ATLAS Offline Software
EntryLayerTool.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_ENTRYLAYERTOOL_H
6 #define ISF_GEANT4COMMONTOOLS_ENTRYLAYERTOOL_H 1
7 
8 // Gaudi
9 #include "GaudiKernel/ToolHandle.h"
10 #include "GaudiKernel/ServiceHandle.h"
11 // Athena
13 
14 // ISF interface
16 
17 // TrackRecordCollection (and TrackRecord)
19 
20 // stl includes
21 #include <string>
22 
23 namespace ISF {
24  class ISFParticle;
25  class IParticleFilter;
26  class IGeoIDSvc;
27 }
28 
29 namespace ISF {
30 
32  typedef ToolHandleArray<ISF::IParticleFilter> ParticleFilterArray;
33 
40  class EntryLayerTool : public extends<AthAlgTool, ISF::IEntryLayerTool> {
41 
42  public:
44  EntryLayerTool( const std::string& t, const std::string& n, const IInterface* p );
45 
47  virtual ~EntryLayerTool() = default;
48 
50  virtual StatusCode initialize() override final;
51 
53  virtual bool passesFilters( const ISFParticle& particle) override final;
54 
57  virtual ISF::EntryLayer identifyEntryLayer( const ISFParticle& particle) override final;
58 
61  ISF::EntryLayer entryLayer) override final;
62 
65 
66  virtual void setupEvent() override final;
67 
68  private:
71 
75 
80 
85  };
86 
87 }
88 
89 #endif //> !ISF_GEANT4COMMONTOOLS_ENTRYLAYERTOOL_H
ISF::EntryLayerTool::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: EntryLayerTool.cxx:156
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
ISF::EntryLayerTool::passesFilters
virtual bool passesFilters(const ISFParticle &particle) override final
Check if given particle passes the EntryLayer filters.
Definition: EntryLayerTool.cxx:109
ISF::EntryLayerTool::m_SGName
std::string m_SGName[ISF::fNumAtlasEntryLayers]
Definition: EntryLayerTool.h:83
ISF::EntryLayerTool::m_particleFilterHandle
ParticleFilterArray m_particleFilterHandle
Array of filters to decide whether a particle is added to the Entry/Exit layer.
Definition: EntryLayerTool.h:77
ISF::EntryLayerTool::initialize
virtual StatusCode initialize() override final
Athena algtool's Hooks.
Definition: EntryLayerTool.cxx:64
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
ISF::EntryLayerTool
Definition: EntryLayerTool.h:40
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
IEntryLayerTool.h
ISF::EntryLayerTool::m_particleFilter
ISF::IParticleFilter ** m_particleFilter
Definition: EntryLayerTool.h:78
ISF::EntryLayerTool::identifyEntryLayer
virtual ISF::EntryLayer identifyEntryLayer(const ISFParticle &particle) override final
Identify the corresponding entry layer for the given particle (may return ISF::fUnsetEntryLayer if pa...
Definition: EntryLayerTool.cxx:122
ISF::EntryLayerTool::setupEvent
virtual void setupEvent() override final
Definition: EntryLayerTool.cxx:95
ISF::fNumAtlasEntryLayers
@ fNumAtlasEntryLayers
Definition: EntryLayer.h:41
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ISF::EntryLayerTool::m_geoIDSvcQuick
ISF::IGeoIDSvc * m_geoIDSvcQuick
Definition: EntryLayerTool.h:74
beamspotman.n
n
Definition: beamspotman.py:731
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::EntryLayerTool::m_geoIDSvc
ServiceHandle< ISF::IGeoIDSvc > m_geoIDSvc
GeoIDSvc will be used to determine the entry layer surface, the particle is on.
Definition: EntryLayerTool.h:73
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TrackRecordCollection.h
ISF::EntryLayerTool::EntryLayerTool
EntryLayerTool(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: EntryLayerTool.cxx:18
ISF::EntryLayerTool::m_numParticleFilters
size_t m_numParticleFilters
Definition: EntryLayerTool.h:79
ISF::EntryLayer
EntryLayer
Definition: EntryLayer.h:31
ISF::EntryLayerTool::setupSGCollection
TrackRecordCollection * setupSGCollection(const std::string &name)
used to setup a TrackRecordCollection on storegate
Definition: EntryLayerTool.cxx:218
ISF::EntryLayerTool::registerTrackRecordCollection
virtual StatusCode registerTrackRecordCollection(TrackRecordCollection *collection, EntryLayer layer) override final
Register the TrackRecordCollection pointer for a layer.
Definition: EntryLayerTool.cxx:209
ISF::EntryLayerTool::~EntryLayerTool
virtual ~EntryLayerTool()=default
Destructor.
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
ISF::EntryLayerTool::m_collection
TrackRecordCollection * m_collection[ISF::fNumAtlasEntryLayers]
The entry layer collections.
Definition: EntryLayerTool.h:82
ISF::EntryLayerTool::m_volumeName
std::string m_volumeName[ISF::fNumAtlasEntryLayers]
Definition: EntryLayerTool.h:84
ServiceHandle
Definition: ClusterMakerTool.h:37
ISF::IParticleFilter
Definition: IParticleFilter.h:28