ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ThinGeantTruthAlg Class Referencefinal

#include <ThinGeantTruthAlg.h>

Inheritance diagram for ThinGeantTruthAlg:
Collaboration diagram for ThinGeantTruthAlg:

Public Member Functions

virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual StatusCode execute (const EventContext &ctx) const override final
 
void ancestors (const xAOD::TruthParticle *, std::vector< bool > &, std::unordered_set< int > &) const
 Inline method. More...
 
void descendants (const xAOD::TruthParticle *, std::vector< bool > &, std::unordered_set< int > &) const
 
 AthReentrantAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters: More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

StringProperty m_streamName
 
Gaudi::Property< float > m_etaMaxEgTruth
 
Gaudi::Property< bool > m_keepMuons { this, "keepMuons", true }
 
Gaudi::Property< bool > m_keepEGamma { this, "keepEGamma", true }
 
Gaudi::Property< std::vector< int > > m_longlived
 
SG::ThinningHandleKey< xAOD::TruthParticleContainerm_truthParticlesKey
 
SG::ThinningHandleKey< xAOD::TruthVertexContainerm_truthVerticesKey
 
SG::ReadHandleKey< xAOD::ElectronContainerm_electronsKey
 
SG::ReadHandleKey< xAOD::ElectronContainerm_fwdElectronsKey
 
SG::ReadHandleKey< xAOD::PhotonContainerm_photonsKey
 
SG::ReadHandleKey< xAOD::MuonContainerm_muonsKey { this, "MuonsKey", "Muons", "Name of the input muon container" }
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_egammaTruthKey
 
std::atomic< unsigned long > m_nEventsProcessed {}
 Counters. More...
 
std::atomic< unsigned long > m_nParticlesProcessed {}
 
std::atomic< unsigned long > m_nVerticesProcessed {}
 
std::atomic< unsigned long > m_nParticlesThinned {}
 
std::atomic< unsigned long > m_nVerticesThinned {}
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 29 of file ThinGeantTruthAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ ancestors()

void ThinGeantTruthAlg::ancestors ( const xAOD::TruthParticle pHead,
std::vector< bool > &  particleMask,
std::unordered_set< int > &  encounteredUniqueIDs 
) const

Inline method.

Definition at line 307 of file ThinGeantTruthAlg.cxx.

310 {
311 
312  // Check that this uniqueID hasn't been seen before (e.g. we are in a loop)
313  std::unordered_set<int>::const_iterator found =
314  encounteredUniqueIDs.find(HepMC::uniqueID(pHead));
315  if (found != encounteredUniqueIDs.end())
316  return;
317  encounteredUniqueIDs.insert(HepMC::uniqueID(pHead));
318 
319  // Save particle position in the mask
320  int headIndex = pHead->index();
321  particleMask[headIndex] = true;
322 
323  // Get the production vertex
324  const xAOD::TruthVertex* prodVtx(nullptr);
325  if (pHead->hasProdVtx()) {
326  prodVtx = pHead->prodVtx();
327  } else {
328  return;
329  }
330 
331  // Get children particles and self-call
332  int nParents = prodVtx->nIncomingParticles();
333  for (int i = 0; i < nParents; ++i)
334  ancestors(prodVtx->incomingParticle(i), particleMask, encounteredUniqueIDs);
335 }

◆ AthReentrantAlgorithm()

AthReentrantAlgorithm::AthReentrantAlgorithm

Constructor with parameters:

Definition at line 90 of file AthReentrantAlgorithm.cxx.

22  :
24 {
25 
26  // Set up to run AthAlgorithmDHUpdate in sysInitialize before
27  // merging depedency lists. This extends the output dependency
28  // list with any symlinks implied by inheritance relations.
29  m_updateDataHandles =
30  std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
32  std::move (m_updateDataHandles));
33 }

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ descendants()

void ThinGeantTruthAlg::descendants ( const xAOD::TruthParticle pHead,
std::vector< bool > &  particleMask,
std::unordered_set< int > &  encounteredUniqueIDs 
) const

Definition at line 342 of file ThinGeantTruthAlg.cxx.

346 {
347  // Check that this unique ID hasn't been seen before (e.g. we are in a loop)
348  std::unordered_set<int>::const_iterator found =
349  encounteredUniqueIDs.find(HepMC::uniqueID(pHead));
350  if (found != encounteredUniqueIDs.end())
351  return;
352  encounteredUniqueIDs.insert(HepMC::uniqueID(pHead));
353 
354  // Save the particle position in the mask
355  int headIndex = pHead->index();
356  particleMask[headIndex] = true;
357 
358  // Get the decay vertex
359  const xAOD::TruthVertex* decayVtx(nullptr);
360  if (pHead->hasDecayVtx()) {
361  decayVtx = pHead->decayVtx();
362  } else {
363  return;
364  }
365 
366  // Get children particles and self-call
367  int nChildren = decayVtx->nOutgoingParticles();
368  for (int i = 0; i < nChildren; ++i) {
369  descendants(
370  decayVtx->outgoingParticle(i), particleMask, encounteredUniqueIDs);
371  }
372 
373  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode ThinGeantTruthAlg::execute ( const EventContext &  ctx) const
finaloverridevirtual

Definition at line 72 of file ThinGeantTruthAlg.cxx.

73 {
74  // Increase the event counter
76 
77  // Retrieve truth and vertex containers
79  m_truthParticlesKey, ctx);
81  m_truthVerticesKey, ctx);
82  if (!truthParticles.isValid()) {
83  ATH_MSG_FATAL("No TruthParticleContainer with key " << m_truthParticlesKey.key() << " found.");
84  return StatusCode::FAILURE;
85  }
86  if (!truthVertices.isValid()) {
87  ATH_MSG_FATAL("No TruthVertexContainer with key " << m_truthVerticesKey.key() << " found.");
88  return StatusCode::FAILURE;
89  }
90 
91  // Loop over photons, electrons and muons and get the associated truth
92  // particles Retain the associated index number
93  std::vector<int> recoParticleTruthIndices;
94  std::vector<int> egammaTruthIndices{};
95 
96  // Muons
97  if (m_keepMuons) {
99  // Retrieve muons, electrons and photons
100  if (!muons.isValid()) {
101  ATH_MSG_WARNING("No muon container with key " << m_muonsKey.key() << " found.");
102  }
103  for (const xAOD::Muon* muon : *muons) {
106  if (truthMuon) {
107  recoParticleTruthIndices.push_back(truthMuon->index());
108  }
109  }
110  }
111 
112  // Electrons and photons
113  if (m_keepEGamma) {
114 
115  // Electrons
117  if (!electrons.isValid()) {
118  ATH_MSG_WARNING("No electron container with key " << m_electronsKey.key() << " found.");
119  }
120  for (const xAOD::Electron* electron : *electrons) {
121  const xAOD::TruthParticle* truthElectron =
123  if (truthElectron) {
124  recoParticleTruthIndices.push_back(truthElectron->index());
125  }
126  }
127 
128  // Forward Electrons
129  if (!m_fwdElectronsKey.empty()) {
131  ctx);
132  if (!fwdElectrons.isValid()) {
133  ATH_MSG_WARNING("No forward electron container with key "
134  << m_fwdElectronsKey.key() << " found.");
135  }
136  for (const xAOD::Electron* electron : *fwdElectrons) {
137  const xAOD::TruthParticle* truthElectron =
139  if (truthElectron) {
140  recoParticleTruthIndices.push_back(truthElectron->index());
141  }
142  }
143  }
144 
145  // Photons
147  if (!photons.isValid()) {
148  ATH_MSG_WARNING("No photon container with key " << m_photonsKey.key() << " found.");
149  }
150 
151  for (const xAOD::Photon* photon : *photons) {
152  const xAOD::TruthParticle* truthPhoton =
154  if (truthPhoton) {
155  recoParticleTruthIndices.push_back(truthPhoton->index());
156  }
157  }
158 
159  // egamma Truth Particles
161  m_egammaTruthKey, ctx);
162  if (!egammaTruthParticles.isValid()) {
163  ATH_MSG_WARNING("No e-gamma truth container with key " << m_egammaTruthKey.key() << " found.");
164  }
165 
166  for (const xAOD::TruthParticle* egTruthParticle : *egammaTruthParticles) {
167 
168  static const SG::AuxElement::ConstAccessor<int> accType("truthType");
169 
170  if (!accType.isAvailable(*egTruthParticle) ||
171  accType(*egTruthParticle) != MCTruthPartClassifier::IsoElectron ||
172  std::abs(egTruthParticle->eta()) > m_etaMaxEgTruth) {
173  continue;
174  }
175  // Only isolated true electrons
177  static const SG::AuxElement::ConstAccessor<TruthLink_t> linkToTruth(
178  "truthParticleLink");
179  if (!linkToTruth.isAvailable(*egTruthParticle)) {
180  continue;
181  }
182 
183  const TruthLink_t& truthegamma = linkToTruth(*egTruthParticle);
184  if (!truthegamma.isValid()) {
185  continue;
186  }
187  egammaTruthIndices.push_back((*truthegamma)->index());
188  }
189  }
190 
191  // Set up masks
192  std::vector<bool> particleMask, vertexMask;
193  int nTruthParticles = truthParticles->size();
194  int nTruthVertices = truthVertices->size();
195  m_nParticlesProcessed.fetch_add(nTruthParticles, std::memory_order_relaxed);
196  m_nVerticesProcessed.fetch_add(nTruthVertices, std::memory_order_relaxed);
197  particleMask.assign(nTruthParticles, false);
198  vertexMask.assign(nTruthVertices, false);
199 
200  // Vector of pairs keeping track of how many incoming/outgoing particles each
201  // vertex has
202  std::vector<std::pair<int, int>> vertexLinksCounts;
203  for (const auto *vertex : *truthVertices) {
204  std::pair<int, int> tmpPair;
205  tmpPair.first = vertex->nIncomingParticles();
206  tmpPair.second = vertex->nOutgoingParticles();
207  vertexLinksCounts.push_back(tmpPair);
208  }
209 
210  // Loop over truth particles and update mask
211  std::unordered_set<int> encounteredUniqueIDs; // for loop protection
212  for (int i = 0; i < nTruthParticles; ++i) {
213  encounteredUniqueIDs.clear();
214  const xAOD::TruthParticle* particle = (*truthParticles)[i];
215  // Retain status 1 BSM particles and descendants
217  descendants(particle, particleMask, encounteredUniqueIDs);
218  encounteredUniqueIDs.clear();
219  }
220  // Retain children of longer-lived generator particles
221  if (MC::isStable(particle)) {
222  int pdgId = abs(particle->pdgId());
223  if (std::find(m_longlived.begin(), m_longlived.end(), pdgId) !=
224  m_longlived.end()) {
225  const xAOD::TruthVertex* decayVtx(nullptr);
226  if (particle->hasDecayVtx()) {
227  decayVtx = particle->decayVtx();
228  }
229  int nChildren = 0;
230  if (decayVtx)
231  nChildren = decayVtx->nOutgoingParticles();
232  for (int i = 0; i < nChildren; ++i) {
233  particleMask[decayVtx->outgoingParticle(i)->index()] = true;
234  }
235  }
236  }
237 
238  // Retain particles and their descendants/ancestors associated with the
239  // reconstructed objects
240  if (std::find(recoParticleTruthIndices.begin(),
241  recoParticleTruthIndices.end(),
242  i) != recoParticleTruthIndices.end()) {
243  if (HepMC::is_simulation_particle(particle)) { // only need to do this for Geant particles since
244  // non-Geant are kept anyway
245  ancestors(particle, particleMask, encounteredUniqueIDs);
246  encounteredUniqueIDs.clear();
247  descendants(particle, particleMask, encounteredUniqueIDs);
248  encounteredUniqueIDs.clear();
249  }
250  }
251 
252  // Retain particles and their descendants associated with the egamma Truth
253  // Particles
254  if (std::find(egammaTruthIndices.begin(), egammaTruthIndices.end(), i) !=
255  egammaTruthIndices.end()) {
256  descendants(particle, particleMask, encounteredUniqueIDs);
257  encounteredUniqueIDs.clear();
258  }
259 
261  particleMask[i] = true;
262  }
263  }
264 
265  // Loop over the mask and update vertex association counters
266  for (int i = 0; i < nTruthParticles; ++i) {
267  if (!particleMask[i]) {
269  const xAOD::TruthParticle* particle = (*truthParticles)[i];
270  if (particle->hasProdVtx()) {
271  const auto *prodVertex = particle->prodVtx();
272  --vertexLinksCounts[prodVertex->index()].second;
273  }
274  if (particle->hasDecayVtx()) {
275  const auto *decayVertex = particle->decayVtx();
276  --vertexLinksCounts[decayVertex->index()].first;
277  }
278  }
279  }
280 
281  // Loop over truth vertices and update mask
282  // Those for which all incoming and outgoing particles are to be thinned, will
283  // be thinned as well
284  unsigned int nVerticesThinned = 0;
285  for (int i = 0; i < nTruthVertices; ++i) {
286  if (vertexLinksCounts[i].first != 0 || vertexLinksCounts[i].second != 0) {
287  vertexMask[i] = true;
288  } else {
289  ++nVerticesThinned;
290  }
291  }
292  m_nVerticesThinned.fetch_add(nVerticesThinned, std::memory_order_relaxed);
293  // Apply masks to thinning
294  truthParticles.keep(particleMask);
295  truthVertices.keep(vertexMask);
296 
297  return StatusCode::SUCCESS;
298 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ finalize()

StatusCode ThinGeantTruthAlg::finalize ( )
overridevirtual

Definition at line 60 of file ThinGeantTruthAlg.cxx.

61 {
62  ATH_MSG_INFO("Processed " << m_nEventsProcessed << " events containing "
63  << m_nParticlesProcessed << " truth particles and "
64  << m_nVerticesProcessed << " truth vertices ");
65  ATH_MSG_INFO("Removed " << m_nParticlesThinned
66  << " Geant truth particles and " << m_nVerticesThinned
67  << " corresponding truth vertices ");
68  return StatusCode::SUCCESS;
69 }

◆ initialize()

StatusCode ThinGeantTruthAlg::initialize ( )
overridevirtual

Definition at line 41 of file ThinGeantTruthAlg.cxx.

42 {
43  if (m_streamName.empty()) {
44  ATH_MSG_ERROR("StreamName property was not initialized.");
45  return StatusCode::FAILURE;
46  }
47 
52  ATH_CHECK(m_photonsKey.initialize(m_keepEGamma));
53  ATH_CHECK(m_muonsKey.initialize(m_keepMuons));
55 
56  return StatusCode::SUCCESS;
57 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_egammaTruthKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> ThinGeantTruthAlg::m_egammaTruthKey
private
Initial value:
{
this,
"EGammaTruthKey",
"egammaTruthParticles",
"Name of the input egammaTruth container"
}

Definition at line 105 of file ThinGeantTruthAlg.h.

◆ m_electronsKey

SG::ReadHandleKey<xAOD::ElectronContainer> ThinGeantTruthAlg::m_electronsKey
private
Initial value:
{
this,
"ElectronsKey",
"Electrons",
"Name of the input electron container"
}

Definition at line 81 of file ThinGeantTruthAlg.h.

◆ m_etaMaxEgTruth

Gaudi::Property<float> ThinGeantTruthAlg::m_etaMaxEgTruth
private
Initial value:
{ this,
"EtaMaxEGammaTruth",
2.525,
"Max eta value for e-gamma truth particles" }

Definition at line 51 of file ThinGeantTruthAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_fwdElectronsKey

SG::ReadHandleKey<xAOD::ElectronContainer> ThinGeantTruthAlg::m_fwdElectronsKey
private
Initial value:
{
this,
"FwdElectronsKey",
"",
"Name of the input forward electron container"
}

Definition at line 88 of file ThinGeantTruthAlg.h.

◆ m_keepEGamma

Gaudi::Property<bool> ThinGeantTruthAlg::m_keepEGamma { this, "keepEGamma", true }
private

Definition at line 57 of file ThinGeantTruthAlg.h.

◆ m_keepMuons

Gaudi::Property<bool> ThinGeantTruthAlg::m_keepMuons { this, "keepMuons", true }
private

Definition at line 56 of file ThinGeantTruthAlg.h.

◆ m_longlived

Gaudi::Property<std::vector<int> > ThinGeantTruthAlg::m_longlived
private
Initial value:
{
this,
"LongLivedParticleList",
{ 310, 3122, 3222, 3112, 3322, 3312 },
"List of long lifetime particles which are likely to be decayed by "
"Geant but whose children must be kept"
}

Definition at line 59 of file ThinGeantTruthAlg.h.

◆ m_muonsKey

SG::ReadHandleKey<xAOD::MuonContainer> ThinGeantTruthAlg::m_muonsKey { this, "MuonsKey", "Muons", "Name of the input muon container" }
private

Definition at line 103 of file ThinGeantTruthAlg.h.

◆ m_nEventsProcessed

std::atomic<unsigned long> ThinGeantTruthAlg::m_nEventsProcessed {}
mutableprivate

Counters.

Definition at line 113 of file ThinGeantTruthAlg.h.

◆ m_nParticlesProcessed

std::atomic<unsigned long> ThinGeantTruthAlg::m_nParticlesProcessed {}
mutableprivate

Definition at line 114 of file ThinGeantTruthAlg.h.

◆ m_nParticlesThinned

std::atomic<unsigned long> ThinGeantTruthAlg::m_nParticlesThinned {}
mutableprivate

Definition at line 116 of file ThinGeantTruthAlg.h.

◆ m_nVerticesProcessed

std::atomic<unsigned long> ThinGeantTruthAlg::m_nVerticesProcessed {}
mutableprivate

Definition at line 115 of file ThinGeantTruthAlg.h.

◆ m_nVerticesThinned

std::atomic<unsigned long> ThinGeantTruthAlg::m_nVerticesThinned {}
mutableprivate

Definition at line 117 of file ThinGeantTruthAlg.h.

◆ m_photonsKey

SG::ReadHandleKey<xAOD::PhotonContainer> ThinGeantTruthAlg::m_photonsKey
private
Initial value:
{
this,
"PhotonsKey",
"Photons",
"Name of the input photon container"
}

Definition at line 95 of file ThinGeantTruthAlg.h.

◆ m_streamName

StringProperty ThinGeantTruthAlg::m_streamName
private
Initial value:
{ this,
"StreamName",
"",
"Stream for which thinning is to be done." }

Definition at line 46 of file ThinGeantTruthAlg.h.

◆ m_truthParticlesKey

SG::ThinningHandleKey<xAOD::TruthParticleContainer> ThinGeantTruthAlg::m_truthParticlesKey
private
Initial value:
{
this,
"TruthParticlesKey",
"TruthParticles",
"Name of the input Truth Particle container"
}

Definition at line 67 of file ThinGeantTruthAlg.h.

◆ m_truthVerticesKey

SG::ThinningHandleKey<xAOD::TruthVertexContainer> ThinGeantTruthAlg::m_truthVerticesKey
private
Initial value:
{
this,
"TruthVerticesKey",
"TruthVertices",
"Name of the input Truth Vertices container"
}

Definition at line 74 of file ThinGeantTruthAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::TruthVertex_v1::nOutgoingParticles
size_t nOutgoingParticles() const
Get the number of outgoing particles.
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
ThinGeantTruthAlg::m_etaMaxEgTruth
Gaudi::Property< float > m_etaMaxEgTruth
Definition: ThinGeantTruthAlg.h:51
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
ThinGeantTruthAlg::descendants
void descendants(const xAOD::TruthParticle *, std::vector< bool > &, std::unordered_set< int > &) const
Definition: ThinGeantTruthAlg.cxx:342
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
isBSM
bool isBSM(const T &p)
Definition: AtlasPID.h:213
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ThinGeantTruthAlg::m_truthParticlesKey
SG::ThinningHandleKey< xAOD::TruthParticleContainer > m_truthParticlesKey
Definition: ThinGeantTruthAlg.h:67
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
ThinGeantTruthAlg::m_electronsKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
Definition: ThinGeantTruthAlg.h:81
ThinGeantTruthAlg::m_muonsKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
Definition: ThinGeantTruthAlg.h:103
PowhegPy8EG_H2a.pdgId
dictionary pdgId
Definition: PowhegPy8EG_H2a.py:128
ThinGeantTruthAlg::m_nParticlesThinned
std::atomic< unsigned long > m_nParticlesThinned
Definition: ThinGeantTruthAlg.h:116
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
SG::ThinningHandle
Handle for requesting thinning for a data object.
Definition: ThinningHandle.h:84
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
ThinGeantTruthAlg::m_photonsKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonsKey
Definition: ThinGeantTruthAlg.h:95
xAOD::TruthParticle_v1::hasDecayVtx
bool hasDecayVtx() const
Check for a decay vertex on this particle.
ThinGeantTruthAlg::ancestors
void ancestors(const xAOD::TruthParticle *, std::vector< bool > &, std::unordered_set< int > &) const
Inline method.
Definition: ThinGeantTruthAlg.cxx:307
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:299
lumiFormat.i
int i
Definition: lumiFormat.py:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
xAOD::TruthParticle_v1::hasProdVtx
bool hasProdVtx() const
Check for a production vertex on this particle.
Definition: TruthParticle_v1.cxx:74
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:113
ThinGeantTruthAlg::m_longlived
Gaudi::Property< std::vector< int > > m_longlived
Definition: ThinGeantTruthAlg.h:59
ThinGeantTruthAlg::m_truthVerticesKey
SG::ThinningHandleKey< xAOD::TruthVertexContainer > m_truthVerticesKey
Definition: ThinGeantTruthAlg.h:74
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ThinGeantTruthAlg::m_keepEGamma
Gaudi::Property< bool > m_keepEGamma
Definition: ThinGeantTruthAlg.h:57
ThinGeantTruthAlg::m_fwdElectronsKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_fwdElectronsKey
Definition: ThinGeantTruthAlg.h:88
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
xAOD::TruthParticle_v1::prodVtx
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Definition: TruthParticle_v1.cxx:80
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:41
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ThinGeantTruthAlg::m_nVerticesProcessed
std::atomic< unsigned long > m_nVerticesProcessed
Definition: ThinGeantTruthAlg.h:115
xAOD::TruthHelpers::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
Definition: xAODTruthHelpers.cxx:25
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
xAOD::Electron_v1
Definition: Electron_v1.h:34
ThinGeantTruthAlg::m_nEventsProcessed
std::atomic< unsigned long > m_nEventsProcessed
Counters.
Definition: ThinGeantTruthAlg.h:113
python.TruthMuonD3PDObject.truthMuon
truthMuon
Definition: TruthMuonD3PDObject.py:51
ThinGeantTruthAlg::m_nParticlesProcessed
std::atomic< unsigned long > m_nParticlesProcessed
Definition: ThinGeantTruthAlg.h:114
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::TruthVertex_v1::nIncomingParticles
size_t nIncomingParticles() const
Get the number of incoming particles.
Definition: TruthVertex_v1.cxx:49
DeMoScan.first
bool first
Definition: DeMoScan.py:534
ThinGeantTruthAlg::m_egammaTruthKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_egammaTruthKey
Definition: ThinGeantTruthAlg.h:105
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
ThinGeantTruthAlg::m_keepMuons
Gaudi::Property< bool > m_keepMuons
Definition: ThinGeantTruthAlg.h:56
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ThinGeantTruthAlg::m_nVerticesThinned
std::atomic< unsigned long > m_nVerticesThinned
Definition: ThinGeantTruthAlg.h:117
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
fitman.k
k
Definition: fitman.py:528
ThinGeantTruthAlg::m_streamName
StringProperty m_streamName
Definition: ThinGeantTruthAlg.h:46
ServiceHandle< ICondSvc >