#include <FSimTrack.h>
Public Member Functions | |
void | addDaughter (int i) |
Add a RecHit for a track on a layer. | |
float | charge () const |
charge | |
int | closestDaughterId () const |
Get the index of the closest charged daughter. | |
const FSimTrack & | daughter (int i) const |
Ith daughter. | |
const std::vector< int > & | daughters () const |
Vector of daughter indices. | |
double | decayTime () const |
Return the pre-defined decay time. | |
const RawParticle & | ecalEntrance () const |
The particle at ECAL entrance. | |
const FSimVertex & | endVertex () const |
end vertex | |
FSimTrack () | |
Default constructor. | |
FSimTrack (const RawParticle *p, int iv, int ig, int id, FBaseSimEvent *mom, double dt=-1.) | |
Constructor from the EmmbSimTrack index in the FBaseSimEvent. | |
const HepMC::GenParticle * | genParticle () const |
The original GenParticle. | |
const RawParticle & | hcalEntrance () const |
The particle at HCAL entrance. | |
int | id () const |
the index in FBaseSimEvent and other vectors | |
const RawParticle & | layer1Entrance () const |
The particle at Preshower Layer 1. | |
const RawParticle & | layer2Entrance () const |
The particle at Preshower Layer 2. | |
const XYZTLorentzVector & | momentum () const |
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful. | |
const FSimTrack & | mother () const |
mother | |
int | nDaughters () const |
Number of daughters. | |
bool | noDaughter () const |
no daughters | |
bool | noEndVertex () const |
no end vertex | |
bool | noMother () const |
no mother particle | |
bool | notYetToEndVertex (const XYZTLorentzVector &pos) const |
Compare the end vertex position with another position. | |
int | onEcal () const |
int | onHcal () const |
int | onLayer1 () const |
int | onLayer2 () const |
int | onVFcal () const |
const HepPDT::ParticleData * | particleInfo () const |
particle info... | |
bool | propagated () const |
The particle was tentatively propagated to calorimeters. | |
void | setClosestDaughterId (int id) |
Set the index of the closest charged daughter. | |
void | setEcal (const RawParticle &pp, int success) |
Set the ecal variables. | |
void | setEndVertex (int endv) |
Set the end vertex. | |
void | setHcal (const RawParticle &pp, int success) |
Set the hcal variables. | |
void | setLayer1 (const RawParticle &pp, int success) |
Set the preshower layer1 variables. | |
void | setLayer2 (const RawParticle &pp, int success) |
Set the preshower layer2 variables. | |
void | setMomentum (const math::XYZTLorentzVector &newMomentum) |
Reset the momentum (to be used with care) | |
void | setPropagate () |
The particle has been propgated through the tracker. | |
void | setVFcal (const RawParticle &pp, int success) |
Set the hcal variables. | |
const SimTrack & | simTrack () const |
Simply returns the SimTrack. | |
const FSimVertex & | vertex () const |
Origin vertex. | |
const RawParticle & | vfcalEntrance () const |
The particle at VFCAL entrance. | |
virtual | ~FSimTrack () |
Destructor. | |
Private Attributes | |
int | closestDaughterId_ |
std::vector< int > | daugh_ |
int | ecal |
RawParticle | ECAL_Entrance |
int | endv_ |
int | hcal |
RawParticle | HCAL_Entrance |
int | id_ |
const HepPDT::ParticleData * | info_ |
int | layer1 |
RawParticle | Layer1_Entrance |
int | layer2 |
RawParticle | Layer2_Entrance |
FBaseSimEvent * | mom_ |
XYZTLorentzVector | momentum_ |
bool | prop |
double | properDecayTime |
int | vfcal |
RawParticle | VFCAL_Entrance |
A class that mimics SimTrack, with enhanced features. Essentially an interface to SimTrack.
Definition at line 29 of file FSimTrack.h.
FSimTrack::FSimTrack | ( | ) |
Default constructor.
Definition at line 9 of file FSimTrack.cc.
FSimTrack::FSimTrack | ( | const RawParticle * | p, |
int | iv, | ||
int | ig, | ||
int | id, | ||
FBaseSimEvent * | mom, | ||
double | dt = -1. |
||
) |
Constructor from the EmmbSimTrack index in the FBaseSimEvent.
Definition at line 15 of file FSimTrack.cc.
References info_, mom_, RecoTau_DiTaus_pt_20-420_cfg::ParticleID, CoreSimTrack::setTrackId(), FBaseSimEvent::theTable(), and CoreSimTrack::type().
: // SimTrack(p->pid(),*p,iv,ig), // to uncomment once Mathcore is installed SimTrack(p->pid(),p->momentum(),iv,ig), mom_(mom), id_(id), endv_(-1), layer1(0), layer2(0), ecal(0), hcal(0), vfcal(0), prop(false), closestDaughterId_(-1), momentum_(p->momentum()), properDecayTime(dt) { setTrackId(id); info_ = mom_->theTable()->particle(HepPDT::ParticleID(type())); }
FSimTrack::~FSimTrack | ( | ) | [virtual] |
void FSimTrack::addDaughter | ( | int | i | ) | [inline] |
Add a RecHit for a track on a layer.
Add a RecHit for a track on a layer Update the vactors of daughter's id
Definition at line 159 of file FSimTrack.h.
References daugh_.
Referenced by FBaseSimEvent::addSimTrack().
float FSimTrack::charge | ( | void | ) | const [inline] |
charge
Reimplemented from CoreSimTrack.
Definition at line 47 of file FSimTrack.h.
References particleInfo().
Referenced by FBaseSimEvent::fill(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), and PFSimParticleProducer::produce().
{ return particleInfo()->charge(); }
int FSimTrack::closestDaughterId | ( | ) | const [inline] |
Get the index of the closest charged daughter.
Definition at line 165 of file FSimTrack.h.
References closestDaughterId_.
Referenced by FSimEvent::load(), and TrajectoryManager::makeSinglePSimHit().
{ return closestDaughterId_; }
const FSimTrack& FSimTrack::daughter | ( | int | i | ) | const [inline] |
Ith daughter.
Referenced by TrajectoryManager::moveAllDaughters(), and operator<<().
const std::vector<int>& FSimTrack::daughters | ( | ) | const [inline] |
Vector of daughter indices.
Referenced by PFSimParticleProducer::produce().
double FSimTrack::decayTime | ( | ) | const [inline] |
Return the pre-defined decay time.
Definition at line 177 of file FSimTrack.h.
References properDecayTime.
Referenced by ParticlePropagator::ParticlePropagator().
{ return properDecayTime; }
const RawParticle& FSimTrack::ecalEntrance | ( | ) | const [inline] |
The particle at ECAL entrance.
Definition at line 123 of file FSimTrack.h.
References ECAL_Entrance.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), HcalHitMaker::HcalHitMaker(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), operator<<(), PFSimParticleProducer::produce(), and CalorimetryManager::reconstructECAL().
{ return ECAL_Entrance; }
const FSimVertex& FSimTrack::endVertex | ( | ) | const [inline] |
end vertex
Referenced by notYetToEndVertex(), operator<<(), PFSimParticleProducer::produce(), and TrajectoryManager::updateWithDaughters().
const HepMC::GenParticle* FSimTrack::genParticle | ( | ) | const [inline] |
The original GenParticle.
const RawParticle& FSimTrack::hcalEntrance | ( | ) | const [inline] |
The particle at HCAL entrance.
Definition at line 126 of file FSimTrack.h.
References HCAL_Entrance.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), EcalHitMaker::hcalCellLine(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), PFSimParticleProducer::produce(), and CalorimetryManager::reconstructHCAL().
{ return HCAL_Entrance; }
int FSimTrack::id | ( | void | ) | const [inline] |
the index in FBaseSimEvent and other vectors
Definition at line 86 of file FSimTrack.h.
References id_.
Referenced by CalorimetryManager::EMShowerSimulation(), CalorimetryManager::HDShowerSimulation(), TrajectoryManager::makeSinglePSimHit(), TrajectoryManager::moveAllDaughters(), CalorimetryManager::MuonMipSimulation(), FSimTrackEqual::operator()(), operator<<(), PFSimParticleProducer::produce(), CalorimetryManager::reconstructECAL(), CalorimetryManager::reconstructHCAL(), and setClosestDaughterId().
{ return id_; }
const RawParticle& FSimTrack::layer1Entrance | ( | ) | const [inline] |
The particle at Preshower Layer 1.
Definition at line 117 of file FSimTrack.h.
References Layer1_Entrance.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), operator<<(), EcalHitMaker::preshowerCellLine(), and PFSimParticleProducer::produce().
{ return Layer1_Entrance; }
const RawParticle& FSimTrack::layer2Entrance | ( | ) | const [inline] |
The particle at Preshower Layer 2.
Definition at line 120 of file FSimTrack.h.
References Layer2_Entrance.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), EcalHitMaker::preshowerCellLine(), and PFSimParticleProducer::produce().
{ return Layer2_Entrance; }
const XYZTLorentzVector& FSimTrack::momentum | ( | ) | const [inline] |
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Reimplemented from CoreSimTrack.
Definition at line 168 of file FSimTrack.h.
References momentum_.
Referenced by FBaseSimEvent::fill(), CalorimetryManager::HDShowerSimulation(), TrajectoryManager::moveAllDaughters(), CalorimetryManager::MuonMipSimulation(), operator<<(), PFSimParticleProducer::produce(), CalorimetryManager::reconstructECAL(), and TrajectoryManager::updateWithDaughters().
{ return momentum_; }
const FSimTrack& FSimTrack::mother | ( | ) | const [inline] |
mother
Referenced by FSimEvent::load(), TrajectoryManager::makeSinglePSimHit(), operator<<(), and PFSimParticleProducer::produce().
int FSimTrack::nDaughters | ( | ) | const [inline] |
Number of daughters.
Referenced by TrajectoryManager::moveAllDaughters(), operator<<(), ParticlePropagator::ParticlePropagator(), TrajectoryManager::reconstruct(), and TrajectoryManager::updateWithDaughters().
bool FSimTrack::noDaughter | ( | ) | const [inline] |
no daughters
bool FSimTrack::noEndVertex | ( | ) | const [inline] |
no end vertex
Referenced by FSimEvent::load(), notYetToEndVertex(), operator<<(), PFSimParticleProducer::produce(), and CalorimetryManager::reconstruct().
bool FSimTrack::noMother | ( | ) | const [inline] |
no mother particle
Referenced by PFSimParticleProducer::produce().
bool FSimTrack::notYetToEndVertex | ( | const XYZTLorentzVector & | pos | ) | const |
Compare the end vertex position with another position.
Definition at line 33 of file FSimTrack.cc.
References endVertex(), noEndVertex(), position, vertex(), and Gflash::Z.
Referenced by FBaseSimEvent::fill(), TrajectoryManager::propagateToCalorimeters(), and TrajectoryManager::reconstruct().
{ // If there is no end vertex, nothing to compare to if ( noEndVertex() ) return true; // If the particle immediately decays, no need to propagate if ( (endVertex().position()-vertex().position()).Vect().Mag2() < 1e-4 ) return false; // If the end vertex has a larger radius, not yet there if ( endVertex().position().Perp2() > pos.Perp2()+1e-10 ) return true; // If the end vertex has a larger z, not yet there if ( fabs(endVertex().position().Z()) > fabs(pos.Z())+1e-5 ) return true; // Otherwise, the end vertex is overtaken already return false; }
int FSimTrack::onEcal | ( | ) | const [inline] |
The particle was propagated to the ECAL front face 1 : on the barrel; 2 : on the EndCaps; 3 : no propagation possible 0 : not yet propagated
Definition at line 101 of file FSimTrack.h.
References ecal.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), operator<<(), PFSimParticleProducer::produce(), CalorimetryManager::reconstruct(), and CalorimetryManager::reconstructECAL().
{ return ecal; }
int FSimTrack::onHcal | ( | ) | const [inline] |
The particle was propagated to the HCAL front face 1 : on the barrel; 2 : on the EndCaps; 3 : no propagation possible 0 : not yet propagated
Definition at line 106 of file FSimTrack.h.
References hcal.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), HcalHitMaker::getSubHcalDet(), EcalHitMaker::hcalCellLine(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), PFSimParticleProducer::produce(), CalorimetryManager::reconstruct(), and CalorimetryManager::reconstructHCAL().
{ return hcal; }
int FSimTrack::onLayer1 | ( | ) | const [inline] |
The particle was propagated to the Preshower Layer1 2 : on the EndCaps; (no Barrel Preshower); no propagation possible 0 : not yet propagated or no pe
Definition at line 91 of file FSimTrack.h.
References layer1.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), operator<<(), EcalHitMaker::preshowerCellLine(), and PFSimParticleProducer::produce().
{ return layer1; }
int FSimTrack::onLayer2 | ( | ) | const [inline] |
The particle was propagated to the Preshower Layer2 2 : on the EndCaps; (no Barrel Preshower); 3 : No propagation possible 0 : not yet propagated
Definition at line 96 of file FSimTrack.h.
References layer2.
Referenced by EcalHitMaker::cellLine(), CalorimetryManager::EMShowerSimulation(), EcalHitMaker::preshowerCellLine(), and PFSimParticleProducer::produce().
{ return layer2; }
int FSimTrack::onVFcal | ( | ) | const [inline] |
The particle was propagated to the VFCAL front face 2 : on the EndCaps (No VFCAL Barrel); 3 : no propagation possible 0 : not yet propagated
Definition at line 111 of file FSimTrack.h.
References vfcal.
Referenced by EcalHitMaker::cellLine(), HcalHitMaker::getSubHcalDet(), EcalHitMaker::hcalCellLine(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), and CalorimetryManager::reconstruct().
{ return vfcal; }
const HepPDT::ParticleData* FSimTrack::particleInfo | ( | ) | const [inline] |
particle info...
Definition at line 42 of file FSimTrack.h.
References info_.
Referenced by charge(), and operator<<().
{ return info_; }
bool FSimTrack::propagated | ( | ) | const [inline] |
The particle was tentatively propagated to calorimeters.
Definition at line 114 of file FSimTrack.h.
References prop.
{ return prop; }
void FSimTrack::setClosestDaughterId | ( | int | id | ) | [inline] |
Set the index of the closest charged daughter.
Definition at line 162 of file FSimTrack.h.
References closestDaughterId_, and id().
Referenced by MaterialEffects::interact(), and TrajectoryManager::updateWithDaughters().
{ closestDaughterId_ = id; }
void FSimTrack::setEcal | ( | const RawParticle & | pp, |
int | success | ||
) |
Set the ecal variables.
Definition at line 69 of file FSimTrack.cc.
References ecal, ECAL_Entrance, createTree::pp, and summarizeEdmComparisonLogfiles::success.
Referenced by FBaseSimEvent::fill(), and TrajectoryManager::propagateToCalorimeters().
{ ECAL_Entrance=pp; ecal=success; }
void FSimTrack::setEndVertex | ( | int | endv | ) | [inline] |
Set the end vertex.
Definition at line 132 of file FSimTrack.h.
References endv_.
Referenced by FBaseSimEvent::addSimVertex().
{ endv_ = endv; }
void FSimTrack::setHcal | ( | const RawParticle & | pp, |
int | success | ||
) |
Set the hcal variables.
Definition at line 76 of file FSimTrack.cc.
References hcal, HCAL_Entrance, createTree::pp, and summarizeEdmComparisonLogfiles::success.
Referenced by FBaseSimEvent::fill(), and TrajectoryManager::propagateToCalorimeters().
{ HCAL_Entrance=pp; hcal=success; }
void FSimTrack::setLayer1 | ( | const RawParticle & | pp, |
int | success | ||
) |
Set the preshower layer1 variables.
Definition at line 55 of file FSimTrack.cc.
References layer1, Layer1_Entrance, createTree::pp, and summarizeEdmComparisonLogfiles::success.
Referenced by FBaseSimEvent::fill(), and TrajectoryManager::propagateToCalorimeters().
{ Layer1_Entrance=pp; layer1=success; }
void FSimTrack::setLayer2 | ( | const RawParticle & | pp, |
int | success | ||
) |
Set the preshower layer2 variables.
Definition at line 62 of file FSimTrack.cc.
References layer2, Layer2_Entrance, createTree::pp, and summarizeEdmComparisonLogfiles::success.
Referenced by FBaseSimEvent::fill(), and TrajectoryManager::propagateToCalorimeters().
{ Layer2_Entrance=pp; layer2=success; }
void FSimTrack::setMomentum | ( | const math::XYZTLorentzVector & | newMomentum | ) | [inline] |
Reset the momentum (to be used with care)
Definition at line 171 of file FSimTrack.h.
References momentum_.
Referenced by TrajectoryManager::moveAllDaughters().
{momentum_ = newMomentum; }
void FSimTrack::setPropagate | ( | ) |
The particle has been propgated through the tracker.
Set the variable at the beginning of the propagation.
Definition at line 49 of file FSimTrack.cc.
References prop.
Referenced by TrajectoryManager::reconstruct().
{ prop=true; }
void FSimTrack::setVFcal | ( | const RawParticle & | pp, |
int | success | ||
) |
Set the hcal variables.
Definition at line 83 of file FSimTrack.cc.
References createTree::pp, summarizeEdmComparisonLogfiles::success, vfcal, and VFCAL_Entrance.
Referenced by FBaseSimEvent::fill(), and TrajectoryManager::propagateToCalorimeters().
{ VFCAL_Entrance=pp; vfcal=success; }
const SimTrack& FSimTrack::simTrack | ( | ) | const [inline] |
const FSimVertex& FSimTrack::vertex | ( | ) | const [inline] |
const RawParticle& FSimTrack::vfcalEntrance | ( | ) | const [inline] |
The particle at VFCAL entrance.
Definition at line 129 of file FSimTrack.h.
References VFCAL_Entrance.
Referenced by EcalHitMaker::cellLine(), EcalHitMaker::hcalCellLine(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), CalorimetryManager::reconstructECAL(), and CalorimetryManager::reconstructHCAL().
{ return VFCAL_Entrance; }
int FSimTrack::closestDaughterId_ [private] |
Definition at line 204 of file FSimTrack.h.
Referenced by closestDaughterId(), and setClosestDaughterId().
std::vector<int> FSimTrack::daugh_ [private] |
Definition at line 203 of file FSimTrack.h.
Referenced by addDaughter().
int FSimTrack::ecal [private] |
Definition at line 191 of file FSimTrack.h.
RawParticle FSimTrack::ECAL_Entrance [private] |
Definition at line 199 of file FSimTrack.h.
Referenced by ecalEntrance(), and setEcal().
int FSimTrack::endv_ [private] |
Definition at line 187 of file FSimTrack.h.
Referenced by setEndVertex().
int FSimTrack::hcal [private] |
Definition at line 192 of file FSimTrack.h.
RawParticle FSimTrack::HCAL_Entrance [private] |
Definition at line 200 of file FSimTrack.h.
Referenced by hcalEntrance(), and setHcal().
int FSimTrack::id_ [private] |
Definition at line 185 of file FSimTrack.h.
Referenced by id().
const HepPDT::ParticleData* FSimTrack::info_ [private] |
Definition at line 206 of file FSimTrack.h.
Referenced by FSimTrack(), and particleInfo().
int FSimTrack::layer1 [private] |
Definition at line 189 of file FSimTrack.h.
Referenced by onLayer1(), and setLayer1().
RawParticle FSimTrack::Layer1_Entrance [private] |
Definition at line 197 of file FSimTrack.h.
Referenced by layer1Entrance(), and setLayer1().
int FSimTrack::layer2 [private] |
Definition at line 190 of file FSimTrack.h.
Referenced by onLayer2(), and setLayer2().
RawParticle FSimTrack::Layer2_Entrance [private] |
Definition at line 198 of file FSimTrack.h.
Referenced by layer2Entrance(), and setLayer2().
FBaseSimEvent* FSimTrack::mom_ [private] |
Definition at line 183 of file FSimTrack.h.
Referenced by FSimTrack().
XYZTLorentzVector FSimTrack::momentum_ [private] |
Definition at line 208 of file FSimTrack.h.
Referenced by momentum(), and setMomentum().
bool FSimTrack::prop [private] |
Definition at line 195 of file FSimTrack.h.
Referenced by propagated(), and setPropagate().
double FSimTrack::properDecayTime [private] |
Definition at line 210 of file FSimTrack.h.
Referenced by decayTime().
int FSimTrack::vfcal [private] |
Definition at line 193 of file FSimTrack.h.
Referenced by onVFcal(), and setVFcal().
RawParticle FSimTrack::VFCAL_Entrance [private] |
Definition at line 201 of file FSimTrack.h.
Referenced by setVFcal(), and vfcalEntrance().