diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/ISF_FatrasServices/FatrasSimSvc.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/ISF_FatrasServices/FatrasSimSvc.h index 2ae5b95efb3e011a09e04aaf64c3d107b6fa13eb..8d7b5211e9b0979523a9cde5c2336e5ef31d8963 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/ISF_FatrasServices/FatrasSimSvc.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/ISF_FatrasServices/FatrasSimSvc.h @@ -28,14 +28,13 @@ namespace ISF { class IParticleFilter; + class IParticleProcessor; class ISFParticle; class ITruthSvc; } namespace iFatras { - class ITransportTool; - /** @class FatrasSimSvc @author Andreas.Salzburger -at- cern.ch @@ -67,7 +66,8 @@ namespace iFatras { FatrasSimSvc(); /** Track Creation & transport */ - ToolHandle<iFatras::ITransportTool> m_simulationTool; //!< Pointer to the transport AlgTool + ToolHandle<ISF::IParticleProcessor> m_IDsimulationTool; //!< Pointer to the transport AlgTool + ToolHandle<ISF::IParticleProcessor> m_simulationTool; //!< Pointer to the transport AlgTool ToolHandle<ISF::IParticleFilter> m_particleFilter; //!< the particle filter concerning kinematic cuts, etc. }; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/cmt/requirements index 81a48d413cc323bd8cae9efd0fb489d794dac01b..bc5f365dd8e80f017f635486dd3fb5bd9bee3c00 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/cmt/requirements +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/cmt/requirements @@ -20,7 +20,6 @@ use AtlasDetDescr AtlasDetDescr-* DetectorDescription # private use statements private use StoreGate StoreGate-* Control -use ISF_FatrasInterfaces ISF_FatrasInterfaces-* Simulation/ISF/ISF_Fatras use ISF_Event ISF_Event-* Simulation/ISF/ISF_Core public @@ -29,6 +28,6 @@ apply_pattern component_library apply_pattern declare_python_modules files="*.py" # use the following to compile with debug information -#private +private #macro cppdebugflags '$(cppdebugflags_s)' #macro_remove componentshr_linkopts "-Wl,-s" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py index 91199f267557c24b5026794eff8534bb208afb49..0fac8cd18aabeb56c67c6d2e403de3549b30f8af 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py @@ -71,6 +71,16 @@ def initialiseCoolDataBaseFolder(): #HACK: CoolDataBaseFolder may not be set at this point! Is this right? -KG return CoolDataBaseFolder + +###################################################################################### +# validation & process sampling +def getFatrasPhysicsValidationTool(name="ISF_FatrasPhysicsValidationTool", **kwargs): + kwargs.setdefault("ValidationStreamName", "ISFFatras") + + from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__PhysicsValidationTool + return iFatras__PhysicsValidationTool(name, **kwargs) + + ################################################################################# # The Geometry Builder ################################################################################# @@ -80,11 +90,14 @@ def getInDetTrackingGeometryBuilder(name="ISF_InDetTrackingGeometryBuilder", **k kwargs.setdefault("namePrefix" , 'Fatras') kwargs.setdefault("setLayerAssociation" , False) #kwargs.setdefault("VolumeEnclosureOuterR" , 1148.) ### HACK: Cannot set via imput arguments. Is this right?? -kg - if not TrkDetFlags.SLHC_Geometry() : - kwargs.setdefault("buildTrtStrawLayers" , True) - from InDetTrackingGeometry.ConfiguredInDetTrackingGeometryBuilder import ConfiguredInDetTrackingGeometryBuilder as IDGeometryBuilder + if TrkDetFlags.ISF_FatrasCustomGeometry() : + from ISF_FatrasDetDescrTools.CustomInDetTrackingGeometryBuilder import CustomInDetTrackingGeometryBuilder as IDGeometryBuilder else : - from InDetTrackingGeometry.ConfiguredSLHC_InDetTrackingGeometryBuilder import ConfiguredSLHC_InDetTrackingGeometryBuilder as IDGeometryBuilder + if not TrkDetFlags.SLHC_Geometry() : + kwargs.setdefault("buildTrtStrawLayers" , True) + from InDetTrackingGeometry.ConfiguredInDetTrackingGeometryBuilder import ConfiguredInDetTrackingGeometryBuilder as IDGeometryBuilder + else : + from InDetTrackingGeometry.ConfiguredSLHC_InDetTrackingGeometryBuilder import ConfiguredSLHC_InDetTrackingGeometryBuilder as IDGeometryBuilder t = IDGeometryBuilder(name, **kwargs ) t.VolumeEnclosureOuterR = 1148. #t.EnvelopeDefinitionSvc = 'ISF_EnvelopeDefSvc' @@ -159,7 +172,8 @@ def getFatrasTrackingGeometrySvc(name="ISF_FatrasTrackingGeometrySvc", **kwargs) def getFatrasNavigator(name="ISF_FatrasNavigator", **kwargs): # the Navigator (needed for several instances) - kwargs.setdefault("TrackingGeometrySvc" , getService('ISF_FatrasTrackingGeometrySvc')) + from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + kwargs.setdefault("TrackingGeometrySvc" , AtlasTrackingGeometrySvc)#getService('ISF_FatrasTrackingGeometrySvc')) from TrkExTools.TrkExToolsConf import Trk__Navigator return Trk__Navigator(name, **kwargs ) @@ -176,13 +190,35 @@ def getFatrasChargedPropagator(name="ISF_FatrasChargedPropagator", **kwargs): #from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as ChargedPropagator #return ChargedPropagator(name, **kwargs ) -###################################################################################### -# validation & process sampling -def getFatrasPhysicsValidationTool(name="ISF_FatrasPhysicsValidationTool", **kwargs): - kwargs.setdefault("ValidationStreamName", "ISFFatras") - - from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__PhysicsValidationTool - return iFatras__PhysicsValidationTool(name, **kwargs) +# Propagators for the Extrapolation Engine +# load the RungeKutta Propagator +def getFatrasPropagator(name="ISF_FatrasPropagator", **kwargs): + from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as RungeKuttaPropagator + return RungeKuttaPropagator(name, **kwargs) + +# from the Propagator create a Propagation engine to handle path length +def getFatrasStaticPropagator(name="ISF_FatrasStaticPropagator", **kwargs): + kwargs.setdefault("Propagator", getPublicTool('ISF_FatrasPropagator')) + # configure output formatting + kwargs.setdefault("OutputPrefix", '[SP] - ') + kwargs.setdefault("OutputPostfix", ' - ') + kwargs.setdefault("OutputLevel", ISF_FatrasFlags.OutputLevelGeneral()) + from TrkExEngine.TrkExEngineConf import Trk__PropagationEngine as StaticPropagator + return StaticPropagator(name, **kwargs) + +# load the static navigation engine +def getFatrasStaticNavigationEngine(name="ISF_FatrasStaticNavigationEngine", **kwargs): + #give the tools it needs + from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + kwargs.setdefault("PropagationEngine", getPublicTool('ISF_FatrasStaticPropagator')) + kwargs.setdefault("MaterialEffectsEngine", getPublicTool('ISF_FatrasMaterialEffectsEngine')) + kwargs.setdefault("TrackingGeometry", AtlasTrackingGeometrySvc.TrackingGeometryName) + # configure output formatting + kwargs.setdefault("OutputPrefix", '[SN] - ') + kwargs.setdefault("OutputPostfix", ' - ') + kwargs.setdefault("OutputLevel", ISF_FatrasFlags.OutputLevelGeneral()) + from TrkExEngine.TrkExEngineConf import Trk__StaticNavigationEngine + return Trk__StaticNavigationEngine(name, **kwargs) ################################################################################ @@ -197,22 +233,15 @@ def getFatrasPdgG4Particle(name="ISF_FatrasPdgG4Particle", **kwargs): from ISF_FatrasToolsG4.ISF_FatrasToolsG4Conf import iFatras__PDGToG4Particle return iFatras__PDGToG4Particle(name, **kwargs ) -def getFatrasParticleDecayer(name="ISF_FatrasParticleDecayer", **kwargs): - kwargs.setdefault("PDGToG4ParticleConverter", getPublicTool('ISF_FatrasPdgG4Particle')) - #kwargs.setdefault("G4RunManagerHelper" , getPublicTool('ISF_G4RunManagerHelper')) - - from ISF_FatrasToolsG4.ISF_FatrasToolsG4Conf import iFatras__G4ParticleDecayCreator - return iFatras__G4ParticleDecayCreator(name, **kwargs ) - def getFatrasParticleDecayHelper(name="ISF_FatrasParticleDecayHelper", **kwargs): from G4AtlasApps.SimFlags import SimFlags,simFlags - simFlags.RandomSeedList.addSeed( "FatrasG4" , 23491234, 23470291 ) + if not simFlags.RandomSeedList.checkForExistingSeed( "FatrasG4" ): + simFlags.RandomSeedList.addSeed( "FatrasG4" , 23491234, 23470291 ) kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) kwargs.setdefault("G4RandomStreamName" , "FatrasG4") # TODO: read stream name "FatrasG4" from Fatras jobProperties kwargs.setdefault("ParticleBroker" , getService('ISF_ParticleBrokerSvc')) kwargs.setdefault("ParticleTruthSvc", ISF_Flags.TruthService.get_Value()) - kwargs.setdefault("ParticleDecayer" , getPublicTool('ISF_FatrasParticleDecayer')) kwargs.setdefault("PDGToG4ParticleConverter", getPublicTool('ISF_FatrasPdgG4Particle')) # the validation output kwargs.setdefault("ValidationMode" , ISF_Flags.ValidationMode()) @@ -239,7 +268,7 @@ def getFatrasG4HadIntProcessor(name="ISF_FatrasG4HadIntProcessor", **kwargs): kwargs.setdefault("TruthRecordSvc" , ISF_Flags.TruthService.get_Value()) kwargs.setdefault("PhysicsValidationTool" , getPublicTool('ISF_FatrasPhysicsValidationTool')) kwargs.setdefault('ValidationMode' , ISF_Flags.ValidationMode()) - kwargs.setdefault("MinEnergyCut" , FatrasTuningFlags.MomCutOffSec()) + kwargs.setdefault("MomentumCut" , FatrasTuningFlags.MomCutOffSec()) from ISF_FatrasToolsG4.ISF_FatrasToolsG4Conf import iFatras__G4HadIntProcessor return iFatras__G4HadIntProcessor(name, **kwargs ) @@ -264,41 +293,61 @@ def getFatrasParametricHadIntProcessor(name="ISF_FatrasParametricHadIntProcessor from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__HadIntProcessorParametric return iFatras__HadIntProcessorParametric(name, **kwargs ) +# (iv) photon conversion +def getFatrasConversionCreator(name="ISF_FatrasConversionCreator", **kwargs): + # Fatras Hadronic Interaction Processor + # hadronic interaction creator + from G4AtlasApps.SimFlags import SimFlags,simFlags + kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) + kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) + kwargs.setdefault("ParticleBroker" , getService('ISF_ParticleBrokerSvc')) + kwargs.setdefault("TruthRecordSvc" , ISF_Flags.TruthService.get_Value()) + kwargs.setdefault("PhysicsValidationTool" , getPublicTool('ISF_FatrasPhysicsValidationTool')) + kwargs.setdefault("PhysicsProcessCode" , 14) # TODO: to be taken from central definition + kwargs.setdefault('ValidationMode' , ISF_Flags.ValidationMode()) + + from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__PhotonConversionTool + return iFatras__PhotonConversionTool(name, **kwargs ) + def getFatrasProcessSamplingTool(name="ISF_FatrasProcessSamplingTool", **kwargs): # random number service from G4AtlasApps.SimFlags import SimFlags,simFlags kwargs.setdefault( "RandomNumberService", simFlags.RandomSvc()) + # truth record + kwargs.setdefault("TruthRecordSvc" , ISF_Flags.TruthService.get_Value()) + # decays + kwargs.setdefault("ParticleDecayHelper" , getPublicTool('ISF_FatrasParticleDecayHelper')) + # photon conversion + kwargs.setdefault("PhotonConversionTool" , getPublicTool('ISF_FatrasConversionCreator')) + # hadronic interactions + kwargs.setdefault("HadronicInteraction" , True) + #kwargs.setdefault("HadronicInteractionProcessor", getPublicTool('ISF_FatrasParametricHadIntProcessor')) + kwargs.setdefault("HadronicInteractionProcessor", getPublicTool('ISF_FatrasG4HadIntProcessor')) + # the validation output + kwargs.setdefault("ValidationMode" , ISF_Flags.ValidationMode()) + kwargs.setdefault("PhysicsValidationTool" , getPublicTool('ISF_FatrasPhysicsValidationTool')) from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__ProcessSamplingTool return iFatras__ProcessSamplingTool(name, **kwargs) # # (ii) Energy Loss # - Ionization and Bremstrahlung loss -# - assing the Bethe-Heitler Eloss updator -def getFatrasBetheHeitlerEnergyLossUpdator(name="ISF_FatrasBetheHeitlerEnergyLossUpdator", **kwargs): - from G4AtlasApps.SimFlags import SimFlags,simFlags - kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) - kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) - kwargs.setdefault("ScaleFactor" , FatrasTuningFlags.BetheHeitlerScalor()) - - from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__McBetheHeitlerEnergyLossUpdator - return iFatras__McBetheHeitlerEnergyLossUpdator(name, **kwargs ) def getFatrasEnergyLossUpdator(name="ISF_FatrasEnergyLossUpdator", **kwargs): from G4AtlasApps.SimFlags import SimFlags,simFlags kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) - kwargs.setdefault("ElectronEnergyLossUpdator" , getPublicTool('ISF_FatrasBetheHeitlerEnergyLossUpdator')) + #kwargs.setdefault("EnergyLossUpdator" , getPublicTool('AtlasEnergyLossUpdator')) from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__McEnergyLossUpdator return iFatras__McEnergyLossUpdator(name, **kwargs ) - # # (iii) Multiple scattering def getFatrasMultipleScatteringUpdator(name="ISF_FatrasMultipleScatteringUpdator", **kwargs): from G4AtlasApps.SimFlags import SimFlags,simFlags - simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 ) + if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ): + simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 ) kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) kwargs.setdefault("RandomStreamName" , 'TrkExRnd' ) # TODO: read stream name "TrkExRnd" from Fatras jobProperties kwargs.setdefault("GaussianMixtureModel" , FatrasTuningFlags.GaussianMixtureModel()) @@ -306,26 +355,37 @@ def getFatrasMultipleScatteringUpdator(name="ISF_FatrasMultipleScatteringUpdator from TrkExTools.TrkExToolsConf import Trk__MultipleScatteringUpdator return Trk__MultipleScatteringUpdator(name, **kwargs ) -# (iv) photon conversion -def getFatrasConversionCreator(name="ISF_FatrasConversionCreator", **kwargs): - # Fatras Hadronic Interaction Processor - # hadronic interaction creator +def getFatrasMultipleScatteringSamplerHighland(name="ISF_MultipleScatteringSamplerHighland", **kwargs): from G4AtlasApps.SimFlags import SimFlags,simFlags - kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) - kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) - kwargs.setdefault("ParticleBroker" , getService('ISF_ParticleBrokerSvc')) - kwargs.setdefault("TruthRecordSvc" , ISF_Flags.TruthService.get_Value()) - kwargs.setdefault("PhysicsValidationTool" , getPublicTool('ISF_FatrasPhysicsValidationTool')) - kwargs.setdefault("PhysicsProcessCode" , 14) # TODO: to be taken from central definition - kwargs.setdefault('ValidationMode' , ISF_Flags.ValidationMode()) + if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ): + simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 ) + kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) + kwargs.setdefault("RandomStreamName" , 'TrkExRnd' ) # TODO: read stream name "TrkExRnd" from Fatras jobProperties + from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__MultipleScatteringSamplerHighland + return iFatras__MultipleScatteringSamplerHighland(name, **kwargs ) - from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__PhotonConversionTool - return iFatras__PhotonConversionTool(name, **kwargs ) +def getFatrasMultipleScatteringSamplerGaussianMixture(name="ISF_MultipleScatteringSamplerGaussianMixture", **kwargs): + from G4AtlasApps.SimFlags import SimFlags,simFlags + if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ): + simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 ) + kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) + kwargs.setdefault("RandomStreamName" , 'TrkExRnd' ) # TODO: read stream name "TrkExRnd" from Fatras jobProperties + from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__MultipleScatteringSamplerGaussianMixture + return iFatras__MultipleScatteringSamplerGaussianMixture(name, **kwargs ) +def getFatrasMultipleScatteringSamplerGeneralMixture(name="ISF_MultipleScatteringSamplerGeneralMixture", **kwargs): + from G4AtlasApps.SimFlags import SimFlags,simFlags + if not simFlags.RandomSeedList.checkForExistingSeed( "TrkExRnd" ): + simFlags.RandomSeedList.addSeed( "TrkExRnd" , 12412330, 37849324 ) + kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) + kwargs.setdefault("RandomStreamName" , 'TrkExRnd' ) # TODO: read stream name "TrkExRnd" from Fatras jobProperties + from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__MultipleScatteringSamplerGeneralMixture + return iFatras__MultipleScatteringSamplerGeneralMixture(name, **kwargs ) # Combining all in the MaterialEffectsUpdator def getFatrasMaterialUpdator(name="ISF_FatrasMaterialUpdator", **kwargs): from G4AtlasApps.SimFlags import SimFlags,simFlags + from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) kwargs.setdefault("ParticleBroker" , getService('ISF_ParticleBrokerSvc')) @@ -352,13 +412,44 @@ def getFatrasMaterialUpdator(name="ISF_FatrasMaterialUpdator", **kwargs): # kwargs.setdefault("PhysicsValidationTool" , getPublicTool('ISF_FatrasPhysicsValidationTool')) kwargs.setdefault("ProcessSamplingTool" , getPublicTool('ISF_FatrasProcessSamplingTool')) - kwargs.setdefault("ParticleDecayer" , getPublicTool('ISF_FatrasParticleDecayer')) + kwargs.setdefault("ParticleDecayHelper" , getPublicTool('ISF_FatrasParticleDecayHelper')) # MCTruth Process Code kwargs.setdefault("BremProcessCode" , 3) # TODO: to be taken from central definition + kwargs.setdefault("TrackingGeometrySvc" , AtlasTrackingGeometrySvc) from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__McMaterialEffectsUpdator return iFatras__McMaterialEffectsUpdator(name, **kwargs ) +def getFatrasMaterialEffectsEngine(name="ISF_FatrasMaterialEffectsEngine", **kwargs): + from G4AtlasApps.SimFlags import SimFlags,simFlags + kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) + kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) + kwargs.setdefault("ParticleBroker" , getService('ISF_ParticleBrokerSvc')) + kwargs.setdefault("TruthRecordSvc" , ISF_Flags.TruthService.get_Value()) + kwargs.setdefault("ProcessSamplingTool" , getPublicTool('ISF_FatrasProcessSamplingTool')) + kwargs.setdefault("ParticleDecayHelper" , getPublicTool('ISF_FatrasParticleDecayHelper')) + # energy loss + kwargs.setdefault("EnergyLoss" , True) + kwargs.setdefault("EnergyLossSampler" , getPublicTool('ISF_FatrasEnergyLossUpdator')) + kwargs.setdefault("CreateBremPhotons" , True) + # multiple scattering + kwargs.setdefault("MultipleScattering" , True) + kwargs.setdefault("MultipleScatteringSampler" , getPublicTool('ISF_FatrasMultipleScatteringSamplerHighland')) + # the properties given throuth the JobProperties interface + kwargs.setdefault("MomentumCut" , FatrasTuningFlags.MomCutOffSec()) + kwargs.setdefault("MinimumBremPhotonMomentum" , FatrasTuningFlags.MomCutOffSec()) + # MCTruth Process Code + kwargs.setdefault("BremProcessCode" , 3) # TODO: to be taken from central definition + # the validation output + kwargs.setdefault("ValidationMode" , ISF_Flags.ValidationMode()) + kwargs.setdefault("PhysicsValidationTool" , getPublicTool('ISF_FatrasPhysicsValidationTool')) + kwargs.setdefault("OutputPrefix", '[McME] - ') + kwargs.setdefault("OutputPostfix", ' - ') + kwargs.setdefault("OutputLevel", ISF_FatrasFlags.OutputLevelGeneral()) + + from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__McMaterialEffectsEngine + return iFatras__McMaterialEffectsEngine(name, **kwargs ) + def getFatrasSTEP_Propagator(name="ISF_FatrasSTEP_Propagator", **kwargs): kwargs.setdefault("MomentumCutOff" , FatrasTuningFlags.MomCutOffSec() ) kwargs.setdefault("SimulationMode" , True ) @@ -387,6 +478,33 @@ def getFatrasExtrapolator(name="ISF_FatrasExtrapolator", **kwargs): #from TrkExTools.TrkExToolsConf import Trk__Extrapolator as Extrapolator #return Extrapolator(name, **kwargs ) +# load the Static ExtrapolationEngine +def getFatrasStaticExtrapolator(name="ISF_FatrasStaticExEngine", **kwargs): + # give the tools it needs + kwargs.setdefault("PropagationEngine", getPublicTool('ISF_FatrasStaticPropagator')) + kwargs.setdefault("MaterialEffectsEngine", getPublicTool('ISF_FatrasMaterialEffectsEngine')) + kwargs.setdefault("NavigationEngine", getPublicTool('ISF_FatrasStaticNavigationEngine')) + # configure output formatting + kwargs.setdefault("OutputPrefix", '[SE] - ') + kwargs.setdefault("OutputPostfix", ' - ') + kwargs.setdefault("OutputLevel", ISF_FatrasFlags.OutputLevelGeneral()) + from TrkExEngine.TrkExEngineConf import Trk__StaticEngine + return Trk__StaticEngine(name, **kwargs) + +def getFatrasExEngine(name="ISF_FatrasExEngine", **kwargs): + # load the tracking geometry service + from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + # assign the tools + kwargs.setdefault("ExtrapolationEngines" , [ getPublicTool('ISF_FatrasStaticExEngine') ] ) + kwargs.setdefault("TrackingGeometrySvc" , AtlasTrackingGeometrySvc) + kwargs.setdefault("PropagationEngine" , getPublicTool('ISF_FatrasStaticPropagator')) + # configure output formatting + kwargs.setdefault("OutputPrefix" , '[ME] - ') + kwargs.setdefault("OutputPostfix" , ' - ') + kwargs.setdefault("OutputLevel" , ISF_FatrasFlags.OutputLevelGeneral()) + + from TrkExEngine.TrkExEngineConf import Trk__ExtrapolationEngine + return Trk__ExtrapolationEngine(name="ISF_FatrasExEngine", **kwargs ) ################################################################################ # HIT CREATION SECTION @@ -425,6 +543,18 @@ def getFatrasHitCreatorTRT(name="ISF_FatrasHitCreatorTRT", **kwargs): from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__HitCreatorTRT return iFatras__HitCreatorTRT(name, **kwargs ) +def getFatrasPileupHitCreatorPixel(name="ISF_FatrasPileupHitCreatorPixel", **kwargs): + kwargs.setdefault("CollectionName" , 'PileupPixelHits') + return getFatrasHitCreatorPixel(name, **kwargs) + +def getFatrasPileupHitCreatorSCT(name="ISF_FatrasPileupHitCreatorSCT", **kwargs): + kwargs.setdefault("CollectionName" , 'PileupSCT_Hits') + return getFatrasHitCreatorSCT(name, **kwargs) + +def getFatrasPileupHitCreatorTRT(name="ISF_FatrasPileupHitCreatorTRT", **kwargs): + kwargs.setdefault("CollectionName" , 'PileupTRTUncompressedHits') + return getFatrasHitCreatorTRT(name, **kwargs) + ################################################################################ # TRACK CREATION SECTION ################################################################################ @@ -437,6 +567,12 @@ def getFatrasSimHitCreatorID(name="ISF_FatrasSimHitCreatorID", **kwargs): from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__SimHitCreatorID return iFatras__SimHitCreatorID(name, **kwargs ) +def getFatrasPileupSimHitCreatorID(name="ISF_FatrasPileupSimHitCreatorID", **kwargs): + kwargs.setdefault("PixelHitCreator" , getPublicTool('ISF_FatrasPileupHitCreatorPixel')) + kwargs.setdefault("SctHitCreator" , getPublicTool('ISF_FatrasPileupHitCreatorSCT')) + kwargs.setdefault("TrtHitCreator" , getPublicTool('ISF_FatrasPileupHitCreatorTRT')) + return getFatrasSimHitCreatorID(name, **kwargs ) + def getFatrasSimHitCreatorMS(name="ISF_FatrasSimHitCreatorMS", **kwargs): from G4AtlasApps.SimFlags import SimFlags,simFlags kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() ) @@ -472,7 +608,7 @@ def getFatrasSimTool(name="ISF_FatrasSimTool", **kwargs): kwargs.setdefault("ProcessSamplingTool" , getPublicTool('ISF_FatrasProcessSamplingTool')) # set the output level kwargs.setdefault("OutputLevel" , ISF_FatrasFlags.OutputLevelGeneral()) - kwargs.setdefault('ValidationOutput' , ISF_Flags.ValidationMode()) + kwargs.setdefault("ValidationOutput" , ISF_Flags.ValidationMode()) # random number service from G4AtlasApps.SimFlags import SimFlags,simFlags kwargs.setdefault( "RandomNumberService", simFlags.RandomSvc()) @@ -480,23 +616,61 @@ def getFatrasSimTool(name="ISF_FatrasSimTool", **kwargs): from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__TransportTool return iFatras__TransportTool(name, **kwargs ) +def getFatrasSimEngine(name="ISF_FatrasSimEngine", **kwargs): + kwargs.setdefault("SimHitCreatorID" , getPublicTool('ISF_FatrasSimHitCreatorID')) + # TODO: G4 Tools can not be used at the same time as Geant4 inside ISF + kwargs.setdefault("ParticleDecayHelper" , getPublicTool('ISF_FatrasParticleDecayHelper')) + # the filter setup + kwargs.setdefault("TrackFilter" , getPublicTool('ISF_FatrasKinematicFilter')) + kwargs.setdefault("NeutralFilter" , getPublicTool('ISF_FatrasKinematicFilter')) + kwargs.setdefault("PhotonFilter" , getPublicTool('ISF_FatrasKinematicFilter')) + # extrapolator - test setup + kwargs.setdefault("Extrapolator" , getPublicTool('ISF_FatrasExEngine')) + # + kwargs.setdefault("ProcessSamplingTool" , getPublicTool('ISF_FatrasProcessSamplingTool')) + # set the output level + # kwargs.setdefault("OutputLevel" , ISF_FatrasFlags.OutputLevelGeneral()) + # the validation + kwargs.setdefault("ValidationMode" , ISF_Flags.ValidationMode()) + kwargs.setdefault("PhysicsValidationTool" , getPublicTool('ISF_FatrasPhysicsValidationTool')) + # random number service + from G4AtlasApps.SimFlags import SimFlags,simFlags + kwargs.setdefault( "RandomNumberService", simFlags.RandomSvc()) + + from ISF_FatrasTools.ISF_FatrasToolsConf import iFatras__TransportEngine + return iFatras__TransportEngine(name, **kwargs ) + def getFatrasSimServiceID(name="ISF_FatrasSimSvc", **kwargs): kwargs.setdefault("Identifier" , "Fatras") + kwargs.setdefault("IDSimulationTool" , getPublicTool('ISF_FatrasSimTool')) kwargs.setdefault("SimulationTool" , getPublicTool('ISF_FatrasSimTool')) - # set the output level - kwargs.setdefault("OutputLevel" , ISF_FatrasFlags.OutputLevelGeneral()) + # set the output level + kwargs.setdefault("OutputLevel" , ISF_FatrasFlags.OutputLevelGeneral()) + # register Fatras random number stream if not already registered from G4AtlasApps.SimFlags import SimFlags,simFlags if not simFlags.RandomSeedList.checkForExistingSeed( "FatrasRnd" ): simFlags.RandomSeedList.addSeed( "FatrasRnd", 81234740, 23474923 ) - + from ISF_FatrasServices.ISF_FatrasServicesConf import iFatras__FatrasSimSvc return iFatras__FatrasSimSvc(name, **kwargs ) def getFatrasNewExtrapolationSimServiceID(name="ISF_FatrasNewExtrapolationSimSvc", **kwargs): - kwargs.setdefault("SimulationTool" , getPublicTool('ISF_FatrasNewExtrapolationSimTool')) - return getFatrasSimServiceID(name, **kwargs ) + kwargs.setdefault("Identifier" , "Fatras") + kwargs.setdefault("IDSimulationTool" , getPublicTool('ISF_FatrasSimEngine')) + kwargs.setdefault("SimulationTool" , getPublicTool('ISF_FatrasSimTool')) + + # set the output level + kwargs.setdefault("OutputLevel" , ISF_FatrasFlags.OutputLevelGeneral()) + + # register Fatras random number stream if not already registered + from G4AtlasApps.SimFlags import SimFlags,simFlags + if not simFlags.RandomSeedList.checkForExistingSeed( "FatrasRnd" ): + simFlags.RandomSeedList.addSeed( "FatrasRnd", 81234740, 23474923 ) + + from ISF_FatrasServices.ISF_FatrasServicesConf import iFatras__FatrasSimSvc + return iFatras__FatrasSimSvc(name, **kwargs ) def getFatrasGeoIDFixSimServiceID(name="ISF_FatrasGeoIDFixSimSvc", **kwargs): kwargs.setdefault("EnableGeoIDOverride" , True ) @@ -504,29 +678,11 @@ def getFatrasGeoIDFixSimServiceID(name="ISF_FatrasGeoIDFixSimSvc", **kwargs): kwargs.setdefault("GeoIDOverride" , 3 ) # ISF::fAtlasCalo return getFatrasSimServiceID(name, **kwargs ) -def getFatrasNewExtrapolationSimTool(name="ISF_FatrasNewExtrapolationSimTool", **kwargs): - # add your custom configuration of the SimTool here - # NB: only the 'delta' to the normal SimTool configuration needs to be configured here, eg: - # kwargs.setdefault("SimHitCreatorMS" , '' ) - # kwargs.setdefault("SimHitCreatorID" , 'ISF_FatrasNewExtrapolationSimHitCreatorID' ) - # .. - return getFatrasSimTool(name, **kwargs ) - def getFatrasPileupSimTool(name="ISF_FatrasPileupSimTool", **kwargs): - ## MB: Turn off track hit creation - kwargs.setdefault("TurnOffHitCreation" , True) - return getFatrasSimTool( name, **kwargs ) + kwargs.setdefault("SimHitCreatorID" , getPublicTool('ISF_FatrasPileupSimHitCreatorID')) + return getFatrasSimTool(name, **kwargs) def getFatrasPileupSimServiceID(name="ISF_FatrasPileupSimSvc", **kwargs): - kwargs.setdefault("Identifier" , "Fatras") - kwargs.setdefault("SimulationTool" , getPublicTool('ISF_FatrasPileupSimTool')) - # set the output level - kwargs.setdefault("OutputLevel" , ISF_FatrasFlags.OutputLevelGeneral()) - - # register Fatras random number stream if not already registered - from G4AtlasApps.SimFlags import SimFlags,simFlags - if not simFlags.RandomSeedList.checkForExistingSeed( "FatrasRnd" ): - simFlags.RandomSeedList.addSeed( "FatrasRnd", 81234740, 23474923 ) - - from ISF_FatrasServices.ISF_FatrasServicesConf import iFatras__FatrasSimSvc - return iFatras__FatrasSimSvc(name, **kwargs ) + kwargs.setdefault("IDSimulationTool", getPublicTool('ISF_FatrasPileupSimTool')) + kwargs.setdefault("SimulationTool" , getPublicTool('ISF_FatrasSimTool')) + return getFatrasSimServiceID(name, **kwargs) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py index 07dc77d98bf3803e84246f4ba2671a4ee815b87e..326a1c602509a5397ce28d7a485cd66948686bbc 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfigDb.py @@ -15,38 +15,53 @@ from AthenaCommon.Constants import * # FATAL,ERROR etc. import AthenaCommon.SystemOfUnits as Units -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getInDetTrackingGeometryBuilder", "ISF_InDetTrackingGeometryBuilder") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasCaloTrackingGeometryBuilder", "ISF_FatrasCaloTrackingGeometryBuilder") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMuonTrackingGeometryBuilder", "ISF_FatrasMuonTrackingGeometryBuilder") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasGeometryBuilder", "ISF_FatrasGeometryBuilder") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasNavigator", "ISF_FatrasNavigator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasChargedPropagator", "ISF_FatrasChargedPropagator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSTEP_Propagator", "ISF_FatrasSTEP_Propagator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasG4HadIntProcessor", "ISF_FatrasG4HadIntProcessor") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasParametricHadIntProcessor", "ISF_FatrasParametricHadIntProcessor") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasBetheHeitlerEnergyLossUpdator", "ISF_FatrasBetheHeitlerEnergyLossUpdator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasEnergyLossUpdator", "ISF_FatrasEnergyLossUpdator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMultipleScatteringUpdator", "ISF_FatrasMultipleScatteringUpdator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPhysicsValidationTool", "ISF_FatrasPhysicsValidationTool") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasProcessSamplingTool", "ISF_FatrasProcessSamplingTool") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMaterialUpdator" , "ISF_FatrasMaterialUpdator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasExtrapolator", "ISF_FatrasExtrapolator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasConversionCreator", "ISF_FatrasConversionCreator") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasHitCreatorPixel", "ISF_FatrasHitCreatorPixel") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasHitCreatorSCT", "ISF_FatrasHitCreatorSCT") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasHitCreatorTRT", "ISF_FatrasHitCreatorTRT") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimHitCreatorMS", "ISF_FatrasSimHitCreatorMS") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimHitCreatorID", "ISF_FatrasSimHitCreatorID") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPdgG4Particle", "ISF_FatrasPdgG4Particle") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasParticleDecayer", "ISF_FatrasParticleDecayer") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasParticleDecayHelper", "ISF_FatrasParticleDecayHelper") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasKinematicFilter", "ISF_FatrasKinematicFilter") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimTool", "ISF_FatrasSimTool") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasNewExtrapolationSimTool", "ISF_FatrasNewExtrapolationSimTool") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupSimTool", "ISF_FatrasPileupSimTool") -addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getG4RunManagerHelper", "ISF_G4RunManagerHelper") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getInDetTrackingGeometryBuilder", "ISF_InDetTrackingGeometryBuilder") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasCaloTrackingGeometryBuilder", "ISF_FatrasCaloTrackingGeometryBuilder") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMuonTrackingGeometryBuilder", "ISF_FatrasMuonTrackingGeometryBuilder") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasGeometryBuilder", "ISF_FatrasGeometryBuilder") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasNavigator", "ISF_FatrasNavigator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasChargedPropagator", "ISF_FatrasChargedPropagator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSTEP_Propagator", "ISF_FatrasSTEP_Propagator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPropagator", "ISF_FatrasPropagator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasStaticPropagator", "ISF_FatrasStaticPropagator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasStaticNavigationEngine", "ISF_FatrasStaticNavigationEngine") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasG4HadIntProcessor", "ISF_FatrasG4HadIntProcessor") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasParametricHadIntProcessor", "ISF_FatrasParametricHadIntProcessor") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasBetheHeitlerEnergyLossUpdator", "ISF_FatrasBetheHeitlerEnergyLossUpdator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasEnergyLossUpdator", "ISF_FatrasEnergyLossUpdator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasEnergyLossSamplerBetheHeitler", "ISF_FatrasEnergyLossSamplerBetheHeitler") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasEnergyLossSamplerBetheBloch", "ISF_FatrasEnergyLossSamplerBetheBloch") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMultipleScatteringUpdator", "ISF_FatrasMultipleScatteringUpdator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMultipleScatteringSamplerHighland", "ISF_FatrasMultipleScatteringSamplerHighland") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMultipleScatteringSamplerGaussianMixture", "ISF_FatrasMultipleScatteringSamplerGaussianMixture") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMultipleScatteringSamplerGeneralMixture", "ISF_FatrasMultipleScatteringSamplerGeneralMixture") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPhysicsValidationTool", "ISF_FatrasPhysicsValidationTool") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasProcessSamplingTool", "ISF_FatrasProcessSamplingTool") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMaterialUpdator" , "ISF_FatrasMaterialUpdator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasExtrapolator", "ISF_FatrasExtrapolator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasMaterialEffectsEngine", "ISF_FatrasMaterialEffectsEngine") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasStaticExtrapolator", "ISF_FatrasStaticExEngine") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasExEngine", "ISF_FatrasExEngine") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasConversionCreator", "ISF_FatrasConversionCreator") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasHitCreatorPixel", "ISF_FatrasHitCreatorPixel") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasHitCreatorSCT", "ISF_FatrasHitCreatorSCT") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasHitCreatorTRT", "ISF_FatrasHitCreatorTRT") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimHitCreatorMS", "ISF_FatrasSimHitCreatorMS") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimHitCreatorID", "ISF_FatrasSimHitCreatorID") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPdgG4Particle", "ISF_FatrasPdgG4Particle") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasParticleDecayHelper", "ISF_FatrasParticleDecayHelper") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasKinematicFilter", "ISF_FatrasKinematicFilter") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimTool", "ISF_FatrasSimTool") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimEngine", "ISF_FatrasSimEngine") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupSimTool", "ISF_FatrasPileupSimTool") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getG4RunManagerHelper", "ISF_G4RunManagerHelper") -addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasTrackingGeometrySvc", "ISF_FatrasTrackingGeometrySvc") -addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimServiceID", "ISF_FatrasSimSvc") -addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasNewExtrapolationSimServiceID", "ISF_FatrasNewExtrapolationSimSvc") -addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupSimServiceID", "ISF_FatrasPileupSimSvc") +addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasTrackingGeometrySvc", "ISF_FatrasTrackingGeometrySvc") +addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasSimServiceID", "ISF_FatrasSimSvc") +addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasNewExtrapolationSimServiceID", "ISF_FatrasNewExtrapolationSimSvc") +addService("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupSimServiceID", "ISF_FatrasPileupSimSvc") + +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupHitCreatorPixel", "ISF_FatrasPileupHitCreatorPixel") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupHitCreatorSCT", "ISF_FatrasPileupHitCreatorSCT") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupHitCreatorTRT", "ISF_FatrasPileupHitCreatorTRT") +addTool("ISF_FatrasServices.ISF_FatrasServicesConfig.getFatrasPileupSimHitCreatorID", "ISF_FatrasPileupSimHitCreatorID") diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx index 21db60871c2f97a5a8773d136450a50918baa11c..e0f5d9a94d58c7707e05d27d38a1baad907a4546 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/src/FatrasSimSvc.cxx @@ -16,15 +16,17 @@ #include "ISF_Interfaces/ITruthSvc.h" #include "ISF_Interfaces/IParticleFilter.h" #include "ISF_Event/ISFParticle.h" -#include "ISF_FatrasInterfaces/ITransportTool.h" +#include "ISF_Interfaces/IParticleProcessor.h" /** Constructor **/ iFatras::FatrasSimSvc::FatrasSimSvc(const std::string& name, ISvcLocator* svc) : BaseSimulationSvc(name, svc), + m_IDsimulationTool(""), m_simulationTool(""), m_particleFilter("") { // retrieve the simulation tool and the transport tool + declareProperty("IDSimulationTool", m_IDsimulationTool); declareProperty("SimulationTool", m_simulationTool); declareProperty("ParticleFilter", m_particleFilter); } @@ -37,8 +39,11 @@ StatusCode iFatras::FatrasSimSvc::initialize() { ATH_MSG_INFO ( m_screenOutputPrefix << "Initializing ..."); // retrieve simulation tool - if ( retrieveTool<iFatras::ITransportTool>(m_simulationTool).isFailure() ) - return StatusCode::FAILURE; + if ( retrieveTool<ISF::IParticleProcessor>(m_IDsimulationTool).isFailure() ) + return StatusCode::FAILURE; + // retrieve simulation tool + if ( retrieveTool<ISF::IParticleProcessor>(m_simulationTool).isFailure() ) + return StatusCode::FAILURE; // retrieve particle filter if ( !m_particleFilter.empty() && retrieveTool<ISF::IParticleFilter>(m_particleFilter).isFailure()) return StatusCode::FAILURE; @@ -78,7 +83,7 @@ StatusCode iFatras::FatrasSimSvc::simulate(const ISF::ISFParticle& isp) return StatusCode::SUCCESS; } /** Process Particle from particle broker */ - ISF::ISFParticle* newIsp = m_simulationTool->process(isp); + ISF::ISFParticle* newIsp = (isp.nextGeoID()==AtlasDetDescr::fAtlasID) ? m_IDsimulationTool->process(isp) : m_simulationTool->process(isp); ATH_MSG_VERBOSE( m_screenOutputPrefix << "Simulation created : " << ( newIsp ? "" : "no") << " new particle"); if (newIsp) {