ATLAS Offline Software
CompositeParticle_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: CompositeParticle_v1.h 696023 2015-09-21 17:09:08Z kkoeneke $
8 #ifndef XAODPARTICLEEVENT_VERSIONS_COMPOSITEPARTICLE_V1_H
9 #define XAODPARTICLEEVENT_VERSIONS_COMPOSITEPARTICLE_V1_H
10 
11 // STL includes
12 #include <vector>
13 
14 // xAOD include(s):
17 #include "xAODBase/IParticle.h"
19 #include "AthLinks/ElementLink.h"
21 #include "xAODEgamma/Electron.h"
22 #include "xAODEgamma/Photon.h"
23 #include "xAODMuon/Muon.h"
24 #include "xAODTau/TauJet.h"
25 #include "xAODJet/Jet.h"
27 
28 // Local include(s):
31 
32 // ROOT include(s):
33 #include "Math/Vector4D.h"
34 
35 namespace xAOD {
36 
46 
47  public:
50 
53 
55  virtual double pt() const;
57  virtual double eta() const;
59  virtual double phi() const;
61  virtual double m() const;
63  virtual double e() const;
65  virtual double rapidity() const;
66 
69 
71  virtual FourMom_t p4() const;
72 
74  typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > GenVecFourMom_t;
75 
78  GenVecFourMom_t genvecP4() const;
79 
81  virtual Type::ObjectType type() const;
83 
84 
87 
89  double px() const;
91  double py() const;
93  double pz() const;
96  double et() const;
97 
98 
100  void setP4( const FourMom_t& vec );
102  void setPxPyPzE( double px, double py, double pz, double e );
104  void setPx( double px );
106  void setPy( double py );
108  void setPz( double pz );
110  void setE( double e );
112 
113 
116 
118  bool hasCharge() const;
120  float charge() const;
122  void setCharge( float charge );
123 
125  bool hasPdgId() const;
127  int pdgId() const;
129  void setPdgId( int pdgID );
130 
132 
133 
141 
143  FourMom_t p4( const std::vector<int>& partIndices ) const;
144 
149  inline FourMom_t p4( int partIndexA, int partIndexB ) const {
150  return this->p4( std::vector<int>{partIndexA, partIndexB} );
151  }
153  inline FourMom_t p4( int partIndexA, int partIndexB, int partIndexC ) const {
154  return this->p4( std::vector<int>{partIndexA, partIndexB, partIndexC} );
155  }
157  inline FourMom_t p4( int partIndexA, int partIndexB, int partIndexC, int partIndexD ) const {
158  return this->p4( std::vector<int>{partIndexA, partIndexB, partIndexC, partIndexD} );
159  }
160 
162  double pt( const std::vector<int>& partIndices ) const;
164  double eta( const std::vector<int>& partIndices ) const;
166  double phi( const std::vector<int>& partIndices ) const;
168  double m( const std::vector<int>& partIndices ) const;
170  double p( const std::vector<int>& partIndices ) const;
172  double e( const std::vector<int>& partIndices ) const;
174  double rapidity( const std::vector<int>& partIndices ) const;
175 
177  double px( const std::vector<int>& partIndices ) const;
179  double py( const std::vector<int>& partIndices ) const;
181  double pz( const std::vector<int>& partIndices ) const;
184  double et( const std::vector<int>& partIndices ) const;
185 
186 
187 
189  struct MT {
190  enum Method {
191  DEFAULT = 0
192  };
193  };
194 
197  double mt( const std::vector<int>& partIndices, MT::Method method=MT::DEFAULT ) const;
198 
199 
205  inline double mt( int partIndexA, int partIndexB=-2, MT::Method method=MT::DEFAULT ) const {
206  if ( partIndexB==-2 ) {
207  return this->mt( std::vector<int>{partIndexA}, method );
208  }
209  return this->mt( std::vector<int>{partIndexA, partIndexB}, method );
210  }
211 
213 
214 
215 
216 
220 
231  float weight( const std::vector<std::string>& varNames,
232  const std::vector<int>& partIndices={} ) const;
233 
234 
239  inline float weight( const std::string& varNameA ) const {
240  return this->weight( std::vector<std::string>{varNameA} );
241  }
242  inline float weight( const std::string& varNameA,
243  const std::string& varNameB ) const {
244  return this->weight( std::vector<std::string>{varNameA,varNameB} );
245  }
246  inline float weight( const std::string& varNameA,
247  const std::string& varNameB,
248  const std::string& varNameC ) const {
249  return this->weight( std::vector<std::string>{varNameA,varNameB,varNameC} );
250  }
251  inline float weight( const std::string& varNameA,
252  const std::string& varNameB,
253  const std::string& varNameC,
254  const std::string& varNameD ) const {
255  return this->weight( std::vector<std::string>{varNameA,varNameB,varNameC,varNameD} );
256  }
257  inline float weight( const std::string& varNameA,
258  const std::string& varNameB,
259  const std::string& varNameC,
260  const std::string& varNameD,
261  const std::string& varNameE ) const {
262  return this->weight( std::vector<std::string>{varNameA,varNameB,varNameC,varNameD,varNameE} );
263  }
264 
265 
266  private:
269  const xAOD::IParticle::ConstAccessor<float>& varAcc ) const;
270 
271  public:
273 
274 
275 
276 
279 
283  void addPart( const xAOD::IParticle* part, bool updateFourMom=true );
284 
288  void addPart( const xAOD::IParticleLink& partLink, bool updateFourMom=true );
289 
293  void addParts( const xAOD::IParticleLinkContainer& partLinkCont,
294  bool updateFourMom=true );
295 
302  void removePart( const xAOD::IParticle* part, bool updateFourMom=true );
303 
310  void removePart( const xAOD::IParticleLink& partLink, bool updateFourMom=true );
311 
312 
313 
317  const xAOD::MissingET* missingET() const;
318 
322  void setMissingET( const xAOD::MissingET* met, bool updateFourMom=true );
323 
327  void removeMissingET( bool updateFourMom=true );
328 
329 
331  bool contains( const xAOD::MissingET* met ) const;
333  bool contains( const xAOD::IParticle* part ) const;
335  bool contains( const xAOD::IParticleLink& partLink ) const;
336 
337 
340  std::size_t nParts() const;
341 
343  std::size_t nCompParts() const;
344 
346  std::size_t nPhotons() const;
347 
349  std::size_t nTruthPhotons() const;
350 
352  std::size_t nElectrons() const;
353 
355  std::size_t nTruthElectrons() const;
356 
358  std::size_t nMuons() const;
359 
361  std::size_t nTruthMuons() const;
362 
364  std::size_t nTaus() const;
365 
367  std::size_t nTruthTaus() const;
368 
370  std::size_t nLeptons() const;
371 
373  std::size_t nTruthLeptons() const;
374 
376  std::size_t nJets() const;
377 
379  std::size_t nTruthParts() const;
380 
381 
383  const xAOD::IParticle* part( std::size_t index = 0 ) const;
384 
386  const xAOD::IParticleLink& partLink( std::size_t index = 0 ) const;
387 
390 
391 
399  template<typename CONTTYPE>
401 
402 
403 
408  xAOD::CompositeParticle_v1* compPart( const std::vector<int>& partIndices,
409  const std::vector<int>& otherPartIndices=std::vector<int>{},
410  bool updateFourMom=true ) const;
411 
412 
418  xAOD::CompositeParticle_v1* compPart( int partIndexA, int partIndexB, int partIndexC=-2,
419  bool updateFourMom=true ) const {
420  if ( partIndexC==-2 ) {
421  return this->compPart( std::vector<int>{partIndexA, partIndexB}, std::vector<int>{}, updateFourMom );
422  }
423  return this->compPart( std::vector<int>{partIndexA, partIndexB, partIndexC}, std::vector<int>{}, updateFourMom );
424  }
425 
426 
429  const xAOD::CompositeParticle_v1* compPart( std::size_t index = 0 ) const;
430 
433  const xAOD::Photon* photon( std::size_t index = 0 ) const;
434 
437  const xAOD::Electron* electron( std::size_t index = 0 ) const;
438 
441  const xAOD::Muon* muon( std::size_t index = 0 ) const;
442 
445  const xAOD::TauJet* tau( std::size_t index = 0 ) const;
446 
449  const xAOD::Jet* jet( std::size_t index = 0 ) const;
450 
453  const xAOD::TruthParticle* truthPart( std::size_t index = 0 ) const;
454 
456 
458 
459 
460 
469 
472 
475 
477  void addOtherParts( const xAOD::IParticleLinkContainer& partLinkCont );
478 
479 
482  void removeOtherPart( const xAOD::IParticle* part );
483 
487 
488 
489 
491  bool containsOther( const xAOD::IParticle* part ) const;
493  bool containsOther( const xAOD::IParticleLink& partLink ) const;
494 
495 
497  std::size_t nOtherParts() const;
498 
500  std::size_t nOtherCompParts() const;
501 
503  std::size_t nOtherPhotons() const;
504 
506  std::size_t nOtherTruthPhotons() const;
507 
509  std::size_t nOtherElectrons() const;
510 
512  std::size_t nOtherTruthElectrons() const;
513 
515  std::size_t nOtherMuons() const;
516 
518  std::size_t nOtherTruthMuons() const;
519 
521  std::size_t nOtherTaus() const;
522 
524  std::size_t nOtherTruthTaus() const;
525 
527  std::size_t nOtherLeptons() const;
528 
530  std::size_t nOtherTruthLeptons() const;
531 
533  std::size_t nOtherJets() const;
534 
536  std::size_t nOtherTruthParts() const;
537 
538 
540  const xAOD::IParticle* otherPart( std::size_t index = 0 ) const;
541 
543  const xAOD::IParticleLink& otherPartLink( std::size_t index = 0 ) const;
544 
547 
548 
551  const xAOD::CompositeParticle_v1* otherCompPart( std::size_t index = 0 ) const;
552 
555  const xAOD::Photon* otherPhoton( std::size_t index = 0 ) const;
556 
559  const xAOD::Electron* otherElectron( std::size_t index = 0 ) const;
560 
563  const xAOD::Muon* otherMuon( std::size_t index = 0 ) const;
564 
567  const xAOD::TauJet* otherTau( std::size_t index = 0 ) const;
568 
571  const xAOD::Jet* otherJet( std::size_t index = 0 ) const;
572 
575  const xAOD::TruthParticle* otherTruthPart( std::size_t index = 0 ) const;
576 
578 
580 
581 
587 
589  inline bool getBool( const std::string& varName ) const {
590  return SG::ConstAccessor<bool>(varName)(*this);
591  }
592 
594  inline int getInt( const std::string& varName ) const {
595  return SG::ConstAccessor<int>(varName)(*this);
596  }
597 
599  inline unsigned int getUInt( const std::string& varName ) const {
601  }
602 
604  inline float getFloat( const std::string& varName ) const {
605  return SG::ConstAccessor<float>(varName)(*this);
606  }
607 
609  inline double getDouble( const std::string& varName ) const {
610  return SG::ConstAccessor<double>(varName)(*this);
611  }
612 
613 
615 
616 
617  protected:
621  void setPartLinks( const xAOD::IParticleLinkContainer& constitLinks );
622 
625 
626 
627  public:
628 
630  void toPersistent();
631 
632 
633  }; // class CompositeParticle_v1
634 
635 
636 } // namespace xAOD
637 
638 
639 // Inline methods
640 inline
643 {
644  const xAOD::IParticle* ipart = this->part(index);
645  if ( ipart->type() != xAOD::Type::CompositeParticle ){ return 0; }
646  return static_cast<const xAOD::CompositeParticle_v1*>(ipart);
647 }
648 
649 
650 inline
651 const xAOD::Photon*
653 {
654  const xAOD::IParticle* ipart = this->part(index);
655  if ( ipart->type() != xAOD::Type::Photon ){ return 0; }
656  return static_cast<const xAOD::Photon*>(ipart);
657 }
658 
659 
660 inline
661 const xAOD::Electron*
663 {
664  const xAOD::IParticle* ipart = this->part(index);
665  if ( ipart->type() != xAOD::Type::Electron ){ return 0; }
666  return static_cast<const xAOD::Electron*>(ipart);
667 }
668 
669 
670 inline
671 const xAOD::Muon*
673 {
674  const xAOD::IParticle* ipart = this->part(index);
675  if ( ipart->type() != xAOD::Type::Muon ){ return 0; }
676  return static_cast<const xAOD::Muon*>(ipart);
677 }
678 
679 
680 inline
681 const xAOD::TauJet*
683 {
684  const xAOD::IParticle* ipart = this->part(index);
685  if ( ipart->type() != xAOD::Type::Tau ){ return 0; }
686  return static_cast<const xAOD::TauJet*>(ipart);
687 }
688 
689 
690 inline
691 const xAOD::Jet*
693 {
694  const xAOD::IParticle* ipart = this->part(index);
695  if ( ipart->type() != xAOD::Type::Jet ){ return 0; }
696  return static_cast<const xAOD::Jet*>(ipart);
697 }
698 
699 
700 inline
701 const xAOD::TruthParticle*
703 {
704  const xAOD::IParticle* ipart = this->part(index);
705  if ( ipart->type() != xAOD::Type::TruthParticle ){ return 0; }
706  return static_cast<const xAOD::TruthParticle*>(ipart);
707 }
708 
709 
710 
711 inline
714 {
715  const xAOD::IParticle* ipart = this->otherPart(index);
716  if ( ipart->type() != xAOD::Type::CompositeParticle ){ return 0; }
717  return static_cast<const xAOD::CompositeParticle_v1*>(ipart);
718 }
719 
720 
721 inline
722 const xAOD::Photon*
724 {
725  const xAOD::IParticle* ipart = this->otherPart(index);
726  if ( ipart->type() != xAOD::Type::Photon ){ return 0; }
727  return static_cast<const xAOD::Photon*>(ipart);
728 }
729 
730 
731 inline
732 const xAOD::Electron*
734 {
735  const xAOD::IParticle* ipart = this->otherPart(index);
736  if ( ipart->type() != xAOD::Type::Electron ){ return 0; }
737  return static_cast<const xAOD::Electron*>(ipart);
738 }
739 
740 
741 inline
742 const xAOD::Muon*
744 {
745  const xAOD::IParticle* ipart = this->otherPart(index);
746  if ( ipart->type() != xAOD::Type::Muon ){ return 0; }
747  return static_cast<const xAOD::Muon*>(ipart);
748 }
749 
750 
751 inline
752 const xAOD::TauJet*
754 {
755  const xAOD::IParticle* ipart = this->otherPart(index);
756  if ( ipart->type() != xAOD::Type::Tau ){ return 0; }
757  return static_cast<const xAOD::TauJet*>(ipart);
758 }
759 
760 
761 inline
762 const xAOD::Jet*
764 {
765  const xAOD::IParticle* ipart = this->otherPart(index);
766  if ( ipart->type() != xAOD::Type::Jet ){ return 0; }
767  return static_cast<const xAOD::Jet*>(ipart);
768 }
769 
770 
771 inline
772 const xAOD::TruthParticle*
774 {
775  const xAOD::IParticle* ipart = this->otherPart(index);
776  if ( ipart->type() != xAOD::Type::TruthParticle ){ return 0; }
777  return static_cast<const xAOD::TruthParticle*>(ipart);
778 }
779 
780 
781 
782 
783 #endif // XAODPARTICLEEVENT_VERSIONS_COMPOSITEPARTICLE_V1_H
RunTileTBRec.method
method
Definition: RunTileTBRec.py:73
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::CompositeParticle_v1::nParts
std::size_t nParts() const
Number of constituent particles.
Definition: CompositeParticle_v1.cxx:722
xAOD::CompositeParticle_v1::otherMuon
const xAOD::Muon * otherMuon(std::size_t index=0) const
Get the other constituent number i as an Muon.
Definition: CompositeParticle_v1.h:743
xAOD::CompositeParticle_v1::photon
const xAOD::Photon * photon(std::size_t index=0) const
Get the constituent number i as a Photon.
Definition: CompositeParticle_v1.h:652
xAOD::CompositeParticle_v1::m
virtual double m() const
The invariant mass of the particle.
Definition: CompositeParticle_v1.cxx:56
xAOD::CompositeParticle_v1::nJets
std::size_t nJets() const
Number of constituent jets.
Jet.h
xAOD::CompositeParticle_v1::getFloat
float getFloat(const std::string &varName) const
Access to get a variable of type float.
Definition: CompositeParticle_v1.h:604
xAOD::CompositeParticle_v1::setPy
void setPy(double py)
Set the y-component of the momentum.
xAOD::CompositeParticle_v1::truthPart
const xAOD::TruthParticle * truthPart(std::size_t index=0) const
Get the constituent number i as a TruthParticle.
Definition: CompositeParticle_v1.h:702
xAOD::CompositeParticle_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: CompositeParticle_v1.h:68
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
xAOD::CompositeParticle_v1::partLink
const xAOD::IParticleLink & partLink(std::size_t index=0) const
Get the constituent IParticle number i as an ElementLink.
Definition: CompositeParticle_v1.cxx:795
xAOD::CompositeParticle_v1::nOtherTruthElectrons
std::size_t nOtherTruthElectrons() const
Number of other constituent truth electrons.
xAOD::CompositeParticle_v1::weight
float weight(const std::string &varNameA, const std::string &varNameB, const std::string &varNameC) const
Definition: CompositeParticle_v1.h:246
IParticle.h
xAOD::CompositeParticle_v1::p4
FourMom_t p4(const std::vector< int > &partIndices) const
The total 4-momentum.
xAOD::CompositeParticle_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CompositeParticle_v1.cxx:64
xAOD::CompositeParticle_v1::weight
float weight(const std::string &varNameA, const std::string &varNameB) const
Definition: CompositeParticle_v1.h:242
Muon.h
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
index
Definition: index.py:1
xAOD::CompositeParticle_v1::otherTruthPart
const xAOD::TruthParticle * otherTruthPart(std::size_t index=0) const
Get the other constituent number i as a TruthParticle.
Definition: CompositeParticle_v1.h:773
xAOD::CompositeParticle_v1::et
double et() const
The transverse energy ( ) of the particle.
Definition: CompositeParticle_v1.cxx:127
xAOD::CompositeParticle_v1::parts
ConstDataVector< CONTTYPE > * parts() const
Method to return a DataVector<T>, e.g., a MuonContainer, for all the constituent particles,...
xAOD::CompositeParticle_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourMom_t
Base 4 Momentum type (GenVector)
Definition: CompositeParticle_v1.h:74
xAOD::CompositeParticle_v1::electron
const xAOD::Electron * electron(std::size_t index=0) const
Get the constituent number i as an Electron.
Definition: CompositeParticle_v1.h:662
xAOD::CompositeParticle_v1::containsOther
bool containsOther(const xAOD::IParticle *part) const
Check if a given xAOD::IParticle is an other constituent.
Definition: CompositeParticle_v1.cxx:975
xAOD::CompositeParticle_v1::nTaus
std::size_t nTaus() const
Number of constituent taus.
xAOD::CompositeParticle_v1::nOtherParts
std::size_t nOtherParts() const
Number of other constituent particles.
Definition: CompositeParticle_v1.cxx:1010
xAOD::CompositeParticle_v1::MT::Method
Method
Definition: CompositeParticle_v1.h:190
xAOD::CompositeParticle_v1::contains
bool contains(const xAOD::MissingET *met) const
Check if a given xAOD::MissingET object is part of this CompositeParticle.
Definition: CompositeParticle_v1.cxx:660
xAOD::CompositeParticle_v1::e
virtual double e() const
The total energy of the particle.
Definition: CompositeParticle_v1.cxx:107
xAOD::CompositeParticle_v1::rapidity
virtual double rapidity() const
The true rapidity (y) of the particle.
Definition: CompositeParticle_v1.cxx:60
xAOD::IParticle::type
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
xAOD::IParticleLinkContainer
IParticleLinkContainer_v1 IParticleLinkContainer
Define the latest version of the IParticleLinkContainer class.
Definition: xAOD/xAODParticleEvent/xAODParticleEvent/IParticleLinkContainer.h:18
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::CompositeParticle_v1::partLinks
const xAOD::IParticleLinkContainer & partLinks() const
Get all constituents in one go.
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
xAOD::CompositeParticle_v1::py
double py() const
Get the py momentum component of the particle.
Definition: CompositeParticle_v1.cxx:117
xAOD::CompositeParticle_v1::nOtherTruthTaus
std::size_t nOtherTruthTaus() const
Number of other constituent truth taus.
xAOD::CompositeParticle_v1::nTruthParts
std::size_t nTruthParts() const
Number of constituent xAOD::TruthParticles.
xAOD::CompositeParticle_v1::setCharge
void setCharge(float charge)
Set the electric charge.
Definition: CompositeParticle_v1.cxx:211
xAOD::CompositeParticle_v1::py
double py(const std::vector< int > &partIndices) const
Get the py momentum component.
xAOD::CompositeParticle_v1::nOtherTruthParts
std::size_t nOtherTruthParts() const
Number of other constituent xAOD::TruthParticles.
xAOD::CompositeParticle_v1::otherCompPart
const xAOD::CompositeParticle_v1 * otherCompPart(std::size_t index=0) const
Get the other constituent number i as a CompositeParticle.
Definition: CompositeParticle_v1.h:713
xAOD::CompositeParticle_v1::addPart
void addPart(const xAOD::IParticle *part, bool updateFourMom=true)
Add a particle as an additional constituent.
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::CompositeParticle_v1::nOtherMuons
std::size_t nOtherMuons() const
Number of other constituent muons.
xAOD::CompositeParticle_v1::setPx
void setPx(double px)
Set the x-component of the momentum.
xAOD::CompositeParticle_v1::removeMissingET
void removeMissingET(bool updateFourMom=true)
Remove the existing MissingET object from this CompositeParticle.
Definition: CompositeParticle_v1.cxx:636
xAOD::CompositeParticle_v1::getBool
bool getBool(const std::string &varName) const
Access to get a variable of type bool (actually, it is stored using type char)
Definition: CompositeParticle_v1.h:589
xAOD::CompositeParticle_v1::muon
const xAOD::Muon * muon(std::size_t index=0) const
Get the constituent number i as an Muon.
Definition: CompositeParticle_v1.h:672
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::CompositeParticle_v1::phi
double phi(const std::vector< int > &partIndices) const
The azimuthal angle ( )
xAOD::CompositeParticle_v1::weight
float weight(const std::string &varNameA) const
Get the weight for this xAOD::CompositeParticle.
Definition: CompositeParticle_v1.h:239
xAOD::CompositeParticle_v1::part
const xAOD::IParticle * part(std::size_t index=0) const
Get the constituent IParticle number i.
Definition: CompositeParticle_v1.cxx:782
xAOD::CompositeParticle_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: CompositeParticle_v1.cxx:44
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:69
xAOD::CompositeParticle_v1::weight
float weight(const std::string &varNameA, const std::string &varNameB, const std::string &varNameC, const std::string &varNameD, const std::string &varNameE) const
Definition: CompositeParticle_v1.h:257
xAOD::CompositeParticle_v1::nOtherPhotons
std::size_t nOtherPhotons() const
Number of other constituent photons.
xAOD::CompositeParticle
CompositeParticle_v1 CompositeParticle
Define the latest version of the composite particle class.
Definition: Event/xAOD/xAODParticleEvent/xAODParticleEvent/CompositeParticle.h:17
xAOD::CompositeParticle_v1::p4
FourMom_t p4(int partIndexA, int partIndexB) const
Get the four-momentum with two indices.
Definition: CompositeParticle_v1.h:149
xAOD::CompositeParticle_v1::weightHelper
float weightHelper(const xAOD::IParticle *part, const xAOD::IParticle::ConstAccessor< float > &varAcc) const
This is a private helper method to calculate the weight.
xAOD::CompositeParticle_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CompositeParticle_v1.cxx:52
xAOD::CompositeParticle_v1::nOtherCompParts
std::size_t nOtherCompParts() const
Number of other constituent CompositeParticles.
xAOD::CompositeParticle_v1::addOtherParts
void addOtherParts(const xAOD::IParticleLinkContainer &partLinkCont)
Add many other constituents at the same time.
Definition: CompositeParticle_v1.cxx:916
xAOD::CompositeParticle_v1::setPartLinks
void setPartLinks(const xAOD::IParticleLinkContainer &constitLinks)
Set all constituents in one go.
xAOD::CompositeParticle_v1::setPxPyPzE
void setPxPyPzE(double px, double py, double pz, double e)
Set the 4-vec.
Definition: CompositeParticle_v1.cxx:140
xAOD::CompositeParticle_v1::et
double et(const std::vector< int > &partIndices) const
The transverse energy ( ) Note that this differs from ( ) for massive particles.
met
Definition: IMETSignificance.h:24
xAOD::CompositeParticle_v1::mt
double mt(const std::vector< int > &partIndices, MT::Method method=MT::DEFAULT) const
Get the transverse mass.
xAOD::CompositeParticle_v1::getDouble
double getDouble(const std::string &varName) const
Access to get a variable of type double.
Definition: CompositeParticle_v1.h:609
xAOD::CompositeParticle_v1::setPdgId
void setPdgId(int pdgID)
Set the PDG identifier.
xAOD::CompositeParticle_v1::e
double e(const std::vector< int > &partIndices) const
The total energy.
PixelAthClusterMonAlgCfg.varName
string varName
end cluster ToT and charge
Definition: PixelAthClusterMonAlgCfg.py:125
Photon.h
xAOD::CompositeParticle_v1::MT::DEFAULT
@ DEFAULT
Definition: CompositeParticle_v1.h:191
xAOD::CompositeParticle_v1::addParts
void addParts(const xAOD::IParticleLinkContainer &partLinkCont, bool updateFourMom=true)
Add many constituents at the same time Note that the 4-momentum of this CompositeParticle will be upd...
Definition: CompositeParticle_v1.cxx:521
IParticleContainer.h
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
xAOD::CompositeParticle_v1::pz
double pz(const std::vector< int > &partIndices) const
Get the pz momentum component.
xAOD::CompositeParticle_v1::nMuons
std::size_t nMuons() const
Number of constituent muons.
xAOD::CompositeParticle_v1::p4
FourMom_t p4(int partIndexA, int partIndexB, int partIndexC, int partIndexD) const
Get the four-momentum with four indices.
Definition: CompositeParticle_v1.h:157
xAOD::CompositeParticle_v1::otherJet
const xAOD::Jet * otherJet(std::size_t index=0) const
Get the other constituent number i as a Jet.
Definition: CompositeParticle_v1.h:763
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition: Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
xAOD::CompositeParticle_v1
Description of a composite particle, i.e.
Definition: CompositeParticle_v1.h:45
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
xAOD::CompositeParticle_v1::removeOtherPart
void removeOtherPart(const xAOD::IParticle *part)
Remove a particle as an other constituent from this CompostiteParticle.
Definition: CompositeParticle_v1.cxx:930
xAOD::CompositeParticle_v1::nTruthLeptons
std::size_t nTruthLeptons() const
Number of constituent truth leptons (truth electrons, truth muons, and truth taus).
Definition: CompositeParticle_v1.cxx:777
xAOD::CompositeParticle_v1::nElectrons
std::size_t nElectrons() const
Number of constituent electrons.
xAOD::CompositeParticle_v1::nOtherTaus
std::size_t nOtherTaus() const
Number of other constituent taus.
xAOD::CompositeParticle_v1::otherTau
const xAOD::TauJet * otherTau(std::size_t index=0) const
Get the other constituent number i as a tau.
Definition: CompositeParticle_v1.h:753
xAOD::CompositeParticle_v1::nOtherTruthMuons
std::size_t nOtherTruthMuons() const
Number of other constituent truth muons.
xAOD::CompositeParticle_v1::CompositeParticle_v1
CompositeParticle_v1()
Default constructor.
Definition: CompositeParticle_v1.cxx:27
xAOD::CompositeParticle_v1::genvecP4
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form Note: can be slower than just p4 for this class;...
Definition: CompositeParticle_v1.cxx:83
xAOD::CompositeParticle_v1::nLeptons
std::size_t nLeptons() const
Number of constituent leptons (electrons, muons, and taus).
Definition: CompositeParticle_v1.cxx:750
xAOD::CompositeParticle_v1::pt
double pt(const std::vector< int > &partIndices) const
The transverse momentum ( )
xAOD::CompositeParticle_v1::pz
double pz() const
Get the pz momentum component of the particle.
Definition: CompositeParticle_v1.cxx:122
xAOD::CompositeParticle_v1::compPart
xAOD::CompositeParticle_v1 * compPart(int partIndexA, int partIndexB, int partIndexC=-2, bool updateFourMom=true) const
Get a CompositeParticle that is build on the fly from the constituent particles associated to the ind...
Definition: CompositeParticle_v1.h:418
MissingET.h
xAOD::CompositeParticle_v1::otherPhoton
const xAOD::Photon * otherPhoton(std::size_t index=0) const
Get the other constituent number i as a Photon.
Definition: CompositeParticle_v1.h:723
xAOD::CompositeParticle_v1::type
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
Definition: CompositeParticle_v1.cxx:102
xAOD::CompositeParticle_v1::nPhotons
std::size_t nPhotons() const
Number of constituent photons.
xAOD::CompositeParticle_v1::otherPartLinks
const xAOD::IParticleLinkContainer & otherPartLinks() const
Get all other constituents in one go.
xAOD::CompositeParticle_v1::px
double px(const std::vector< int > &partIndices) const
Get the px momentum component.
xAOD::CompositeParticle_v1::px
double px() const
Get the px momentum component of the particle.
Definition: CompositeParticle_v1.cxx:112
xAOD::CompositeParticle_v1::p4
FourMom_t p4(int partIndexA, int partIndexB, int partIndexC) const
Get the four-momentum with three indices.
Definition: CompositeParticle_v1.h:153
xAOD::CompositeParticle_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CompositeParticle_v1.cxx:48
xAOD::CompositeParticle_v1::tau
const xAOD::TauJet * tau(std::size_t index=0) const
Get the constituent number i as a tau.
Definition: CompositeParticle_v1.h:682
xAOD::CompositeParticle_v1::nOtherLeptons
std::size_t nOtherLeptons() const
Number of other constituent leptons (electrons, muons, and taus).
Definition: CompositeParticle_v1.cxx:1038
xAOD::CompositeParticle_v1::p
double p(const std::vector< int > &partIndices) const
The total 3-momentum.
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::CompositeParticle_v1::addOtherPart
void addOtherPart(const xAOD::IParticle *part)
Add a particle as an additional other constituent.
xAOD::CompositeParticle_v1::compPart
xAOD::CompositeParticle_v1 * compPart(const std::vector< int > &partIndices, const std::vector< int > &otherPartIndices=std::vector< int >{}, bool updateFourMom=true) const
Get a CompositeParticle that is build on the fly from the constituent particles associated to the ind...
xAOD::CompositeParticle_v1::rapidity
double rapidity(const std::vector< int > &partIndices) const
The true rapidity (y)
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
xAOD::CompositeParticle_v1::otherElectron
const xAOD::Electron * otherElectron(std::size_t index=0) const
Get the other constituent number i as an Electron.
Definition: CompositeParticle_v1.h:733
Muon
struct TBPatternUnitContext Muon
xAOD::CompositeParticle_v1::charge
float charge() const
Return the electric charge.
Definition: CompositeParticle_v1.cxx:182
xAOD::CompositeParticle_v1::nTruthElectrons
std::size_t nTruthElectrons() const
Number of constituent truth electrons.
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
xAOD::CompositeParticle_v1::setPz
void setPz(double pz)
Set the z-component of the momentum.
xAOD::Photon_v1
Definition: Photon_v1.h:37
xAOD::CompositeParticle_v1::otherPartLink
const xAOD::IParticleLink & otherPartLink(std::size_t index=0) const
Get the other constituent IParticle number i as an ElementLink.
Definition: CompositeParticle_v1.cxx:1084
xAOD::CompositeParticle_v1::nOtherElectrons
std::size_t nOtherElectrons() const
Number of other constituent electrons.
xAOD::CompositeParticle_v1::jet
const xAOD::Jet * jet(std::size_t index=0) const
Get the constituent number i as a Jet.
Definition: CompositeParticle_v1.h:692
xAOD::CompositeParticle_v1::nTruthMuons
std::size_t nTruthMuons() const
Number of constituent truth muons.
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
xAOD::CompositeParticle_v1::setMissingET
void setMissingET(const xAOD::MissingET *met, bool updateFourMom=true)
Set the MissingET for this CompositeParticle.
Definition: CompositeParticle_v1.cxx:608
xAOD::CompositeParticle_v1::pdgId
int pdgId() const
Return the PDG identifier.
xAOD::CompositeParticle_v1::eta
double eta(const std::vector< int > &partIndices) const
The pseudorapidity ( )
TauJet.h
xAOD::CompositeParticle_v1::removePart
void removePart(const xAOD::IParticle *part, bool updateFourMom=true)
Remove a particle as a constituent from this CompostiteParticle.
Definition: CompositeParticle_v1.cxx:536
xAOD::CompositeParticle_v1::nOtherJets
std::size_t nOtherJets() const
Number of other constituent jets.
xAOD::CompositeParticle_v1::nOtherTruthLeptons
std::size_t nOtherTruthLeptons() const
Number of other constituent truth leptons (truth electrons, truth muons, and truth taus).
Definition: CompositeParticle_v1.cxx:1065
xAOD::CompositeParticle_v1::mt
double mt(int partIndexA, int partIndexB=-2, MT::Method method=MT::DEFAULT) const
Get the transverse mass with only one constituent particle.
Definition: CompositeParticle_v1.h:205
xAOD::CompositeParticle_v1::setOtherPartLinks
void setOtherPartLinks(const xAOD::IParticleLinkContainer &otherPartLinks)
Set all other constituents in one go.
xAOD::CompositeParticle_v1::nOtherTruthPhotons
std::size_t nOtherTruthPhotons() const
Number of other constituent truth photons.
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
xAOD::CompositeParticle_v1::nCompParts
std::size_t nCompParts() const
Number of constituent CompositeParticles.
Electron.h
xAOD::CompositeParticle_v1::weight
float weight(const std::string &varNameA, const std::string &varNameB, const std::string &varNameC, const std::string &varNameD) const
Definition: CompositeParticle_v1.h:251
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
xAOD::CompositeParticle_v1::hasCharge
bool hasCharge() const
Check if this composite particle has its charge set.
Definition: CompositeParticle_v1.cxx:177
xAOD::CompositeParticle_v1::setP4
void setP4(const FourMom_t &vec)
Set the 4-vec.
Definition: CompositeParticle_v1.cxx:132
xAOD::CompositeParticle_v1::m
double m(const std::vector< int > &partIndices) const
The invariant mass.
TruthParticle.h
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::CompositeParticle_v1::MT
Define the enumeration of calculation methods for the transverse mass.
Definition: CompositeParticle_v1.h:189
xAOD::CompositeParticle_v1::otherPart
const xAOD::IParticle * otherPart(std::size_t index=0) const
Get the other constituent IParticle number i.
Definition: CompositeParticle_v1.cxx:1071
xAOD::CompositeParticle_v1::toPersistent
void toPersistent()
Function preparing the object to be persistified.
xAOD::CompositeParticle_v1::getInt
int getInt(const std::string &varName) const
Access to get a variable of type int.
Definition: CompositeParticle_v1.h:594
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::CompositeParticle_v1::nTruthPhotons
std::size_t nTruthPhotons() const
Number of constituent truth photons.
xAOD::CompositeParticle_v1::nTruthTaus
std::size_t nTruthTaus() const
Number of constituent truth taus.
xAOD::CompositeParticle_v1::missingET
const xAOD::MissingET * missingET() const
Get the MissingET object that is associated with this CompositeParticle.
Definition: CompositeParticle_v1.cxx:593
xAOD::CompositeParticle_v1::hasPdgId
bool hasPdgId() const
Check if this composite particle has its charge set.
Definition: CompositeParticle_v1.cxx:217
xAOD::CompositeParticle_v1::getUInt
unsigned int getUInt(const std::string &varName) const
Access to get a variable of type unsigned int.
Definition: CompositeParticle_v1.h:599
xAOD::CompositeParticle_v1::weight
float weight(const std::vector< std::string > &varNames, const std::vector< int > &partIndices={}) const
Get the weight for this xAOD::CompositeParticle by providing a vector of variable names that will be ...
xAOD::CompositeParticle_v1::setE
void setE(double e)
Set the energy.