PandaRoot
CbmPlane.h
Go to the documentation of this file.
1 #ifndef CBMPlane_H
2 #define CBMPlane_H
3 
4 #include "TClonesArray.h"
5 //#include "TVector3.h"
6 #include "TLorentzVector.h"
7 #include "FairDetector.h"
8 
9 class TClonesArray;
10 // class CbmPlaneImPlanePoint;
11 class CbmPlanePoint;
12 class FairVolume;
13 
14 class CbmPlane : public FairDetector {
15 
16  public:
18  CbmPlane();
19 
24  CbmPlane(const char *name, Bool_t active);
25 
27  virtual ~CbmPlane();
28 
32  virtual void Initialize();
33 
41  virtual Bool_t ProcessHits(FairVolume *vol = 0);
42 
48  virtual void EndOfEvent();
49 
50  virtual void BeginEvent();
55  virtual void Register();
56 
58  virtual TClonesArray *GetCollection(Int_t iColl) const;
59 
64  virtual void Print() const;
65 
70  virtual void Reset();
71 
79  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
80 
84  virtual void ConstructGeometry();
85 
86  /* CbmPlanePoint* AddHit(Int_t trackID, Int_t detID, TVector3 posIn, */
87  /* TVector3 pos_out, TVector3 momIn, */
88  /* TVector3 momOut, Double_t time, */
89  /* Double_t length, Double_t eLoss); */
90 
91  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,
92  Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt);
93 
94  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,
95  Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt);
96 
97  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,
98  Double_t charge, Double_t mass, Bool_t preflag, Bool_t postflag, TString nam, Int_t evt);
99 
100  void plane();
101 
102  private:
103  Int_t fTrackID;
104  Int_t fVolumeID;
105  TLorentzVector fPosIn, fPosOut;
106  TLorentzVector fMomIn, fMomOut;
107  Double32_t fTime;
108  Double32_t fLength;
109  Double32_t fELoss;
110  Int_t fPosIndex;
111  Int_t volDetector;
112  Double_t fcharge;
113  Double_t fmass;
114  Bool_t fpreflag, fpostflag;
115 
116  TString fcurrnam;
117  TString fcurrnam2;
118 
119  TClonesArray *fPlane1Collection;
120  TClonesArray *fPlane2Collection;
121  TClonesArray *fPlane3Collection;
122 
123  Int_t fevent;
124  // reset all parameters
125  void ResetParameters();
126 
127  ClassDef(CbmPlane, 1)
128 };
129 
130 inline void CbmPlane::ResetParameters()
131 {
132  fTrackID = -999;
133  fVolumeID = -999;
134  fPosIn.SetXYZT(-999., -999., -999., -999.);
135  fPosOut.SetXYZT(-999., -999., -999., -999.);
136  fMomIn.SetXYZT(-999., -999., -999., -999.);
137  fMomOut.SetXYZT(-999., -999., -999., -999.);
138  fTime = -999;
139  fLength = -999;
140  fELoss = 0;
141  fmass = -999;
142  fpreflag = -999;
143  fpostflag = -999;
144 }
145 
146 #endif
virtual void EndOfEvent()
virtual void ConstructGeometry()
void plane()
virtual void Initialize()
virtual void Reset()
virtual Bool_t ProcessHits(FairVolume *vol=0)
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)
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Print() const
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)
virtual void Register()
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)
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual ~CbmPlane()
virtual void BeginEvent()