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
18 
19 // TrackRecordCollection (and TrackRecord)
21 
22 // stl includes
23 #include <array>
24 #include <memory>
25 #include <string>
26 
27 namespace ISF {
28  class ISFParticle;
29 }
30 
31 namespace ISF {
32 
34  typedef ToolHandleArray<ISF::IParticleFilter> ParticleFilterArray;
35 
42  class EntryLayerToolMT : public extends<AthAlgTool, ISF::IEntryLayerTool> {
43 
44  public:
46  EntryLayerToolMT( const std::string& t, const std::string& n, const IInterface* p );
47 
49  virtual ~EntryLayerToolMT() = default;
50 
52  virtual StatusCode initialize() override final;
53 
54  // /** handle for incident service */
55  // void handle(const Incident& inc);
56 
58  virtual bool passesFilters( const ISFParticle& particle) override final;
59 
62  virtual ISF::EntryLayer identifyEntryLayer( const ISFParticle& particle) override final;
63 
66  ISF::EntryLayer entryLayer) override final;
67 
70 
71  virtual void setupEvent() override { return; }
72 
73  private:
75  ServiceHandle<ISF::IGeoIDSvc> m_geoIDSvc{this, "GeoIDSvc", "GeoIDSvc", "AthenaService used to indentify sub-detector by (x,y,z) coordintes."};
77 
79  ParticleFilterArray m_particleFilterHandle{this, "ParticleFilters", {}, "ISF Particle filters, defining whether a particle will be stored or not."};
82 
84  static thread_local std::unique_ptr<std::array<TrackRecordCollection*, ISF::fNumAtlasEntryLayers>> s_collection;
86  };
87 
88 }
89 
90 #endif //> !ISF_GEANT4COMMONTOOLS_ENTRYLAYERTOOL_H
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
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:72
AtlasHitsVector
Definition: AtlasHitsVector.h:32
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:85
IEntryLayerTool.h
ISF::EntryLayerToolMT::EntryLayerToolMT
EntryLayerToolMT(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: EntryLayerToolMT.cxx:16
ISF::fNumAtlasEntryLayers
@ fNumAtlasEntryLayers
Definition: EntryLayer.h:41
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
ISF::EntryLayerToolMT::~EntryLayerToolMT
virtual ~EntryLayerToolMT()=default
Destructor.
beamspotman.n
n
Definition: beamspotman.py:727
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:79
ISF::EntryLayerToolMT::passesFilters
virtual bool passesFilters(const ISFParticle &particle) override final
Check if given particle passes the EntryLayer filters.
Definition: EntryLayerToolMT.cxx:59
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:75
IGeoIDSvc.h
ISF::EntryLayerToolMT::registerTrackRecordCollection
virtual StatusCode registerTrackRecordCollection(TrackRecordCollection *collection, EntryLayer layer) override final
Register the TrackRecordCollection pointer for a layer.
Definition: EntryLayerToolMT.cxx:159
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:106
ISF::EntryLayerToolMT::setupEvent
virtual void setupEvent() override
Definition: EntryLayerToolMT.h:71
ISF::EntryLayerToolMT::m_geoIDSvcQuick
ISF::IGeoIDSvc * m_geoIDSvcQuick
Definition: EntryLayerToolMT.h:76
ISF::EntryLayerToolMT::m_particleFilter
ISF::IParticleFilter ** m_particleFilter
Definition: EntryLayerToolMT.h:80
TrackRecordCollection.h
ISF::EntryLayer
EntryLayer
Definition: EntryLayer.h:31
ISF::EntryLayerToolMT
Definition: EntryLayerToolMT.h:42
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
ISF::EntryLayerToolMT::s_collection
static thread_local std::unique_ptr< std::array< TrackRecordCollection *, ISF::fNumAtlasEntryLayers > > s_collection
The entry layer collections.
Definition: EntryLayerToolMT.h:84
ISF::EntryLayerToolMT::m_numParticleFilters
size_t m_numParticleFilters
Definition: EntryLayerToolMT.h:81
ISF::EntryLayerToolMT::initialize
virtual StatusCode initialize() override final
Athena algtool's Hooks.
Definition: EntryLayerToolMT.cxx:34
ServiceHandle< ISF::IGeoIDSvc >
ISF::IParticleFilter
Definition: IParticleFilter.h:28