ATLAS Offline Software
ISF_Fatras/ISF_FatrasTools/src/TransportTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TransportTool.h, (c) ATLAS Detector software
8 
9 #ifndef ISF_FATRASTOOLS_TRANSPORTTOOL_H
10 #define ISF_FATRASTOOLS_TRANSPORTTOOL_H
11 
12 // Athena Base
14 #include "GaudiKernel/ToolHandle.h"
15 #include "GaudiKernel/ITHistSvc.h"
19 
20 // IFS
22 
23 // Tracking
26 // ROOT forward declarations
27 class TTree;
28 
29 //class AtlasDetectorID;
30 
31 namespace ISF {
32  class ISFParticle;
33  class IParticleHelper;
34  class IParticleFilter;
35 }
36 
37 namespace iFatras
38 {
39 
40  class IParticleDecayHelper;
41  class ISimHitCreator;
42  class IPhysicsValidationTool;
43  class IProcessSamplingTool;
44 
54  class ATLAS_NOT_THREAD_SAFE TransportTool : public extends<AthAlgTool, ISF::IParticleProcessor> // deprecated: ATLASSIM-6020
55  {
56  public:
58  TransportTool(const std::string&,const std::string&,const IInterface*);
59 
61  virtual ~TransportTool ();
62 
64  virtual StatusCode initialize() override;
65 
68  virtual StatusCode finalize() override;
69 
71  virtual
72  ISF::ISFParticle* process(const ISF::ISFParticle& isp, CLHEP::HepRandomEngine*) const override;
73 
74  private:
76  template <class T> StatusCode retrieveTool(ToolHandle<T>& thandle){
77  if (!thandle.empty() && thandle.retrieve().isFailure()){
78  ATH_MSG_FATAL( "[ fatras setup ] Cannot retrieve " << thandle << ". Abort.");
79  return StatusCode::FAILURE;
80  }
81  else {
82  ATH_MSG_DEBUG("[ fatras setup ] Successfully retrieved " << thandle);
83  }
84  return StatusCode::SUCCESS;
85  }
86 
87  /*---------------------------------------------------------------------
88  * Private members
89  *---------------------------------------------------------------------*/
90 
93  CLHEP::HepRandomEngine* m_randomEngine;
94  std::string m_randomEngineName;
95 
96 
99  ToolHandle<IPhysicsValidationTool> m_validationTool;
100 
102  ToolHandle<IParticleDecayHelper> m_particleDecayHelper;
103 
105  ToolHandle<ISimHitCreator> m_simHitCreatorID;
106  ToolHandle<ISimHitCreator> m_simHitCreatorMS;
107 
109  ToolHandle<Trk::ITimedExtrapolator> m_extrapolator;
110 
112  ToolHandle<ISF::IParticleFilter> m_trackFilter;
113  ToolHandle<ISF::IParticleFilter> m_neutralHadronFilter;
114  ToolHandle<ISF::IParticleFilter> m_photonFilter;
115  ToolHandle<ISF::IParticleHelper> m_iparticleHelper;
116  ToolHandle<IProcessSamplingTool> m_samplingTool;
117 
118  //const AtlasDetectorID* m_idHelper; //*> hit type identification
120 
121  bool m_errorPropagation; // error propagation for eloss validation
122  bool m_hitsOff; // steering of sim hit production
123 
124  };
125 }
126 
127 #endif // FATRASTOOLS_TRANSPORTTOOL_H
iFatras::TransportTool::m_errorPropagation
bool m_errorPropagation
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:121
iFatras::TransportTool::m_randomEngineName
std::string m_randomEngineName
Name of the random number stream.
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:94
iFatras::TransportTool::retrieveTool
StatusCode retrieveTool(ToolHandle< T > &thandle)
templated Tool retrieval - gives unique handling & look and feel
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:76
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
iFatras::TransportTool::m_simHitCreatorID
ToolHandle< ISimHitCreator > m_simHitCreatorID
The SimHit Creation.
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:105
TrackParameters.h
ITimedExtrapolator.h
iFatras::TransportTool::m_trackFilter
ToolHandle< ISF::IParticleFilter > m_trackFilter
Filtering setup & other ISF stuff.
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:112
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
iFatras::TransportTool::m_randomEngine
CLHEP::HepRandomEngine * m_randomEngine
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:93
IParticleProcessor.h
initialize
void initialize()
Definition: run_EoverP.cxx:894
iFatras::TransportTool
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:55
ISF::ISFParticle
Definition: ISFParticle.h:42
iFatras::TransportTool::m_validationTool
ToolHandle< IPhysicsValidationTool > m_validationTool
the ntuple
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:99
PdgToParticleHypothesis.h
iFatras::TransportTool::m_rndGenSvc
ServiceHandle< IAtRndmGenSvc > m_rndGenSvc
Random Generator service
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:92
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
iFatras::TransportTool::m_validationOutput
bool m_validationOutput
Validation output with histogram service.
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:98
iFatras
Definition: ActsFatrasSimTool.h:52
iFatras::TransportTool::m_particleDecayHelper
ToolHandle< IParticleDecayHelper > m_particleDecayHelper
Particle Decay.
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:102
iFatras::TransportTool::m_hitsOff
bool m_hitsOff
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:122
iFatras::TransportTool::m_iparticleHelper
ToolHandle< ISF::IParticleHelper > m_iparticleHelper
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:115
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthAlgTool.h
iFatras::TransportTool::m_neutralHadronFilter
ToolHandle< ISF::IParticleFilter > m_neutralHadronFilter
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:113
IAtRndmGenSvc.h
iFatras::TransportTool::m_photonFilter
ToolHandle< ISF::IParticleFilter > m_photonFilter
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:114
Trk::PdgToParticleHypothesis
Definition: PdgToParticleHypothesis.h:29
iFatras::TransportTool::m_samplingTool
ToolHandle< IProcessSamplingTool > m_samplingTool
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:116
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
iFatras::TransportTool::m_simHitCreatorMS
ToolHandle< ISimHitCreator > m_simHitCreatorMS
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:106
checker_macros.h
Define macros for attributes used to control the static checker.
iFatras::TransportTool::m_pdgToParticleHypothesis
Trk::PdgToParticleHypothesis m_pdgToParticleHypothesis
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:119
iFatras::TransportTool::m_extrapolator
ToolHandle< Trk::ITimedExtrapolator > m_extrapolator
The Extrapolator setup.
Definition: ISF_Fatras/ISF_FatrasTools/src/TransportTool.h:109
ServiceHandle< IAtRndmGenSvc >