CbmRoot
CbmMuch.h
Go to the documentation of this file.
1 
11 #ifndef CBMMUCH_H
12 #define CBMMUCH_H
13 
14 
15 #include "FairDetector.h"
16 #include "TLorentzVector.h"
17 #include "TVector3.h"
18 #include <string>
19 
20 class TClonesArray;
21 class CbmMuchPoint;
22 class FairVolume;
23 class CbmGeoMuchPar;
24 class TGeoMedium;
25 class TGeoCombiTrans;
26 
27 class CbmMuch : public FairDetector {
28 
29 public:
32 
33 
38  CbmMuch(const char* name, Bool_t active);
39 
41  virtual ~CbmMuch();
42 
43 
51  virtual Bool_t ProcessHits(FairVolume* vol = 0);
52 
53 
60  virtual void BeginEvent();
61 
68  virtual void EndOfEvent();
69 
70 
75  virtual void Register();
76 
77 
79  virtual TClonesArray* GetCollection(Int_t iColl) const;
80 
81 
86  virtual void Print(Option_t*) const;
87 
88 
93  virtual void Reset();
94 
95 
103  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
104 
105 
106  virtual void ConstructGeometry();
107  virtual void ConstructRootGeometry(TGeoMatrix* shift = NULL);
108  Bool_t CheckIfSensitive(std::string name);
109 
110 private:
113  Int_t fTrackID;
114  Int_t fVolumeID;
115  Int_t fFlagID; // ! Flag to distinguish geometries
116  TLorentzVector fPosIn, fPosOut;
117  TLorentzVector fMomIn, fMomOut;
118  Double32_t fTime;
119  Double32_t fLength;
120  Double32_t fELoss;
121 
122  Int_t fPosIndex;
123  TClonesArray* fMuchCollection;
124  Bool_t kGeoSaved;
125  TList* flGeoPar;
127  TString fVolumeName;
128  TGeoCombiTrans* fCombiTrans;
129 
130  CbmMuchPoint* AddHit(Int_t trackID,
131  Int_t detID,
132  TVector3 posIn,
133  TVector3 posOut,
134  TVector3 momIn,
135  TVector3 momOut,
136  Double_t time,
137  Double_t length,
138  Double_t eLoss);
139 
140 
145  void ResetParameters();
146 
147  Int_t GetDetId(FairVolume* vol);
148 
149  Int_t Intersect(Float_t x, Float_t y, Float_t lx, Float_t ly, Float_t r);
150 
151  CbmMuch(const CbmMuch&);
153 
155 };
156 
157 
159  fTrackID = fVolumeID = 0;
160  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
161  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
162  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
163  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
164  fTime = fLength = fELoss = 0;
165  fPosIndex = 0;
166 };
167 
168 
169 #endif
CbmMuch::CopyClones
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: CbmMuch.cxx:259
CbmMuchPoint
Definition: CbmMuchPoint.h:21
CbmMuch::fMomIn
TLorentzVector fMomIn
position
Definition: CbmMuch.h:117
CbmMuch::fVolumeID
Int_t fVolumeID
track index
Definition: CbmMuch.h:114
CbmMuch::fVolumeName
TString fVolumeName
parameter container
Definition: CbmMuch.h:127
CbmMuch::CbmMuch
CbmMuch()
CbmMuch::fPosOut
TLorentzVector fPosOut
Definition: CbmMuch.h:116
CbmMuch::Reset
virtual void Reset()
Definition: CbmMuch.cxx:253
CbmMuch::fTrackID
Int_t fTrackID
Definition: CbmMuch.h:113
CbmMuch::fMomOut
TLorentzVector fMomOut
Definition: CbmMuch.h:117
CbmGeoMuchPar
Definition: CbmGeoMuchPar.h:25
CbmMuch::ClassDef
ClassDef(CbmMuch, 1)
CbmMuch::flGeoPar
TList * flGeoPar
Definition: CbmMuch.h:125
CbmMuch::operator=
CbmMuch & operator=(const CbmMuch &)
CbmMuch::~CbmMuch
virtual ~CbmMuch()
Definition: CbmMuch.cxx:118
CbmMuch::Print
virtual void Print(Option_t *) const
Definition: CbmMuch.cxx:247
CbmMuch::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: CbmMuch.cxx:237
CbmMuch::ConstructGeometry
virtual void ConstructGeometry()
Definition: CbmMuch.cxx:300
CbmMuch
Definition: CbmMuch.h:27
CbmMuch::BeginEvent
virtual void BeginEvent()
Definition: CbmMuch.cxx:220
CbmMuch::fLength
Double32_t fLength
time
Definition: CbmMuch.h:119
CbmMuch::fPosIndex
Int_t fPosIndex
energy loss
Definition: CbmMuch.h:122
CbmMuch::fFlagID
Int_t fFlagID
volume id
Definition: CbmMuch.h:115
CbmMuch::Intersect
Int_t Intersect(Float_t x, Float_t y, Float_t lx, Float_t ly, Float_t r)
CbmMuch::ConstructRootGeometry
virtual void ConstructRootGeometry(TGeoMatrix *shift=NULL)
Definition: CbmMuch.cxx:320
CbmMuch::GetDetId
Int_t GetDetId(FairVolume *vol)
Definition: CbmMuch.cxx:199
CbmMuch::CbmMuch
CbmMuch(const CbmMuch &)
CbmMuch::AddHit
CbmMuchPoint * AddHit(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss)
Definition: CbmMuch.cxx:277
CbmMuch::Register
virtual void Register()
Definition: CbmMuch.cxx:231
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMuch::fPar
CbmGeoMuchPar * fPar
Definition: CbmMuch.h:126
CbmMuch::ProcessHits
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: CbmMuch.cxx:131
CbmMuch::fCombiTrans
TGeoCombiTrans * fCombiTrans
Definition: CbmMuch.h:128
CbmMuch::ResetParameters
void ResetParameters()
Definition: CbmMuch.h:158
CbmMuch::fMuchCollection
TClonesArray * fMuchCollection
Definition: CbmMuch.h:123
CbmMuch::fPosIn
TLorentzVector fPosIn
Definition: CbmMuch.h:116
CbmMuch::CheckIfSensitive
Bool_t CheckIfSensitive(std::string name)
Definition: CbmMuch.cxx:402
CbmMuch::kGeoSaved
Bool_t kGeoSaved
The hit collection.
Definition: CbmMuch.h:124
CbmMuch::EndOfEvent
virtual void EndOfEvent()
Definition: CbmMuch.cxx:224
CbmMuch::fELoss
Double32_t fELoss
length
Definition: CbmMuch.h:120
CbmMuch::fTime
Double32_t fTime
momentum
Definition: CbmMuch.h:118