ATLAS Offline Software
HardTruthThinning.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 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 
20 #include "xAODJet/JetContainer.h"
21 #include "xAODBase/IParticle.h"
24 #include "GaudiKernel/SystemOfUnits.h"
26 #include "GaudiKernel/ThreadLocalContext.h"
27 
29 #include <vector>
30 #include <string>
31 
32 using Gaudi::Units::GeV;
33 
35 // Constructor
37 
38 // Required parameters:
39 // EventInfo, TruthParticles, TruthVertices, HardParticles
40 // Parameters that turn on features:
41 // JetName If not empty, save constituents with cuts
42 // KeepIds If pdgId list not empty, save particles and decay chains
43 // IsolRadius If positive, save stable particles in isolation cones
44 
46  const std::string& t, const std::string& n, const IInterface* p ) :
47  base_class(t,n,p),
48  m_jetPtCut(0.),
49  m_jetEtaCut(5.0),
50  m_jetConstPtCut(0.),
51  m_jetPhotonPtCut(0.),
52  m_isolR(-1),
53  m_isolPtCut(0),
54  m_maxCount(0)
55 {
56  declareProperty("HardParticles", m_hardParticleName,
57  "hard particle container name");
58 
59  declareProperty("JetName", m_jetName,
60  "truth jet container name");
61 
62  declareProperty("JetPtCut", m_jetPtCut,
63  "truth jet minumum pt");
64 
65  declareProperty("JetEtaCut", m_jetEtaCut,
66  "truth jet maximum abs(eta)");
67 
68  declareProperty("JetConstPtCut", m_jetConstPtCut,
69  "jet constituent minimum pt");
70 
71  declareProperty("JetPhotonPtCut", m_jetPhotonPtCut,
72  "jet constituent photon minimum pt");
73 
74  declareProperty("KeepIds", m_keepIds,
75  "list of abs(pdgID) to keep");
76 
77  declareProperty("IsolRadius", m_isolR,
78  "isolation radius for leptons and photons");
79 
80  declareProperty("IsolPtCut", m_isolPtCut,
81  "isolation particle minimum pt");
82 
83  declareProperty("MaxCount",
84  m_maxCount,
85  "maximum number of events to print");
86 }
87 
88 
90 // Destructor
92 
94 }
95 
96 
98 // Athena initialize and finalize
100 
102 {
103  ATH_CHECK( m_evt.initialize() );
104  ATH_CHECK (m_truthParticleName.initialize (m_streamName) );
105  ATH_CHECK (m_truthVertexName.initialize (m_streamName) );
106 
107  m_evtCount = -1;
108  m_errCount = 0;
109 
110  // Check for unset photon cut
111  if( m_jetPhotonPtCut < m_jetConstPtCut ) m_jetPhotonPtCut =m_jetConstPtCut;
112 
113  return StatusCode::SUCCESS;
114 }
115 
116 
118 {
119  ATH_MSG_INFO("finalize() ...");
120  if( m_errCount > 0 ){
121  ATH_MSG_WARNING("TruthHard/TruthEvent pdgId mismatches " <<m_errCount);
122  } else {
123  ATH_MSG_INFO("No TruthHard/TruthEvent pdgId mismatches");
124  }
125 
126  return StatusCode::SUCCESS;
127 }
128 
129 
131 // doThinning
133 
135 {
136  const EventContext& ctx = Gaudi::Hive::currentContext();
137 
138  ++m_evtCount;
139  bool doPrint = m_evtCount < m_maxCount;
140  //bool doExtra = false;
141 
142 
144  if(!evt.isValid()) {
145  ATH_MSG_ERROR("Failed to retrieve EventInfo");
146  return StatusCode::FAILURE;
147  }
148  long long int evtNum = evt->eventNumber();
149 
150  // Retrieve truth particles and vertices
151 
154 
156  (m_truthParticleName, ctx);
158  (m_truthVertexName, ctx);
159 
160  const xAOD::TruthParticleContainer* inHardParts = nullptr;
161  if( evtStore()->retrieve(inHardParts, m_hardParticleName).isFailure() ){
162  ATH_MSG_ERROR("No TruthParticleContainer found with name "
163  <<m_hardParticleName);
164  return StatusCode::FAILURE;
165  }
166 
167  // Hard particles are different objects but have matching unique IDs.
168  // Find hard particles with status==1.
169  // Save 4vectors of leptons and photons for matching if requested.
170  // Do we need a photon pt cut for soft photons from quarks?
171 
172  std::vector<const xAOD::TruthParticle*> hardPart;
173  std::vector<TLorentzVector> pLepGam;
174 
175  pItr = inHardParts->begin();
176  pItrE = inHardParts->end();
177  for(; pItr!=pItrE; ++pItr){
178  if( MC::isStable(*pItr) ){
179  hardPart.push_back(*pItr);
180  if( m_isolR > 0 ){
181  int ida = abs( (*pItr)->pdgId() );
182  if( ida==11 || ida==13 || ida==15 || ida==22 ){
183  pLepGam.push_back( (*pItr)->p4() );
184  }
185  }
186  }
187  }
188 
189 
190  // Print full input event
191  if( doPrint ){
192  printxAODTruth(evtNum, inTruthParts.cptr());
193  }
194 
195 
196  // Set up masks for particles/vertices
197  // Default is false for all
198 
199  std::vector<bool> partMask;
200  std::vector<bool> vertMask;
201  unsigned int inPartNum = inTruthParts->size();
202  unsigned int inVertNum = inTruthVerts->size();
203  partMask.assign(inPartNum, false);
204  vertMask.assign(inVertNum, false);
205 
206  ATH_MSG_DEBUG("Initial particles/vertices = " <<inPartNum <<" " <<inVertNum);
207 
208 
209  // Particles from hard event are stable => keep no parent/child vertices.
210  // No descendants (except Geant).
211  // Particles from keep list need descendants and their parent vertices.
212  // There could be overlap, e.g. for taus.
213  // Expect no pdgId mismatches.
214 
215  pItr = inTruthParts->begin();
216  pItrE = inTruthParts->end();
217  std::vector<const xAOD::TruthParticle*> kids;
218 
219  for(; pItr!=pItrE; ++pItr){
220 
221  // Stable hard particle matches
222  int uid = HepMC::uniqueID(*pItr);
223  bool isHard = false;
224  for(unsigned int i=0; i<hardPart.size(); ++i){
225  if( uid == HepMC::uniqueID(hardPart[i]) ){
226  isHard = true;
227  if( (*pItr)->pdgId() != (hardPart[i])->pdgId() ){
228  ATH_MSG_WARNING("pdgID mismatch, TruthParticle uid/pdgid "
229  <<HepMC::uniqueID(*pItr) <<" " <<(*pItr)->pdgId()
230  <<" Hard uid/pdgid " <<HepMC::uniqueID(hardPart[i])
231  <<" " <<(hardPart[i])->pdgId());
232  ++m_errCount;
233  break;
234  }
235  }
236  }
237  if( isHard ){
238  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isHard " <<uid);
239  partMask[ (*pItr)->index() ] = true;
240  }
241 
242  // Keep particles
243  int ida = abs((*pItr)->pdgId());
244  bool isKeep = false;
245  for(unsigned int i=0; i<m_keepIds.size(); ++i){
246  if( ida == m_keepIds[i] ){
247  isKeep = true;
248  break;
249  }
250  }
251  if( isKeep ){
252  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isKeep " <<uid);
253  partMask[(*pItr)->index()] = true;
254  const xAOD::TruthParticle* ppItr = (*pItr);
255  int nkids = getDescendants( ppItr, kids );
256  for(int i=0; i<nkids; ++i){
257  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isKeep kid "
258  <<uid <<" " <<HepMC::uniqueID(kids[i]));
259  partMask[ (kids[i])->index() ] = true;
260  const xAOD::TruthVertex* v = (kids[i])->prodVtx();
261  if( v ) vertMask[ v->index() ] = true;
262  }
263  }
264 
265  // Delta(R) matches to hard truth leptons/photons
266  if( !pLepGam.empty() && (*pItr)->pt() > m_isolPtCut ){
267  TLorentzVector pp4 = (*pItr)->p4();
268  for(unsigned int lep=0; lep<pLepGam.size(); ++lep){
269  double r = pp4.DeltaR( pLepGam[lep] );
270  if( r < m_isolR ){
271  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isol " <<uid);
272  partMask[ (*pItr)->index() ] = true;
273  }
274  }
275  }
276  }
277 
278 
279 
280 
281  // Retrieve optional jets
282  // Add particles that are constituents of selected jets using unique IDs.
283  // Is index() for JetConstituentVector or TruthParticleContainer or??
284 
285  if( !m_jetName.empty() ){
286 
287  const xAOD::JetContainer* inJets = nullptr;
288  if( evtStore()->retrieve(inJets, m_jetName).isFailure() ){
289  ATH_MSG_ERROR("No JetContainer found with name " <<m_jetName);
290  return StatusCode::FAILURE;
291  }
292 
293  std::vector<int> uidJetConst;
294 
295  for(unsigned int j=0; j<inJets->size(); ++j){
296  const xAOD::Jet* ajet = (*inJets)[j];
297  if( ajet->pt() < m_jetPtCut ) continue;
298  if( std::abs(ajet->eta()) > m_jetEtaCut ) continue;
299 
302  xAOD::JetConstituentVector::iterator aItrE = aconst.end();
303  for( ; aItr != aItrE; ++aItr){
304  const xAOD::JetConstituent* aip = (*aItr);
305  const xAOD::IParticle* aipraw = aip->rawConstituent();
306  const xAOD::TruthParticle* pp =
307  dynamic_cast<const xAOD::TruthParticle*>(aipraw);
308  if( pp ) {
309  if( pp->pt()>m_jetConstPtCut && pp->pdgId()!=22 ){
310  uidJetConst.push_back( HepMC::uniqueID(pp) );
311  }
312  if( pp->pt()>m_jetPhotonPtCut && pp->pdgId()==22 ){
313  uidJetConst.push_back( HepMC::uniqueID(pp) );
314  }
315  } else {
316  ATH_MSG_WARNING("Bad cast for particle in jet " <<j);
317  }
318  }
319  }
320 
321  pItr = inTruthParts->begin();
322  pItrE = inTruthParts->end();
323  for(; pItr!=pItrE; ++pItr){
324  int uid = HepMC::uniqueID(*pItr);
325  bool isJet = false;
326  for(unsigned int i=0; i<uidJetConst.size(); ++i){
327  if( uid == uidJetConst[i] ){
328  isJet = true;
329  break;
330  }
331  }
332  if( isJet ){
333  if( doPrint ) ATH_MSG_DEBUG("ParticleMask isJet " <<uid);
334  partMask[ (*pItr)->index() ] = true;
335  }
336  }
337 
338  } //end optional jets
339 
340 
341  // Execute the thinning service based on the mask. Finish.
342  inTruthParts.keep (partMask);
343  inTruthVerts.keep (vertMask);
344 
345  // Final statistics
346  int outPartNum = 0;
347  for(unsigned int i=0; i<partMask.size(); ++i){
348  if( partMask[i] ) ++outPartNum;
349  }
350  int outVertNum = 0;
351  for(unsigned int i=0; i<vertMask.size(); ++i){
352  if( vertMask[i] ) ++outVertNum;
353  }
354 
355  ATH_MSG_DEBUG("Final particles/vertices = " <<outPartNum <<" " <<outVertNum);
356 
357  if( doPrint ){
358  std::cout <<"======================================================================================" <<std::endl;
359  std::cout <<"HardTruthThinning complete for event " <<evtNum <<std::endl;
360  std::cout <<"Saved " <<outPartNum <<" particles" <<std::endl;
361  std::cout <<"Particle unique IDs = ";
362  for(unsigned int i=0; i<partMask.size(); ++i){
363  if( partMask[i] ) std::cout << HepMC::uniqueID((*inTruthParts)[i]) <<" ";
364  }
365  std::cout <<std::endl;
366 
367  std::cout <<"Saved " <<outVertNum <<" vertices" <<std::endl;
368  std::cout <<"Vertex unique IDs = ";
369  for(unsigned int i=0; i<vertMask.size(); ++i){
370  if( vertMask[i] ) std::cout << HepMC::uniqueID((*inTruthVerts)[i]) <<" ";
371  }
372  std::cout <<std::endl;
373  std::cout <<"======================================================================================" <<std::endl;
374  }
375 
376  return StatusCode::SUCCESS;
377 
378 }
379 
380 
382 // Utility functions
384 
385 // Emulate HepMC descendant iterator
386 // Multiple particles can give same descendant (string/cluster)
387 // Remove Geant descendants
388 // MUST check ElementLink validity with isValid() for thinned samples
389 
391  const xAOD::TruthParticle* p,
392  std::vector<const xAOD::TruthParticle*>& descendants ) {
393  descendants.clear();
394  if( ! (p->hasDecayVtx()) ) return 0;
395  const xAOD::TruthVertex* dvtx = p->decayVtx();
396  if( !dvtx ) return 0;
397  if( dvtx->nOutgoingParticles() == 0 ) return 0;
398  if(HepMC::is_simulation_vertex(dvtx)) return 0;
399  const std::vector< ElementLink< xAOD::TruthParticleContainer > >& outPart =
400  dvtx->outgoingParticleLinks();
401  for(unsigned int k=0; k<outPart.size(); ++k){
402  if( ! (outPart[k]).isValid() ) continue;
403  const xAOD::TruthParticle* kid = *(outPart[k]);
404  descendants.push_back(kid);
405  }
406 
407  int nstart = 0;
408  int nstop = descendants.size();
409 
410  while( nstop > nstart ){
411  for(int i=nstart; i<nstop; ++i){
412  const xAOD::TruthParticle* pp = descendants[i];
413  if( ! (pp->hasDecayVtx()) ) continue;
414  const xAOD::TruthVertex* vpp = pp->decayVtx();
415  if( !vpp ) continue;
416  if( vpp->nOutgoingParticles() == 0 ) continue;
417  if( HepMC::is_simulation_vertex(vpp)) continue;
418  const std::vector< ElementLink< xAOD::TruthParticleContainer > >&
419  outPart2 = vpp->outgoingParticleLinks();
420  for(unsigned int k=0; k<outPart2.size(); ++k){
421  if( ! (outPart2[k]).isValid() ) continue;
422  const xAOD::TruthParticle* kpp = *(outPart2[k]);
423  if( HepMC::is_simulation_particle(kpp)) continue;
424  bool isIn = false;
425  for(unsigned int kk=0; kk<descendants.size(); ++kk){
426  if(kpp==descendants[kk]) isIn = true;
427  }
428  if( !isIn ) descendants.push_back(kpp);
429  }
430  }
431  nstart = nstop;
432  nstop = descendants.size();
433  }
434 
435  return nstop;
436 }
437 
438 // Print xAODTruth Event. The printout is particle oriented, unlike
439 // the HepMC particle/vertex printout. Geant and pileup particles are
440 // omitted.
441 
443  const xAOD::TruthParticleContainer* truths) {
444 
447  std::vector<int> uidPars;
448  std::vector<int> uidKids;
449 
450  std::cout <<"======================================================================================" <<std::endl;
451  std::cout <<"xAODTruth Event " <<evnum <<std::endl;
452  std::cout <<" Unique ID PDG Id Status px(GeV) py(GeV) pz(GeV) E(GeV) Parent: Decay" <<std::endl;
453  std::cout <<" -----------------------------------------------------------------------------------" <<std::endl;
454 
455  for(; tpItr != tpItrE; ++tpItr ) {
456  if (HepMC::is_simulation_particle(*tpItr)) continue;
457  int uid = HepMC::uniqueID(*tpItr);
458  int id = (*tpItr)->pdgId();
459  int stat = (*tpItr)->status();
460  float px = (*tpItr)->px()/1000.;
461  float py = (*tpItr)->py()/1000.;
462  float pz = (*tpItr)->pz()/1000.;
463  float e = (*tpItr)->e()/1000.;
464  uidPars.clear();
465  uidKids.clear();
466 
467  if( (*tpItr)->hasProdVtx() ){
468  const xAOD::TruthVertex* pvtx = (*tpItr)->prodVtx();
469  if( pvtx ){
470  const std::vector< ElementLink< xAOD::TruthParticleContainer > >& pars =
471  pvtx->incomingParticleLinks();
472  for(unsigned int k=0; k<pars.size(); ++k){
473  if( ! (pars[k]).isValid() ) continue;
474  const xAOD::TruthParticle* par = *(pars[k]);
475  uidPars.push_back(HepMC::uniqueID(par));
476  }
477  }
478  }
479  if( (*tpItr)->hasDecayVtx() ){
480  const xAOD::TruthVertex* dvtx = (*tpItr)->decayVtx();
481  if( dvtx ){
482  const std::vector< ElementLink< xAOD::TruthParticleContainer > >& kids =
483  dvtx->outgoingParticleLinks();
484  for(unsigned int k=0; k<kids.size(); ++k){
485  if( ! (kids[k]).isValid() ) continue;
486  const xAOD::TruthParticle* kid = *(kids[k]);
487  uidKids.push_back(HepMC::uniqueID(kid));
488  }
489  }
490  }
491 
492  std::cout <<std::setw(10)<<uid <<std::setw(12)<<id
493  <<std::setw(8)<<stat
494  <<std::setprecision(2)<<std::fixed
495  <<std::setw(10)<<px <<std::setw(10)<<py
496  <<std::setw(10)<<pz <<std::setw(10)<<e <<" ";
497  std::cout <<"P: ";
498  for(unsigned int k=0; k<uidPars.size(); ++k){
499  std::cout <<uidPars[k] <<" ";
500  }
501  std::cout <<" D: ";
502  for(unsigned int k=0; k<uidKids.size(); ++k){
503  std::cout <<uidKids[k] <<" ";
504  }
505  std::cout <<std::endl;
506  }
507  std::cout <<"======================================================================================" <<std::endl;
508 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
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:676
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
DerivationFramework::HardTruthThinning::printxAODTruth
static void printxAODTruth(long long evnum, const xAOD::TruthParticleContainer *truths)
Definition: HardTruthThinning.cxx:442
test_pyathena.px
px
Definition: test_pyathena.py:18
IParticle.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::HardTruthThinning::m_isolR
float m_isolR
Definition: HardTruthThinning.h:81
DerivationFramework::HardTruthThinning::initialize
virtual StatusCode initialize() override
Definition: HardTruthThinning.cxx:101
ThinningHandle.h
Handle for requesting thinning for a data object.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAOD::JetConstituentVector::end
iterator end() const
iterator after the last constituent
Definition: JetConstituentVector.cxx:104
TruthVertexContainer.h
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:390
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:620
xAOD::Jet_v1::getConstituents
JetConstituentVector getConstituents() const
Return a vector of consituents. The object behaves like vector<const IParticle*>. See JetConstituentV...
Definition: Jet_v1.cxx:147
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
python.changerun.kk
list kk
Definition: changerun.py:41
DerivationFramework::HardTruthThinning::m_jetPhotonPtCut
float m_jetPhotonPtCut
Definition: HardTruthThinning.h:80
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:68
xAOD::TruthParticle_v1::hasDecayVtx
bool hasDecayVtx() const
Check for a decay vertex on this particle.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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:355
DerivationFramework::HardTruthThinning::doThinning
virtual StatusCode doThinning() const override
Definition: HardTruthThinning.cxx:134
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
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
IParticleContainer.h
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:45
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:361
xAOD::JetConstituent::rawConstituent
const IParticle * rawConstituent() const
Access the real underlying IParticle.
Definition: JetConstituentVector.h:102
DerivationFramework::HardTruthThinning::m_jetName
std::string m_jetName
Definition: HardTruthThinning.h:76
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
beamspotman.stat
stat
Definition: beamspotman.py:266
DerivationFramework::HardTruthThinning::~HardTruthThinning
virtual ~HardTruthThinning()
Definition: HardTruthThinning.cxx:93
xAOD::Jet_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: Jet_v1.cxx:49
DerivationFramework::HardTruthThinning::m_hardParticleName
std::string m_hardParticleName
Definition: HardTruthThinning.h:73
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:78
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
MagicNumbers.h
errorcheck.h
Helpers for checking error return status codes and reporting errors.
DerivationFramework::HardTruthThinning::m_jetPtCut
float m_jetPtCut
Definition: HardTruthThinning.h:77
DerivationFramework::HardTruthThinning::m_isolPtCut
float m_isolPtCut
Definition: HardTruthThinning.h:82
DecayGraphHelper.h
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.PyAthena.v
v
Definition: PyAthena.py:154
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
DeMoScan.index
string index
Definition: DeMoScan.py:364
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:117
JetContainer.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
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:86
DerivationFramework::HardTruthThinning::m_keepIds
std::vector< int > m_keepIds
Definition: HardTruthThinning.h:90
TruthEventContainer.h
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
xAOD::Jet_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: Jet_v1.cxx:44
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
DerivationFramework::HardTruthThinning::m_jetConstPtCut
float m_jetConstPtCut
Definition: HardTruthThinning.h:79
xAOD::TruthVertex_v1::incomingParticleLinks
const TPLinks_t & incomingParticleLinks() const
Get all the incoming particles.