ATLAS Offline Software
HardTruthThinning.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // HardTruthThinning.cxx, (c) ATLAS Detector software
7 // Author: Frank Paige
8 // Based on MenuTruthThinning and should perhaps be merged with it.
9 // Intended for use with CompactHardTruth.
10 // Preserves graph only for decays of selected particles.
11 //
12 // No treatment of Geant particles (yet).
13 //
15 
17 #include "xAODJet/JetContainer.h"
18 #include "xAODBase/IParticle.h"
20 #include "GaudiKernel/SystemOfUnits.h"
22 #include "GaudiKernel/ThreadLocalContext.h"
23 
25 #include <vector>
26 #include <string>
27 #include <format>
28 
29 using Gaudi::Units::GeV;
30 
32 // Constructor
34 
35 // Required parameters:
36 // EventInfo, TruthParticles, TruthVertices, HardParticles
37 // Parameters that turn on features:
38 // JetName If not empty, save constituents with cuts
39 // KeepIds If pdgId list not empty, save particles and decay chains
40 // IsolRadius If positive, save stable particles in isolation cones
41 
43  const std::string& t, const std::string& n, const IInterface* p ) :
44  base_class(t,n,p),
45  m_jetPtCut(0.),
46  m_jetEtaCut(5.0),
47  m_jetConstPtCut(0.),
48  m_jetPhotonPtCut(0.),
49  m_isolR(-1),
50  m_isolPtCut(0),
51  m_maxCount(0)
52 {
53  declareProperty("JetPtCut", m_jetPtCut,
54  "truth jet minumum pt");
55 
56  declareProperty("JetEtaCut", m_jetEtaCut,
57  "truth jet maximum abs(eta)");
58 
59  declareProperty("JetConstPtCut", m_jetConstPtCut,
60  "jet constituent minimum pt");
61 
62  declareProperty("JetPhotonPtCut", m_jetPhotonPtCut,
63  "jet constituent photon minimum pt");
64 
65  declareProperty("KeepIds", m_keepIds,
66  "list of abs(pdgID) to keep");
67 
68  declareProperty("IsolRadius", m_isolR,
69  "isolation radius for leptons and photons");
70 
71  declareProperty("IsolPtCut", m_isolPtCut,
72  "isolation particle minimum pt");
73 
74  declareProperty("MaxCount",
75  m_maxCount,
76  "maximum number of events to print");
77 }
78 
79 
81 // Destructor
83 
85 }
86 
87 
89 // Athena initialize and finalize
91 
93 {
94  ATH_CHECK( m_eventInfoKey.initialize() );
95  ATH_CHECK( m_hardParticleKey.initialize() );
96  ATH_CHECK( m_truthJetsKey.initialize(SG::AllowEmpty) );
97  ATH_CHECK( m_truthParticleName.initialize (m_streamName) );
98  ATH_CHECK( m_truthVertexName.initialize (m_streamName) );
99 
100  m_evtCount = -1;
101  m_errCount = 0;
102 
103  // Check for unset photon cut
104  if( m_jetPhotonPtCut < m_jetConstPtCut ) m_jetPhotonPtCut =m_jetConstPtCut;
105 
106  return StatusCode::SUCCESS;
107 }
108 
109 
111 {
112  ATH_MSG_INFO("finalize() ...");
113  if( m_errCount > 0 ){
114  ATH_MSG_WARNING("TruthHard/TruthEvent pdgId mismatches " <<m_errCount);
115  } else {
116  ATH_MSG_INFO("No TruthHard/TruthEvent pdgId mismatches");
117  }
118 
119  return StatusCode::SUCCESS;
120 }
121 
122 
124 // doThinning
126 
128 {
129  const EventContext& ctx = Gaudi::Hive::currentContext();
130 
131  ++m_evtCount;
132  bool doPrint = m_evtCount < m_maxCount;
133 
134  // Retrieve truth particles and vertices
136  (m_truthParticleName, ctx);
138  (m_truthVertexName, ctx);
139 
140  SG::ReadHandle<xAOD::TruthParticleContainer> inHardParts(m_hardParticleKey, ctx);
141  if (!inHardParts.isValid()) {
142  ATH_MSG_ERROR("Cannot retrieve TruthParticleContainer " << m_hardParticleKey);
143  return StatusCode::FAILURE;
144  }
145 
146  // Hard particles are different objects but have matching unique IDs.
147  // Find hard particles with status==1.
148  // Save 4vectors of leptons and photons for matching if requested.
149  // Do we need a photon pt cut for soft photons from quarks?
150 
151  std::vector<const xAOD::TruthParticle*> hardPart;
152  std::vector<TLorentzVector> pLepGam;
153 
154  for (const auto* pItr : *inHardParts) {
155  if( MC::isStable(pItr) ){
156  hardPart.push_back(pItr);
157  if( m_isolR > 0 ){
158  int ida = pItr->absPdgId();
159  if( MC::isElectron(ida) || MC::isMuon(ida) || MC::isTau(ida) || MC::isPhoton(ida) ){
160  pLepGam.push_back( pItr->p4() );
161  }
162  }
163  }
164  }
165 
166  // Print full input event
167  long long int evtNum{};
168  if( doPrint ){
169  SG::ReadHandle<xAOD::EventInfo> evt(m_eventInfoKey, ctx);
170  if(!evt.isValid()) {
171  ATH_MSG_ERROR("Failed to retrieve EventInfo");
172  return StatusCode::FAILURE;
173  }
174  evtNum = evt->eventNumber();
175 
176  printxAODTruth(evtNum, inTruthParts.cptr());
177  }
178 
179 
180  // Set up masks for particles/vertices
181  // Default is false for all
182 
183  std::vector<bool> partMask;
184  std::vector<bool> vertMask;
185  unsigned int inPartNum = inTruthParts->size();
186  unsigned int inVertNum = inTruthVerts->size();
187  partMask.assign(inPartNum, false);
188  vertMask.assign(inVertNum, false);
189 
190  ATH_MSG_DEBUG("Initial particles/vertices = " <<inPartNum <<" " <<inVertNum);
191 
192 
193  // Particles from hard event are stable => keep no parent/child vertices.
194  // No descendants (except Geant).
195  // Particles from keep list need descendants and their parent vertices.
196  // There could be overlap, e.g. for taus.
197  // Expect no pdgId mismatches.
198 
199  std::vector<const xAOD::TruthParticle*> kids;
200 
201  for (const auto* pItr : *inTruthParts) {
202  // Stable hard particle matches
203  int uid = HepMC::uniqueID(pItr);
204  bool isHard = false;
205  for(unsigned int i=0; i<hardPart.size(); ++i){
206  if( uid == HepMC::uniqueID(hardPart[i]) ){
207  isHard = true;
208  if( pItr->pdgId() != (hardPart[i])->pdgId() ){
209  ATH_MSG_WARNING("pdgID mismatch, TruthParticle uid/pdgid "
210  <<HepMC::uniqueID(pItr) <<" " <<pItr->pdgId()
211  <<" Hard uid/pdgid " <<HepMC::uniqueID(hardPart[i])
212  <<" " <<(hardPart[i])->pdgId());
213  ++m_errCount;
214  break;
215  }
216  }
217  }
218  if( isHard ){
219  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isHard " <<uid);
220  partMask[ pItr->index() ] = true;
221  }
222 
223  // Keep particles
224  int ida = pItr->absPdgId();
225  bool isKeep = false;
226  for(unsigned int i=0; i<m_keepIds.size(); ++i){
227  if( ida == m_keepIds[i] ){
228  isKeep = true;
229  break;
230  }
231  }
232  if( isKeep ){
233  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isKeep " <<uid);
234  partMask[pItr->index()] = true;
235  int nkids = getDescendants( pItr, kids );
236  for(int i=0; i<nkids; ++i){
237  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isKeep kid "
238  <<uid <<" " <<HepMC::uniqueID(kids[i]));
239  partMask[ (kids[i])->index() ] = true;
240  const xAOD::TruthVertex* v = (kids[i])->prodVtx();
241  if( v ) vertMask[ v->index() ] = true;
242  }
243  }
244 
245  // Delta(R) matches to hard truth leptons/photons
246  if( !pLepGam.empty() && pItr->pt() > m_isolPtCut ){
247  TLorentzVector pp4 = pItr->p4();
248  for(unsigned int lep=0; lep<pLepGam.size(); ++lep){
249  double r = pp4.DeltaR( pLepGam[lep] );
250  if( r < m_isolR ){
251  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isol " <<uid);
252  partMask[ pItr->index() ] = true;
253  }
254  }
255  }
256  }
257 
258 
259  // Retrieve optional jets
260  // Add particles that are constituents of selected jets using unique IDs.
261  // Is index() for JetConstituentVector or TruthParticleContainer or??
262 
263  if( !m_truthJetsKey.empty() ){
264 
265  SG::ReadHandle<xAOD::JetContainer> inJets(m_truthJetsKey, ctx);
266  if (!inJets.isValid()) {
267  ATH_MSG_ERROR("Cannot retrieve JetContainer " << m_truthJetsKey);
268  return StatusCode::FAILURE;
269  }
270 
271  std::vector<int> uidJetConst;
272 
273  for(const auto* ajet : *inJets){
274  if( ajet->pt() < m_jetPtCut ) continue;
275  if( std::abs(ajet->eta()) > m_jetEtaCut ) continue;
276 
277  xAOD::JetConstituentVector aconst = ajet->getConstituents();
279  xAOD::JetConstituentVector::iterator aItrE = aconst.end();
280  for( ; aItr != aItrE; ++aItr){
281  const xAOD::JetConstituent* aip = (*aItr);
282  const xAOD::IParticle* aipraw = aip->rawConstituent();
283  const xAOD::TruthParticle* pp =
284  dynamic_cast<const xAOD::TruthParticle*>(aipraw);
285  if( pp ) {
286  if( pp->pt()>m_jetConstPtCut && !MC::isPhoton(pp) ){
287  uidJetConst.push_back( HepMC::uniqueID(pp) );
288  }
289  if( pp->pt()>m_jetPhotonPtCut && !MC::isPhoton(pp) ){
290  uidJetConst.push_back( HepMC::uniqueID(pp) );
291  }
292  } else {
293  ATH_MSG_WARNING("Bad cast for particle in jet " <<ajet->index());
294  }
295  }
296  }
297 
298  for (const auto* pItr : *inTruthParts) {
299  int uid = HepMC::uniqueID(pItr);
300  bool isJet = false;
301  for(unsigned int i=0; i<uidJetConst.size(); ++i){
302  if( uid == uidJetConst[i] ){
303  isJet = true;
304  break;
305  }
306  }
307  if( isJet ){
308  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isJet " <<uid);
309  partMask[ pItr->index() ] = true;
310  }
311  }
312 
313  } //end optional jets
314 
315 
316  // Execute the thinning service based on the mask. Finish.
317  inTruthParts.keep (partMask);
318  inTruthVerts.keep (vertMask);
319 
320  // Final statistics
321  int outPartNum = 0;
322  for(unsigned int i=0; i<partMask.size(); ++i){
323  if( partMask[i] ) ++outPartNum;
324  }
325  int outVertNum = 0;
326  for(unsigned int i=0; i<vertMask.size(); ++i){
327  if( vertMask[i] ) ++outVertNum;
328  }
329 
330  ATH_MSG_DEBUG("Final particles/vertices = " <<outPartNum <<" " <<outVertNum);
331 
332  if( doPrint ){
333  std::cout <<"======================================================================================" <<std::endl;
334  std::cout <<"HardTruthThinning complete for event " <<evtNum <<std::endl;
335  std::cout <<"Saved " <<outPartNum <<" particles" <<std::endl;
336  std::cout <<"Particle unique IDs = ";
337  for(unsigned int i=0; i<partMask.size(); ++i){
338  if( partMask[i] ) std::cout << HepMC::uniqueID((*inTruthParts)[i]) <<" ";
339  }
340  std::cout <<std::endl;
341 
342  std::cout <<"Saved " <<outVertNum <<" vertices" <<std::endl;
343  std::cout <<"Vertex unique IDs = ";
344  for(unsigned int i=0; i<vertMask.size(); ++i){
345  if( vertMask[i] ) std::cout << HepMC::uniqueID((*inTruthVerts)[i]) <<" ";
346  }
347  std::cout <<std::endl;
348  std::cout <<"======================================================================================" <<std::endl;
349  }
350 
351  return StatusCode::SUCCESS;
352 
353 }
354 
355 
357 // Utility functions
359 
360 // Emulate HepMC descendant iterator
361 // Multiple particles can give same descendant (string/cluster)
362 // Remove Geant descendants
363 // MUST check ElementLink validity with isValid() for thinned samples
364 
366  const xAOD::TruthParticle* p,
367  std::vector<const xAOD::TruthParticle*>& descendants ) {
368  descendants.clear();
369  if( ! (p->hasDecayVtx()) ) return 0;
370  const xAOD::TruthVertex* dvtx = p->decayVtx();
371  if( !dvtx ) return 0;
372  if( dvtx->nOutgoingParticles() == 0 ) return 0;
373  if(HepMC::is_simulation_vertex(dvtx)) return 0;
374  const std::vector< ElementLink< xAOD::TruthParticleContainer > >& outPart =
375  dvtx->outgoingParticleLinks();
376  for(unsigned int k=0; k<outPart.size(); ++k){
377  if( ! (outPart[k]).isValid() ) continue;
378  const xAOD::TruthParticle* kid = *(outPart[k]);
379  descendants.push_back(kid);
380  }
381 
382  int nstart = 0;
383  int nstop = descendants.size();
384 
385  while( nstop > nstart ){
386  for(int i=nstart; i<nstop; ++i){
387  const xAOD::TruthParticle* pp = descendants[i];
388  if( ! (pp->hasDecayVtx()) ) continue;
389  const xAOD::TruthVertex* vpp = pp->decayVtx();
390  if( !vpp ) continue;
391  if( vpp->nOutgoingParticles() == 0 ) continue;
392  if( HepMC::is_simulation_vertex(vpp)) continue;
393  const std::vector< ElementLink< xAOD::TruthParticleContainer > >&
394  outPart2 = vpp->outgoingParticleLinks();
395  for(unsigned int k=0; k<outPart2.size(); ++k){
396  if( ! (outPart2[k]).isValid() ) continue;
397  const xAOD::TruthParticle* kpp = *(outPart2[k]);
398  if( HepMC::is_simulation_particle(kpp)) continue;
399  bool isIn = false;
400  for(unsigned int kk=0; kk<descendants.size(); ++kk){
401  if(kpp==descendants[kk]) isIn = true;
402  }
403  if( !isIn ) descendants.push_back(kpp);
404  }
405  }
406  nstart = nstop;
407  nstop = descendants.size();
408  }
409 
410  return nstop;
411 }
412 
413 // Print xAODTruth Event. The printout is particle oriented, unlike
414 // the HepMC particle/vertex printout. Geant and pileup particles are
415 // omitted.
416 
418  const xAOD::TruthParticleContainer* truths) {
419 
420  std::vector<int> uidPars;
421  std::vector<int> uidKids;
422 
423  std::cout <<"======================================================================================\n" ;
424  std::cout <<"xAODTruth Event " <<evnum <<"\n";
425  std::cout <<" Unique ID PDG Id Status px(GeV) py(GeV) pz(GeV) E(GeV) Parent: Decay\n" ;
426  std::cout <<" -----------------------------------------------------------------------------------\n" ;
427 
428  for (const auto* tpItr : *truths) {
429  if (HepMC::is_simulation_particle(tpItr)) continue;
430  int uid = HepMC::uniqueID(tpItr);
431  int id = tpItr->pdgId();
432  int stat = tpItr->status();
433  float px = tpItr->px()/GeV;
434  float py = tpItr->py()/GeV;
435  float pz = tpItr->pz()/GeV;
436  float e = tpItr->e()/GeV;
437  uidPars.clear();
438  uidKids.clear();
439 
440  if( tpItr->hasProdVtx() ){
441  const xAOD::TruthVertex* pvtx = tpItr->prodVtx();
442  if( pvtx ){
443  const std::vector< ElementLink< xAOD::TruthParticleContainer > >& pars =
444  pvtx->incomingParticleLinks();
445  for(unsigned int k=0; k<pars.size(); ++k){
446  if( ! (pars[k]).isValid() ) continue;
447  const xAOD::TruthParticle* par = *(pars[k]);
448  uidPars.push_back(HepMC::uniqueID(par));
449  }
450  }
451  }
452  if( tpItr->hasDecayVtx() ){
453  const xAOD::TruthVertex* dvtx = tpItr->decayVtx();
454  if( dvtx ){
455  const std::vector< ElementLink< xAOD::TruthParticleContainer > >& kids =
456  dvtx->outgoingParticleLinks();
457  for(unsigned int k=0; k<kids.size(); ++k){
458  if( ! (kids[k]).isValid() ) continue;
459  const xAOD::TruthParticle* kid = *(kids[k]);
460  uidKids.push_back(HepMC::uniqueID(kid));
461  }
462  }
463  }
464 
465  std::cout << std::format("{:>10}{:>12}{:>8}{:>10.2f}{:>10.2f}{:>10.2f}{:>10.2f} P: ",
466  uid, id, stat, px, py, pz, e);
467  for(unsigned int k=0; k<uidPars.size(); ++k){
468  std::cout <<uidPars[k] <<" ";
469  }
470  std::cout <<" D: ";
471  for(unsigned int k=0; k<uidKids.size(); ++k){
472  std::cout <<uidKids[k] <<" ";
473  }
474  std::cout <<"\n";
475  }
476  std::cout <<"======================================================================================" <<std::endl;
477 }
xAOD::TruthVertex_v1::nOutgoingParticles
size_t nOutgoingParticles() const
Get the number of outgoing particles.
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
beamspotman.r
def r
Definition: beamspotman.py:672
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:18
DerivationFramework::HardTruthThinning::printxAODTruth
static void printxAODTruth(long long evnum, const xAOD::TruthParticleContainer *truths)
Definition: HardTruthThinning.cxx:417
test_pyathena.px
px
Definition: test_pyathena.py:18
IParticle.h
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::HardTruthThinning::m_isolR
float m_isolR
Definition: HardTruthThinning.h:80
DerivationFramework::HardTruthThinning::initialize
virtual StatusCode initialize() override
Definition: HardTruthThinning.cxx:92
ThinningHandle.h
Handle for requesting thinning for a data object.
SG::ReadHandle< xAOD::TruthParticleContainer >
xAOD::JetConstituentVector::end
iterator end() const
iterator after the last constituent
Definition: JetConstituentVector.cxx:104
HardTruthThinning.h
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
DerivationFramework::HardTruthThinning::getDescendants
static int getDescendants(const xAOD::TruthParticle *p, std::vector< const xAOD::TruthParticle * > &d)
Definition: HardTruthThinning.cxx:365
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:872
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::TruthVertex_v1::outgoingParticleLinks
const TPLinks_t & outgoingParticleLinks() const
Get all the outgoing particles.
SG::ThinningHandle
Handle for requesting thinning for a data object.
Definition: ThinningHandle.h:84
xAOD::uid
uid
Definition: TruthVertex_v1.cxx:29
python.changerun.kk
list kk
Definition: changerun.py:39
DerivationFramework::HardTruthThinning::m_jetPhotonPtCut
float m_jetPhotonPtCut
Definition: HardTruthThinning.h:79
xAOD::JetConstituentVector::begin
iterator begin() const
iterator on the first constituent
Definition: JetConstituentVector.cxx:103
SG::ThinningHandleBase::keep
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
Definition: ThinningHandleBase.cxx:75
xAOD::TruthParticle_v1::hasDecayVtx
bool hasDecayVtx() const
Check for a decay vertex on this particle.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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:354
DerivationFramework::HardTruthThinning::doThinning
virtual StatusCode doThinning() const override
Definition: HardTruthThinning.cxx:127
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:727
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
DerivationFramework::HardTruthThinning::HardTruthThinning
HardTruthThinning(const std::string &t, const std::string &n, const IInterface *p)
Definition: HardTruthThinning.cxx:42
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
HepMC::is_simulation_vertex
bool is_simulation_vertex(const T &v)
Method to establish if the vertex was created during simulation (TODO migrate to be based on status).
Definition: MagicNumbers.h:360
xAOD::JetConstituent::rawConstituent
const IParticle * rawConstituent() const
Access the real underlying IParticle.
Definition: JetConstituentVector.h:102
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
beamspotman.stat
stat
Definition: beamspotman.py:262
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DerivationFramework::HardTruthThinning::~HardTruthThinning
virtual ~HardTruthThinning()
Definition: HardTruthThinning.cxx:84
isTau
bool isTau(const T &p)
Definition: AtlasPID.h:205
xAOD::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
Amg::py
@ py
Definition: GeoPrimitives.h:39
DerivationFramework::HardTruthThinning::m_jetEtaCut
float m_jetEtaCut
Definition: HardTruthThinning.h:77
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:28
errorcheck.h
Helpers for checking error return status codes and reporting errors.
DerivationFramework::HardTruthThinning::m_jetPtCut
float m_jetPtCut
Definition: HardTruthThinning.h:76
DerivationFramework::HardTruthThinning::m_isolPtCut
float m_isolPtCut
Definition: HardTruthThinning.h:81
python.PyAthena.v
v
Definition: PyAthena.py:154
DeMoScan.index
string index
Definition: DeMoScan.py:362
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
DerivationFramework::HardTruthThinning::finalize
virtual StatusCode finalize() override
Definition: HardTruthThinning.cxx:110
JetContainer.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:161
xAOD::JetConstituent
4-vector of jet constituent at the scale used during jet finding.
Definition: JetConstituentVector.h:61
xAOD::JetConstituentVector
A vector of jet constituents at the scale used during jet finding.
Definition: JetConstituentVector.h:117
xAOD::JetConstituentVector::iterator
Definition: JetConstituentVector.h:121
DerivationFramework::HardTruthThinning::m_maxCount
int m_maxCount
Definition: HardTruthThinning.h:85
DerivationFramework::HardTruthThinning::m_keepIds
std::vector< int > m_keepIds
Definition: HardTruthThinning.h:89
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
HepMCHelpers.h
fitman.k
k
Definition: fitman.py:528
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:202
DerivationFramework::HardTruthThinning::m_jetConstPtCut
float m_jetConstPtCut
Definition: HardTruthThinning.h:78
xAOD::TruthVertex_v1::incomingParticleLinks
const TPLinks_t & incomingParticleLinks() const
Get all the incoming particles.