Skip to content

Commit 3dfca81

Browse files
authored
ALICE 3: Add iTOF, oTOF, fTOF and bTOF geometry proposal (#11854)
* ALICE3: Add inner and outer TOF * Plug iTOF and oTOF in simulation for run5 * Add forward and backward TOFs * Resize ALICE 3 beampipe
1 parent e5b4dac commit 3dfca81

File tree

23 files changed

+1015
-23
lines changed

23 files changed

+1015
-23
lines changed

Common/SimConfig/src/SimConfig.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
7474
if (activeModules[0] != "all") {
7575
if (mIsRun5) {
7676
for (int i = 0; i < activeModules.size(); ++i) {
77-
if (activeModules[i] != "IT3" && activeModules[i] != "TRK" && activeModules[i] != "FT3" && activeModules[i] != "FCT" && activeModules[i] != "A3IP") {
77+
if (activeModules[i] != "IT3" && activeModules[i] != "TRK" && activeModules[i] != "FT3" && activeModules[i] != "FCT" && activeModules[i] != "A3IP" && activeModules[i] != "TF3") {
7878
LOGP(fatal, "List of active modules contains {}, which is not a run 5 module", activeModules[i]);
7979
}
8080
}
8181
}
8282
if (!mIsRun5) {
8383
for (int i = 0; i < activeModules.size(); ++i) {
84-
if (activeModules[i] == "TRK" || activeModules[i] == "FT3" || activeModules[i] == "FCT" || activeModules[i] == "A3IP") {
84+
if (activeModules[i] == "TRK" || activeModules[i] == "FT3" || activeModules[i] == "FCT" || activeModules[i] == "A3IP" && activeModules[i] == "TF3") {
8585
LOGP(fatal, "List of active modules contains {}, which is not a run 3 module", activeModules[i]);
8686
}
8787
}
@@ -93,7 +93,7 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
9393
#ifdef ENABLE_UPGRADES
9494
if (mIsRun5) {
9595
for (int d = DetID::First; d <= DetID::Last; ++d) {
96-
if (d == DetID::TRK || d == DetID::FT3 || d == DetID::FCT) {
96+
if (d == DetID::TRK || d == DetID::FT3 || d == DetID::FCT || d == DetID::TF3) {
9797
activeModules.emplace_back(DetID::getName(d));
9898
}
9999
}
@@ -112,7 +112,7 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
112112
activeModules.emplace_back("SHIL");
113113
for (int d = DetID::First; d <= DetID::Last; ++d) {
114114
#ifdef ENABLE_UPGRADES
115-
if (d != DetID::IT3 && d != DetID::TRK && d != DetID::FT3 && d != DetID::FCT) {
115+
if (d != DetID::IT3 && d != DetID::TRK && d != DetID::FT3 && d != DetID::FCT && d != DetID::TF3) {
116116
activeModules.emplace_back(DetID::getName(d));
117117
}
118118
}

DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/DetID.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ class DetID
8383
static constexpr ID TRK = 19;
8484
static constexpr ID FT3 = 20;
8585
static constexpr ID FCT = 21;
86-
static constexpr ID Last = FCT;
86+
static constexpr ID TF3 = 22;
87+
static constexpr ID Last = TF3;
8788
#else
8889
static constexpr ID Last = FOC; ///< if extra detectors added, update this !!!
8990
#endif
@@ -177,7 +178,7 @@ class DetID
177178
// detector names, will be defined in DataSources
178179
static constexpr const char* sDetNames[nDetectors + 1] = ///< defined detector names
179180
#ifdef ENABLE_UPGRADES
180-
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", "IT3", "TRK", "FT3", "FCT", nullptr};
181+
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", "IT3", "TRK", "FT3", "FCT", "TF3", nullptr};
181182
#else
182183
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", nullptr};
183184
#endif
@@ -208,7 +209,7 @@ GPUconstexpr() DetID::mask_t sMasks[DetID::nDetectors] = ///< detectot masks
208209
DetID::mask_t(math_utils::bit2Mask(DetID::TST)), DetID::mask_t(math_utils::bit2Mask(DetID::CTP)), DetID::mask_t(math_utils::bit2Mask(DetID::FOC))
209210
#ifdef ENABLE_UPGRADES
210211
,
211-
DetID::mask_t(math_utils::bit2Mask(DetID::IT3)), DetID::mask_t(math_utils::bit2Mask(DetID::TRK)), DetID::mask_t(math_utils::bit2Mask(DetID::FT3)), DetID::mask_t(math_utils::bit2Mask(DetID::FCT))
212+
DetID::mask_t(math_utils::bit2Mask(DetID::IT3)), DetID::mask_t(math_utils::bit2Mask(DetID::TRK)), DetID::mask_t(math_utils::bit2Mask(DetID::FT3)), DetID::mask_t(math_utils::bit2Mask(DetID::FCT)), DetID::mask_t(math_utils::bit2Mask(DetID::TF3))
212213
#endif
213214
};
214215
} // namespace detid_internal

Detectors/Upgrades/ALICE3/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ add_subdirectory(TRK)
1414
add_subdirectory(FT3)
1515
add_subdirectory(FCT)
1616
add_subdirectory(AOD)
17+
add_subdirectory(IOTOF)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
add_subdirectory(base)
13+
add_subdirectory(simulation)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
o2_add_library(IOTOFBase
13+
SOURCES src/GeometryTGeo.cxx
14+
src/IOTOFBaseParam.cxx
15+
PUBLIC_LINK_LIBRARIES O2::DetectorsBase)
16+
17+
o2_target_root_dictionary(IOTOFBase
18+
HEADERS include/IOTOFBase/GeometryTGeo.h
19+
include/IOTOFBase/IOTOFBaseParam.h)
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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>
16+
#include <DetectorsCommonDataFormats/DetMatrixCache.h>
17+
18+
namespace o2
19+
{
20+
namespace iotof
21+
{
22+
class GeometryTGeo : public o2::detectors::DetMatrixCache
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* getITOFChipPattern() { return sITOFChipName.c_str(); }
36+
static const char* getITOFSensorPattern() { return sITOFSensorName.c_str(); }
37+
38+
// Outer TOF
39+
static const char* getOTOFLayerPattern() { return sOTOFLayerName.c_str(); }
40+
static const char* getOTOFChipPattern() { return sOTOFChipName.c_str(); }
41+
static const char* getOTOFSensorPattern() { return sOTOFSensorName.c_str(); }
42+
43+
// Forward TOF
44+
static const char* getFTOFLayerPattern() { return sFTOFLayerName.c_str(); }
45+
static const char* getFTOFChipPattern() { return sFTOFChipName.c_str(); }
46+
static const char* getFTOFSensorPattern() { return sFTOFSensorName.c_str(); }
47+
48+
// Backward TOF
49+
static const char* getBTOFLayerPattern() { return sBTOFLayerName.c_str(); }
50+
static const char* getBTOFChipPattern() { return sBTOFChipName.c_str(); }
51+
static const char* getBTOFSensorPattern() { return sBTOFSensorName.c_str(); }
52+
53+
static const char* composeSymNameIOTOF(int d)
54+
{
55+
return Form("%s_%d", o2::detectors::DetID(o2::detectors::DetID::TF3).getName(), d);
56+
}
57+
58+
// Inner TOF
59+
static const char* composeITOFSymNameLayer(int d, int layer);
60+
static const char* composeITOFSymNameChip(int d, int lr);
61+
static const char* composeITOFSymNameSensor(int d, int layer);
62+
63+
// Outer TOF
64+
static const char* composeOTOFSymNameLayer(int d, int layer);
65+
static const char* composeOTOFSymNameChip(int d, int lr);
66+
static const char* composeOTOFSymNameSensor(int d, int layer);
67+
68+
// Forward TOF
69+
static const char* composeFTOFSymNameLayer(int d, int layer);
70+
static const char* composeFTOFSymNameChip(int d, int lr);
71+
static const char* composeFTOFSymNameSensor(int d, int layer);
72+
73+
// Backward TOF
74+
static const char* composeBTOFSymNameLayer(int d, int layer);
75+
static const char* composeBTOFSymNameChip(int d, int lr);
76+
static const char* composeBTOFSymNameSensor(int d, int layer);
77+
78+
protected:
79+
// i/oTOF mother volume
80+
static std::string sIOTOFVolumeName;
81+
82+
// Inner TOF
83+
static std::string sITOFLayerName;
84+
static std::string sITOFChipName;
85+
static std::string sITOFSensorName;
86+
87+
// Outer TOF
88+
static std::string sOTOFLayerName;
89+
static std::string sOTOFChipName;
90+
static std::string sOTOFSensorName;
91+
92+
// Forward TOF
93+
static std::string sFTOFLayerName;
94+
static std::string sFTOFChipName;
95+
static std::string sFTOFSensorName;
96+
97+
// Backward TOF
98+
static std::string sBTOFLayerName;
99+
static std::string sBTOFChipName;
100+
static std::string sBTOFSensorName;
101+
102+
private:
103+
static std::unique_ptr<o2::iotof::GeometryTGeo> sInstance;
104+
};
105+
106+
} // namespace iotof
107+
} // namespace o2
108+
#endif
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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 O2_IOTOF_BASEPARAM_H
13+
#define O2_IOTOF_BASEPARAM_H
14+
15+
#include "CommonUtils/ConfigurableParam.h"
16+
#include "CommonUtils/ConfigurableParamHelper.h"
17+
18+
namespace o2
19+
{
20+
namespace iotof
21+
{
22+
23+
struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam> {
24+
bool enableInnerTOF = true;
25+
bool enableOuterTOF = true;
26+
bool enableForwardTOF = true;
27+
bool enableBackwardTOF = true;
28+
29+
O2ParamDef(IOTOFBaseParam, "IOTOFBase");
30+
};
31+
32+
} // namespace iotof
33+
} // end namespace o2
34+
35+
#endif
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
#include <IOTOFBase/GeometryTGeo.h>
13+
#include <TGeoManager.h>
14+
15+
namespace o2
16+
{
17+
namespace iotof
18+
{
19+
std::unique_ptr<o2::iotof::GeometryTGeo> GeometryTGeo::sInstance;
20+
21+
// Common i/oTOF
22+
std::string GeometryTGeo::sIOTOFVolumeName = "IOTOFV";
23+
24+
// Inner TOF
25+
std::string GeometryTGeo::sITOFLayerName = "ITOFLayer";
26+
std::string GeometryTGeo::sITOFChipName = "ITOFChip";
27+
std::string GeometryTGeo::sITOFSensorName = "ITOFSensor";
28+
29+
// Outer TOF
30+
std::string GeometryTGeo::sOTOFLayerName = "OTOFLayer";
31+
std::string GeometryTGeo::sOTOFChipName = "OTOFChip";
32+
std::string GeometryTGeo::sOTOFSensorName = "OTOFSensor";
33+
34+
// Forward TOF
35+
std::string GeometryTGeo::sFTOFLayerName = "FTOFLayer";
36+
std::string GeometryTGeo::sFTOFChipName = "FTOFChip";
37+
std::string GeometryTGeo::sFTOFSensorName = "FTOFSensor";
38+
39+
// Backward TOF
40+
std::string GeometryTGeo::sBTOFLayerName = "BTOFLayer";
41+
std::string GeometryTGeo::sBTOFChipName = "BTOFChip";
42+
std::string GeometryTGeo::sBTOFSensorName = "BTOFSensor";
43+
44+
GeometryTGeo::GeometryTGeo(bool build, int loadTrans) : DetMatrixCache()
45+
{
46+
if (sInstance) {
47+
LOGP(fatal, "Invalid use of public constructor: o2::iotof::GeometryTGeo instance exists");
48+
}
49+
if (build) {
50+
Build(loadTrans);
51+
}
52+
}
53+
54+
void GeometryTGeo::Build(int loadTrans)
55+
{
56+
if (isBuilt()) {
57+
LOGP(warning, "Already built");
58+
return; // already initialized
59+
}
60+
61+
if (!gGeoManager) {
62+
LOGP(fatal, "Geometry is not loaded");
63+
}
64+
65+
fillMatrixCache(loadTrans);
66+
}
67+
68+
void GeometryTGeo::fillMatrixCache(int mask)
69+
{
70+
}
71+
72+
GeometryTGeo* GeometryTGeo::Instance()
73+
{
74+
if (!sInstance) {
75+
sInstance = std::unique_ptr<GeometryTGeo>(new GeometryTGeo(true, 0));
76+
}
77+
return sInstance.get();
78+
}
79+
80+
} // namespace iotof
81+
} // namespace o2
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
#ifdef __CLING__
13+
14+
#pragma link off all globals;
15+
#pragma link off all classes;
16+
#pragma link off all functions;
17+
18+
#pragma link C++ class o2::iotof::GeometryTGeo +
19+
#pragma link C++ class o2::iotof::IOTOFBaseParam + ;
20+
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::iotof::IOTOFBaseParam> + ;
21+
22+
#endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
#include "IOTOFBase/IOTOFBaseParam.h"
13+
14+
O2ParamImpl(o2::iotof::IOTOFBaseParam);

0 commit comments

Comments
 (0)