Definition of a generic FastSim Particle which can be propagated through the detector (formerly ParticlePropagator) More...
#include <Particle.h>
Public Member Functions | |
double | charge () const |
Return charge of the particle. More... | |
bool | chargeIsSet () const |
Check if charge of particle was set. More... | |
double | gamma () const |
Return Lorentz' gamma factor. More... | |
int | genParticleIndex () const |
Return index of the particle in the genParticle vector. More... | |
double | getEnergyDeposit () const |
Return the energy the particle deposited in the tracker layer that was last hit (ionization). More... | |
double | getMotherDeltaR () const |
Get delta R to mother particle (only makes sense if mother and daughter charged). More... | |
int | getMotherPdgId () const |
Get pdgIdto mother particle (only makes sense if mother and daughter charged). More... | |
int | getMotherSimTrackIndex () const |
Get index of simTrack of mother particle (only makes sense if mother and daughter charged). More... | |
double | isLooper () const |
Check if this particle is about to do a loop in the tracker or the direction of the momentum is going inwards. More... | |
bool | isOnLayer (bool isForward, int index) |
Check if particle is on layer. More... | |
bool | isStable () const |
Returns true if particle is considered stable. More... | |
math::XYZTLorentzVector & | momentum () |
Return momentum of the particle. More... | |
const math::XYZTLorentzVector & | momentum () const |
Return momentum of the particle. More... | |
Particle (int pdgId, const math::XYZTLorentzVector &position, const math::XYZTLorentzVector &momentum) | |
Constructor. More... | |
int | pdgId () const |
Return pdgId of the particle. More... | |
math::XYZTLorentzVector & | position () |
Return position of the particle. More... | |
const math::XYZTLorentzVector & | position () const |
Return position of the particle. More... | |
double | remainingProperLifeTimeC () const |
Return the particle's remaining proper lifetime[in ct]. More... | |
bool | remainingProperLifeTimeIsSet () const |
Check if remaining proper lifetime of particle is set. More... | |
void | resetMother () |
Reset all information stored about the mother particle. More... | |
void | resetOnLayer () |
Reset layer this particle is currently on (i.e. particle is not on a layer anyomre) More... | |
void | setCharge (double charge) |
Set the charge of the particle. More... | |
void | setEnergyDeposit (double energyDeposit) |
Set the energy the particle deposited in the tracker layer that was last hit (ionization). More... | |
void | setGenParticleIndex (int index) |
Set index of the particle in the genParticle vector (if applies). More... | |
void | setLooper () |
This particle is about to do a loop in the tracker or the direction of the momentum is going inwards. More... | |
void | setMotherDeltaR (const math::XYZTLorentzVector &motherMomentum) |
Set delta R to mother particle (only necessary if mother and daughter charged). More... | |
void | setMotherPdgId (int motherPpdId) |
Set pdgId of the mother particle (only necessary if mother and daughter charged). More... | |
void | setMotherSimTrackIndex (int id) |
Set the index of the SimTrack of the mother particle (only necessary if mother and daughter charged). More... | |
void | setOnLayer (bool isForward, int index) |
Set layer this particle is currently on. More... | |
void | setRemainingProperLifeTimeC (double remainingProperLifeTimeC) |
Set the particle's remaining proper lifetime if not stable [in ct]. More... | |
void | setSimTrackIndex (int index) |
Set the index of the SimTrack of this particle. More... | |
void | setSimVertexIndex (int index) |
Set the index of the origin SimVertex of this particle. More... | |
void | setStable () |
Particle is stable. More... | |
int | simTrackIndex () const |
Return index of the SimTrack. More... | |
int | simVertexIndex () const |
Return index of the origin vertex. More... | |
Private Attributes | |
double | charge_ |
charge of the particle in elemntary units More... | |
double | energyDeposit_ |
energy deposit through ionization in the previous tracker layer More... | |
int | genParticleIndex_ |
index of the particle in the vector of genParticles (if applies) More... | |
bool | isLooper_ |
this particle is about to do a loop or momentum goes inwards More... | |
bool | isOnForwardLayer_ |
the layer this particle is currently on: is it a ForwardLayer More... | |
int | isOnLayerIndex_ |
the layer this particle is currently on: the index of the layer More... | |
math::XYZTLorentzVector | momentum_ |
momentum of the particle More... | |
double | motherDeltaR_ |
delta R to mother particle if both charged More... | |
int | motherPpdId_ |
pdgId of mother particle if both charged More... | |
int | motherSimTrackIndex_ |
simTrack index of mother particle if both charged More... | |
const int | pdgId_ |
pdgId of the particle More... | |
math::XYZTLorentzVector | position_ |
position of the particle More... | |
double | remainingProperLifeTimeC_ |
remaining proper lifetime of the particle in units of t*c More... | |
int | simTrackIndex_ |
index of the simTrack More... | |
int | simVertexIndex_ |
index of the origin vertex More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Particle &particle) |
Some basic output. More... | |
Definition of a generic FastSim Particle which can be propagated through the detector (formerly ParticlePropagator)
Contains all information necessary for the propagation and tracking of a particle:
Definition at line 16 of file Particle.h.
|
inline |
Constructor.
pdgId | The pdgId of the particle. |
position | The position of the particle. |
momentum | The momentum of the particle. |
Definition at line 24 of file Particle.h.
|
inline |
Return charge of the particle.
Definition at line 137 of file Particle.h.
References charge_.
Referenced by fastsim::ParticleFilter::acceptsEn(), FastSimProducer::createFSimTrack(), fastsim::Trajectory::createTrajectory(), fastsim::Decayer::decay(), fastsim::EnergyLoss::interact(), fastsim::MultipleScattering::interact(), fastsim::TrackerSimHitProducer::interact(), fastsim::NuclearInteraction::interact(), fastsim::NuclearInteractionFTF::interact(), and setCharge().
|
inline |
|
inline |
Return Lorentz' gamma factor.
Definition at line 180 of file Particle.h.
References momentum().
Referenced by fastsim::LayerNavigator::moveParticleToNextLayer().
|
inline |
Return index of the particle in the genParticle vector.
Returns -1 if not a genParticle.
Definition at line 165 of file Particle.h.
References genParticleIndex_.
Referenced by fastsim::ParticleManager::addSimTrack(), and FastSimProducer::createFSimTrack().
|
inline |
Return the energy the particle deposited in the tracker layer that was last hit (ionization).
This energy can then be assigned with a SimHit (if any).
Definition at line 188 of file Particle.h.
References energyDeposit_.
Referenced by fastsim::TrackerSimHitProducer::interact().
|
inline |
Get delta R to mother particle (only makes sense if mother and daughter charged).
Needed for FastSim (cheat) tracking: daughter can continue the track of the mother.
Definition at line 202 of file Particle.h.
References motherDeltaR_.
Referenced by fastsim::Decayer::decay(), and fastsim::NuclearInteractionFTF::interact().
|
inline |
Get pdgIdto mother particle (only makes sense if mother and daughter charged).
Needed for FastSim (cheat) tracking: daughter can continue the track of the mother.
Definition at line 209 of file Particle.h.
References motherPpdId_.
Referenced by fastsim::Decayer::decay(), and fastsim::NuclearInteractionFTF::interact().
|
inline |
Get index of simTrack of mother particle (only makes sense if mother and daughter charged).
Needed for FastSim (cheat) tracking: daughter can continue the track of the mother.
Definition at line 216 of file Particle.h.
References motherSimTrackIndex_.
Referenced by fastsim::TrackerSimHitProducer::interact().
|
inline |
Check if this particle is about to do a loop in the tracker or the direction of the momentum is going inwards.
The TrackerSimHitProducer has the option not to store SimHits in this case, since tracking not possible (just leads to fakes).
Definition at line 195 of file Particle.h.
References isLooper_.
Referenced by fastsim::TrackerSimHitProducer::interact().
|
inline |
Check if particle is on layer.
Definition at line 168 of file Particle.h.
References ecaldqm::isForward(), isOnForwardLayer_, and isOnLayerIndex_.
Referenced by fastsim::LayerNavigator::moveParticleToNextLayer().
|
inline |
Returns true if particle is considered stable.
Definition at line 171 of file Particle.h.
References remainingProperLifeTimeC_.
Referenced by FastSimProducer::createFSimTrack(), fastsim::LayerNavigator::moveParticleToNextLayer(), and fastsim::operator<<().
|
inline |
|
inline |
Return momentum of the particle.
Definition at line 143 of file Particle.h.
References momentum_.
Referenced by fastsim::ParticleFilter::accepts(), fastsim::ParticleFilter::acceptsEn(), fastsim::ParticleManager::addSimTrack(), fastsim::Bremsstrahlung::brem(), fastsim::MuonBremsstrahlung::brem(), FastSimProducer::createFSimTrack(), fastsim::Trajectory::createTrajectory(), fastsim::Decayer::decay(), gamma(), fastsim::PairProduction::interact(), fastsim::EnergyLoss::interact(), fastsim::Bremsstrahlung::interact(), fastsim::MultipleScattering::interact(), fastsim::MuonBremsstrahlung::interact(), fastsim::TrackerSimHitProducer::interact(), fastsim::NuclearInteraction::interact(), fastsim::NuclearInteractionFTF::interact(), fastsim::LayerNavigator::moveParticleToNextLayer(), and fastsim::Trajectory::Trajectory().
|
inline |
Return pdgId of the particle.
Definition at line 134 of file Particle.h.
References pdgId_.
Referenced by Particle.Particle::__str__(), fastsim::ParticleFilter::accepts(), fastsim::ParticleFilter::acceptsEn(), fastsim::ParticleManager::addSimTrack(), FastSimProducer::createFSimTrack(), fastsim::Decayer::decay(), fastsim::PairProduction::interact(), fastsim::Bremsstrahlung::interact(), fastsim::MuonBremsstrahlung::interact(), fastsim::TrackerSimHitProducer::interact(), fastsim::NuclearInteraction::interact(), and fastsim::NuclearInteractionFTF::interact().
|
inline |
|
inline |
Return position of the particle.
Definition at line 140 of file Particle.h.
References position_.
Referenced by fastsim::ParticleFilter::accepts(), fastsim::ParticleManager::addEndVertex(), FastSimProducer::createFSimTrack(), fastsim::Decayer::decay(), fastsim::PairProduction::interact(), fastsim::EnergyLoss::interact(), fastsim::Bremsstrahlung::interact(), fastsim::MultipleScattering::interact(), fastsim::MuonBremsstrahlung::interact(), fastsim::TrackerSimHitProducer::interact(), fastsim::NuclearInteraction::interact(), fastsim::NuclearInteractionFTF::interact(), fastsim::LayerNavigator::moveParticleToNextLayer(), and fastsim::Trajectory::Trajectory().
|
inline |
Return the particle's remaining proper lifetime[in ct].
Returns -1 in case particle is stable.
Definition at line 150 of file Particle.h.
References remainingProperLifeTimeC_.
Referenced by FastSimProducer::createFSimTrack(), fastsim::LayerNavigator::moveParticleToNextLayer(), and setRemainingProperLifeTimeC().
|
inline |
Check if remaining proper lifetime of particle is set.
Definition at line 177 of file Particle.h.
References remainingProperLifeTimeC_.
|
inline |
Reset all information stored about the mother particle.
Definition at line 123 of file Particle.h.
References motherDeltaR_, motherPpdId_, and motherSimTrackIndex_.
|
inline |
Reset layer this particle is currently on (i.e. particle is not on a layer anyomre)
Definition at line 78 of file Particle.h.
References isOnLayerIndex_.
Referenced by fastsim::LayerNavigator::moveParticleToNextLayer().
|
inline |
|
inline |
Set the energy the particle deposited in the tracker layer that was last hit (ionization).
This energy is then assigned with a SimHit (if any).
energyDeposit | The energy loss of the particle in the tracker material layer. |
Definition at line 87 of file Particle.h.
References energyDeposit_.
Referenced by fastsim::EnergyLoss::interact(), and fastsim::TrackerSimHitProducer::interact().
|
inline |
Set index of the particle in the genParticle vector (if applies).
Definition at line 55 of file Particle.h.
References genParticleIndex_.
|
inline |
This particle is about to do a loop in the tracker or the direction of the momentum is going inwards.
The TrackerSimHitProducer has the option not to store SimHits in this case, since tracking not possible (just leads to fakes).
Definition at line 94 of file Particle.h.
References isLooper_.
Referenced by fastsim::TrackerSimHitProducer::interact().
|
inline |
Set delta R to mother particle (only necessary if mother and daughter charged).
Needed for FastSim (cheat) tracking: daughter can continue the track of the mother.
motherMomentum | The momentum 4-vector of the mother particle. |
Definition at line 102 of file Particle.h.
References momentum_, and motherDeltaR_.
|
inline |
Set pdgId of the mother particle (only necessary if mother and daughter charged).
Needed for FastSim (cheat) tracking: daughter can continue the track of the mother.
motherPpdId | The pdgId of the mother particle. |
Definition at line 112 of file Particle.h.
References motherPpdId_.
|
inline |
Set the index of the SimTrack of the mother particle (only necessary if mother and daughter charged).
Needed for FastSim (cheat) tracking: daughter can continue the track of the mother.
id | The Id of the SimTrack of the mother particle. |
Definition at line 120 of file Particle.h.
References triggerObjects_cff::id, and motherSimTrackIndex_.
|
inline |
Set layer this particle is currently on.
Definition at line 72 of file Particle.h.
References ecaldqm::isForward(), isOnForwardLayer_, and isOnLayerIndex_.
Referenced by fastsim::LayerNavigator::moveParticleToNextLayer().
|
inline |
Set the particle's remaining proper lifetime if not stable [in ct].
remainingProperLifeTimeC | Important: defined in units of c*t! |
Definition at line 64 of file Particle.h.
References remainingProperLifeTimeC(), and remainingProperLifeTimeC_.
Referenced by fastsim::LayerNavigator::moveParticleToNextLayer().
|
inline |
Set the index of the SimTrack of this particle.
Definition at line 49 of file Particle.h.
References simTrackIndex_.
|
inline |
Set the index of the origin SimVertex of this particle.
Definition at line 52 of file Particle.h.
References simVertexIndex_.
|
inline |
|
inline |
Return index of the SimTrack.
Definition at line 153 of file Particle.h.
References simTrackIndex_.
Referenced by fastsim::ParticleManager::addEndVertex(), FastSimProducer::createFSimTrack(), fastsim::Decayer::decay(), fastsim::TrackerSimHitProducer::interact(), fastsim::NuclearInteraction::interact(), and fastsim::NuclearInteractionFTF::interact().
|
inline |
Return index of the origin vertex.
Returns -1 for primary vertex.
Definition at line 159 of file Particle.h.
References simVertexIndex_.
Referenced by fastsim::ParticleManager::addSimTrack(), and FastSimProducer::createFSimTrack().
|
friend |
Some basic output.
|
private |
charge of the particle in elemntary units
Definition at line 232 of file Particle.h.
Referenced by charge(), chargeIsSet(), and setCharge().
|
private |
energy deposit through ionization in the previous tracker layer
Definition at line 241 of file Particle.h.
Referenced by getEnergyDeposit(), and setEnergyDeposit().
|
private |
index of the particle in the vector of genParticles (if applies)
Definition at line 238 of file Particle.h.
Referenced by genParticleIndex(), and setGenParticleIndex().
|
private |
this particle is about to do a loop or momentum goes inwards
Definition at line 242 of file Particle.h.
Referenced by isLooper(), and setLooper().
|
private |
the layer this particle is currently on: is it a ForwardLayer
Definition at line 239 of file Particle.h.
Referenced by isOnLayer(), and setOnLayer().
|
private |
the layer this particle is currently on: the index of the layer
Definition at line 240 of file Particle.h.
Referenced by isOnLayer(), resetOnLayer(), and setOnLayer().
|
private |
momentum of the particle
Definition at line 234 of file Particle.h.
Referenced by momentum(), fastsim::operator<<(), and setMotherDeltaR().
|
private |
delta R to mother particle if both charged
Definition at line 243 of file Particle.h.
Referenced by getMotherDeltaR(), resetMother(), and setMotherDeltaR().
|
private |
pdgId of mother particle if both charged
Definition at line 244 of file Particle.h.
Referenced by getMotherPdgId(), resetMother(), and setMotherPdgId().
|
private |
simTrack index of mother particle if both charged
Definition at line 245 of file Particle.h.
Referenced by getMotherSimTrackIndex(), resetMother(), and setMotherSimTrackIndex().
|
private |
pdgId of the particle
Definition at line 231 of file Particle.h.
Referenced by fastsim::operator<<(), and pdgId().
|
private |
position of the particle
Definition at line 233 of file Particle.h.
Referenced by fastsim::operator<<(), and position().
|
private |
remaining proper lifetime of the particle in units of t*c
Definition at line 235 of file Particle.h.
Referenced by isStable(), fastsim::operator<<(), remainingProperLifeTimeC(), remainingProperLifeTimeIsSet(), setRemainingProperLifeTimeC(), and setStable().
|
private |
index of the simTrack
Definition at line 236 of file Particle.h.
Referenced by setSimTrackIndex(), and simTrackIndex().
|
private |
index of the origin vertex
Definition at line 237 of file Particle.h.
Referenced by setSimVertexIndex(), and simVertexIndex().