Skip to content

Commit e923447

Browse files
committed
A3: Add geometries for IOTOF
1 parent 3e68768 commit e923447

File tree

3 files changed

+56
-20
lines changed

3 files changed

+56
-20
lines changed

Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam>
2525
bool enableOuterTOF = true;
2626
bool enableForwardTOF = true;
2727
bool enableBackwardTOF = true;
28+
std::string detectorPattern = "";
2829

2930
O2ParamDef(IOTOFBaseParam, "IOTOFBase");
3031
};

Detectors/Upgrades/ALICE3/IOTOF/simulation/include/IOTOFSimulation/Detector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Detector : public o2::base::DetImpl<Detector>
6060
return nullptr;
6161
}
6262

63-
void configLayers(bool itof = true, bool otof = true, bool ftof = true, bool btof = true);
63+
void configLayers(bool itof = true, bool otof = true, bool ftof = true, bool btof = true, std::string pattern = "");
6464

6565
void configServices();
6666
void createMaterials();

Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include "IOTOFSimulation/Detector.h"
2121
#include "IOTOFBase/IOTOFBaseParam.h"
2222

23-
using o2::itsmft::Hit;
24-
2523
namespace o2
2624
{
2725
namespace iotof
@@ -40,7 +38,9 @@ Detector::Detector(bool active)
4038
mHits(o2::utils::createSimVector<o2::itsmft::Hit>())
4139
{
4240
auto& iotofPars = IOTOFBaseParam::Instance();
43-
configLayers(iotofPars.enableInnerTOF, iotofPars.enableOuterTOF, iotofPars.enableForwardTOF);
41+
configLayers(iotofPars.enableInnerTOF, iotofPars.enableOuterTOF,
42+
iotofPars.enableForwardTOF, iotofPars.enableBackwardTOF,
43+
iotofPars.detectorPattern);
4444
}
4545

4646
Detector::~Detector()
@@ -56,19 +56,54 @@ void Detector::ConstructGeometry()
5656
createGeometry();
5757
}
5858

59-
void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof)
59+
void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::string pattern)
6060
{
61+
62+
float radiusInnerTof = 19.f;
63+
float radiusOuterTof = 85.f;
64+
float lengthInnerTof = 124.f;
65+
float lengthOuterTof = 680.f;
66+
std::pair<float, float> radiusRangeDiskTof = {15.f, 100.f};
67+
float zForwardTof = 370.f;
68+
if (pattern == "") {
69+
} else if (pattern == "v3b") {
70+
LOG(info) << "Configuring IOTOF layers with v3b pattern";
71+
ftof = false;
72+
btof = false;
73+
} else if (pattern == "v3b1a") {
74+
lengthOuterTof = 500.f;
75+
zForwardTof = 270.f;
76+
radiusRangeDiskTof = {30.f, 100.f};
77+
} else if (pattern == "v3b1b") {
78+
lengthOuterTof = 500.f;
79+
zForwardTof = 200.f;
80+
radiusRangeDiskTof = {20.f, 68.f};
81+
} else if (pattern == "v3b2a") {
82+
lengthOuterTof = 440.f;
83+
zForwardTof = 270.f;
84+
radiusRangeDiskTof = {30.f, 120.f};
85+
} else if (pattern == "v3b2b") {
86+
lengthOuterTof = 440.f;
87+
zForwardTof = 200.f;
88+
radiusRangeDiskTof = {20.f, 68.f};
89+
} else if (pattern == "v3b3") {
90+
lengthOuterTof = 580.f;
91+
zForwardTof = 200.f;
92+
radiusRangeDiskTof = {20.f, 68.f};
93+
} else {
94+
LOG(fatal) << "IOTOF layer pattern " << pattern << " not recognized, exiting";
95+
}
6196
if (itof) {
62-
mITOFLayer = ITOFLayer(std::string{GeometryTGeo::getITOFLayerPattern()}, 19.f, 0.f, 124.f, 0.f, 0.02f, true); // iTOF
97+
mITOFLayer = ITOFLayer(std::string{GeometryTGeo::getITOFLayerPattern()}, radiusInnerTof, 0.f, lengthInnerTof, 0.f, 0.02f, true); // iTOF
6398
}
6499
if (otof) {
65-
mOTOFLayer = OTOFLayer(std::string{GeometryTGeo::getOTOFLayerPattern()}, 85.f, 0.f, 680.f, 0.f, 0.02f, true); // oTOF
100+
mOTOFLayer = OTOFLayer(std::string{GeometryTGeo::getOTOFLayerPattern()}, radiusOuterTof, 0.f, lengthOuterTof, 0.f, 0.02f, true); // oTOF
66101
}
67102
if (ftof) {
68-
mFTOFLayer = FTOFLayer(std::string{GeometryTGeo::getFTOFLayerPattern()}, 15.f, 100.f, 0.f, 370.f, 0.02f, false); // fTOF
103+
mFTOFLayer = FTOFLayer(std::string{GeometryTGeo::getFTOFLayerPattern()}, radiusRangeDiskTof.first, radiusRangeDiskTof.second, 0.f, zForwardTof, 0.02f, false); // fTOF
69104
}
70105
if (btof) {
71-
mBTOFLayer = BTOFLayer(std::string{GeometryTGeo::getBTOFLayerPattern()}, 15.f, 100.f, 0.f, -370.f, 0.02f, false); // bTOF
106+
mBTOFLayer = BTOFLayer(std::string{GeometryTGeo::getBTOFLayerPattern()}, radiusRangeDiskTof.first, radiusRangeDiskTof.second, 0.f, -zForwardTof, 0.02f, false); // bTOF
72107
}
73108
}
74109

@@ -214,28 +249,28 @@ bool Detector::ProcessHits(FairVolume* vol)
214249
bool startHit = false, stopHit = false;
215250
unsigned char status = 0;
216251
if (fMC->IsTrackEntering()) {
217-
status |= Hit::kTrackEntering;
252+
status |= o2::itsmft::Hit::kTrackEntering;
218253
}
219254
if (fMC->IsTrackInside()) {
220-
status |= Hit::kTrackInside;
255+
status |= o2::itsmft::Hit::kTrackInside;
221256
}
222257
if (fMC->IsTrackExiting()) {
223-
status |= Hit::kTrackExiting;
258+
status |= o2::itsmft::Hit::kTrackExiting;
224259
}
225260
if (fMC->IsTrackOut()) {
226-
status |= Hit::kTrackOut;
261+
status |= o2::itsmft::Hit::kTrackOut;
227262
}
228263
if (fMC->IsTrackStop()) {
229-
status |= Hit::kTrackStopped;
264+
status |= o2::itsmft::Hit::kTrackStopped;
230265
}
231266
if (fMC->IsTrackAlive()) {
232-
status |= Hit::kTrackAlive;
267+
status |= o2::itsmft::Hit::kTrackAlive;
233268
}
234269

235270
// track is entering or created in the volume
236-
if ((status & Hit::kTrackEntering) || (status & Hit::kTrackInside && !mTrackData.mHitStarted)) {
271+
if ((status & o2::itsmft::Hit::kTrackEntering) || (status & o2::itsmft::Hit::kTrackInside && !mTrackData.mHitStarted)) {
237272
startHit = true;
238-
} else if ((status & (Hit::kTrackExiting | Hit::kTrackOut | Hit::kTrackStopped))) {
273+
} else if ((status & (o2::itsmft::Hit::kTrackExiting | o2::itsmft::Hit::kTrackOut | o2::itsmft::Hit::kTrackStopped))) {
239274
stopHit = true;
240275
}
241276

@@ -264,9 +299,9 @@ bool Detector::ProcessHits(FairVolume* vol)
264299
fMC->CurrentVolOffID(3, halfstave);
265300
fMC->CurrentVolOffID(4, stave);
266301

267-
Hit* p = addHit(stack->GetCurrentTrackNumber(), lay, mTrackData.mPositionStart.Vect(), positionStop.Vect(),
268-
mTrackData.mMomentumStart.Vect(), mTrackData.mMomentumStart.E(), positionStop.T(),
269-
mTrackData.mEnergyLoss, mTrackData.mTrkStatusStart, status);
302+
o2::itsmft::Hit* p = addHit(stack->GetCurrentTrackNumber(), lay, mTrackData.mPositionStart.Vect(), positionStop.Vect(),
303+
mTrackData.mMomentumStart.Vect(), mTrackData.mMomentumStart.E(), positionStop.T(),
304+
mTrackData.mEnergyLoss, mTrackData.mTrkStatusStart, status);
270305

271306
// RS: not sure this is needed
272307
// Increment number of Detector det points in TParticle

0 commit comments

Comments
 (0)