CbmRoot
Loading...
Searching...
No Matches
CbmMuch.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2020 St. Petersburg Polytechnic University, St. Petersburg
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Mikhail Ryzhinskiy [committer] */
4
15#ifndef CBMMUCH_H
16#define CBMMUCH_H
17
18
19#include "FairDetector.h"
20
21#include "TLorentzVector.h"
22#include "TVector3.h"
23
24#include <string>
25
26class TClonesArray;
27class CbmMuchPoint;
28class FairVolume;
29class CbmGeoMuchPar;
30class TGeoMedium;
31class TGeoCombiTrans;
32
33class CbmMuch : public FairDetector {
34
35public:
38
39
44 CbmMuch(const char* name, Bool_t active);
45
47 virtual ~CbmMuch();
48
49
57 virtual Bool_t ProcessHits(FairVolume* vol = 0);
58
59
66 virtual void BeginEvent();
67
74 virtual void EndOfEvent();
75
76
81 virtual void Register();
82
83
85 virtual TClonesArray* GetCollection(Int_t iColl) const;
86
87
92 virtual void Print(Option_t*) const;
93
94
99 virtual void Reset();
100
101
109 virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
110
111
112 virtual void ConstructGeometry();
113 virtual void ConstructRootGeometry(TGeoMatrix* shift = NULL);
114 Bool_t CheckIfSensitive(std::string name);
115 virtual Bool_t IsSensitive(const std::string& name);
116
117private:
120 Int_t fTrackID;
121 Int_t fVolumeID;
122 Int_t fFlagID; // ! Flag to distinguish geometries
123 TLorentzVector fPosIn, fPosOut;
124 TLorentzVector fMomIn, fMomOut;
125 Double32_t fTime;
126 Double32_t fLength;
127 Double32_t fELoss;
128
129 Int_t fPosIndex;
130 TClonesArray* fMuchCollection;
131 Bool_t kGeoSaved;
132 TList* flGeoPar;
134 TString fVolumeName;
135 TGeoCombiTrans* fCombiTrans;
136
137 CbmMuchPoint* AddHit(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 posOut, TVector3 momIn, TVector3 momOut,
138 Double_t time, Double_t length, 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
153
155};
156
157
159{
160 fTrackID = fVolumeID = 0;
161 fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
162 fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
163 fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
164 fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
165 fTime = fLength = fELoss = 0;
166 fPosIndex = 0;
167};
168
169
170#endif
virtual void Register()
Definition CbmMuch.cxx:228
TString fVolumeName
parameter container
Definition CbmMuch.h:134
Bool_t kGeoSaved
The hit collection.
Definition CbmMuch.h:131
Int_t fVolumeID
track index
Definition CbmMuch.h:121
virtual void ConstructRootGeometry(TGeoMatrix *shift=NULL)
Definition CbmMuch.cxx:308
TList * flGeoPar
Definition CbmMuch.h:132
virtual void Reset()
Definition CbmMuch.cxx:248
virtual ~CbmMuch()
Definition CbmMuch.cxx:120
virtual Bool_t IsSensitive(const std::string &name)
Definition CbmMuch.cxx:390
Int_t fPosIndex
energy loss
Definition CbmMuch.h:129
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:274
virtual void BeginEvent()
Definition CbmMuch.cxx:216
Int_t GetDetId(FairVolume *vol)
Definition CbmMuch.cxx:195
Int_t fFlagID
volume id
Definition CbmMuch.h:122
TLorentzVector fMomIn
position
Definition CbmMuch.h:124
Double32_t fELoss
length
Definition CbmMuch.h:127
TClonesArray * fMuchCollection
Definition CbmMuch.h:130
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition CbmMuch.cxx:231
virtual void Print(Option_t *) const
Definition CbmMuch.cxx:241
CbmMuch(const CbmMuch &)
virtual void EndOfEvent()
Definition CbmMuch.cxx:220
void ResetParameters()
Definition CbmMuch.h:158
ClassDef(CbmMuch, 1)
TLorentzVector fPosIn
Definition CbmMuch.h:123
Int_t fTrackID
Definition CbmMuch.h:120
Bool_t CheckIfSensitive(std::string name)
Definition CbmMuch.cxx:402
TLorentzVector fPosOut
Definition CbmMuch.h:123
Double32_t fLength
time
Definition CbmMuch.h:126
CbmMuch & operator=(const CbmMuch &)
virtual void ConstructGeometry()
Definition CbmMuch.cxx:288
CbmGeoMuchPar * fPar
Definition CbmMuch.h:133
Int_t Intersect(Float_t x, Float_t y, Float_t lx, Float_t ly, Float_t r)
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition CbmMuch.cxx:134
TLorentzVector fMomOut
Definition CbmMuch.h:124
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition CbmMuch.cxx:255
TGeoCombiTrans * fCombiTrans
Definition CbmMuch.h:135
Double32_t fTime
momentum
Definition CbmMuch.h:125