From ef0c566f3bb65ba6117572988065c7d345cb3c4e Mon Sep 17 00:00:00 2001 From: Andreas Morsch Date: Sun, 13 Dec 2020 18:09:58 +0100 Subject: [PATCH 1/3] TPC drift gas settings in case FLUKA is used --- Detectors/TPC/simulation/src/Detector.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Detectors/TPC/simulation/src/Detector.cxx b/Detectors/TPC/simulation/src/Detector.cxx index 41e08eb6d9f77..53bb48aa8cc16 100644 --- a/Detectors/TPC/simulation/src/Detector.cxx +++ b/Detectors/TPC/simulation/src/Detector.cxx @@ -8,6 +8,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +#include "DetectorsBase/MaterialManager.h" #include "TPCSimulation/Detector.h" #include "TPCSimulation/Point.h" #include "TPCBase/ParameterGas.h" @@ -3078,6 +3079,18 @@ void Detector::defineSensitiveVolumes() // set volume sentive AddSensitiveVolume(v); } + // + // Special sensitive volue parameters in case FKUKA is used as transport engine + auto vmc = TVirtualMC::GetMC(); + if (strcmp(vmc->GetName(), "TFluka") == 0) { + printf("Setting special FLUKA parameters for TPC Driftgas \n"); + auto& mgr = o2::base::MaterialManager::Instance(); + Int_t index = mgr.getMediumID("TPC", kDriftGas2); + vmc->Gstpar(index, "PRIMIO_E", 20.77); + vmc->Gstpar(index, "PRIMIO_N", 14.35); + vmc->Gstpar(index, "LOSS", 14); + vmc->Gstpar(index, "STRA", 4); + } } Double_t Detector::Gamma(Double_t k) From 66dcf1d1c416b031ba7b8282981bfc0fb569bb31 Mon Sep 17 00:00:00 2001 From: Andreas Morsch Date: Sun, 13 Dec 2020 18:18:49 +0100 Subject: [PATCH 2/3] style correction --- Detectors/TPC/simulation/src/Detector.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detectors/TPC/simulation/src/Detector.cxx b/Detectors/TPC/simulation/src/Detector.cxx index 53bb48aa8cc16..eaa7357609f3a 100644 --- a/Detectors/TPC/simulation/src/Detector.cxx +++ b/Detectors/TPC/simulation/src/Detector.cxx @@ -3089,7 +3089,7 @@ void Detector::defineSensitiveVolumes() vmc->Gstpar(index, "PRIMIO_E", 20.77); vmc->Gstpar(index, "PRIMIO_N", 14.35); vmc->Gstpar(index, "LOSS", 14); - vmc->Gstpar(index, "STRA", 4); + vmc->Gstpar(index, "STRA", 4); } } From 1ecd7fa6710876f71b46f233984d1b2466db1edc Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Mon, 14 Dec 2020 08:32:33 +0100 Subject: [PATCH 3/3] Update Detector.cxx fix typos --- Detectors/TPC/simulation/src/Detector.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Detectors/TPC/simulation/src/Detector.cxx b/Detectors/TPC/simulation/src/Detector.cxx index eaa7357609f3a..7e49887f8ede7 100644 --- a/Detectors/TPC/simulation/src/Detector.cxx +++ b/Detectors/TPC/simulation/src/Detector.cxx @@ -3079,11 +3079,11 @@ void Detector::defineSensitiveVolumes() // set volume sentive AddSensitiveVolume(v); } - // - // Special sensitive volue parameters in case FKUKA is used as transport engine + + // Special sensitive volume parameters in case FLUKA is used as transport engine auto vmc = TVirtualMC::GetMC(); if (strcmp(vmc->GetName(), "TFluka") == 0) { - printf("Setting special FLUKA parameters for TPC Driftgas \n"); + LOG(INFO) << "Setting special FLUKA parameters for TPC Driftgas"; auto& mgr = o2::base::MaterialManager::Instance(); Int_t index = mgr.getMediumID("TPC", kDriftGas2); vmc->Gstpar(index, "PRIMIO_E", 20.77);