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, double 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 double GetCPVAngle(Int_t index) const { return mCPVAngle[index - 1]; }
53
54 void GetModuleCenter(int module, double* 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 double GetCPVPadSizePhi() const { return mCPVPadSizePhi; }
65 double GetCPVPadSizeZ() const { return mCPVPadSizeZ; }
66 double GetCPVBoxSize(int index) const { return mCPVBoxSize[index]; }
67 double GetCPVActiveSize(int index) const { return mCPVActiveSize[index]; }
68 int GetNumberOfCPVChipsPhi() const { return mNumberOfCPVChipsPhi; }
69 int GetNumberOfCPVChipsZ() const { return mNumberOfCPVChipsZ; }
70 double GetGassiplexChipSize(int index) const { return mGassiplexChipSize[index]; }
71 double GetCPVGasThickness() const { return mCPVGasThickness; }
72 double GetCPVTextoliteThickness() const { return mCPVTextoliteThickness; }
73 double GetCPVCuNiFoilThickness() const { return mCPVCuNiFoilThickness; }
74 double GetFTPosition(int index) const { return mFTPosition[index]; }
75 double 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 double mCPVPadSizePhi; // CPV pad size in phi
90 double mCPVPadSizeZ; // CPV pad size in z
91 double mCPVBoxSize[3]; // Outer size of CPV box
92 double 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 double mGassiplexChipSize[3]; // Size of a Gassiplex chip (0 - in z, 1 - in phi, 2 - thickness (in ALICE radius))
96 double mCPVGasThickness; // Thickness of CPV gas volume
97 double mCPVTextoliteThickness; // Thickness of CPV textolite PCB (without moil)
98 double mCPVCuNiFoilThickness; // Thickness of CPV Copper-Nickel moil of PCB
99 double mFTPosition[4]; // Positions of the 4 PCB vs the CPV box center
100 double mCPVFrameSize[3]; // CPV frame size (0 - in phi, 1 - in z, 2 - thickness (along ALICE radius))
101 double mIPtoCPVSurface; // Distance from IP to CPV front cover
102 double mModuleAngle[5][3][2]; // Orientation angles of CPV modules
103 double mCPVAngle[5]; // Direction to the center of CPV modules in phi
104 double mModuleCenter[5][3]; // Coordunates of modules centra in ALICE system
105 ClassDefOverride(GeometryParams, 2);
106};
107} // namespace cpv
108} // namespace o2
109#endif
int32_t i
uint16_t pos
Definition RawData.h:3
void GetModuleCenter(int module, double *pos) const
double GetCPVFrameSize(int index) const
double GetCPVGasThickness() const
int GetNumberOfCPVPadsZ() const
static GeometryParams * GetInstance(const std::string_view name="CPVRun3Params")
Get singleton (create if necessary)
void GetModuleAngle(int module, double angle[3][2]) const
int GetNumberOfCPVChipsZ() const
~GeometryParams() final=default
Destructor.
double GetCPVPadSizePhi() const
double GetGassiplexChipSize(int index) const
double GetFTPosition(int index) const
double GetCPVTextoliteThickness() const
double GetCPVActiveSize(int index) const
int GetNumberOfCPVPadsPhi() const
double GetCPVBoxSize(int index) const
double GetCPVAngle(Int_t index) const
int GetNumberOfCPVChipsPhi() const
double GetCPVCuNiFoilThickness() const
GeometryParams()=default
Default constructor.
double GetCPVPadSizeZ() 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 ...