Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
31 const std::string&
name,
34 m_classifier (
"MCTruthClassifier")
50 return StatusCode::SUCCESS;
80 RconvMC = +9.999e+10 ;
81 ZconvMC = +9.999e+10 ;
82 if (!truePart)
return false;
85 if (!
v ||
v->nOutgoingParticles() < 2)
88 int pdgId = truePart->
pdgId();
96 if (
v->nOutgoingParticles() == 2 ) {
97 int pdgChild[2] = {0};
98 for (
unsigned u=0;
u<2 ; ++
u) {
101 pdgChild[
u] =
p->pdgId();
103 if ( pdgChild[0]+pdgChild[1]==0 && pdgChild[0]*pdgChild[1]==-121 ) {
109 else if ( std::abs(pdgId) == 11 ) {
111 if (
v->nIncomingParticles()==1 &&
v->nOutgoingParticles()==2 ) {
112 int pdgBrother[2] = {0};
113 for (
unsigned u=0 ;
u<2 ; ++
u ) {
116 pdgBrother[
u] =
p->pdgId();
118 if ( pdgBrother[0]+pdgBrother[1]==(22+pdgId) &&
119 pdgBrother[0]*pdgBrother[1]==(22*pdgId) )
146 if ( truePart == 0 )
return false ;
147 const std::vector<const xAOD::TruthParticle*> mothers =
149 unsigned nmothers = mothers.size() ;
150 if ( nmothers == 0 ) {
154 else if ( nmothers == 1 ) {
158 int aPdgMother = abs(mothers[0]->pdgId());
159 return (( aPdgMother>=23 && aPdgMother<=39 ) || aPdgMother==5000039 ) ;
165 int nParentPartons = 0 ;
166 for (
unsigned u=0 ;
u<nmothers ; ++
u ) {
167 int pdgMother = mothers[
u]->pdgId() ;
168 if ( pdgMother==21 || ( std::abs(pdgMother)<7 && pdgMother!=0 ) )
171 return ( nParentPartons >= 1 ) ;
183 const std::vector<const xAOD::TruthParticle*> mothers =
185 if ( mothers.size() != 1 )
return false ;
186 int pdgMother = mothers[0]->pdgId() ;
187 return ( pdgMother==21 || ( std::abs(pdgMother)<7 && pdgMother!=0 ) ) ;
207 if ( truePart ==
nullptr )
return false;
220 if (!
v)
return false;
221 if (
v->nOutgoingParticles()>0 ) {
238 while (
v &&
v->nIncomingParticles() == 1 &&
239 v->incomingParticle(0)->pdgId() ==
p->pdgId())
241 p =
v->incomingParticle(0);
257 if (!
v ||
v->nIncomingParticles() == 0)
260 return v->incomingParticle(0);
267 std::vector<const xAOD::TruthParticle*>
270 std::vector<const xAOD::TruthParticle*>
out;
274 int n =
v->nIncomingParticles();
276 for (
int i = 0;
i <
n;
i++)
277 out.push_back (
v->incomingParticle(
i));
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
@ u
Enums for curvilinear frames.
Block filler tool for noisy FEB information.
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...
::StatusCode StatusCode
StatusCode definition for legacy code.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Class describing a truth particle in the MC record.
#define CHECK(...)
Evaluate an expression and check for errors.
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Class describing a truth vertex in the MC record.
Helpers for checking error return status codes and reporting errors.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
int pdgId() const
PDG ID code.