ATLAS Offline Software
Loading...
Searching...
No Matches
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
35namespace 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
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 }
152
153 inline FourMom_t p4( int partIndexA, int partIndexB, int partIndexC ) const {
154 return this->p4( std::vector<int>{partIndexA, partIndexB, partIndexC} );
155 }
156
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 {
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 {
600 return SG::ConstAccessor<unsigned int>(varName)(*this);
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
631
632
633 }; // class CompositeParticle_v1
634
635
636} // namespace xAOD
637
638
639// Inline methods
640inline
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
650inline
651const 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
660inline
661const 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
670inline
671const 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
680inline
681const 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
690inline
691const 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
700inline
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
711inline
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
721inline
722const 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
731inline
732const 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
741inline
742const 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
751inline
752const 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
761inline
762const 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
771inline
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
std::vector< size_t > vec
Helper class to provide constant type-safe access to aux data.
DataVector adapter that acts like it holds const pointers.
DataVector adapter that acts like it holds const pointers.
Helper class to provide constant type-safe access to aux data.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Helper class to provide type-safe access to aux data.
Definition AuxElement.h:131
Description of a composite particle, i.e.
std::size_t nOtherPhotons() const
Number of other constituent photons.
bool containsOther(const xAOD::IParticle *part) const
Check if a given xAOD::IParticle is an other constituent.
bool hasPdgId() const
Check if this composite particle has its charge set.
std::size_t nOtherLeptons() const
Number of other constituent leptons (electrons, muons, and taus).
virtual double phi() const
The azimuthal angle ( ) of the particle.
std::size_t nOtherTruthPhotons() const
Number of other constituent truth photons.
std::size_t nCompParts() const
Number of constituent CompositeParticles.
double phi(const std::vector< int > &partIndices) const
The azimuthal angle ( )
double pz() const
Get the pz momentum component of the particle.
const xAOD::IParticle * part(std::size_t index=0) const
Get the constituent IParticle number i.
std::size_t nOtherMuons() const
Number of other constituent muons.
FourMom_t p4(int partIndexA, int partIndexB) const
Get the four-momentum with two indices.
std::size_t nOtherTruthTaus() const
Number of other constituent truth taus.
std::size_t nElectrons() const
Number of constituent electrons.
std::size_t nJets() const
Number of constituent jets.
const xAOD::IParticleLinkContainer & partLinks() const
Get all constituents in one go.
void setPartLinks(const xAOD::IParticleLinkContainer &constitLinks)
Set all constituents in one go.
std::size_t nOtherTruthMuons() const
Number of other constituent truth muons.
const xAOD::IParticleLink & partLink(std::size_t index=0) const
Get the constituent IParticle number i as an ElementLink.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
std::size_t nOtherElectrons() const
Number of other constituent electrons.
const xAOD::TruthParticle * otherTruthPart(std::size_t index=0) const
Get the other constituent number i as a TruthParticle.
double pt(const std::vector< int > &partIndices) const
The transverse momentum ( )
bool hasCharge() const
Check if this composite particle has its charge set.
int pdgId() const
Return the PDG identifier.
double et(const std::vector< int > &partIndices) const
The transverse energy ( ) Note that this differs from ( ) for massive particles.
const xAOD::Electron * electron(std::size_t index=0) const
Get the constituent number i as an Electron.
double py() const
Get the py momentum component of the particle.
void removeOtherPart(const xAOD::IParticle *part)
Remove a particle as an other constituent from this CompostiteParticle.
double p(const std::vector< int > &partIndices) const
The total 3-momentum.
double rapidity(const std::vector< int > &partIndices) const
The true rapidity (y)
double m(const std::vector< int > &partIndices) const
The invariant mass.
unsigned int getUInt(const std::string &varName) const
Access to get a variable of type unsigned int.
void setPxPyPzE(double px, double py, double pz, double e)
Set the 4-vec.
float weight(const std::string &varNameA, const std::string &varNameB, const std::string &varNameC, const std::string &varNameD) const
CompositeParticle_v1()
Default constructor.
const xAOD::CompositeParticle_v1 * otherCompPart(std::size_t index=0) const
Get the other constituent number i as a CompositeParticle.
std::size_t nOtherTruthParts() const
Number of other constituent xAOD::TruthParticles.
std::size_t nTruthParts() const
Number of constituent xAOD::TruthParticles.
std::size_t nMuons() const
Number of constituent muons.
void addOtherPart(const xAOD::IParticle *part)
Add a particle as an additional other constituent.
std::size_t nOtherTaus() const
Number of other constituent taus.
double et() const
The transverse energy ( ) of the particle.
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
double px() const
Get the px momentum component of the particle.
const xAOD::Photon * photon(std::size_t index=0) const
Get the constituent number i as a Photon.
const xAOD::IParticle * otherPart(std::size_t index=0) const
Get the other constituent IParticle number i.
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...
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 ...
float weight(const std::string &varNameA, const std::string &varNameB, const std::string &varNameC) const
virtual double e() const
The total energy of the particle.
void setPy(double py)
Set the y-component of the momentum.
void setCharge(float charge)
Set the electric charge.
const xAOD::MissingET * missingET() const
Get the MissingET object that is associated with this CompositeParticle.
void addPart(const xAOD::IParticle *part, bool updateFourMom=true)
Add a particle as an additional constituent.
std::size_t nTruthElectrons() const
Number of constituent truth electrons.
const xAOD::TruthParticle * truthPart(std::size_t index=0) const
Get the constituent number i as a TruthParticle.
double pz(const std::vector< int > &partIndices) const
Get the pz momentum component.
const xAOD::Muon * otherMuon(std::size_t index=0) const
Get the other constituent number i as an Muon.
double mt(const std::vector< int > &partIndices, MT::Method method=MT::DEFAULT) const
Get the transverse mass.
void setPdgId(int pdgID)
Set the PDG identifier.
std::size_t nParts() const
Number of constituent particles.
int getInt(const std::string &varName) const
Access to get a variable of type int.
std::size_t nOtherJets() const
Number of other constituent jets.
std::size_t nOtherCompParts() const
Number of other constituent CompositeParticles.
double px(const std::vector< int > &partIndices) const
Get the px momentum component.
float weight(const std::string &varNameA, const std::string &varNameB) const
float weight(const std::string &varNameA) const
Get the weight for this xAOD::CompositeParticle.
const xAOD::Electron * otherElectron(std::size_t index=0) const
Get the other constituent number i as an Electron.
double eta(const std::vector< int > &partIndices) const
The pseudorapidity ( )
std::size_t nTruthLeptons() const
Number of constituent truth leptons (truth electrons, truth muons, and truth taus).
std::size_t nLeptons() const
Number of constituent leptons (electrons, muons, and taus).
void addOtherParts(const xAOD::IParticleLinkContainer &partLinkCont)
Add many other constituents at the same time.
float charge() const
Return the electric charge.
void toPersistent()
Function preparing the object to be persistified.
std::size_t nOtherParts() const
Number of other constituent particles.
std::size_t nOtherTruthElectrons() const
Number of other constituent truth electrons.
bool contains(const xAOD::MissingET *met) const
Check if a given xAOD::MissingET object is part of this CompositeParticle.
std::size_t nPhotons() const
Number of constituent photons.
void removeMissingET(bool updateFourMom=true)
Remove the existing MissingET object from this CompositeParticle.
void setP4(const FourMom_t &vec)
Set the 4-vec.
float getFloat(const std::string &varName) const
Access to get a variable of type float.
void setOtherPartLinks(const xAOD::IParticleLinkContainer &otherPartLinks)
Set all other constituents in one go.
const xAOD::TauJet * tau(std::size_t index=0) const
Get the constituent number i as a tau.
const xAOD::IParticleLinkContainer & otherPartLinks() const
Get all other constituents in one go.
FourMom_t p4(int partIndexA, int partIndexB, int partIndexC) const
Get the four-momentum with three indices.
float weight(const std::string &varNameA, const std::string &varNameB, const std::string &varNameC, const std::string &varNameD, const std::string &varNameE) const
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...
std::size_t nOtherTruthLeptons() const
Number of other constituent truth leptons (truth electrons, truth muons, and truth taus).
std::size_t nTruthTaus() const
Number of constituent truth taus.
ConstDataVector< CONTTYPE > * parts() const
Method to return a DataVector<T>, e.g., a MuonContainer, for all the constituent particles,...
const xAOD::Muon * muon(std::size_t index=0) const
Get the constituent number i as an Muon.
const xAOD::Photon * otherPhoton(std::size_t index=0) const
Get the other constituent number i as a Photon.
double e(const std::vector< int > &partIndices) const
The total energy.
double py(const std::vector< int > &partIndices) const
Get the py momentum component.
double mt(int partIndexA, int partIndexB=-2, MT::Method method=MT::DEFAULT) const
Get the transverse mass with only one constituent particle.
float weightHelper(const xAOD::IParticle *part, const xAOD::IParticle::ConstAccessor< float > &varAcc) const
This is a private helper method to calculate the weight.
void setE(double e)
Set the energy.
FourMom_t p4(int partIndexA, int partIndexB, int partIndexC, int partIndexD) const
Get the four-momentum with four indices.
const xAOD::IParticleLink & otherPartLink(std::size_t index=0) const
Get the other constituent IParticle number i as an ElementLink.
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourMom_t
Base 4 Momentum type (GenVector)
double getDouble(const std::string &varName) const
Access to get a variable of type double.
void removePart(const xAOD::IParticle *part, bool updateFourMom=true)
Remove a particle as a constituent from this CompostiteParticle.
FourMom_t p4(const std::vector< int > &partIndices) const
The total 4-momentum.
virtual double eta() const
The pseudorapidity ( ) of the particle.
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form Note: can be slower than just p4 for this class;...
void setPz(double pz)
Set the z-component of the momentum.
virtual double rapidity() const
The true rapidity (y) of the particle.
const xAOD::Jet * jet(std::size_t index=0) const
Get the constituent number i as a Jet.
std::size_t nTruthMuons() const
Number of constituent truth muons.
std::size_t nTruthPhotons() const
Number of constituent truth photons.
void setPx(double px)
Set the x-component of the momentum.
bool getBool(const std::string &varName) const
Access to get a variable of type bool (actually, it is stored using type char)
const xAOD::TauJet * otherTau(std::size_t index=0) const
Get the other constituent number i as a tau.
void setMissingET(const xAOD::MissingET *met, bool updateFourMom=true)
Set the MissingET for this CompositeParticle.
virtual double m() const
The invariant mass of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
const xAOD::Jet * otherJet(std::size_t index=0) const
Get the other constituent number i as a Jet.
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...
std::size_t nTaus() const
Number of constituent taus.
Class providing the definition of the 4-vector interface.
IParticle()=default
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition index.py:1
@ CompositeParticle
Particle composed of other particles.
Definition ObjectType.h:95
@ Jet
The object is a jet.
Definition ObjectType.h:40
@ Photon
The object is a photon.
Definition ObjectType.h:47
@ Muon
The object is a muon.
Definition ObjectType.h:48
@ TruthParticle
The object is a truth particle.
Definition ObjectType.h:67
@ Electron
The object is an electron.
Definition ObjectType.h:46
@ Tau
The object is a tau (jet)
Definition ObjectType.h:49
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
MissingET_v1 MissingET
Version control by type defintion.
IParticleLinkContainer_v1 IParticleLinkContainer
Define the latest version of the IParticleLinkContainer class.
IParticleLink_v1 IParticleLink
Define the latest version of the IParticleLink class.
TauJet_v3 TauJet
Definition of the current "tau version".
TruthParticle_v1 TruthParticle
Typedef to implementation.
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".
Define the enumeration of calculation methods for the transverse mass.