ATLAS Offline Software
Namespaces | Macros | Functions | Variables
CompositeParticle_v1.cxx File Reference
#include <cmath>
#include "TruthUtils/HepMCHelpers.h"
#include "xAODCore/AuxStoreAccessorMacros.h"
#include "xAODBase/IParticle.h"
#include "xAODMissingET/MissingET.h"
#include "xAODMissingET/MissingETContainer.h"
#include "xAODParticleEvent/versions/CompositeParticle_v1.h"
#include "Math/Vector4D.h"
Include dependency graph for CompositeParticle_v1.cxx:

Go to the source code of this file.

Namespaces

 xAOD
 ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
 

Macros

#define NUM_PARTS(FUNCNAME, OBJTYPE)
 
#define NUM_TRUTHPARTS(FUNCNAME, PIDMETHOD)
 
#define NUM_OTHERPARTS(FUNCNAME, OBJTYPE)
 
#define NUM_OTHERTRUTHPARTS(FUNCNAME, PIDMETHOD)
 

Functions

 xAOD::AUXSTORE_PRIMITIVE_SETTER_WITH_CAST (CompositeParticle_v1, float, double, px, setPx) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1
 
setPy xAOD::AUXSTORE_PRIMITIVE_SETTER_WITH_CAST (CompositeParticle_v1, float, double, pz, setPz) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1
 
 xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER (CompositeParticle_v1, xAOD::IParticleLinkContainer, otherPartLinks, setOtherPartLinks) void CompositeParticle_v1
 

Variables

 xAOD::double
 
 xAOD::py
 
setPy xAOD::e
 

Macro Definition Documentation

◆ NUM_OTHERPARTS

#define NUM_OTHERPARTS (   FUNCNAME,
  OBJTYPE 
)
Value:
std::size_t CompositeParticle_v1::FUNCNAME() const { \
std::size_t n(0); \
std::size_t nParts = this->nOtherParts(); \
for ( std::size_t i=0; i<nParts; ++i ) { \
const xAOD::IParticle* part = this->otherPart(i); \
if (!part) { throw std::runtime_error("Got a zero pointer to an xAOD::IParticle!"); } \
if ( part->type() == xAOD::Type::OBJTYPE ) { n += 1; } \
} \
return n; \
}

Definition at line 1021 of file CompositeParticle_v1.cxx.

◆ NUM_OTHERTRUTHPARTS

#define NUM_OTHERTRUTHPARTS (   FUNCNAME,
  PIDMETHOD 
)
Value:
std::size_t CompositeParticle_v1::FUNCNAME() const { \
std::size_t n(0); \
std::size_t nParts = this->nOtherParts(); \
for ( std::size_t i=0; i<nParts; ++i ) { \
const xAOD::IParticle* part = this->otherPart(i); \
if (!part) { throw std::runtime_error("Got a zero pointer to an xAOD::IParticle!"); } \
if ( part->type() != xAOD::Type::TruthParticle ) { continue; } \
const xAOD::TruthParticle* truthParticle = dynamic_cast<const xAOD::TruthParticle*>(part); \
if (!truthParticle) { throw std::runtime_error("Zero pointer to xAOD::TruthParticle"); } \
if ( PIDMETHOD(truthParticle->pdgId()) ) { n += 1; } \
} \
return n; \
}

Definition at line 1046 of file CompositeParticle_v1.cxx.

◆ NUM_PARTS

#define NUM_PARTS (   FUNCNAME,
  OBJTYPE 
)
Value:
std::size_t CompositeParticle_v1::FUNCNAME() const { \
std::size_t n(0); \
std::size_t nParts = this->nParts(); \
for ( std::size_t i=0; i<nParts; ++i ) { \
const xAOD::IParticle* part = this->part(i); \
if (!part) { throw std::runtime_error("Got a zero pointer to an xAOD::IParticle!"); } \
if ( part->type() == xAOD::Type::OBJTYPE ) { n += 1; } \
} \
return n; \
}

Definition at line 733 of file CompositeParticle_v1.cxx.

◆ NUM_TRUTHPARTS

#define NUM_TRUTHPARTS (   FUNCNAME,
  PIDMETHOD 
)
Value:
std::size_t CompositeParticle_v1::FUNCNAME() const { \
std::size_t n(0); \
std::size_t nParts = this->nParts(); \
for ( std::size_t i=0; i<nParts; ++i ) { \
const xAOD::IParticle* part = this->part(i); \
if (!part) { throw std::runtime_error("Got a zero pointer to an xAOD::IParticle!"); } \
if ( part->type() != xAOD::Type::TruthParticle ) { continue; } \
const xAOD::TruthParticle* truthParticle = dynamic_cast<const xAOD::TruthParticle*>(part); \
if (!truthParticle) { throw std::runtime_error("Zero pointer to xAOD::TruthParticle"); } \
if ( PIDMETHOD(truthParticle->pdgId()) ) { n += 1; } \
} \
return n; \
}

Definition at line 758 of file CompositeParticle_v1.cxx.

LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition: Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15