30 declareProperty(
"GeoIDSvc",
32 "AthenaService used to indentify sub-detector by (x,y,z) coordintes.");
35 declareProperty(
"ParticleFilters",
37 "ISF Particle filters, defining whether a particle will be stored or not.");
40 declareProperty(
"CaloEntryLayer",
42 "Name of CaloEntryLayer collection on Storegate");
43 declareProperty(
"MuonEntryLayer",
45 "Name of MuonEntryLayer collection on Storegate");
46 declareProperty(
"MuonExitLayer",
48 "Name of MuonExitLayer collection on Storegate");
51 declareProperty(
"CaloEntryVolumeString",
53 "VolumeName in TrackRecords in CaloEntryLayer");
54 declareProperty(
"MuonEntryVolumeString",
56 "VolumeName in TrackRecords in MuonEntryLayer");
57 declareProperty(
"MuonExitVolumeString",
59 "VolumeName in TrackRecords in MuonExitLayer");
71 return StatusCode::FAILURE;
80 return StatusCode::FAILURE;
91 return StatusCode::SUCCESS;
133 if ( onIDSurface && onCaloSurface ) {
143 if (onCaloSurface && onMSSurface) {
147 else if (onMSSurface) {
175 ATH_MSG_VERBOSE(
"Particle >>" << particle <<
"<< hit boundary surface, "
176 "adding it to '" <<
m_SGName[layerHit] <<
"' TrackRecord collection");
180 CLHEP::Hep3Vector hepPos( pos.x(), pos.y(), pos.z() );
181 CLHEP::Hep3Vector hepMom( mom.x(), mom.y(), mom.z() );
183 double mass = particle.mass();
184 double energy = sqrt(mass*mass + mom.mag2());
188 auto truthBinding = particle.getTruthBinding();
189 auto generationZeroGenParticle = truthBinding ? truthBinding->getGenerationZeroGenParticle() :
nullptr;
191 const int id = generationZeroGenParticle ?
HepMC::uniqueID(generationZeroGenParticle) : particle.id();
192 const int status = generationZeroGenParticle ? generationZeroGenParticle->status() : particle.status();
199 particle.timeStamp(),
212 return StatusCode::SUCCESS;
225 if ( (evtStore()->retrieve( collection, collectionName)).isFailure() )
226 ATH_MSG_ERROR(
"[ --- ] Unable to retrieve TrackRecordCollection " << collectionName);
230 if ( (evtStore()->record( collection, collectionName,
true)).isFailure() ) {
231 ATH_MSG_ERROR(
"[ --- ] Unable to record SiHitCollection " << collectionName);
#define ATH_MSG_VERBOSE(x)
AtlasHitsVector< TrackRecord > TrackRecordCollection
std::string m_volumeName[ISF::fNumAtlasEntryLayers]
virtual StatusCode initialize() override final
Athena algtool's Hooks.
virtual void setupEvent() override final
ServiceHandle< ISF::IGeoIDSvc > m_geoIDSvc
GeoIDSvc will be used to determine the entry layer surface, the particle is on.
std::string m_SGName[ISF::fNumAtlasEntryLayers]
size_t m_numParticleFilters
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.
TrackRecordCollection * setupSGCollection(const std::string &name)
used to setup a TrackRecordCollection on storegate
EntryLayerTool(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
virtual bool passesFilters(const ISFParticle &particle) override final
Check if given particle passes the EntryLayer filters.
virtual ISF::EntryLayer identifyEntryLayer(const ISFParticle &particle) override final
Identify the corresponding entry layer for the given particle (may return ISF::fUnsetEntryLayer if pa...
virtual StatusCode registerTrackRecordCollection(TrackRecordCollection *collection, EntryLayer layer) override final
Register the TrackRecordCollection pointer for a layer.
TrackRecordCollection * m_collection[ISF::fNumAtlasEntryLayers]
The entry layer collections.
ParticleFilterArray m_particleFilterHandle
Array of filters to decide whether a particle is added to the Entry/Exit layer.
ISF::IParticleFilter ** m_particleFilter
ISF::IGeoIDSvc * m_geoIDSvcQuick
The generic ISF particle definition,.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
Eigen::Matrix< double, 3, 1 > Vector3D
EntryLayer
Identifiers for the TrackRecordCollections on the boundaries between CaloEntry: Inner Detector - Calo...