00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MYPARTICLE_H
00019 #define MYPARTICLE_H
00020
00021 #include "TGListTree.h"
00022 #include "TVector3.h"
00023 #include "TClonesArray.h"
00024 #include "TRefArray.h"
00025 #include "TRef.h"
00026 #include "TPolyLine3D.h"
00027 #include "TParticle.h"
00028 #include "TParticlePDG.h"
00029
00030 class MyParticle : public TParticle {
00031
00032 private:
00033 Int_t fId;
00034 Int_t fStatus;
00035 Int_t fDecayType;
00036 Int_t fNChildren;
00037 TVector3 *fLocation;
00038 Double_t fPassed;
00039 Double_t fEloss;
00040 Double_t fDecayLength;
00041 Double_t fTimeOfDecay;
00042 Int_t fChild[6];
00043
00044 Int_t fNtrack;
00045 TObjArray *fTracks;
00046
00047 public :
00048 MyParticle();
00049 ~MyParticle();
00050 MyParticle(Int_t, Int_t, Int_t, Int_t, const TVector3 &, const TVector3 &, Double_t, Double_t, Double_t);
00051 MyParticle(Int_t, Int_t, Int_t, Int_t, const TVector3 &, const TVector3 &);
00052 TPolyLine3D *AddTrack(const TVector3 &, Int_t);
00053 TPolyLine3D *AddTrack(Double_t, Double_t, Double_t, Int_t);
00054 Int_t GetId() { return fId; }
00055 Int_t GetStatus() { return fStatus; }
00056 Int_t GetDecayType() { return fDecayType; }
00057 TVector3 *GetpLocation() { return fLocation; }
00058 TVector3 GetvLocation() { return *fLocation; }
00059 TVector3 GetvMoment() { return TVector3(Px(),Py(),Pz()); }
00060 Double_t GetPassed() { return fPassed; }
00061 Double_t GetELoss() { return fEloss; }
00062 Double_t GetDecayLength() { return fDecayLength; }
00063 Int_t GetChildId(Int_t id) { return fChild[id]; }
00064 Double_t GetTimeOfDecay() { return fTimeOfDecay; }
00065 Int_t GetNChildren() { return fNChildren; }
00066 Int_t GetNTracks() { return fNtrack+1; }
00067 Char_t *GetObjectInfo(Int_t px, Int_t py) const;
00068 TPolyLine3D *GetTrack(Int_t at) const {return (TPolyLine3D*)fTracks->At(at);}
00069 const Char_t *GetName() const;
00070
00071 void SetId(Int_t id) { fId = id; }
00072 void SetNChildren(Int_t nb) { fNChildren = nb; }
00073 void SetStatus(Int_t stat) { fStatus = stat; }
00074 void SetDecayType(Int_t decay) { fDecayType = decay; }
00075 void SetTimeOfDecay(Double_t time) { fTimeOfDecay = time; }
00076 void SetLocation(const TVector3 &loc) { fLocation->SetX(loc.x());
00077 fLocation->SetY(loc.y()); fLocation->SetZ(loc.z()); }
00078 void SetLocation(Double_t lx, Double_t ly, Double_t lz) {
00079 fLocation->SetX(lx); fLocation->SetY(ly); fLocation->SetZ(lz); }
00080 void SetMoment(const TVector3 &mom);
00081 void SetMoment(const TVector3 &mom, Double_t energy) {
00082 SetMomentum(mom.x(), mom.y(), mom.z(), energy); }
00083 void SetNextPoint(Int_t color);
00084 void SetPassed(Double_t pass) { fPassed = pass; }
00085 void AddELoss(Double_t eloss) { fEloss += eloss; }
00086 void SetDecayLength(Double_t len) { fDecayLength = len; }
00087 void SetChild(Int_t id, Int_t child_id) { fChild[id] = child_id; }
00088 void GenerateTimeOfDecay();
00089
00090 void HighLight();
00091
00092 virtual void Delete(Option_t *) { }
00093 virtual void SetLineAttributes() { }
00094 virtual void SetDrawOption(Option_t *) { }
00095
00096 ClassDef(MyParticle,1)
00097 };
00098
00099 #endif // MYPARTICLE_H