![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
31 const std::string&
name,
34 m_classifier (
"MCTruthClassifier")
50 return StatusCode::SUCCESS;
63 return StatusCode::SUCCESS;
66 return AthAlgTool::queryInterface( riid, ppvIf );
96 RconvMC = +9.999e+10 ;
97 ZconvMC = +9.999e+10 ;
98 if (!truePart)
return false;
101 if (!
v ||
v->nOutgoingParticles() < 2)
112 if (
v->nOutgoingParticles() == 2 ) {
113 int pdgChild[2] = {0};
114 for (
unsigned u=0;
u<2 ; ++
u) {
117 pdgChild[
u] =
p->pdgId();
119 if ( pdgChild[0]+pdgChild[1]==0 && pdgChild[0]*pdgChild[1]==-121 ) {
125 else if ( std::abs(
pdgId) == 11 ) {
127 if (
v->nIncomingParticles()==1 &&
v->nOutgoingParticles()==2 ) {
128 int pdgBrother[2] = {0};
129 for (
unsigned u=0 ;
u<2 ; ++
u ) {
132 pdgBrother[
u] =
p->pdgId();
134 if ( pdgBrother[0]+pdgBrother[1]==(22+
pdgId) &&
135 pdgBrother[0]*pdgBrother[1]==(22*
pdgId) )
162 if ( truePart == 0 )
return false ;
163 const std::vector<const xAOD::TruthParticle*> mothers =
165 unsigned nmothers = mothers.size() ;
166 if ( nmothers == 0 ) {
170 else if ( nmothers == 1 ) {
174 int aPdgMother = abs(mothers[0]->
pdgId());
175 return (( aPdgMother>=23 && aPdgMother<=39 ) || aPdgMother==5000039 ) ;
181 int nParentPartons = 0 ;
182 for (
unsigned u=0 ;
u<nmothers ; ++
u ) {
183 int pdgMother = mothers[
u]->pdgId() ;
184 if ( pdgMother==21 || ( std::abs(pdgMother)<7 && pdgMother!=0 ) )
187 return ( nParentPartons >= 1 ) ;
199 const std::vector<const xAOD::TruthParticle*> mothers =
201 if ( mothers.size() != 1 )
return false ;
202 int pdgMother = mothers[0]->pdgId() ;
203 return ( pdgMother==21 || ( std::abs(pdgMother)<7 && pdgMother!=0 ) ) ;
223 if ( truePart ==
nullptr )
return false;
236 if (!
v)
return false;
237 if (
v->nOutgoingParticles()>0 ) {
254 while (
v &&
v->nIncomingParticles() == 1 &&
255 v->incomingParticle(0)->pdgId() ==
p->pdgId())
257 p =
v->incomingParticle(0);
273 if (!
v ||
v->nIncomingParticles() == 0)
276 return v->incomingParticle(0);
283 std::vector<const xAOD::TruthParticle*>
286 std::vector<const xAOD::TruthParticle*>
out;
290 int n =
v->nIncomingParticles();
292 for (
int i = 0;
i <
n;
i++)
293 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)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
int pdgId() const
PDG ID code.