Project
Loading...
Searching...
No Matches
GeometryParams.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_CPV_GEOMETRYPARAMS_H_
13#define ALICEO2_CPV_GEOMETRYPARAMS_H_
14
15#include <string>
16
17#include <RStringView.h>
18#include <TNamed.h>
19//#include <TVector3.h>
20
21namespace o2
22{
23namespace cpv
24{
25class GeometryParams final : public TNamed
26{
27 public:
29 GeometryParams() = default;
30
32 ~GeometryParams() final = default;
33
35 static GeometryParams* GetInstance(const std::string_view name = "CPVRun3Params")
36 {
37 if (!sGeomParam) {
38 sGeomParam = new GeometryParams(name);
39 }
40 return sGeomParam;
41 }
42
43 void GetModuleAngle(int module, float angle[3][2]) const
44 {
45 for (int i = 0; i < 3; i++) {
46 for (int ian = 0; ian < 2; ian++) {
47 angle[i][ian] = mModuleAngle[module][i][ian];
48 }
49 }
50 }
51
52 float GetCPVAngle(Int_t index) const { return mCPVAngle[index - 1]; }
53
54 void GetModuleCenter(int module, float* pos) const
55 {
56 for (int i = 0; i < 3; i++) {
57 pos[i] = mModuleCenter[module][i];
58 }
59 }
60
61 int GetNModules() const { return mNModules; }
62 int GetNumberOfCPVPadsPhi() const { return mNumberOfCPVPadsPhi; }
63 int GetNumberOfCPVPadsZ() const { return mNumberOfCPVPadsZ; }
64 float GetCPVPadSizePhi() const { return mCPVPadSizePhi; }
65 float GetCPVPadSizeZ() const { return mCPVPadSizeZ; }
66 float GetCPVBoxSize(int index) const { return mCPVBoxSize[index]; }
67 float GetCPVActiveSize(int index) const { return mCPVActiveSize[index]; }
68 int GetNumberOfCPVChipsPhi() const { return mNumberOfCPVChipsPhi; }
69 int GetNumberOfCPVChipsZ() const { return mNumberOfCPVChipsZ; }
70 float GetGassiplexChipSize(int index) const { return mGassiplexChipSize[index]; }
71 float GetCPVGasThickness() const { return mCPVGasThickness; }
72 float GetCPVTextoliteThickness() const { return mCPVTextoliteThickness; }
73 float GetCPVCuNiFoilThickness() const { return mCPVCuNiFoilThickness; }
74 float GetFTPosition(int index) const { return mFTPosition[index]; }
75 float GetCPVFrameSize(int index) const { return mCPVFrameSize[index]; }
76
77 private:
82 GeometryParams(const std::string_view name);
83
84 static GeometryParams* sGeomParam;
85
86 int mNModules; // Number of CPV modules
87 int mNumberOfCPVPadsPhi; // Number of CPV pads in phi
88 int mNumberOfCPVPadsZ; // Number of CPV pads in z
89 float mCPVPadSizePhi; // CPV pad size in phi
90 float mCPVPadSizeZ; // CPV pad size in z
91 float mCPVBoxSize[3]; // Outer size of CPV box
92 float mCPVActiveSize[2]; // Active size of CPV box (x,z)
93 int mNumberOfCPVChipsPhi; // Number of CPV Gassiplex chips in phi
94 int mNumberOfCPVChipsZ; // Number of CPV Gassiplex chips in z
95 float mGassiplexChipSize[3]; // Size of a Gassiplex chip (0 - in z, 1 - in phi, 2 - thickness (in ALICE radius))
96 float mCPVGasThickness; // Thickness of CPV gas volume
97 float mCPVTextoliteThickness; // Thickness of CPV textolite PCB (without moil)
98 float mCPVCuNiFoilThickness; // Thickness of CPV Copper-Nickel moil of PCB
99 float mFTPosition[4]; // Positions of the 4 PCB vs the CPV box center
100 float mCPVFrameSize[3]; // CPV frame size (0 - in phi, 1 - in z, 2 - thickness (along ALICE radius))
101 float mIPtoCPVSurface; // Distance from IP to CPV front cover
102 float mModuleAngle[5][3][2]; // Orientation angles of CPV modules
103 float mCPVAngle[5]; // Direction to the center of CPV modules in phi
104 float mModuleCenter[5][3]; // Coordunates of modules centra in ALICE system
105 ClassDefOverride(GeometryParams, 1);
106};
107} // namespace cpv
108} // namespace o2
109#endif
int32_t i
uint16_t pos
Definition RawData.h:3
int GetNumberOfCPVPadsZ() const
float GetCPVAngle(Int_t index) const
static GeometryParams * GetInstance(const std::string_view name="CPVRun3Params")
Get singleton (create if necessary)
float GetCPVFrameSize(int index) const
float GetCPVPadSizePhi() const
int GetNumberOfCPVChipsZ() const
float GetCPVGasThickness() const
~GeometryParams() final=default
Destructor.
float GetFTPosition(int index) const
void GetModuleCenter(int module, float *pos) const
float GetCPVPadSizeZ() const
void GetModuleAngle(int module, float angle[3][2]) const
float GetCPVActiveSize(int index) const
float GetGassiplexChipSize(int index) const
int GetNumberOfCPVPadsPhi() const
float GetCPVTextoliteThickness() const
int GetNumberOfCPVChipsPhi() const
GeometryParams()=default
Default constructor.
float GetCPVCuNiFoilThickness() const
float GetCPVBoxSize(int index) const
GLuint index
Definition glcorearb.h:781
GLuint const GLchar * name
Definition glcorearb.h:781
GLfloat angle
Definition glcorearb.h:4071
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.