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
00116 inline int outHcal() const { return hcalexit; }
00117
00118
00121 inline int onHO() const { return hoentr; }
00122
00124 inline bool propagated() const { return prop; }
00125
00127 inline const RawParticle& layer1Entrance() const { return Layer1_Entrance; }
00128
00130 inline const RawParticle& layer2Entrance() const { return Layer2_Entrance; }
00131
00133 inline const RawParticle& ecalEntrance() const { return ECAL_Entrance; }
00134
00136 inline const RawParticle& hcalEntrance() const { return HCAL_Entrance; }
00137
00139 inline const RawParticle& vfcalEntrance() const { return VFCAL_Entrance; }
00140
00142 inline const RawParticle& hcalExit() const { return HCAL_Exit; }
00143
00145 inline const RawParticle& hoEntrance() const { return HO_Entrance; }
00146
00148 inline void setEndVertex(int endv) { endv_ = endv; }
00149
00151 void setPropagate();
00152
00154 void setLayer1(const RawParticle& pp, int success);
00155
00157 void setLayer2(const RawParticle& pp, int success);
00158
00160 void setEcal(const RawParticle& pp,int success);
00161
00163 void setHcal(const RawParticle& pp, int success);
00164
00166 void setVFcal(const RawParticle& pp, int success);
00167
00169 void setHcalExit(const RawParticle& pp, int success);
00170
00172 void setHO(const RawParticle& pp, int success);
00173
00175
00176
00178
00179
00181 inline void addDaughter(int i) { daugh_.push_back(i); }
00182
00184 inline void setClosestDaughterId(int id) { closestDaughterId_ = id; }
00185
00187 inline int closestDaughterId() const { return closestDaughterId_; }
00188
00190 const XYZTLorentzVector& momentum() const { return momentum_; }
00191
00193 inline void setMomentum(const math::XYZTLorentzVector& newMomentum) {momentum_ = newMomentum; }
00194
00196 inline const SimTrack& simTrack() const { return *this; }
00197
00199 inline double decayTime() const { return properDecayTime; }
00200
00201 private:
00202
00203
00204
00205 FBaseSimEvent* mom_;
00206
00207 int id_;
00208
00209 int endv_;
00210
00211 int layer1;
00212 int layer2;
00213 int ecal;
00214 int hcal;
00215 int vfcal;
00216 int hcalexit;
00217 int hoentr;
00218
00219
00220 bool prop;
00221
00222 RawParticle Layer1_Entrance;
00223 RawParticle Layer2_Entrance;
00224 RawParticle ECAL_Entrance;
00225 RawParticle HCAL_Entrance;
00226 RawParticle VFCAL_Entrance;
00227 RawParticle HCAL_Exit;
00228 RawParticle HO_Entrance;
00229
00230
00231 std::vector<int> daugh_;
00232 int closestDaughterId_;
00233
00234 const HepPDT::ParticleData* info_;
00235
00236 XYZTLorentzVector momentum_;
00237
00238 double properDecayTime;
00239
00240 };
00241
00242 #include<iosfwd>
00243 std::ostream& operator <<(std::ostream& o , const FSimTrack& t);
00244
00245 #include "FastSimulation/Event/interface/FSimTrack.icc"
00246
00247
00248
00249 #endif // FSimTrack_H
00250
00251
00252
00253
00254