84 {
85
86 const static SG::Decorator< unsigned int > originDecorator("classifierParticleOrigin");
87 const static SG::Decorator< unsigned int > typeDecorator("classifierParticleType");
88 const static SG::Decorator< unsigned int > outcomeDecorator("classifierParticleOutCome");
89 const static SG::Decorator< int > motherIDDecorator("motherID");
90 const static SG::Decorator< int > daughterIDDecorator("daughterID");
91
92 static const SG::ConstAccessor<unsigned int> classifierParticleTypeAcc("classifierParticleType");
93 static const SG::ConstAccessor<unsigned int> classifierParticleOriginAcc("classifierParticleOrigin");
94 static const SG::ConstAccessor<unsigned int> classifierParticleOutComeAcc("classifierParticleOutCome");
95
96
99
103 xTruthParticle->
setM(oldPart.
m());
104 xTruthParticle->
setPx(oldPart.
px());
105 xTruthParticle->
setPy(oldPart.
py());
106 xTruthParticle->
setPz(oldPart.
pz());
107 xTruthParticle->
setE(oldPart.
e());
108
112 }
113
114 typeDecorator(*xTruthParticle) = classifierParticleTypeAcc.withDefault(oldPart, 0);
115 originDecorator(*xTruthParticle) = classifierParticleOriginAcc.withDefault(oldPart, 0);
116 outcomeDecorator(*xTruthParticle) = classifierParticleOutComeAcc.withDefault(oldPart, 0);
117 return xTruthParticle;
118}
void setPy(float value)
Set the y component of the particle's momentum.
int status() const
Status code.
void setUid(int value)
Set unique ID.
void setM(float value)
Also store the mass.
virtual double m() const override final
The mass of the particle.
void setE(float value)
Set the energy of the particle.
int pdgId() const
PDG ID code.
Polarization polarization() const
Retrieve a full Polarization with a single call.
void setPz(float value)
Set the z component of the particle's momentum.
float px() const
The x component of the particle's momentum.
virtual double e() const override final
The total energy of the particle.
bool setPolarizationParameter(float value, PolParam parameter)
Set method for polarization parameter values.
float py() const
The y component of the particle's momentum.
void setStatus(int value)
Set status code.
void setPdgId(int pid)
Set PDG ID code.
void setPx(float value)
Set the x component of the particle's momentum.
bool polarizationParameter(float &value, PolParam parameter) const
Accessor for polarization parameters.
float pz() const
The z component of the particle's momentum.
@ polarizationPhi
Polarization in ( )
@ polarizationTheta
Polarization in ( )
bool valid() const
Check if the stored values are valid.