FairRoot/PandaRoot
CbmPlane.h
Go to the documentation of this file.
1 #ifndef CBMPlane_H
2 #define CBMPlane_H
3 
4 
5 #include "TClonesArray.h"
6 //#include "TVector3.h"
7 #include "TLorentzVector.h"
8 #include "FairDetector.h"
9 
10 
11 class TClonesArray;
12 //class CbmPlaneImPlanePoint;
13 class CbmPlanePoint;
14 class FairVolume;
15 
16 
17 
18 class CbmPlane : public FairDetector
19 {
20 
21  public:
22 
24  CbmPlane();
25 
26 
31  CbmPlane(const char* name, Bool_t active);
32 
33 
35  virtual ~CbmPlane();
36 
37 
41  virtual void Initialize();
42 
43 
51  virtual Bool_t ProcessHits(FairVolume* vol = 0);
52 
53 
59  virtual void EndOfEvent();
60 
61 
62  virtual void BeginEvent();
67  virtual void Register();
68 
69 
71  virtual TClonesArray* GetCollection(Int_t iColl) const;
72 
73 
78  virtual void Print() const;
79 
80 
85  virtual void Reset();
86 
87 
95  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2,
96  Int_t offset);
97 
98 
102  virtual void ConstructGeometry();
103 
104  /* CbmPlanePoint* AddHit(Int_t trackID, Int_t detID, TVector3 posIn, */
105 /* TVector3 pos_out, TVector3 momIn, */
106 /* TVector3 momOut, Double_t time, */
107 /* Double_t length, Double_t eLoss); */
108 
109  CbmPlanePoint* AddHit1(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam,Int_t evt);
110 
111 CbmPlanePoint* AddHit2(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam,Int_t evt);
112 
113 CbmPlanePoint* AddHit3(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam,Int_t evt);
114 
115 
116 
117 
118  void plane();
119 
120 
121 
122  private:
123 
124  Int_t fTrackID;
125  Int_t fVolumeID;
126  TLorentzVector fPosIn, fPosOut;
127  TLorentzVector fMomIn, fMomOut;
128  Double32_t fTime;
129  Double32_t fLength;
130  Double32_t fELoss;
131  Int_t fPosIndex;
132  Int_t volDetector;
136 
139 
140  TClonesArray* fPlane1Collection;
141  TClonesArray* fPlane2Collection;
142  TClonesArray* fPlane3Collection;
143 
144  Int_t fevent;
145  // reset all parameters
146  void ResetParameters();
147 
148  ClassDef(CbmPlane,1)
149 
150 };
151 
153  fTrackID = -999;
154  fVolumeID = -999;
155  fPosIn.SetXYZT(-999., -999., -999., -999.);
156  fPosOut.SetXYZT(-999., -999., -999., -999.) ;
157  fMomIn.SetXYZT(-999., -999., -999., -999.) ;
158  fMomOut.SetXYZT(-999., -999., -999., -999.);
159  fTime = -999;
160  fLength = -999;
161  fELoss = 0;
162  fmass = -999;
163  fpreflag = -999;
164  fpostflag = -999;
165 }
166 
167 
168 
169 #endif
Double32_t fTime
momentum
Definition: CbmPlane.h:128
TLorentzVector fMomIn
position
Definition: CbmPlane.h:127
Bool_t fpostflag
Definition: CbmPlane.h:135
CbmPlanePoint * AddHit2(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt)
Definition: CbmPlane.cxx:375
TClonesArray * fPlane2Collection
Hit collection.
Definition: CbmPlane.h:141
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: CbmPlane.cxx:315
virtual void EndOfEvent()
Definition: CbmPlane.cxx:209
Double_t fcharge
MC volume ID of Plane.
Definition: CbmPlane.h:133
TString fcurrnam
Definition: CbmPlane.h:137
void ResetParameters()
Definition: CbmPlane.h:152
int evt
Definition: checkhelixhit.C:36
void plane()
Definition: CbmPlane.cxx:217
TVector3 offset(2, 0, 0)
Bool_t fpreflag
Definition: CbmPlane.h:135
virtual void ConstructGeometry()
Definition: CbmPlane.cxx:324
CbmPlanePoint * AddHit1(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt)
Definition: CbmPlane.cxx:363
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: CbmPlane.cxx:105
Double32_t fELoss
length
Definition: CbmPlane.h:130
TClonesArray * fPlane3Collection
Hit collection.
Definition: CbmPlane.h:142
TLorentzVector fPosIn
volume id
Definition: CbmPlane.h:126
virtual void Initialize()
Definition: CbmPlane.cxx:82
Int_t volDetector
Definition: CbmPlane.h:132
TClonesArray * fPlane1Collection
Definition: CbmPlane.h:140
TString fcurrnam2
Definition: CbmPlane.h:138
Double_t
CbmPlane()
Definition: CbmPlane.cxx:34
Int_t fevent
Hit collection.
Definition: CbmPlane.h:144
virtual ~CbmPlane()
Definition: CbmPlane.cxx:70
Int_t fVolumeID
track index
Definition: CbmPlane.h:125
TString name
Int_t fTrackID
Definition: CbmPlane.h:124
Int_t fPosIndex
energy loss
Definition: CbmPlane.h:131
Double32_t fLength
time
Definition: CbmPlane.h:129
virtual void Register()
Definition: CbmPlane.cxx:274
virtual void Print() const
Definition: CbmPlane.cxx:295
Double_t fmass
Definition: CbmPlane.h:134
virtual void BeginEvent()
Definition: CbmPlane.cxx:98
virtual void Reset()
Definition: CbmPlane.cxx:303
CbmPlanePoint * AddHit3(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt)
Definition: CbmPlane.cxx:385
TString nam
Definition: sim_hypGe.C:48
TLorentzVector fPosOut
Definition: CbmPlane.h:126
TLorentzVector fMomOut
Definition: CbmPlane.h:127
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: CbmPlane.cxx:284