ATLAS Offline Software
Loading...
Searching...
No Matches
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
27namespace ISF {
28 class ISFParticle;
29}
30
31namespace ISF {
32
34 typedef ToolHandleArray<ISF::IParticleFilter> ParticleFilterArray;
35
41
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
69 virtual StatusCode registerTrackRecordCollection(TrackRecordCollection* collection, EntryLayer layer) override final;
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
AtlasHitsVector< TrackRecord > TrackRecordCollection
ServiceHandle< ISF::IGeoIDSvc > m_geoIDSvc
GeoIDSvc will be used to determine the entry layer surface, the particle is on.
virtual bool passesFilters(const ISFParticle &particle) override final
handle for incident service
virtual ~EntryLayerToolMT()=default
Destructor.
ISF::IParticleFilter ** m_particleFilter
virtual void setupEvent() override
static thread_local std::unique_ptr< std::array< TrackRecordCollection *, ISF::fNumAtlasEntryLayers > > s_collection
The entry layer collections.
std::string m_volumeName[ISF::fNumAtlasEntryLayers]
virtual StatusCode registerTrackRecordCollection(TrackRecordCollection *collection, EntryLayer layer) override final
Register the TrackRecordCollection pointer for a layer.
virtual ISF::EntryLayer identifyEntryLayer(const ISFParticle &particle) override final
Identify the corresponding entry layer for the given particle (may return ISF::fUnsetEntryLayere if p...
ParticleFilterArray m_particleFilterHandle
Array of filters to decide whether a particle is added to the Entry/Exit layer.
virtual StatusCode initialize() override final
Athena algtool's Hooks.
EntryLayerToolMT(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
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.
ISF::IGeoIDSvc * m_geoIDSvcQuick
The interface to chose between the sub geometry services, realized as an AlgTool since it does not ha...
Definition IGeoIDSvc.h:41
The generic ISF particle definition,.
Definition ISFParticle.h:42
ISFParticleOrderedQueue.
ToolHandleArray< ISF::IParticleFilter > ParticleFilterArray
use this typedef to make the code structure more clean
EntryLayer
Identifiers for the TrackRecordCollections on the boundaries between CaloEntry: Inner Detector - Calo...
Definition EntryLayer.h:31
@ fNumAtlasEntryLayers
Definition EntryLayer.h:41