Verified Commit d6e00d06 authored by Tadej Novak's avatar Tadej Novak
Browse files

Properly define ITk volumes to G4

parent c699a8ef
Pipeline #3104155 passed with stage
in 0 seconds
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
SubDetectorEnvelopes configurations for AtlasGeometryCommon
......@@ -13,8 +13,8 @@ DetDescrDBEnvelopeSvc=CompFactory.DetDescrDBEnvelopeSvc
def EnvelopeDefSvcCfg(ConfigFlags, name="AtlasGeometry_EnvelopeDefSvc", **kwargs):
result = ComponentAccumulator()
kwargs.setdefault("DBInDetNode" , 'InDetEnvelope' )
kwargs.setdefault("DBBeamPipeNode" , 'BeamPipeEnvelope' )
kwargs.setdefault("DBInDetNode" , 'InDetEnvelope' if ConfigFlags.GeoModel.Run in ['RUN1', 'RUN2', 'RUN3'] else 'ITkEnvelope' )
kwargs.setdefault("DBCaloNode" , 'CaloEnvelope' )
kwargs.setdefault("DBMSNode" , 'MuonEnvelope' )
kwargs.setdefault("DBCavernNode" , 'CavernEnvelope' )
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
......@@ -31,6 +31,7 @@ def FullG4TrackProcessorUserActionToolCfg(flags, name="FullG4TrackProcessorUserA
kwargs.setdefault("GeoIDSvc", result.getService("ISF_GeoIDSvc"))
if flags.Detector.GeometryCavern:
kwargs.setdefault("TruthVolumeLevel", 2)
kwargs.setdefault("IsITkGeometry", flags.GeoModel.Run not in ['RUN1', 'RUN2', 'RUN3'])
result.setPrivateTools(CompFactory.G4UA.iGeant4.TrackProcessorUserActionFullG4Tool(name, **kwargs))
return result
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# ComponentAccumulator based configuration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
......@@ -62,6 +62,15 @@ def InDetFieldManagerToolCfg(ConfigFlags, name='InDetFieldManager', **kwargs):
kwargs.setdefault('MinimumEpsilonStep', 0.00001)
return BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs)
def ITkFieldManagerToolCfg(ConfigFlags, name='ITkFieldManager', **kwargs):
kwargs.setdefault("LogicalVolumes", ['ITK::ITK'])
#kwargs.setdefault('DeltaChord', 0.00001)
kwargs.setdefault('DeltaIntersection', 0.00001)
kwargs.setdefault('DeltaOneStep', 0.0001)
kwargs.setdefault('MaximumEpsilonStep', 0.001)
kwargs.setdefault('MinimumEpsilonStep', 0.00001)
return BasicDetectorFieldManagerToolCfg(ConfigFlags, name, **kwargs)
def MuonsOnlyInCaloFieldManagerToolCfg(ConfigFlags, name='MuonsOnlyInCaloFieldManager', **kwargs):
kwargs.setdefault("LogicalVolumes", ['CALO::CALO'])
#kwargs.setdefault('DeltaChord', 0.00000002)
......
......@@ -65,7 +65,6 @@ def getCavernInfraGeoDetectorTool(name='CavernInfra', **kwargs):
def getIDETEnvelope(name="IDET", **kwargs):
from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags
from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags
isUpgrade = commonGeoFlags.Run()=="RUN4" or (commonGeoFlags.Run()=="UNDEFINED" and geoFlags.isSLHC())
isRUN2 = (commonGeoFlags.Run() in ["RUN2", "RUN3"]) or (commonGeoFlags.Run()=="UNDEFINED" and geoFlags.isIBL())
#isRUN1 = not (isRUN2 or isUpgrade)
......@@ -73,8 +72,6 @@ def getIDETEnvelope(name="IDET", **kwargs):
innerRadius = 37.*mm # RUN1 default
if isRUN2:
innerRadius = 28.9*mm #29.15*mm
if isUpgrade:
innerRadius = 32.15*mm
kwargs.setdefault("InnerRadius", innerRadius)
kwargs.setdefault("OuterRadius", 1.148*m)
kwargs.setdefault("dZ", 347.5*cm)
......@@ -84,7 +81,7 @@ def getIDETEnvelope(name="IDET", **kwargs):
SubDetectorList += ['Pixel']
if DetFlags.geometry.SCT_on():
SubDetectorList += ['SCT']
if DetFlags.geometry.TRT_on() and not isUpgrade:
if DetFlags.geometry.TRT_on():
SubDetectorList += ['TRT']
SubDetectorList += ['IDetServicesMat']
kwargs.setdefault("SubDetectors", SubDetectorList)
......
......@@ -11,7 +11,7 @@ from G4AtlasTools.G4PhysicsRegionConfigNew import SX1PhysicsRegionToolCfg, Bedro
from G4AtlasTools.G4PhysicsRegionConfigNew import DriftWallPhysicsRegionToolCfg, DriftWall1PhysicsRegionToolCfg, DriftWall2PhysicsRegionToolCfg, MuonSystemFastPhysicsRegionToolCfg
#the field config tools
from G4AtlasTools.G4FieldConfigNew import ATLASFieldManagerToolCfg, TightMuonsATLASFieldManagerToolCfg, BeamPipeFieldManagerToolCfg, InDetFieldManagerToolCfg, MuonsOnlyInCaloFieldManagerToolCfg, MuonFieldManagerToolCfg, Q1FwdFieldManagerToolCfg, Q2FwdFieldManagerToolCfg, Q3FwdFieldManagerToolCfg, D1FwdFieldManagerToolCfg, D2FwdFieldManagerToolCfg, Q4FwdFieldManagerToolCfg, Q5FwdFieldManagerToolCfg, Q6FwdFieldManagerToolCfg, Q7FwdFieldManagerToolCfg, Q1HKickFwdFieldManagerToolCfg, Q1VKickFwdFieldManagerToolCfg, Q2HKickFwdFieldManagerToolCfg, Q2VKickFwdFieldManagerToolCfg, Q3HKickFwdFieldManagerToolCfg, Q3VKickFwdFieldManagerToolCfg, Q4VKickAFwdFieldManagerToolCfg, Q4HKickFwdFieldManagerToolCfg, Q4VKickBFwdFieldManagerToolCfg, Q5HKickFwdFieldManagerToolCfg, Q6VKickFwdFieldManagerToolCfg, FwdRegionFieldManagerToolCfg
from G4AtlasTools.G4FieldConfigNew import ATLASFieldManagerToolCfg, TightMuonsATLASFieldManagerToolCfg, BeamPipeFieldManagerToolCfg, InDetFieldManagerToolCfg, ITkFieldManagerToolCfg, MuonsOnlyInCaloFieldManagerToolCfg, MuonFieldManagerToolCfg, Q1FwdFieldManagerToolCfg, Q2FwdFieldManagerToolCfg, Q3FwdFieldManagerToolCfg, D1FwdFieldManagerToolCfg, D2FwdFieldManagerToolCfg, Q4FwdFieldManagerToolCfg, Q5FwdFieldManagerToolCfg, Q6FwdFieldManagerToolCfg, Q7FwdFieldManagerToolCfg, Q1HKickFwdFieldManagerToolCfg, Q1VKickFwdFieldManagerToolCfg, Q2HKickFwdFieldManagerToolCfg, Q2VKickFwdFieldManagerToolCfg, Q3HKickFwdFieldManagerToolCfg, Q3VKickFwdFieldManagerToolCfg, Q4VKickAFwdFieldManagerToolCfg, Q4HKickFwdFieldManagerToolCfg, Q4VKickBFwdFieldManagerToolCfg, Q5HKickFwdFieldManagerToolCfg, Q6VKickFwdFieldManagerToolCfg, FwdRegionFieldManagerToolCfg
from G4AtlasTools.G4AtlasToolsConfigNew import SensitiveDetectorMasterToolCfg
......@@ -623,6 +623,10 @@ def ATLAS_FieldMgrListCfg(ConfigFlags):
acc = InDetFieldManagerToolCfg(ConfigFlags)
tool = result.popToolsAndMerge(acc)
fieldMgrList += [tool]
if ConfigFlags.Detector.GeometryITk:
acc = ITkFieldManagerToolCfg(ConfigFlags)
tool = result.popToolsAndMerge(acc)
fieldMgrList += [tool]
#if ConfigFlags.Detector.GeometryCalo and simFlags.MuonFieldOnlyInCalo.statusOn and simFlags.MuonFieldOnlyInCalo():
if False:
acc = MuonsOnlyInCaloFieldManagerToolCfg(ConfigFlags)
......
......@@ -274,7 +274,10 @@ def MuonSystemFastPhysicsRegionToolCfg(ConfigFlags, name='MuonSystemFastPhysicsR
kwargs.setdefault("RegionName", 'MuonSystemFastRegion')
volumeList = []
if ConfigFlags.Sim.CavernBG == 'World':
volumeList += ['BeamPipe::BeamPipe', 'IDET::IDET']
if ConfigFlags.GeoModel.Run in ['RUN1', 'RUN2', 'RUN3']:
volumeList += ['BeamPipe::BeamPipe', 'IDET::IDET']
else:
volumeList += ['BeamPipe::BeamPipe', 'ITK::ITK']
volumeList = ['Muon::MuonSys']
kwargs.setdefault("VolumeList", volumeList)
kwargs.setdefault("ElectronCut", 1.0)
......
......@@ -40,6 +40,8 @@ def getEnvelopeMap(ConfigFlags):
if not ConfigFlags.Sim.ISFRun:
if ConfigFlags.Detector.GeometryID:
envelopeMap['IDET::IDET'] = 'CaloEntryLayer'
if ConfigFlags.Detector.GeometryITk:
envelopeMap['ITK::ITK'] = 'CaloEntryLayer'
if ConfigFlags.Detector.GeometryCalo:
envelopeMap['CALO::CALO'] = 'MuonEntryLayer'
if ConfigFlags.Detector.GeometryMuon: #was geometry in old style, should it be?
......
......@@ -101,6 +101,12 @@ namespace G4DebuggingHelpers {
|| nom.contains("station") ) {
return "Muon";
}
else if ( nom.length() >= 8 && nom.substr(0, 8) == "ITkPixel" ) {
return "ITkPixel";
}
else if ( nom.length() >= 8 && nom.substr(0, 8) == "ITkStrip" ) {
return "ITkStrip";
}
else if ( ( nom.length() >= 5 && nom.substr(0, 5) == "Pixel" )
|| nom == "Outside Barrel Service") {
return "Pixel";
......@@ -119,9 +125,11 @@ namespace G4DebuggingHelpers {
return "Section";
else if ( ( nom.length() >= 12 && nom.substr(0, 12) == "InDetServMat" )
|| ( nom.length() >= 4 && nom.substr(0, 4) == "IDET" )
|| ( nom.length() >= 3 && nom.substr(0, 3) == "ITK" )
|| ( nom.length() >= 8 && nom.substr(0, 8) == "BeamPipe" )
|| ( nom.length() >= 3 &&
( nom.substr(0, 3) == "BLM" || nom.substr(0, 3) == "BCM" ) ) ) {
( nom.substr(0, 3) == "BLM" || nom.substr(0, 3) == "BCM" || nom.substr(0, 3) == "PLR" ) )
|| ( nom.length() >= 8 && nom.substr(0, 8) == "BCMPrime") ) {
return "Service";
}
return "other";
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
//////////////////////////////////////////////////////////////////
......@@ -60,6 +60,8 @@ namespace G4UA
m_report.timeName[eCry] = "Cry";
m_report.timeName[eLAr] = "LAr";
m_report.timeName[eHCB] = "HCB";
m_report.timeName[eITkPix] = "ITkPixel";
m_report.timeName[eITkStrip] = "ITkStrip";
m_report.timeName[ePre] = "Pre";
m_report.timeName[eMu] = "Mu";
m_report.timeName[ePx] = "Px";
......@@ -304,6 +306,14 @@ namespace G4UA
nom.contains("station") ){
return eMu;
}
else if ( nom.length() >= 8 &&
nom(0,8) == "ITkPixel" ){
return eITkPix;
}
else if ( nom.length() >= 8 &&
nom(0,8) == "ITkStrip" ){
return eITkStrip;
}
else if ((nom.length() >= 5 &&
nom(0,5) == "Pixel") ||
nom == "Outside Barrel Service"){
......@@ -326,13 +336,18 @@ namespace G4UA
nom(0,12) == "InDetServMat" ) ||
( nom.length() >= 4 &&
nom(0,4) == "IDET" ) ||
( nom.length() >= 3 &&
nom(0,3) == "ITK" ) ||
( nom.length() >= 8 &&
nom(0,8) == "BeamPipe" ) ||
( nom.length() >= 7 &&
nom(0,7) == "Section" ) ||
( nom.length() >= 3 &&
( nom(0,3) == "BLM" ||
nom(0,3) == "BCM" ) ) ){
nom(0,3) == "BCM" ||
nom(0,3) == "PLR" ) ) ||
( nom.length() >= 8 &&
nom(0,8) == "BCMPrime" ) ){
return eSev;
}
return eOther;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
//////////////////////////////////////////////////////////////////
......@@ -92,7 +92,7 @@ namespace G4UA
First timers are by subdetector, second few are by particle
These are not straightforward for the non-expert to interpret*/
enum { eEMB, eEMEC, eFC1, eFC23, eFCO, eHEC, eCry, eLAr, eHCB,
ePre, eMu, ePx, eSct, eSev, eTrt, eOther,
ePre, eMu, ePx, eSct, eITkPix, eITkStrip, eSev, eTrt, eOther,
eElec, ePos, eGam, eNeut, eMax };
private:
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "TestActionTimerTool.h"
......@@ -71,7 +71,7 @@ namespace G4UA
ATH_MSG_INFO("FCAL\t" << (report.time[TestActionTimer::eFC1]+report.time[TestActionTimer::eFC23]+report.time[TestActionTimer::eFCO])/report.nev);
ATH_MSG_INFO("HEC\t" << (report.time[TestActionTimer::eHEC])/report.nev);
ATH_MSG_INFO("Tile\t" << (report.time[TestActionTimer::eHCB])/report.nev);
ATH_MSG_INFO("Tracker\t" << (report.time[TestActionTimer::ePx]+report.time[TestActionTimer::eSct]+report.time[TestActionTimer::eTrt]+report.time[TestActionTimer::eSev])/report.nev);
ATH_MSG_INFO("Tracker\t" << (report.time[TestActionTimer::ePx]+report.time[TestActionTimer::eSct]+report.time[TestActionTimer::eITkPix]+report.time[TestActionTimer::eITkStrip]+report.time[TestActionTimer::eTrt]+report.time[TestActionTimer::eSev])/report.nev);
ATH_MSG_INFO("Muons\t" << (report.time[TestActionTimer::eMu])/report.nev);
ATH_MSG_INFO("Oth.LAr\t" << (report.time[TestActionTimer::ePre]+report.time[TestActionTimer::TestActionTimer::eCry]+report.time[TestActionTimer::eLAr])/report.nev);
ATH_MSG_INFO("Other\t" << (report.time[TestActionTimer::eOther])/report.nev);
......@@ -82,7 +82,7 @@ namespace G4UA
ATH_MSG_INFO("FCAL\t" << (report.time[TestActionTimer::eFC1]+report.time[TestActionTimer::eFC23]+report.time[TestActionTimer::eFCO])/report.runTime*100.);
ATH_MSG_INFO("HEC\t" << (report.time[TestActionTimer::eHEC])/report.runTime*100.);
ATH_MSG_INFO("Tile\t" << (report.time[TestActionTimer::eHCB])/report.runTime*100.);
ATH_MSG_INFO("Tracker\t" << (report.time[TestActionTimer::ePx]+report.time[TestActionTimer::eSct]+report.time[TestActionTimer::eTrt]+report.time[TestActionTimer::eSev])/report.runTime*100.);
ATH_MSG_INFO("Tracker\t" << (report.time[TestActionTimer::ePx]+report.time[TestActionTimer::eSct]+report.time[TestActionTimer::eITkPix]+report.time[TestActionTimer::eITkStrip]+report.time[TestActionTimer::eTrt]+report.time[TestActionTimer::eSev])/report.runTime*100.);
ATH_MSG_INFO("Muons\t" << (report.time[TestActionTimer::eMu])/report.runTime*100.);
ATH_MSG_INFO("Oth.LAr\t" << (report.time[TestActionTimer::ePre]+report.time[TestActionTimer::eCry]+report.time[TestActionTimer::eLAr])/report.runTime*100.);
ATH_MSG_INFO("Other\t" << (report.time[TestActionTimer::eOther])/report.runTime*100.);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
//////////////////////////////////////////////////////////////////
......@@ -74,7 +74,7 @@ void VolumeTreeNavigator::SetDepthCutSimple(const int CALO, const int BeamPipe,
string name = stringify(m_history[1].first->GetName());
if (name == "CALO::CALO") cut = CALO+1;
else if (name == "BeamPipe::BeamPipe") cut = BeamPipe+1;
else if (name == "IDET::IDET") cut = IDET+1;
else if (name == "IDET::IDET" || name == "ITK::ITK") cut = IDET+1;
else if (name == "MUONQ02::MUONQ02") cut = MUONQ02+1;
else { log<< MSG::INFO <<"Level 1 volume not found, output default depth"<< endmsg; }
}
......
"""ComponentAccumulator Geant4 tools config for ISF
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
......@@ -17,6 +17,11 @@ def EntryLayerToolCfg(flags, name="ISF_EntryLayerTool", **kwargs):
filt = acc.popToolsAndMerge(EntryLayerFilterCfg(flags))
kwargs.setdefault("ParticleFilters", [filt])
if flags.GeoModel.Run in ['RUN1', 'RUN2', 'RUN3']:
kwargs.setdefault("CaloEntryVolumeString", "IDET::IDET")
else:
kwargs.setdefault("CaloEntryVolumeString", "ITK::ITK")
if flags.Sim.DoFullChain:
OEsvc = CompFactory.StoreGateSvc("OriginalEvent_SG")
acc.addService(OEsvc)
......@@ -35,6 +40,11 @@ def EntryLayerToolMTCfg(flags, name="ISF_EntryLayerToolMT", **kwargs):
filt = acc.popToolsAndMerge(EntryLayerFilterCfg(flags))
kwargs.setdefault("ParticleFilters", [filt])
if flags.GeoModel.Run in ['RUN1', 'RUN2', 'RUN3']:
kwargs.setdefault("CaloEntryVolumeString", "IDET::IDET")
else:
kwargs.setdefault("CaloEntryVolumeString", "ITK::ITK")
if flags.Sim.DoFullChain:
OEsvc = CompFactory.StoreGateSvc("OriginalEvent_SG")
acc.addService(OEsvc)
......@@ -53,6 +63,11 @@ def AFIIEntryLayerToolCfg(flags, name="ISF_AFIIEntryLayerTool", **kwargs):
filt = acc.popToolsAndMerge(EntryLayerFilterCfg(flags))
kwargs.setdefault("ParticleFilters", [filt])
if flags.GeoModel.Run in ['RUN1', 'RUN2', 'RUN3']:
kwargs.setdefault("CaloEntryVolumeString", "IDET::IDET")
else:
kwargs.setdefault("CaloEntryVolumeString", "ITK::ITK")
if flags.Sim.DoFullChain:
OEsvc = CompFactory.StoreGateSvc("OriginalEvent_SG")
acc.addService(OEsvc)
......@@ -71,6 +86,11 @@ def AFIIEntryLayerToolMTCfg(flags, name="ISF_AFIIEntryLayerToolMT", **kwargs):
filt = acc.popToolsAndMerge(EntryLayerFilterCfg(flags))
kwargs.setdefault("ParticleFilters", [filt])
if flags.GeoModel.Run in ['RUN1', 'RUN2', 'RUN3']:
kwargs.setdefault("CaloEntryVolumeString", "IDET::IDET")
else:
kwargs.setdefault("CaloEntryVolumeString", "ITK::ITK")
if flags.Sim.DoFullChain:
OEsvc = CompFactory.StoreGateSvc("OriginalEvent_SG")
acc.addService(OEsvc)
......
......@@ -31,7 +31,7 @@ iGeant4::ISFG4GeoHelper::nextGeoId(const G4Step* aStep, int truthVolLevel, ISF::
if ( !(*lvs)[i] ) { continue; }
if ( (*lvs)[i]->GetName() == "BeamPipe::BeamPipe" ) { BPholder = (*lvs)[i]; }
else if ( (*lvs)[i]->GetName() == "IDET::IDET" ) { IDholder = (*lvs)[i]; }
else if ( (*lvs)[i]->GetName() == "IDET::IDET" || (*lvs)[i]->GetName() == "ITK::ITK" ) { IDholder = (*lvs)[i]; }
else if ( (*lvs)[i]->GetName() == "CALO::CALO" ) { CALOholder = (*lvs)[i]; }
else if ( (*lvs)[i]->GetName() == "MUONQ02::MUONQ02" ) { MUholder = (*lvs)[i]; }
else if ( (*lvs)[i]->GetName() == "TTR_BARREL::TTR_BARREL" ) {TTRholder = (*lvs)[i]; }
......@@ -116,6 +116,7 @@ bool iGeant4::ISFG4GeoHelper::checkVolumeDepth(G4LogicalVolume* lv, int volLevel
if ( lv->GetName() == "BeamPipe::BeamPipe" ||
lv->GetName() == "IDET::IDET" ||
lv->GetName() == "ITK::ITK" ||
lv->GetName() == "CALO::CALO" ||
lv->GetName() == "MUONQ02::MUONQ02" ||
lv->GetName() == "TTR_BARREL::TTR_BARREL" ) {
......
"""Geant4 services config for ISF with ComponentAccumulator
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
......@@ -15,7 +15,7 @@ def Geant4SimCfg(flags, name="ISFG4SimSvc", **kwargs):
G4_DDDBEnvelopeDefSvc = CompFactory.DetDescrDBEnvelopeSvc("G4EnvelopeDefSvc")
G4_DDDBEnvelopeDefSvc.DBBeamPipeNode = "BPipeEnvelopeG4"
G4_DDDBEnvelopeDefSvc.DBInDetNode = "InDetEnvelopeG4"
G4_DDDBEnvelopeDefSvc.DBInDetNode = "InDetEnvelopeG4" if flags.GeoModel.Run in ['RUN1', 'RUN2', 'RUN3'] else "ITkEnvelopeG4"
G4_DDDBEnvelopeDefSvc.DBCaloNode = "CaloEnvelopeG4"
G4_DDDBEnvelopeDefSvc.DBMSNode = "MuonEnvelopeG4"
G4_DDDBEnvelopeDefSvc.DBCavernNode = "CavernEnvelopeG4"
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
// class header
......@@ -73,7 +73,7 @@ namespace G4UA{
m_entryLayerMap["CALO::CALO"] = m_config.truthVolLevel+1;
m_entryLayerMap["MUONQ02::MUONQ02"] = m_config.truthVolLevel+1;
m_entryLayerMap["IDET::IDET"] = m_config.truthVolLevel+1;
m_entryLayerMap[m_config.isITkGeometry ? "ITK::ITK" : "IDET::IDET"] = m_config.truthVolLevel+1;
}
......@@ -207,7 +207,8 @@ namespace G4UA{
ISF::EntryLayer layer=ISF::fUnsetEntryLayer;
if (pass) {
if (vname1=="IDET::IDET") layer=ISF::fAtlasCaloEntry;
if (!m_config.isITkGeometry && vname1=="IDET::IDET") layer=ISF::fAtlasCaloEntry;
else if ( m_config.isITkGeometry && vname1=="ITK::ITK") layer=ISF::fAtlasCaloEntry;
else if (vname1=="CALO::CALO") layer=ISF::fAtlasMuonEntry;
else if (vname1=="MUONQ02::MUONQ02") layer=ISF::fAtlasMuonExit;
}
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
......@@ -38,15 +38,15 @@ namespace G4UA{
Config() = delete;
Config(const std::string& name):
entryLayerTool(""),
geoIDSvc("",name),
truthVolLevel(1)
geoIDSvc("",name)
{}
/** access to the ISF Entry Layer tool which is used to record entry-layer collections */
ToolHandle<ISF::IEntryLayerTool> entryLayerTool;
/** access to the central ISF GeoID service*/
ServiceHandle<ISF::IGeoIDSvc> geoIDSvc;
int truthVolLevel;
int truthVolLevel{1};
unsigned int verboseLevel=0;
bool isITkGeometry{};
};
TrackProcessorUserActionFullG4(const Config& config);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "TrackProcessorUserActionFullG4Tool.h"
......@@ -20,6 +20,7 @@ namespace G4UA
declareProperty("EntryLayerTool", m_config.entryLayerTool, "ISF Entry Layer Tool");
declareProperty("GeoIDSvc", m_config.geoIDSvc, "ISF GeoIDService" );
declareProperty("TruthVolumeLevel", m_config.truthVolLevel, "Level in geo hierarchy for the truth volumes");
declareProperty("IsITkGeometry", m_config.isITkGeometry, "toggle for ITk");
}
std::unique_ptr<TrackProcessorUserActionFullG4>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment