Skip to content

Commit e558770

Browse files
authored
TPC drift gas settings in case FLUKA is used (#5059)
* TPC drift gas settings in case FLUKA is used
1 parent 6fc0585 commit e558770

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Detectors/TPC/simulation/src/Detector.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// granted to it by virtue of its status as an Intergovernmental Organization
99
// or submit itself to any jurisdiction.
1010

11+
#include "DetectorsBase/MaterialManager.h"
1112
#include "TPCSimulation/Detector.h"
1213
#include "TPCSimulation/Point.h"
1314
#include "TPCBase/ParameterGas.h"
@@ -3078,6 +3079,18 @@ void Detector::defineSensitiveVolumes()
30783079
// set volume sentive
30793080
AddSensitiveVolume(v);
30803081
}
3082+
3083+
// Special sensitive volume parameters in case FLUKA is used as transport engine
3084+
auto vmc = TVirtualMC::GetMC();
3085+
if (strcmp(vmc->GetName(), "TFluka") == 0) {
3086+
LOG(INFO) << "Setting special FLUKA parameters for TPC Driftgas";
3087+
auto& mgr = o2::base::MaterialManager::Instance();
3088+
Int_t index = mgr.getMediumID("TPC", kDriftGas2);
3089+
vmc->Gstpar(index, "PRIMIO_E", 20.77);
3090+
vmc->Gstpar(index, "PRIMIO_N", 14.35);
3091+
vmc->Gstpar(index, "LOSS", 14);
3092+
vmc->Gstpar(index, "STRA", 4);
3093+
}
30813094
}
30823095

30833096
Double_t Detector::Gamma(Double_t k)

0 commit comments

Comments
 (0)