Skip to content

Commit f5e8cf5

Browse files
committed
modified constants and configuration file
1 parent ae5bef9 commit f5e8cf5

3 files changed

Lines changed: 18 additions & 39 deletions

File tree

Detectors/Upgrades/ALICE3/FD3/base/include/FD3Base/Constants.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ struct Constants {
4848
static constexpr float etaMax_cher_v2 = 7.0f;
4949
static constexpr float zscint_v2 = 1500.0f;
5050
static constexpr float zcher_v2 = 1560.0f;
51-
52-
// static constexpr float etaMin_scintA_v3 = 2.0f;
53-
// static constexpr float etaMax_scintA_v3 = 5.0f;
54-
// static constexpr float etaMin_scintC_v3 = -4.9f;
55-
// static constexpr float etaMax_scintC_v3 = -2.5f;
56-
// static constexpr float etaMin_cher_v3 = 5.0f;
57-
// static constexpr float etaMax_cher_v3 = 7.0f;
58-
// static constexpr float zscint_v3 = 410.0f;
59-
// static constexpr float zcher_v3 = 1560.0f;
6051
};
6152

6253
} // namespace fd3

Detectors/Upgrades/ALICE3/FD3/base/include/FD3Base/FD3BaseParam.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,8 @@ namespace o2
2222
namespace fd3
2323
{
2424

25-
26-
2725
struct FD3BaseParam : public o2::conf::ConfigurableParamHelper<FD3BaseParam> {
2826

29-
// float zmodAC = 1500.0f;
30-
// float zmodAC_extra = 400.0f;
31-
32-
// float dzscint = 4.0f;
33-
// float dzcher = 4.0f;
34-
35-
// float zscint_v1 = 370.0f;
36-
// float zscint_v2 = 1500.0f;
37-
// float zscint_v3 = 370.0f;
38-
39-
// float zcher_v1 = 430.0f;
40-
// float zcher_v2 = 1560.0f;
41-
// float zcher_v3 = 1560.0f;
42-
43-
// enum FD3GeoVersion {
44-
// v1 = 1, v2, v3
45-
// };
46-
// enum FD3GeoVersion geoVersion = v1;
4727
unsigned int geoVersion = 1; // 1, 2 or 3;
4828

4929
O2ParamDef(FD3BaseParam, "FD3Base");

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ Detector::Detector(bool active)
119119
mTopVolumeNameScint = "barrel";
120120
mTopVolumeNameCher = "cave";
121121
break;
122+
default:
123+
LOG(fatal) << "The version number should be either 1, 2 or 3!";
122124
}
123125

124126
}
@@ -157,6 +159,7 @@ void Detector::InitializeO2Detector()
157159
LOG(info) << "Initialize Forward Detector";
158160
mGeometryTGeo = GeometryTGeo::Instance();
159161
defineSensitiveVolumes();
162+
definePassiveVolumes();
160163
}
161164

162165
bool Detector::ProcessHits(FairVolume* vol)
@@ -353,15 +356,15 @@ void Detector::buildModules()
353356

354357
TGeoVolumeAssembly* Detector::buildModuleScintA()
355358
{
356-
TGeoVolumeAssembly* mod = new TGeoVolumeAssembly("FD3_ScintA");
359+
auto mod = new TGeoVolumeAssembly("FD3_ScintA");
357360

358361
const TGeoMedium* medium = gGeoManager->GetMedium("FD3_Scintillator");
359362

360363
float dphiDeg = 360. / mNumberOfSectors;
361364

362365
for (int ir = 0; ir < mNumberOfRingsScint; ir++) {
363366
std::string rName = "fd3_ring" + std::to_string(ir + 1);
364-
TGeoVolumeAssembly* ring = new TGeoVolumeAssembly(rName.c_str());
367+
auto ring = new TGeoVolumeAssembly(rName.c_str());
365368
float etaMin = mEtaMaxScintA - (ir + 1) * (mEtaMaxScintA - mEtaMinScintA) / mNumberOfRingsScint;
366369
float etaMax = mEtaMaxScintA - ir * (mEtaMaxScintA - mEtaMinScintA) / mNumberOfRingsScint;
367370
float zmod = mZScintA;
@@ -389,15 +392,15 @@ TGeoVolumeAssembly* Detector::buildModuleScintA()
389392

390393
TGeoVolumeAssembly* Detector::buildModuleScintC()
391394
{
392-
TGeoVolumeAssembly* mod = new TGeoVolumeAssembly("FD3_ScintC");
395+
auto mod = new TGeoVolumeAssembly("FD3_ScintC");
393396

394397
const TGeoMedium* medium = gGeoManager->GetMedium("FD3_Scintillator");
395398

396399
float dphiDeg = 360. / mNumberOfSectors;
397400

398401
for (int ir = 0; ir < mNumberOfRingsScint; ir++) {
399402
std::string rName = "fd3_ring" + std::to_string(ir + 1 + mNumberOfRingsScint);
400-
TGeoVolumeAssembly* ring = new TGeoVolumeAssembly(rName.c_str());
403+
auto ring = new TGeoVolumeAssembly(rName.c_str());
401404
float etaMin = mEtaMinScintC + ir * (mEtaMaxScintC - mEtaMinScintC) / mNumberOfRingsScint;
402405
float etaMax = mEtaMinScintC + (ir + 1) * (mEtaMaxScintC - mEtaMinScintC) / mNumberOfRingsScint;
403406
float zmod = mZScintC;
@@ -425,15 +428,15 @@ TGeoVolumeAssembly* Detector::buildModuleScintC()
425428

426429
TGeoVolumeAssembly* Detector::buildModuleCherA()
427430
{
428-
TGeoVolumeAssembly* mod = new TGeoVolumeAssembly("FD3_CherA");
431+
auto mod = new TGeoVolumeAssembly("FD3_CherA");
429432

430433
const TGeoMedium* medium = gGeoManager->GetMedium("FD3_Glass");
431434

432435
float dphiDeg = 360.;// / mNumberOfSectors;
433436

434437
for (int ir = 0; ir < mNumberOfRingsCher; ir++) {
435438
std::string rName = "fd3_ring" + std::to_string(ir + 1 + 2 * mNumberOfRingsScint);
436-
TGeoVolumeAssembly* ring = new TGeoVolumeAssembly(rName.c_str());
439+
auto ring = new TGeoVolumeAssembly(rName.c_str());
437440
float etaMin = mEtaMaxCherA - (ir + 1) * (mEtaMaxCherA - mEtaMinCherA) / mNumberOfRingsCher;
438441
float etaMax = mEtaMaxCherA - ir * (mEtaMaxCherA - mEtaMinCherA) / mNumberOfRingsCher;
439442
float zmod = mZCherA;
@@ -461,15 +464,15 @@ TGeoVolumeAssembly* Detector::buildModuleCherA()
461464

462465
TGeoVolumeAssembly* Detector::buildModuleCherC()
463466
{
464-
TGeoVolumeAssembly* mod = new TGeoVolumeAssembly("FD3_CherC");
467+
auto mod = new TGeoVolumeAssembly("FD3_CherC");
465468

466469
const TGeoMedium* medium = gGeoManager->GetMedium("FD3_Glass");
467470

468471
float dphiDeg = 360.;// / mNumberOfSectors;
469472

470473
for (int ir = 0; ir < mNumberOfRingsCher; ir++) {
471474
std::string rName = "fd3_ring" + std::to_string(ir + 1 + 2 * mNumberOfRingsScint + mNumberOfRingsCher);
472-
TGeoVolumeAssembly* ring = new TGeoVolumeAssembly(rName.c_str());
475+
auto ring = new TGeoVolumeAssembly(rName.c_str());
473476
float etaMin = mEtaMinCherC + ir * (mEtaMaxCherC - mEtaMinCherC) / mNumberOfRingsCher;
474477
float etaMax = mEtaMinCherC + (ir + 1) * (mEtaMaxCherC - mEtaMinCherC) / mNumberOfRingsCher;
475478
float zmod = mZCherC;
@@ -501,18 +504,23 @@ void Detector::defineSensitiveVolumes()
501504

502505
TGeoVolume* v;
503506

504-
int nCells = 2 * (mNumberOfRingsScint + mNumberOfRingsCher) * mNumberOfSectors;
507+
int nCells = 2 * mNumberOfRingsScint * mNumberOfSectors + 2 * mNumberOfRingsCher;
505508

506509
for (int iv = 0; iv < nCells; iv++) {
507510
TString volumeName = "fd3_node" + std::to_string(iv);
508511
v = gGeoManager->GetVolume(volumeName);
509512
//LOG(info) << "Adding sensitive volume " << v->GetName();
510-
LOG(info) << "Adding sensitive volume nr " << iv << " out of " << nCells;
513+
//LOG(info) << "Adding sensitive volume nr " << iv << " out of " << nCells;
511514
AddSensitiveVolume(v);
512515
}
513516

514517
}
515518

519+
void Detector::definePassiveVolumes()
520+
{
521+
// To be added later
522+
}
523+
516524
float Detector::getRingSize(float z, float eta)
517525
{
518526
return z * TMath::Tan(2 * TMath::ATan(TMath::Exp(-eta)));

0 commit comments

Comments
 (0)