Go to the documentation of this file.00001 #ifndef FastSimulation_Event_FSimTrack_H
00002 #define FastSimulation_Event_FSimTrack_H
00003
00004
00005 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00006
00007
00008 #include "SimDataFormats/Track/interface/SimTrack.h"
00009
00010
00011 #include "FastSimulation/Particle/interface/RawParticle.h"
00012
00013 #include <vector>
00014
00015 class FSimVertex;
00016 class FBaseSimEvent;
00017
00018 namespace HepMC {
00019 class GenParticle;
00020 class GenVertex;
00021 }
00022
00029 class FSimTrack : public SimTrack {
00030
00031 public:
00033 FSimTrack();
00034
00036 FSimTrack(const RawParticle* p, int iv, int ig, int id, FBaseSimEvent* mom, double dt=-1.);
00037
00039 virtual ~FSimTrack();
00040
00042 inline const HepPDT::ParticleData* particleInfo() const {
00043 return info_;
00044 }
00045
00047 inline float charge() const {
00048 return particleInfo()->charge();
00049 }
00050
00051
00053 inline const FSimVertex& vertex() const;
00054
00056 inline const FSimVertex& endVertex() const;
00057
00059 inline const FSimTrack& mother() const;
00060
00062 inline const FSimTrack& daughter(int i) const;
00063
00065 inline int nDaughters() const;
00066
00068 inline const std::vector<int>& daughters() const;
00069
00071 inline bool noEndVertex() const;
00072
00074 bool notYetToEndVertex(const XYZTLorentzVector& pos) const;
00075
00077 inline bool noMother() const;
00078
00080 inline bool noDaughter() const;
00081
00083 inline const HepMC::GenParticle* genParticle() const;
00084
00086 inline int id() const { return id_; }
00087
00091 inline int onLayer1() const { return layer1; }
00092
00096 inline int onLayer2() const { return layer2; }
00097
00101 inline int onEcal() const { return ecal; }
00102
00106 inline int onHcal() const { return hcal; }
00107
00111 inline int onVFcal() const { return vfcal; }
00112
00114 inline bool propagated() const { return prop; }
00115
00117 inline const RawParticle& layer1Entrance() const { return Layer1_Entrance; }
00118
00120 inline const RawParticle& layer2Entrance() const { return Layer2_Entrance; }
00121
00123 inline const RawParticle& ecalEntrance() const { return ECAL_Entrance; }
00124
00126 inline const RawParticle& hcalEntrance() const { return HCAL_Entrance; }
00127
00129 inline const RawParticle& vfcalEntrance() const { return VFCAL_Entrance; }
00130
00132 inline void setEndVertex(int endv) { endv_ = endv; }
00133
00135 void setPropagate();
00136
00138 void setLayer1(const RawParticle& pp, int success);
00139
00141 void setLayer2(const RawParticle& pp, int success);
00142
00144 void setEcal(const RawParticle& pp,int success);
00145
00147 void setHcal(const RawParticle& pp, int success);
00148
00150 void setVFcal(const RawParticle& pp, int success);
00151
00153
00154
00156
00157
00159 inline void addDaughter(int i) { daugh_.push_back(i); }
00160
00162 inline void setClosestDaughterId(int id) { closestDaughterId_ = id; }
00163
00165 inline int closestDaughterId() const { return closestDaughterId_; }
00166
00168 const XYZTLorentzVector& momentum() const { return momentum_; }
00169
00171 inline void setMomentum(const math::XYZTLorentzVector& newMomentum) {momentum_ = newMomentum; }
00172
00174 inline const SimTrack& simTrack() const { return *this; }
00175
00177 inline double decayTime() const { return properDecayTime; }
00178
00179 private:
00180
00181
00182
00183 FBaseSimEvent* mom_;
00184
00185 int id_;
00186
00187 int endv_;
00188
00189 int layer1;
00190 int layer2;
00191 int ecal;
00192 int hcal;
00193 int vfcal;
00194
00195 bool prop;
00196
00197 RawParticle Layer1_Entrance;
00198 RawParticle Layer2_Entrance;
00199 RawParticle ECAL_Entrance;
00200 RawParticle HCAL_Entrance;
00201 RawParticle VFCAL_Entrance;
00202
00203 std::vector<int> daugh_;
00204 int closestDaughterId_;
00205
00206 const HepPDT::ParticleData* info_;
00207
00208 XYZTLorentzVector momentum_;
00209
00210 double properDecayTime;
00211
00212 };
00213
00214 #include<iosfwd>
00215 std::ostream& operator <<(std::ostream& o , const FSimTrack& t);
00216
00217 #include "FastSimulation/Event/interface/FSimTrack.icc"
00218
00219
00220
00221 #endif // FSimTrack_H
00222
00223
00224
00225
00226