diff --git a/DetectorDescription/FaserDetDescr/FaserDetDescr/FaserRegion.h b/DetectorDescription/FaserDetDescr/FaserDetDescr/FaserRegion.h index fdefad244797c043e1d6048dd0e4e416c60fba7f..86b9324d943ef75f1eea2d2c45eaf8521981be5e 100644 --- a/DetectorDescription/FaserDetDescr/FaserDetDescr/FaserRegion.h +++ b/DetectorDescription/FaserDetDescr/FaserDetDescr/FaserRegion.h @@ -35,8 +35,9 @@ namespace FaserDetDescr { fFaserDipole = 4, // this means in the metal of the magnet, not the bore fFaserCalorimeter = 5, fFaserCavern = 6, + fFaserTrench = 7, // i.e. the concrete around the trench // number of defined GeoIDs - fNumFaserRegions = 7 + fNumFaserRegions = 8 }; } // end of namespace diff --git a/DetectorDescription/FaserDetDescr/src/FaserRegionHelper.cxx b/DetectorDescription/FaserDetDescr/src/FaserRegionHelper.cxx index 35362e28494447026cb03495568f67bc8a1066ed..b2af1fbef778f1fc224dd09417eb90a350c6d60b 100644 --- a/DetectorDescription/FaserDetDescr/src/FaserRegionHelper.cxx +++ b/DetectorDescription/FaserDetDescr/src/FaserRegionHelper.cxx @@ -22,6 +22,7 @@ namespace FaserDetDescr { else if ( region == FaserDetDescr::fFaserCalorimeter ) return "FaserCalo"; else if ( region == FaserDetDescr::fFaserNeutrino ) return "FaserNeutrino"; else if ( region == FaserDetDescr::fFaserCavern ) return "FaserCavern"; + else if ( region == FaserDetDescr::fFaserTrench ) return "FaserTrench"; else return "UndefinedFaserRegion"; } diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py index e507545cd536d1a85889e6768330a77c5755c5c5..4bf06b76f66ba0af57e64646cebc12b18b978612 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py @@ -82,7 +82,8 @@ def FaserTruthServiceCfg(ConfigFlags, name="FaserISF_TruthService", **kwargs): FaserRegion.fFaserTracker, FaserRegion.fFaserDipole, FaserRegion.fFaserCalorimeter, - FaserRegion.fFaserCavern]) + FaserRegion.fFaserCavern, + FaserRegion.fFaserTrench]) #long_lived_simulators = ['LongLived', 'longLived', 'QS'] #from ISF_Config.ISF_jobProperties import ISF_Flags diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx b/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx index 89b57d8284ced7dd0b48522f381501dd8f13780c..18ad0de36e3548ac39c804ed92385ef4f6aef0ea 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/src/FaserGeoIDSvc.cxx @@ -131,6 +131,8 @@ FaserDetDescr::FaserRegion ISF::FaserGeoIDSvc::identifyGeoID(const Amg::Vector3D if (lvName == "Emulsion::Emulsion" || lvName == "Emulsion::EmulsionStationA" ) return FaserDetDescr::fFaserNeutrino; if (lvName == "Dipole::Dipole") return FaserDetDescr::fFaserDipole; + + if (lvName == "Trench::Trench") return FaserDetDescr::fFaserTrench; } // If all else fails diff --git a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h index 96cf70d316be5b74e858c6ffeecd97bed93d917c..29081a1b99180ad28fd7bcb338f2f45bb657b2b3 100644 --- a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h +++ b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/FaserISF_Geant4Event/FaserISFG4GeoHelper.h @@ -21,7 +21,7 @@ class FaserISFG4GeoHelper static bool checkVolumeDepth(G4LogicalVolume* logicalVol, int volLevel, int depth=0); private: - static G4LogicalVolume *s_vetoLV, *s_triggerLV, *s_preshowerLV, *s_vetonuLV, *s_sctLV, *s_dipoleLV, *s_ecalLV, *s_emulsionLV; + static G4LogicalVolume *s_vetoLV, *s_triggerLV, *s_preshowerLV, *s_vetonuLV, *s_sctLV, *s_dipoleLV, *s_ecalLV, *s_emulsionLV, *s_trenchLV; }; diff --git a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx index f5337083756488e4939979a5a5424e1cf7b0b04c..80942559c6c8c46cf9f0e9e7cedf78181dc9b264 100644 --- a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx +++ b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/src/FaserISFG4GeoHelper.cxx @@ -25,13 +25,14 @@ G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_preshowerLV = nullptr; G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_ecalLV = nullptr; G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_dipoleLV = nullptr; G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_emulsionLV = nullptr; +G4LogicalVolume* iGeant4::FaserISFG4GeoHelper::s_trenchLV = nullptr; //________________________________________________________________________ FaserDetDescr::FaserRegion iGeant4::FaserISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel) { - if (s_sctLV == nullptr && s_vetoLV == nullptr && s_triggerLV == nullptr && s_preshowerLV == nullptr && s_vetonuLV == nullptr && s_ecalLV == nullptr && s_emulsionLV == nullptr && s_dipoleLV == nullptr) // Initialize + if (s_sctLV == nullptr && s_vetoLV == nullptr && s_triggerLV == nullptr && s_preshowerLV == nullptr && s_vetonuLV == nullptr && s_ecalLV == nullptr && s_emulsionLV == nullptr && s_dipoleLV == nullptr && s_trenchLV == nullptr) // Initialize { G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance(); for (size_t i = 0; i < lvs->size(); ++i) { @@ -46,6 +47,7 @@ iGeant4::FaserISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel) else if ( thisName == "Ecal::Ecal" ) { s_ecalLV = thisLV; } else if ( thisName == "Dipole::Dipole" ) { s_dipoleLV = thisLV; } else if ( ( s_emulsionLV == nullptr && thisName == "Emulsion::EmulsionStationA" ) || thisName == "Emulsion::Emulsion" ) { s_emulsionLV = thisLV; } + else if ( thisName == "Trench::Trench" ) { s_trenchLV = thisLV; } } const auto& worldVolume = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume(); @@ -93,6 +95,10 @@ iGeant4::FaserISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel) { nextGeoID = FaserDetDescr::fFaserDipole; } + else if (s_trenchLV != nullptr && s_trenchLV == postStepVolume) + { + nextGeoID = FaserDetDescr::fFaserTrench; + } else { nextGeoID = FaserDetDescr::fFaserCavern; @@ -115,7 +121,8 @@ bool iGeant4::FaserISFG4GeoHelper::checkVolumeDepth(G4LogicalVolume* lv, int vol ((s_preshowerLV != nullptr) && (lv->GetName() == s_preshowerLV->GetName())) || ((s_dipoleLV != nullptr) && (lv->GetName() == s_dipoleLV->GetName())) || ((s_ecalLV != nullptr) && (lv->GetName() == s_ecalLV->GetName())) || - ((s_emulsionLV != nullptr) && (lv->GetName() == s_emulsionLV->GetName())) ) { + ((s_emulsionLV != nullptr) && (lv->GetName() == s_emulsionLV->GetName())) || + ((s_trenchLV != nullptr) && (lv->GetName() == s_trenchLV->GetName())) ) { if(depth!=volLevel) { G4ExceptionDescription description; description << "Volume " << lv->GetName() << " at depth " << depth << " instead of depth " << volLevel;