8#ifndef LAR_MC_PARTICLE_H
9#define LAR_MC_PARTICLE_H 1
185 m_nuanceCode(parameters.m_nuanceCode.Get()),
186 m_process(parameters.m_process.Get())
203 parameters.m_energy = this->GetEnergy();
204 parameters.m_momentum = this->GetMomentum();
205 parameters.m_vertex = this->GetVertex();
206 parameters.m_endpoint = this->GetEndpoint();
207 parameters.m_particleId = this->GetParticleId();
208 parameters.m_mcParticleType = this->GetMCParticleType();
210 parameters.m_pParentAddress =
static_cast<const void *
>(
this);
241 return pandora::STATUS_CODE_SUCCESS;
270 return pandora::STATUS_CODE_INVALID_PARAMETER;
275 larMCParticleParameters.
m_process = process;
277 return pandora::STATUS_CODE_SUCCESS;
288 return pandora::STATUS_CODE_INVALID_PARAMETER;
297 pandora::STATUS_CODE_SUCCESS, !=, binaryFileWriter.
WriteVariable(
static_cast<int>(pLArMCParticle->
GetProcess())));
306 pandora::STATUS_CODE_SUCCESS, !=, xmlFileWriter.
WriteVariable(
"Process",
static_cast<int>(pLArMCParticle->
GetProcess())));
310 return pandora::STATUS_CODE_INVALID_PARAMETER;
313 return pandora::STATUS_CODE_SUCCESS;
Header file for the binary file reader class.
Header file for the binary file writer class.
Header file for the mc particle class.
Header file for pandora object creation classes.
Header file for the pandora object factories classes.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Header file for the xml file reader class.
Header file for the xml file writer class.
LArMCParticleFactory responsible for object creation.
LArMCParticleFactory(const unsigned int version=2)
Constructor.
Parameters * NewParameters() const
Create new parameters instance on the heap (memory-management to be controlled by user)
pandora::StatusCode Write(const Object *const pObject, pandora::FileWriter &fileWriter) const
Persist any additional (derived class only) object parameters using the specified file writer.
pandora::StatusCode Create(const Parameters ¶meters, const Object *&pObject) const
Create an object with the given parameters.
pandora::StatusCode Read(Parameters ¶meters, pandora::FileReader &fileReader) const
Read any additional (derived class only) object parameters from file using the specified file reader.
unsigned int m_version
The LArMCParticle version.
void FillParameters(LArMCParticleParameters ¶meters) const
Fill the parameters associated with this MC particle.
int m_nuanceCode
The nuance code.
MCProcess GetProcess() const
Get the process.
int GetNuanceCode() const
Get the nuance code.
int m_process
The process that created the particle.
LArMCParticle(const LArMCParticleParameters ¶meters)
Constructor.
LAr mc particle parameters.
pandora::InputInt m_nuanceCode
The nuance code.
pandora::InputInt m_process
The process creating the particle.
StatusCode ReadVariable(T &t)
Read a variable from the file.
StatusCode WriteVariable(const T &t)
Write a variable to the file.
ObjectFactory class responsible for extended pandora object creation.
object_creation::MCParticle::Object Object
object_creation::MCParticle::Parameters Parameters
FileType GetFileType() const
Get the file type.
StatusCode ReadVariable(const std::string &xmlKey, T &t)
Read a variable from the file.
StatusCode WriteVariable(const std::string &xmlKey, const T &t)
Write a variable to the file.
@ MC_PROC_HAD_BERTINI_CAPTURE_AT_REST
@ MC_PROC_NEUTRON_INELASTIC
@ MC_PROC_ALPHA_INELASTIC
@ MC_PROC_DEUTERON_INELASTIC
@ MC_PROC_TRITON_INELASTIC
@ MC_PROC_ANTI_DEUTERON_INELASTIC
@ MC_PROC_PI_PLUS_INELASTIC
@ MC_PROC_ANTI_NEUTRON_INELASTIC
@ MC_PROC_ANTI_ALPHA_INELASTIC
@ MC_PROC_CHIPS_NUCLEAR_CAPTURE_AT_REST
@ MC_PROC_PRIMARY_BACKGROUND
@ MC_PROC_ANTI_TRITON_INELASTIC
@ MC_PROC_ELECTRON_NUCLEAR
@ MC_PROC_ANTI_PROTON_INELASTIC
@ MC_PROC_PI_MINUS_INELASTIC
@ MC_PROC_PROTON_INELASTIC
@ MC_PROC_PHOTON_INELASTIC
@ MC_PROC_MU_MINUS_CAPTURE_AT_REST
@ MC_PROC_HAD_FRITIOF_CAPTURE_AT_REST
@ MC_PROC_KAON_PLUS_INELASTIC
@ MC_PROC_LAMBDA_INELASTIC
@ MC_PROC_ANTI_HE3_INELASTIC
@ MC_PROC_KAON_MINUS_INELASTIC
StatusCode
The StatusCode enum.