CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
FSimTrack Class Reference

#include <FSimTrack.h>

Inheritance diagram for FSimTrack:
SimTrack CoreSimTrack

Public Member Functions

void addDaughter (int i)
 Add a RecHit for a track on a layer. More...
 
float charge () const
 charge More...
 
int closestDaughterId () const
 Get the index of the closest charged daughter. More...
 
const FSimTrackdaughter (int i) const
 Ith daughter. More...
 
const std::vector< int > & daughters () const
 Vector of daughter indices. More...
 
double decayTime () const
 Return the pre-defined decay time. More...
 
const RawParticleecalEntrance () const
 The particle at ECAL entrance. More...
 
const FSimVertexendVertex () const
 end vertex More...
 
 FSimTrack ()
 Default constructor. More...
 
 FSimTrack (const RawParticle *p, int iv, int ig, int id, FBaseSimEvent *mom, double dt=-1.)
 Constructor from the EmmbSimTrack index in the FBaseSimEvent. More...
 
const HepMC::GenParticle * genParticle () const
 The original GenParticle. More...
 
const RawParticlehcalEntrance () const
 The particle at HCAL entrance. More...
 
int id () const
 the index in FBaseSimEvent and other vectors More...
 
const RawParticlelayer1Entrance () const
 The particle at Preshower Layer 1. More...
 
const RawParticlelayer2Entrance () const
 The particle at Preshower Layer 2. More...
 
const XYZTLorentzVectormomentum () const
 Temporary (until move of SimTrack to Mathcore) - No! Actually very useful. More...
 
const FSimTrackmother () const
 mother More...
 
int nDaughters () const
 Number of daughters. More...
 
bool noDaughter () const
 no daughters More...
 
bool noEndVertex () const
 no end vertex More...
 
bool noMother () const
 no mother particle More...
 
bool notYetToEndVertex (const XYZTLorentzVector &pos) const
 Compare the end vertex position with another position. More...
 
int onEcal () const
 
int onHcal () const
 
int onLayer1 () const
 
int onLayer2 () const
 
int onVFcal () const
 
const HepPDT::ParticleDataparticleInfo () const
 particle info... More...
 
bool propagated () const
 The particle was tentatively propagated to calorimeters. More...
 
void setClosestDaughterId (int id)
 Set the index of the closest charged daughter. More...
 
void setEcal (const RawParticle &pp, int success)
 Set the ecal variables. More...
 
void setEndVertex (int endv)
 Set the end vertex. More...
 
void setHcal (const RawParticle &pp, int success)
 Set the hcal variables. More...
 
void setLayer1 (const RawParticle &pp, int success)
 Set the preshower layer1 variables. More...
 
void setLayer2 (const RawParticle &pp, int success)
 Set the preshower layer2 variables. More...
 
void setMomentum (const math::XYZTLorentzVector &newMomentum)
 Reset the momentum (to be used with care) More...
 
void setPropagate ()
 The particle has been propgated through the tracker. More...
 
void setVFcal (const RawParticle &pp, int success)
 Set the hcal variables. More...
 
const SimTracksimTrack () const
 Simply returns the SimTrack. More...
 
const FSimVertexvertex () const
 Origin vertex. More...
 
const RawParticlevfcalEntrance () const
 The particle at VFCAL entrance. More...
 
virtual ~FSimTrack ()
 Destructor. More...
 
- Public Member Functions inherited from SimTrack
int genpartIndex () const
 index of the corresponding Generator particle in the Event container (-1 if no Genpart) More...
 
bool noGenpart () const
 
bool noVertex () const
 
void setTkMomentum (const math::XYZTLorentzVectorD &mom)
 
void setTkPosition (const math::XYZVectorD &pos)
 
void setVertexIndex (const int v)
 
 SimTrack ()
 constructor More...
 
 SimTrack (int ipart, const math::XYZTLorentzVectorD &p)
 
 SimTrack (int ipart, const math::XYZTLorentzVectorD &p, int iv, int ig)
 
 SimTrack (int ipart, const math::XYZTLorentzVectorD &p, int iv, int ig, const math::XYZVectorD &tkp, const math::XYZTLorentzVectorD &tkm)
 
 SimTrack (const CoreSimTrack &t, int iv, int ig)
 constructor from transient More...
 
const math::XYZTLorentzVectorDtrackerSurfaceMomentum () const
 
const math::XYZVectorDtrackerSurfacePosition () const
 
int vertIndex () const
 index of the vertex in the Event container (-1 if no vertex) More...
 
- Public Member Functions inherited from CoreSimTrack
float charge () const
 charge More...
 
 CoreSimTrack ()
 constructors More...
 
 CoreSimTrack (int ipart, const math::XYZTLorentzVectorD &p)
 
 CoreSimTrack (int ipart, math::XYZVectorD &ip, double ie)
 
EncodedEventId eventId () const
 
const math::XYZTLorentzVectorDmomentum () const
 particle info... More...
 
void setEventId (EncodedEventId e)
 
void setTrackId (unsigned int t)
 
unsigned int trackId () const
 
int type () const
 particle type (HEP PDT convension) More...
 

Private Attributes

int closestDaughterId_
 
std::vector< int > daugh_
 
int ecal
 
RawParticle ECAL_Entrance
 
int endv_
 
int hcal
 
RawParticle HCAL_Entrance
 
int id_
 
const HepPDT::ParticleDatainfo_
 
int layer1
 
RawParticle Layer1_Entrance
 
int layer2
 
RawParticle Layer2_Entrance
 
FBaseSimEventmom_
 
XYZTLorentzVector momentum_
 
bool prop
 
double properDecayTime
 
int vfcal
 
RawParticle VFCAL_Entrance
 

Additional Inherited Members

- Public Types inherited from SimTrack
typedef CoreSimTrack Core
 

Detailed Description

A class that mimics SimTrack, with enhanced features. Essentially an interface to SimTrack.

Author
Patrick Janot, CERN $Date: 9-Dec-2003

Definition at line 29 of file FSimTrack.h.

Constructor & Destructor Documentation

FSimTrack::FSimTrack ( )

Default constructor.

Definition at line 9 of file FSimTrack.cc.

9  :
10  SimTrack(), mom_(0), id_(-1), endv_(-1),
11  layer1(0), layer2(0), ecal(0), hcal(0), vfcal(0),
12  prop(false), closestDaughterId_(-1), info_(0),
13  properDecayTime(1E99) {;}
int endv_
Definition: FSimTrack.h:187
int layer2
Definition: FSimTrack.h:190
int ecal
Definition: FSimTrack.h:191
const HepPDT::ParticleData * info_
Definition: FSimTrack.h:206
SimTrack()
constructor
Definition: SimTrack.cc:3
int closestDaughterId_
Definition: FSimTrack.h:204
int vfcal
Definition: FSimTrack.h:193
int layer1
Definition: FSimTrack.h:189
FBaseSimEvent * mom_
Definition: FSimTrack.h:183
int hcal
Definition: FSimTrack.h:192
double properDecayTime
Definition: FSimTrack.h:210
bool prop
Definition: FSimTrack.h:195
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().

18  :
19  // SimTrack(p->pid(),*p,iv,ig), // to uncomment once Mathcore is installed
20  SimTrack(p->pid(),p->momentum(),iv,ig),
21  mom_(mom), id_(id), endv_(-1),
22  layer1(0), layer2(0), ecal(0), hcal(0), vfcal(0), prop(false),
25 {
26  setTrackId(id);
27  info_ = mom_->theTable()->particle(HepPDT::ParticleID(type()));
28 }
float dt
Definition: AMPTWrapper.h:126
int endv_
Definition: FSimTrack.h:187
int layer2
Definition: FSimTrack.h:190
int ecal
Definition: FSimTrack.h:191
const HepPDT::ParticleData * info_
Definition: FSimTrack.h:206
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:64
SimTrack()
constructor
Definition: SimTrack.cc:3
int pid() const
get the HEP particle ID number
Definition: RawParticle.h:264
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:285
int closestDaughterId_
Definition: FSimTrack.h:204
int vfcal
Definition: FSimTrack.h:193
int layer1
Definition: FSimTrack.h:189
FBaseSimEvent * mom_
Definition: FSimTrack.h:183
void setTrackId(unsigned int t)
Definition: CoreSimTrack.h:48
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:40
XYZTLorentzVector momentum_
Definition: FSimTrack.h:208
int hcal
Definition: FSimTrack.h:192
double properDecayTime
Definition: FSimTrack.h:210
bool prop
Definition: FSimTrack.h:195
FSimTrack::~FSimTrack ( )
virtual

Destructor.

Definition at line 30 of file FSimTrack.cc.

30 {;}

Member Function Documentation

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().

159 { daugh_.push_back(i); }
int i
Definition: DBlmapReader.cc:9
std::vector< int > daugh_
Definition: FSimTrack.h:203
float FSimTrack::charge ( void  ) const
inline

charge

Definition at line 47 of file FSimTrack.h.

References particleInfo().

Referenced by FBaseSimEvent::fill(), CalorimetryManager::HDShowerSimulation(), CalorimetryManager::MuonMipSimulation(), and PFSimParticleProducer::produce().

47  {
48  return particleInfo()->charge();
49  }
const HepPDT::ParticleData * particleInfo() const
particle info...
Definition: FSimTrack.h:42
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().

165 { return closestDaughterId_; }
int closestDaughterId_
Definition: FSimTrack.h:204
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().

177 { return properDecayTime; }
double properDecayTime
Definition: FSimTrack.h:210
const RawParticle& FSimTrack::ecalEntrance ( ) const
inline
const FSimVertex& FSimTrack::endVertex ( ) const
inline
const HepMC::GenParticle* FSimTrack::genParticle ( ) const
inline

The original GenParticle.

const RawParticle& FSimTrack::hcalEntrance ( ) const
inline
int FSimTrack::id ( void  ) const
inline
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().

117 { return Layer1_Entrance; }
RawParticle Layer1_Entrance
Definition: FSimTrack.h:197
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().

120 { return Layer2_Entrance; }
RawParticle Layer2_Entrance
Definition: FSimTrack.h:198
const XYZTLorentzVector& FSimTrack::momentum ( ) const
inline
const FSimTrack& FSimTrack::mother ( ) const
inline
int FSimTrack::nDaughters ( ) const
inline
bool FSimTrack::noDaughter ( ) const
inline

no daughters

bool FSimTrack::noEndVertex ( ) const
inline
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 ExpressReco_HICollisions_FallBack::e, endVertex(), noEndVertex(), position, vertex(), and Gflash::Z.

Referenced by FBaseSimEvent::fill(), TrajectoryManager::propagateToCalorimeters(), and TrajectoryManager::reconstruct().

33  {
34  // If there is no end vertex, nothing to compare to
35  if ( noEndVertex() ) return true;
36  // If the particle immediately decays, no need to propagate
37  if ( (endVertex().position()-vertex().position()).Vect().Mag2() < 1e-4 )
38  return false;
39  // If the end vertex has a larger radius, not yet there
40  if ( endVertex().position().Perp2() > pos.Perp2()+1e-10 ) return true;
41  // If the end vertex has a larger z, not yet there
42  if ( fabs(endVertex().position().Z()) > fabs(pos.Z())+1e-5 ) return true;
43  // Otherwise, the end vertex is overtaken already
44  return false;
45 }
const double Z[kNumberCalorimeter]
bool noEndVertex() const
no end vertex
const FSimVertex & endVertex() const
end vertex
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
const FSimVertex & vertex() const
Origin vertex.
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().

101 { return ecal; }
int ecal
Definition: FSimTrack.h:191
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().

106 { return hcal; }
int hcal
Definition: FSimTrack.h:192
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().

91 { return layer1; }
int layer1
Definition: FSimTrack.h:189
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().

96 { return layer2; }
int layer2
Definition: FSimTrack.h:190
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().

111 { return vfcal; }
int vfcal
Definition: FSimTrack.h:193
const HepPDT::ParticleData* FSimTrack::particleInfo ( ) const
inline

particle info...

Definition at line 42 of file FSimTrack.h.

References info_.

Referenced by charge(), and operator<<().

42  {
43  return info_;
44  }
const HepPDT::ParticleData * info_
Definition: FSimTrack.h:206
bool FSimTrack::propagated ( ) const
inline

The particle was tentatively propagated to calorimeters.

Definition at line 114 of file FSimTrack.h.

References prop.

114 { return prop; }
bool prop
Definition: FSimTrack.h:195
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().

162 { closestDaughterId_ = id; }
int closestDaughterId_
Definition: FSimTrack.h:204
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:86
void FSimTrack::setEcal ( const RawParticle pp,
int  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().

132 { endv_ = endv; }
int endv_
Definition: FSimTrack.h:187
void FSimTrack::setHcal ( const RawParticle pp,
int  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().

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().

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().

171 {momentum_ = newMomentum; }
XYZTLorentzVector momentum_
Definition: FSimTrack.h:208
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().

49  {
50  prop=true;
51 }
bool prop
Definition: FSimTrack.h:195
void FSimTrack::setVFcal ( const RawParticle pp,
int  success 
)
const SimTrack& FSimTrack::simTrack ( ) const
inline

Simply returns the SimTrack.

Definition at line 174 of file FSimTrack.h.

174 { return *this; }
const FSimVertex& FSimTrack::vertex ( ) const
inline
const RawParticle& FSimTrack::vfcalEntrance ( ) const
inline

Member Data Documentation

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.

Referenced by onEcal(), and setEcal().

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.

Referenced by onHcal(), and setHcal().

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().