allpix::MCParticle

Module: Objects

Monte-Carlo particle through the sensor.

#include <MCParticle.hpp>

Inherits from allpix::Object, TObject

Public Functions

Name
MCParticle(ROOT::Math::XYZPoint local_start_point, ROOT::Math::XYZPoint global_start_point, ROOT::Math::XYZPoint local_end_point, ROOT::Math::XYZPoint global_end_point, int particle_id, double local_time, double global_time)
Construct a Monte-Carlo particle.
ROOT::Math::XYZPoint getLocalStartPoint() const
Get the entry point of the particle in local coordinates.
ROOT::Math::XYZPoint getGlobalStartPoint() const
Get the entry point of the particle in global coordinates.
ROOT::Math::XYZPoint getLocalEndPoint() const
Get the exit point of the particle in local coordinates.
ROOT::Math::XYZPoint getGlobalEndPoint() const
Get the exit point of the particle in global coordinates.
ROOT::Math::XYZPoint getLocalReferencePoint() const
Get the reference point of the particle in the sensor center plane in local coordinates.
bool isPrimary() const
Check if this MCParticle is a primary particle by checking if the parent particle reference is a nullptr.
int getParticleID() const
Get PDG particle id for the particle.
double getGlobalTime() const
Get the arrival time for the particle.
double getLocalTime() const
Get the local time for the particle in the respective sensor.
void setTotalEnergyStart(double total_energy)
Set the starting total energy of this particle in the respective sensor.
double getTotalEnergyStart() const
Return the starting total energy of this particle in the respective sensor.
void setKineticEnergyStart(double kinetic_energy)
Set the starting kinetic energy of this particle in the respective sensor.
double getKineticEnergyStart() const
Return the starting kinetic energy of this particle in the respective sensor.
void setTotalDepositedCharge(unsigned int total_charge)
Set the total number of charge carriers produced by this particle.
unsigned int getTotalDepositedCharge() const
Return the total number of charge carriers deposited by this particle.
void setParent(const MCParticle * mc_particle)
Set the Monte-Carlo particle.
const MCParticle * getParent() const
Get the parent MCParticle if it has one.
const MCParticle * getPrimary() const
Get the primary MCParticle from which this MCParticle originates.
void setTrack(const MCTrack * mc_track)
Set the MCParticle’s track.
const MCTrack * getTrack() const
Get the MCTrack of this MCParticle.
ClassDefOverride(MCParticle , 10 )
ROOT class definition.
MCParticle() =default
Default constructor for ROOT I/O.
virtual void print(std::ostream & out) const override
Print an ASCII representation of MCParticle to the given stream.
virtual void loadHistory() override
Resolve all the history to standard pointers.
virtual void petrifyHistory() override
Petrify all the pointers to prepare for persistent storage.

Additional inherited members

Public Classes inherited from allpix::Object

Name
class BaseWrapper
class PointerWrapper

Public Functions inherited from allpix::Object

Name
Object(const Object & ) =default
Use default copy behaviour.
Object & operator=(const Object & ) =default
Use default copy behaviour.
Object(Object && ) =default
Use default move behaviour.
Object & operator=(Object && ) =default
Use default move behaviour.
Object() =default
Required default constructor.
~Object() override =default
Required virtual destructor.
void markForStorage()

Protected Functions inherited from allpix::Object

Name
void Print(Option_t * ) const override
Override function to implement ROOTPrint()

Friends inherited from allpix::Object

Name
std::ostream & operator«(std::ostream & out, const allpix::Object & obj)
Overloaded ostream operator for printing of object data.

Public Functions Documentation

function MCParticle

MCParticle(
    ROOT::Math::XYZPoint local_start_point,
    ROOT::Math::XYZPoint global_start_point,
    ROOT::Math::XYZPoint local_end_point,
    ROOT::Math::XYZPoint global_end_point,
    int particle_id,
    double local_time,
    double global_time
)

Construct a Monte-Carlo particle.

Parameters:

  • local_start_point Entry point of the particle in the sensor in local coordinates
  • global_start_point Entry point of the particle in the sensor in global coordinates
  • local_end_point Exit point of the particle in the sensor in local coordinates
  • global_end_point Exit point of the particle in the sensor in global coordinates
  • particle_id PDG id for this particle type
  • local_time The arrival time of the particle in the sensor in local coordinates
  • global_time The arrival time of the particle in the sensor in global coordinates

function getLocalStartPoint

ROOT::Math::XYZPoint getLocalStartPoint() const

Get the entry point of the particle in local coordinates.

Return: Particle entry point

function getGlobalStartPoint

ROOT::Math::XYZPoint getGlobalStartPoint() const

Get the entry point of the particle in global coordinates.

Return: Particle entry point

function getLocalEndPoint

ROOT::Math::XYZPoint getLocalEndPoint() const

Get the exit point of the particle in local coordinates.

Return: Particle exit point

function getGlobalEndPoint

ROOT::Math::XYZPoint getGlobalEndPoint() const

Get the exit point of the particle in global coordinates.

Return: Particle exit point

function getLocalReferencePoint

ROOT::Math::XYZPoint getLocalReferencePoint() const

Get the reference point of the particle in the sensor center plane in local coordinates.

Return: Particle reference point on the center plane of the sensor

function isPrimary

bool isPrimary() const

Check if this MCParticle is a primary particle by checking if the parent particle reference is a nullptr.

Return: Bollean flag indicating whether this MCParticle is a primary particle

Object is stored as allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope

function getParticleID

int getParticleID() const

Get PDG particle id for the particle.

Return: Particle id

function getGlobalTime

double getGlobalTime() const

Get the arrival time for the particle.

Return: Arrival time of the particle in the respective sensor in global reference system

function getLocalTime

double getLocalTime() const

Get the local time for the particle in the respective sensor.

Return: Arrival time of the particle in the respective sensor in the local system

function setTotalEnergyStart

void setTotalEnergyStart(
    double total_energy
)

Set the starting total energy of this particle in the respective sensor.

Parameters:

  • total_energy Total energy of this particle at its start point

function getTotalEnergyStart

double getTotalEnergyStart() const

Return the starting total energy of this particle in the respective sensor.

Return: Total energy of this particle at its start point

function setKineticEnergyStart

void setKineticEnergyStart(
    double kinetic_energy
)

Set the starting kinetic energy of this particle in the respective sensor.

Parameters:

  • kinetic_energy Kinetic energy of this particle at its start point

function getKineticEnergyStart

double getKineticEnergyStart() const

Return the starting kinetic energy of this particle in the respective sensor.

Return: Kinetic energy of this particle at its start point

function setTotalDepositedCharge

void setTotalDepositedCharge(
    unsigned int total_charge
)

Set the total number of charge carriers produced by this particle.

Parameters:

  • total_charge Total charge deposited by this particle

function getTotalDepositedCharge

unsigned int getTotalDepositedCharge() const

Return the total number of charge carriers deposited by this particle.

Return: Total number of deposited charge carriers

function setParent

void setParent(
    const MCParticle * mc_particle
)

Set the Monte-Carlo particle.

Parameters:

  • mc_particle The Monte-Carlo particle

Warning: Special method because parent can only be set after creation, should not be replaced later.

function getParent

const MCParticle * getParent() const

Get the parent MCParticle if it has one.

Return: Parent MCParticle or null pointer if it has no parent

Warning: No MissingReferenceException is thrown, because a particle without parent should always be handled.

Object is stored as allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope

function getPrimary

const MCParticle * getPrimary() const

Get the primary MCParticle from which this MCParticle originates.

Return: Primary MCParticle. If it is a primary itself, returns pointer to self

Warning: No MissingReferenceException is thrown, because primary particles should always be handled.

Object is stored as allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope

function setTrack

void setTrack(
    const MCTrack * mc_track
)

Set the MCParticle’s track.

Parameters:

  • mc_track The track

Warning: Special method because track can only be set after creation, should not be replaced later.

function getTrack

const MCTrack * getTrack() const

Get the MCTrack of this MCParticle.

Return: Parent MCTrack or null pointer if it has no track

Warning: No MissingReferenceException is thrown, because a particle without a track should always be handled.

Object is stored as allpix::Object::PointerWrapper and can only be accessed if pointed object is in scope

function ClassDefOverride

ClassDefOverride(
    MCParticle ,
    10 
)

ROOT class definition.

function MCParticle

MCParticle() =default

Default constructor for ROOT I/O.

function print

virtual void print(
    std::ostream & out
) const override

Print an ASCII representation of MCParticle to the given stream.

Parameters:

  • out Stream to print to

Reimplements: allpix::Object::print

function loadHistory

virtual void loadHistory() override

Resolve all the history to standard pointers.

Reimplements: allpix::Object::loadHistory

function petrifyHistory

virtual void petrifyHistory() override

Petrify all the pointers to prepare for persistent storage.

Reimplements: allpix::Object::petrifyHistory


Updated on 2024-12-13 at 08:31:36 +0000