ATLAS Offline Software
EntryLayerToolMT.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_GEANT4COMMONTOOLS_ENTRYLAYERTOOLMT_H
6 #define ISF_GEANT4COMMONTOOLS_ENTRYLAYERTOOLMT_H 1
7 
8 // Gaudi
9 #include "GaudiKernel/ToolHandle.h"
10 #include "GaudiKernel/ServiceHandle.h"
11 // Athena
13 
14 // ISF interfaces
19 
20 // TrackRecordCollection (and TrackRecord)
22 
23 // stl includes
24 #include <string>
25 
26 namespace ISF {
27  class ISFParticle;
28 }
29 
30 namespace ISF {
31 
33  typedef ToolHandleArray<ISF::IParticleFilter> ParticleFilterArray;
34 
41  class EntryLayerToolMT : public extends<AthAlgTool, ISF::IEntryLayerTool> {
42 
43  public:
45  EntryLayerToolMT( const std::string& t, const std::string& n, const IInterface* p );
46 
48  virtual ~EntryLayerToolMT() = default;
49 
51  virtual StatusCode initialize() override final;
52 
53  // /** handle for incident service */
54  // void handle(const Incident& inc);
55 
57  virtual bool passesFilters( const ISFParticle& particle) override final;
58 
61  virtual ISF::EntryLayer identifyEntryLayer( const ISFParticle& particle) override final;
62 
65  ISF::EntryLayer entryLayer) override final;
66 
69 
70  virtual void setupEvent() override { return; }
71 
72  private:
74  ServiceHandle<ISF::IGeoIDSvc> m_geoIDSvc{this, "GeoIDSvc", "GeoIDSvc", "AthenaService used to indentify sub-detector by (x,y,z) coordintes."};
76 
78  ParticleFilterArray m_particleFilterHandle{this, "ParticleFilters", {}, "ISF Particle filters, defining whether a particle will be stored or not."};
81 
85  };
86 
87 }
88 
89 #endif //> !ISF_GEANT4COMMONTOOLS_ENTRYLAYERTOOL_H
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
thread_utils::ThreadLocalOwner
A ThreadLocalHolder which owns its objects.
Definition: ThreadLocalHolder.h:94
ThreadLocalHolder.h
Defines template helper classes for thread-local storage.
ISF::EntryLayerToolMT::identifyEntryLayer
virtual ISF::EntryLayer identifyEntryLayer(const ISFParticle &particle) override final
Identify the corresponding entry layer for the given particle (may return ISF::fUnsetEntryLayere if p...
Definition: EntryLayerToolMT.cxx:70
AtlasHitsVector
Definition: AtlasHitsVector.h:33
ISF::ISFParticle
Definition: ISFParticle.h:42
ISF::ParticleFilterArray
ToolHandleArray< ISF::IParticleFilter > ParticleFilterArray
use this typedef to make the code structure more clean
Definition: EntryLayerTool.h:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ISF::EntryLayerToolMT::m_volumeName
std::string m_volumeName[ISF::fNumAtlasEntryLayers]
Definition: EntryLayerToolMT.h:84
IEntryLayerTool.h
ISF::EntryLayerToolMT::EntryLayerToolMT
EntryLayerToolMT(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: EntryLayerToolMT.cxx:14
ISF::fNumAtlasEntryLayers
@ fNumAtlasEntryLayers
Definition: EntryLayer.h:41
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ISF::EntryLayerToolMT::~EntryLayerToolMT
virtual ~EntryLayerToolMT()=default
Destructor.
beamspotman.n
n
Definition: beamspotman.py:731
IParticleFilter.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
AthAlgTool.h
ISF::IGeoIDSvc
Definition: IGeoIDSvc.h:41
ISF::EntryLayerToolMT::m_particleFilterHandle
ParticleFilterArray m_particleFilterHandle
Array of filters to decide whether a particle is added to the Entry/Exit layer.
Definition: EntryLayerToolMT.h:78
ISF::EntryLayerToolMT::passesFilters
virtual bool passesFilters(const ISFParticle &particle) override final
Check if given particle passes the EntryLayer filters.
Definition: EntryLayerToolMT.cxx:57
ISF::EntryLayerToolMT::m_geoIDSvc
ServiceHandle< ISF::IGeoIDSvc > m_geoIDSvc
GeoIDSvc will be used to determine the entry layer surface, the particle is on.
Definition: EntryLayerToolMT.h:74
IGeoIDSvc.h
ISF::EntryLayerToolMT::registerTrackRecordCollection
virtual StatusCode registerTrackRecordCollection(TrackRecordCollection *collection, EntryLayer layer) override final
Register the TrackRecordCollection pointer for a layer.
Definition: EntryLayerToolMT.cxx:157
ISF::EntryLayerToolMT::registerParticle
virtual ISF::EntryLayer registerParticle(const ISF::ISFParticle &particle, ISF::EntryLayer entryLayer) override final
Add the given particle to the corresponding Entry/Exit layer if applicable.
Definition: EntryLayerToolMT.cxx:104
ISF::EntryLayerToolMT::setupEvent
virtual void setupEvent() override
Definition: EntryLayerToolMT.h:70
ISF::EntryLayerToolMT::m_geoIDSvcQuick
ISF::IGeoIDSvc * m_geoIDSvcQuick
Definition: EntryLayerToolMT.h:75
ISF::EntryLayerToolMT::m_particleFilter
ISF::IParticleFilter ** m_particleFilter
Definition: EntryLayerToolMT.h:79
TrackRecordCollection.h
ISF::EntryLayer
EntryLayer
Definition: EntryLayer.h:31
ISF::EntryLayerToolMT
Definition: EntryLayerToolMT.h:41
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
ISF::EntryLayerToolMT::m_numParticleFilters
size_t m_numParticleFilters
Definition: EntryLayerToolMT.h:80
ISF::EntryLayerToolMT::m_collectionHolder
thread_utils::ThreadLocalOwner< std::array< TrackRecordCollection *, ISF::fNumAtlasEntryLayers > > m_collectionHolder
The entry layer collections.
Definition: EntryLayerToolMT.h:83
ISF::EntryLayerToolMT::initialize
virtual StatusCode initialize() override final
Athena algtool's Hooks.
Definition: EntryLayerToolMT.cxx:32
ServiceHandle< ISF::IGeoIDSvc >
ISF::IParticleFilter
Definition: IParticleFilter.h:28