21 declareProperty(
"CaloEntryVolumeString",
23 "VolumeName in TrackRecords in CaloEntryLayer");
24 declareProperty(
"MuonEntryVolumeString",
26 "VolumeName in TrackRecords in MuonEntryLayer");
27 declareProperty(
"MuonExitVolumeString",
29 "VolumeName in TrackRecords in MuonExitLayer");
54 return StatusCode::SUCCESS;
83 if ( onIDSurface && onCaloSurface ) {
93 if (onCaloSurface && onMSSurface) {
97 else if (onMSSurface) {
125 ATH_MSG_VERBOSE(
"Particle >>" << particle <<
"<< hit boundary surface, "
126 "adding it to '" << (*
s_collection)[layerHit]->
Name() <<
"' TrackRecord collection");
130 CLHEP::Hep3Vector hepPos( pos.x(), pos.y(), pos.z() );
131 CLHEP::Hep3Vector hepMom( mom.x(), mom.y(), mom.z() );
133 double mass = particle.mass();
134 double energy = std::sqrt(mass*mass + mom.mag2());
138 auto truthBinding = particle.getTruthBinding();
139 auto generationZeroGenParticle = truthBinding ? truthBinding->getGenerationZeroGenParticle() :
nullptr;
141 const int id = generationZeroGenParticle ?
HepMC::uniqueID(generationZeroGenParticle) : particle.id();
142 const int status = generationZeroGenParticle ? generationZeroGenParticle->status() : particle.status();
144 (*s_collection)[layerHit]->Emplace(particle.pdgCode(),
149 particle.timeStamp(),
163 s_collection = std::make_unique<std::array<TrackRecordCollection*, ISF::fNumAtlasEntryLayers>>();
165 (*s_collection)[layer]=collection;
166 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
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
ISF::IParticleFilter ** m_particleFilter
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...
size_t m_numParticleFilters
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 generic ISF particle definition,.
Eigen::Matrix< double, 3, 1 > Vector3D
EntryLayer
Identifiers for the TrackRecordCollections on the boundaries between CaloEntry: Inner Detector - Calo...