SND@LHC Software
Loading...
Searching...
No Matches
veto.h
Go to the documentation of this file.
1#ifndef VETO_H
2#define VETO_H
3
4#include "FairDetector.h"
5#include "TVector3.h"
6#include "TLorentzVector.h"
7#include "TGeoVolume.h"
8
9#include <map>
10
11class vetoPoint;
12class FairVolume;
13class TClonesArray;
14
15class veto: public FairDetector
16{
17
18 public:
19
24 veto(const char* Name, Bool_t Active);
25
27 veto();
28
30 virtual ~veto();
31
33 virtual void Initialize();
34
38 virtual Bool_t ProcessHits( FairVolume* v=0);
39
41 virtual void Register();
42
44 virtual TClonesArray* GetCollection(Int_t iColl) const ;
45
47 virtual void Reset();
48
49 void SetFastMuon() {fFastMuon=true;} // kill all tracks except of muons
50 void SetFollowMuon() {fFollowMuon=true;} // make muon shield active to follow muons
51
53 void ConstructGeometry();
54
55 void SetZpositions(Float_t z0, Float_t z1, Float_t z2, Float_t z3, Float_t z4, Int_t c);
56 void SetTubZpositions(Float_t z1, Float_t z2, Float_t z3, Float_t z4, Float_t z5, Float_t z6);
57 void SetTublengths(Float_t l1, Float_t l2, Float_t l3, Float_t l6);
58 void SetB(Float_t b) {fBtube=b;}
59 void SetFloorHeight(Float_t a,Float_t b) {floorHeightA=a;floorHeightB=b;}
60 void SetXYstart(Float_t b, Float_t fx, Float_t c, Float_t fy) {fXstart=b; zFocusX=fx; fYstart=c; zFocusY=fy;}
61 void SetVesselStructure(Float_t a,Float_t b,Float_t c,TString d,Float_t l,TString e,TString f,TString v,Float_t r) {f_InnerSupportThickness=a;
64
68 vetoPoint* AddHit(Int_t trackID, Int_t detID,
69 TVector3 pos, TVector3 mom,
70 Double_t time, Double_t length,
71 Double_t eLoss,Int_t pdgcode,TVector3 Lpos, TVector3 Lmom);
72
77 virtual void CopyClones( TClonesArray* cl1, TClonesArray* cl2 ,
78 Int_t offset) {;}
79 virtual void SetSpecialPhysicsCuts() {;}
80 virtual void EndOfEvent();
81 virtual void FinishPrimary() {;}
82 virtual void FinishRun() {;}
83 virtual void BeginPrimary() {;}
84 virtual void PostTrack() {;}
85 virtual void PreTrack();
86 virtual void BeginEvent() {;}
87
88 inline void SetUseSupport(Int_t use=1) {fUseSupport=use;}
89 inline Int_t GetUseSupport() const {return fUseSupport;}
90
91 inline void SetPlasticVeto(Int_t plastic=1) {fPlasticVeto=plastic;}
92 inline Int_t GetPlasticVeto() const {return fPlasticVeto;}
93
94 inline void SetLiquidVeto(Int_t liquid=1) {fLiquidVeto=liquid;}
95 inline Int_t GetLiquidVeto() const {return fLiquidVeto;}
96
97 private:
98
102 Int_t fTrackID;
103 Int_t fVolumeID;
104 TLorentzVector fPos;
105 TLorentzVector fMom;
106 Float_t fTime;
107 Float_t fLength;
108 Float_t fELoss;
109 Float_t fT0z;
110 Float_t fT1z;
111 Float_t fT2z;
112 Float_t fT3z;
113 Float_t fT4z;
114 Int_t fDesign;
115 // 2: conical with basic tracking chambers, but no trscking chamber at entrance
116 // 3: cylindrical, no tracking chambers defined but sensitive walls, strawchambers separated
117 // 4: design used for TP, smaller upstream part in x
118 // 5: optimized design, changed to trapezoidal shape
120 Float_t fTub1z;
121 Float_t fTub2z;
122 Float_t fTub3z;
123 Float_t fTub4z;
124 Float_t fTub5z;
125 Float_t fTub6z;
126 Float_t fTub1length;
127 Float_t fTub2length;
128 Float_t fTub3length;
129 Float_t fTub6length;
136 Float_t fBtube;
137 Float_t ws;
138 TString vetoMed_name;
142 TGeoMedium *vetoMed;
143 TGeoMedium *supportMedIn;
144 TGeoMedium *supportMedOut;
145 TGeoMedium *decayVolumeMed;
146
147 Float_t fXstart,fYstart; // horizontal/vertical width at start of tank
148 Float_t zFocusX,zFocusY; // focus points for conical design
149 Float_t floorHeightA,floorHeightB; // height of floor
150
155 TClonesArray* fvetoPointCollection;
156
157 veto(const veto&);
159 Int_t InitMedium(const char* name);
160 TGeoVolume* GeoTrapezoid(TString xname,Double_t wz,Double_t wX_start,Double_t wX_end,Double_t wY_start,Double_t wY_end,
161 Int_t color,TGeoMedium *material,Bool_t sens);
162 TGeoVolume* GeoTrapezoidNew(TString xname,Double_t thick,Double_t wz,Double_t wX_start,Double_t wX_end,Double_t wY_start,Double_t wY_end,Int_t color,TGeoMedium *material,Bool_t sens);
163 void AddBlock(TGeoVolumeAssembly *tInnerWall,TGeoVolumeAssembly *tDecayVacuum, TGeoVolumeAssembly *tOuterWall,TGeoVolumeAssembly *tLongitRib,TGeoVolumeAssembly *tVerticalRib,TGeoVolumeAssembly *ttLiSc, int& liScCounter,
164 int blockNr , int nx, int ny,
165 double z1, double z2 , double Zshift, double dist, double distC,
166 double wallThick, double liscThick1, double liscThick2,double ribThick);
167
168 TGeoVolumeAssembly* GeoCornerRib(TString xname, double ribThick, double lt1,double lt2 , double dz, double slopeX, double slopeY,Int_t color, TGeoMedium *material, Bool_t sens);
169 int makeId(double z,double x, double y);
170 int liscId(TString ShapeTypeName,int blockNr,int Zlayer,int number, int position);
171
172
173 TGeoVolume* GeoSideObj(TString xname, double dz,
174 double a1, double b1,double a2, double b2,double dA, double dB,
175 Int_t color, TGeoMedium *material, Bool_t sens);
176 TGeoVolume* GeoCornerLiSc1(TString xname, double dz,bool isClockwise,
177 double a, double b1,double b2, double dA, double dB,
178 Int_t color, TGeoMedium *material, Bool_t sens);
179 TGeoVolume* GeoCornerLiSc2(TString xname, double dz,bool isClockwise,
180 double a, double b1,double b2, double dA, double dB,
181 Int_t color, TGeoMedium *material, Bool_t sens);
182
183
184 TGeoVolume* MakeSegments(Double_t dz,Double_t dx_start,Double_t dy,Double_t slopex,Double_t slopey,Double_t floorHeight);
185 TGeoVolume* MakeMagnetSegment(Int_t seg);
186 TGeoVolume* MakeLidSegments(Int_t seg,Double_t dx,Double_t dy);
187
188
189 Int_t fDeltaCpy; //Delta in copy number for solid plastic veto
190 std::map<Int_t, TVector3> fCenters;
191
192 // Return copy number for solid plastic scitillator veto
193 inline Int_t GetCopyNumber(Int_t iz, Int_t iplank, Int_t region)
194 { return (iz*1000+iplank)*10+region+fDeltaCpy; }
195
196 // Add center of volume and its dx, dy and dz (currently dummy) to a map for futher export
197 void InnerAddToMap(Int_t ncpy, Double_t x, Double_t y, Double_t z, Double_t dx=-1111, Double_t dy=-1111, Double_t dz=-1111);
198
199
200 ClassDef(veto, 9)
201};
202
203#endif //VETO_H
Definition veto.h:16
TGeoVolume * GeoCornerLiSc2(TString xname, double dz, bool isClockwise, double a, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:320
void SetFloorHeight(Float_t a, Float_t b)
Definition veto.h:59
Float_t floorHeightA
Definition veto.h:149
TClonesArray * fvetoPointCollection
Definition veto.h:155
TString supportMedIn_name
medium of veto counter, liquid or plastic scintillator
Definition veto.h:139
Float_t fT4z
z-position of tracking station 3
Definition veto.h:113
virtual void PostTrack()
Definition veto.h:84
void SetXYstart(Float_t b, Float_t fx, Float_t c, Float_t fy)
Definition veto.h:60
Float_t ws
Definition veto.h:137
void SetFollowMuon()
Definition veto.h:50
int liscId(TString ShapeTypeName, int blockNr, int Zlayer, int number, int position)
Definition veto.cxx:417
virtual Bool_t ProcessHits(FairVolume *v=0)
Definition veto.cxx:1062
TString decayVolumeMed_name
medium of support structure, aluminium, balloon
Definition veto.h:141
TGeoVolume * GeoTrapezoidNew(TString xname, Double_t thick, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:139
Int_t fUseSupport
Definition veto.h:151
virtual ~veto()
Definition veto.cxx:99
void SetUseSupport(Int_t use=1)
Definition veto.h:88
int makeId(double z, double x, double y)
Definition veto.cxx:406
virtual void Reset()
Definition veto.cxx:1145
Float_t fYstart
Definition veto.h:147
Bool_t fFollowMuon
Definition veto.h:119
void SetTubZpositions(Float_t z1, Float_t z2, Float_t z3, Float_t z4, Float_t z5, Float_t z6)
Definition veto.cxx:1042
void SetPlasticVeto(Int_t plastic=1)
Definition veto.h:91
TGeoVolume * GeoCornerLiSc1(TString xname, double dz, bool isClockwise, double a, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:283
Float_t fTub6z
Definition veto.h:125
Float_t zFocusX
Definition veto.h:148
void SetVesselStructure(Float_t a, Float_t b, Float_t c, TString d, Float_t l, TString e, TString f, TString v, Float_t r)
Definition veto.h:61
Float_t fTub3z
Definition veto.h:122
TGeoVolume * MakeMagnetSegment(Int_t seg)
Definition veto.cxx:623
TGeoMedium * vetoMed
medium of decay volume, vacuum/air/helium
Definition veto.h:142
Int_t fVolumeID
track index
Definition veto.h:103
TGeoMedium * supportMedOut
Definition veto.h:144
Float_t fT0z
energy loss
Definition veto.h:109
Int_t GetPlasticVeto() const
Definition veto.h:92
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition veto.h:77
Float_t fTime
momentum at entrance
Definition veto.h:106
TGeoMedium * decayVolumeMed
Definition veto.h:145
TLorentzVector fMom
position at entrance
Definition veto.h:105
virtual void SetSpecialPhysicsCuts()
Definition veto.h:79
Float_t f_LidThickness
Definition veto.h:133
Float_t fTub2z
Definition veto.h:121
std::map< Int_t, TVector3 > fCenters
Definition veto.h:190
void SetB(Float_t b)
Definition veto.h:58
TGeoVolume * GeoSideObj(TString xname, double dz, double a1, double b1, double a2, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:253
TGeoVolumeAssembly * GeoCornerRib(TString xname, double ribThick, double lt1, double lt2, double dz, double slopeX, double slopeY, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:358
Float_t floorHeightB
Definition veto.h:149
Int_t GetLiquidVeto() const
Definition veto.h:95
virtual void FinishRun()
Definition veto.h:82
Float_t f_OuterSupportThickness
Definition veto.h:132
Float_t fT3z
z-position of tracking station 2
Definition veto.h:112
Float_t f_VetoThickness
Definition veto.h:134
TGeoVolume * MakeLidSegments(Int_t seg, Double_t dx, Double_t dy)
Definition veto.cxx:972
void SetLiquidVeto(Int_t liquid=1)
Definition veto.h:94
Float_t zFocusY
Definition veto.h:148
Int_t fTrackID
Definition veto.h:102
Float_t fBtube
Definition veto.h:136
void SetFastMuon()
Definition veto.h:49
Int_t fDesign
z-position of tracking station 4
Definition veto.h:114
Float_t fELoss
length
Definition veto.h:108
void InnerAddToMap(Int_t ncpy, Double_t x, Double_t y, Double_t z, Double_t dx=-1111, Double_t dy=-1111, Double_t dz=-1111)
Definition veto.cxx:1278
virtual void BeginPrimary()
Definition veto.h:83
Float_t fTub2length
Definition veto.h:127
virtual void FinishPrimary()
Definition veto.h:81
virtual void PreTrack()
Definition veto.cxx:1118
TGeoMedium * supportMedIn
Definition veto.h:143
TString supportMedOut_name
medium of support structure, iron, balloon
Definition veto.h:140
Float_t fXstart
Definition veto.h:147
Bool_t fFastMuon
1: cylindrical with basic tracking chambers,
Definition veto.h:119
Float_t fTub3length
Definition veto.h:128
void SetZpositions(Float_t z0, Float_t z1, Float_t z2, Float_t z3, Float_t z4, Int_t c)
Definition veto.cxx:1149
void ConstructGeometry()
Definition veto.cxx:1159
void SetTublengths(Float_t l1, Float_t l2, Float_t l3, Float_t l6)
Definition veto.cxx:1052
veto & operator=(const veto &)
TGeoVolume * MakeSegments(Double_t dz, Double_t dx_start, Double_t dy, Double_t slopex, Double_t slopey, Double_t floorHeight)
Definition veto.cxx:833
Float_t fTub5z
Definition veto.h:124
void AddBlock(TGeoVolumeAssembly *tInnerWall, TGeoVolumeAssembly *tDecayVacuum, TGeoVolumeAssembly *tOuterWall, TGeoVolumeAssembly *tLongitRib, TGeoVolumeAssembly *tVerticalRib, TGeoVolumeAssembly *ttLiSc, int &liScCounter, int blockNr, int nx, int ny, double z1, double z2, double Zshift, double dist, double distC, double wallThick, double liscThick1, double liscThick2, double ribThick)
Definition veto.cxx:435
Float_t f_InnerSupportThickness
Definition veto.h:130
Int_t fDeltaCpy
Definition veto.h:189
TGeoVolume * GeoTrapezoid(TString xname, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:114
TString vetoMed_name
Definition veto.h:138
TLorentzVector fPos
volume id
Definition veto.h:104
Float_t f_RibThickness
Definition veto.h:135
veto()
Definition veto.cxx:45
Float_t fLength
time
Definition veto.h:107
Float_t fT2z
z-position of tracking station 1
Definition veto.h:111
Int_t InitMedium(const char *name)
Definition veto.cxx:1021
Int_t fPlasticVeto
Definition veto.h:152
virtual void EndOfEvent()
Definition veto.cxx:1111
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition veto.cxx:1139
Float_t fT1z
z-position of veto station
Definition veto.h:110
Float_t fTub1length
Definition veto.h:126
Float_t fTub4z
Definition veto.h:123
veto(const veto &)
Float_t fTub6length
Definition veto.h:129
virtual void Register()
Definition veto.cxx:1124
virtual void BeginEvent()
Definition veto.h:86
vetoPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
Definition veto.cxx:1266
Float_t f_PhiRibsThickness
Definition veto.h:131
Int_t fLiquidVeto
Definition veto.h:153
virtual void Initialize()
Definition veto.cxx:107
Int_t GetUseSupport() const
Definition veto.h:89
Int_t GetCopyNumber(Int_t iz, Int_t iplank, Int_t region)
Map of copy number to center of tiles.
Definition veto.h:193
Float_t fTub1z
Definition veto.h:120