Project
Loading...
Searching...
No Matches
GeometryTGeo.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_IOTOF_GEOMETRYTGEO_H
13#define ALICEO2_IOTOF_GEOMETRYTGEO_H
14
15#include <memory>
17
18namespace o2
19{
20namespace iotof
21{
23{
24 public:
25 GeometryTGeo(bool build = false, int loadTrans = 0);
26 void Build(int loadTrans);
27 void fillMatrixCache(int mask);
28 static GeometryTGeo* Instance();
29
30 // Common i/o/f/bTOF
31 static const char* getIOTOFVolPattern() { return sIOTOFVolumeName.c_str(); }
32
33 // Inner TOF
34 static const char* getITOFLayerPattern() { return sITOFLayerName.c_str(); }
35 static const char* getITOFStavePattern() { return sITOFStaveName.c_str(); }
36 static const char* getITOFModulePattern() { return sITOFModuleName.c_str(); }
37 static const char* getITOFChipPattern() { return sITOFChipName.c_str(); }
38 static const char* getITOFSensorPattern() { return sITOFSensorName.c_str(); }
39
40 // Outer TOF
41 static const char* getOTOFLayerPattern() { return sOTOFLayerName.c_str(); }
42 static const char* getOTOFStavePattern() { return sOTOFStaveName.c_str(); }
43 static const char* getOTOFModulePattern() { return sOTOFModuleName.c_str(); }
44 static const char* getOTOFChipPattern() { return sOTOFChipName.c_str(); }
45 static const char* getOTOFSensorPattern() { return sOTOFSensorName.c_str(); }
46
47 // Forward TOF
48 static const char* getFTOFLayerPattern() { return sFTOFLayerName.c_str(); }
49 static const char* getFTOFChipPattern() { return sFTOFChipName.c_str(); }
50 static const char* getFTOFSensorPattern() { return sFTOFSensorName.c_str(); }
51
52 // Backward TOF
53 static const char* getBTOFLayerPattern() { return sBTOFLayerName.c_str(); }
54 static const char* getBTOFChipPattern() { return sBTOFChipName.c_str(); }
55 static const char* getBTOFSensorPattern() { return sBTOFSensorName.c_str(); }
56
57 static const char* composeSymNameIOTOF(int d)
58 {
59 return Form("%s_%d", o2::detectors::DetID(o2::detectors::DetID::TF3).getName(), d);
60 }
61
62 // Inner TOF
63 static const char* composeITOFSymNameLayer(int d, int layer);
64 static const char* composeITOFSymNameChip(int d, int lr);
65 static const char* composeITOFSymNameSensor(int d, int layer);
66
67 // Outer TOF
68 static const char* composeOTOFSymNameLayer(int d, int layer);
69 static const char* composeOTOFSymNameChip(int d, int lr);
70 static const char* composeOTOFSymNameSensor(int d, int layer);
71
72 // Forward TOF
73 static const char* composeFTOFSymNameLayer(int d, int layer);
74 static const char* composeFTOFSymNameChip(int d, int lr);
75 static const char* composeFTOFSymNameSensor(int d, int layer);
76
77 // Backward TOF
78 static const char* composeBTOFSymNameLayer(int d, int layer);
79 static const char* composeBTOFSymNameChip(int d, int lr);
80 static const char* composeBTOFSymNameSensor(int d, int layer);
81
82 protected:
83 // i/oTOF mother volume
84 static std::string sIOTOFVolumeName;
85
86 // Inner TOF
87 static std::string sITOFLayerName;
88 static std::string sITOFStaveName;
89 static std::string sITOFModuleName;
90 static std::string sITOFChipName;
91 static std::string sITOFSensorName;
92
93 // Outer TOF
94 static std::string sOTOFLayerName;
95 static std::string sOTOFStaveName;
96 static std::string sOTOFModuleName;
97 static std::string sOTOFChipName;
98 static std::string sOTOFSensorName;
99
100 // Forward TOF
101 static std::string sFTOFLayerName;
102 static std::string sFTOFChipName;
103 static std::string sFTOFSensorName;
104
105 // Backward TOF
106 static std::string sBTOFLayerName;
107 static std::string sBTOFChipName;
108 static std::string sBTOFSensorName;
109
110 private:
111 static std::unique_ptr<o2::iotof::GeometryTGeo> sInstance;
112};
113
114} // namespace iotof
115} // namespace o2
116#endif
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
const char * getName() const
static const char * getITOFChipPattern()
static std::string sFTOFSensorName
static const char * composeOTOFSymNameSensor(int d, int layer)
static const char * getFTOFLayerPattern()
static std::string sOTOFLayerName
static const char * getIOTOFVolPattern()
static const char * getOTOFLayerPattern()
static const char * getFTOFSensorPattern()
static const char * getFTOFChipPattern()
static const char * getBTOFChipPattern()
static const char * getOTOFModulePattern()
static std::string sOTOFSensorName
static std::string sIOTOFVolumeName
static const char * getITOFModulePattern()
static const char * composeBTOFSymNameLayer(int d, int layer)
void fillMatrixCache(int mask)
static const char * getOTOFSensorPattern()
static std::string sITOFStaveName
static const char * composeFTOFSymNameSensor(int d, int layer)
static std::string sFTOFChipName
static const char * composeBTOFSymNameSensor(int d, int layer)
static const char * composeFTOFSymNameChip(int d, int lr)
static std::string sOTOFChipName
static const char * composeITOFSymNameLayer(int d, int layer)
static std::string sITOFModuleName
static const char * composeFTOFSymNameLayer(int d, int layer)
static const char * getITOFStavePattern()
static std::string sFTOFLayerName
static const char * getITOFSensorPattern()
static const char * getOTOFStavePattern()
static std::string sBTOFSensorName
static const char * composeOTOFSymNameChip(int d, int lr)
static std::string sBTOFChipName
static const char * getOTOFChipPattern()
static const char * composeITOFSymNameSensor(int d, int layer)
static const char * getBTOFLayerPattern()
static std::string sITOFChipName
void Build(int loadTrans)
static std::string sOTOFModuleName
static const char * composeOTOFSymNameLayer(int d, int layer)
static std::string sOTOFStaveName
static std::string sITOFSensorName
static GeometryTGeo * Instance()
static const char * getITOFLayerPattern()
static std::string sITOFLayerName
static std::string sBTOFLayerName
static const char * composeITOFSymNameChip(int d, int lr)
static const char * composeSymNameIOTOF(int d)
static const char * getBTOFSensorPattern()
static const char * composeBTOFSymNameChip(int d, int lr)
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLint GLuint mask
Definition glcorearb.h:291
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...