FairShip
Loading...
Searching...
No Matches
veto.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#ifndef VETO_VETO_H_
6#define VETO_VETO_H_
7
8#include <map>
9#include <utility>
10#include <vector>
11
12#include "Detector.h"
13#include "TGeoVolume.h"
14#include "TLorentzVector.h"
15#include "TVector3.h"
16
17class vetoPoint;
18class FairVolume;
19class TClonesArray;
20
29
30class veto : public SHiP::Detector<vetoPoint> {
31 public:
36
37 veto();
38
42 Bool_t ProcessHits(FairVolume* v = nullptr) override;
43
44 void SetFastMuon() { fFastMuon = true; } // kill all tracks except of muons
46 fFollowMuon = true;
47 } // make muon shield active to follow muons
48 void SetVesselDimensions(Float_t x1, Float_t x2, Float_t y1, Float_t y2,
49 Float_t vesselstart) {
50 VetoStartInnerX = x1;
51 VetoEndInnerX = x2;
52 VetoStartInnerY = y1;
53 VetoEndInnerY = y2;
54 zStartDecayVol = vesselstart;
55 }
56
58 void ConstructGeometry() override;
59
60 void SetVesselStructure(Float_t a, Float_t b, Float_t c, TString d, Float_t l,
61 TString e, TString f, TString v, Float_t r,
62 Float_t he_balloon_thickness,
63 TString he_balloon_med) {
67 supportMedIn_name = std::move(d);
69 vetoMed_name = std::move(e);
70 supportMedOut_name = std::move(f);
71 decayVolumeMed_name = std::move(v);
73 f_he_balloon_thickness = he_balloon_thickness;
74 f_he_balloon_med_name = std::move(he_balloon_med);
75 }
76
80
81 void PreTrack() override;
82
83 inline void SetUseSupport(Int_t use = 1) { fUseSupport = use; }
84 inline Int_t GetUseSupport() const { return fUseSupport; }
85
86 inline void SetLiquidVeto(Int_t liquid = 1) { fLiquidVeto = liquid; }
87 inline Int_t GetLiquidVeto() const { return fLiquidVeto; }
88
89 private:
93
95
98
106
117
118 TGeoMedium* vetoMed;
119 TGeoMedium* supportMedIn;
120 TGeoMedium* supportMedOut;
121 TGeoMedium* decayVolumeMed;
122 TGeoMedium* f_he_balloon_med;
123
132
135
139
140 veto(const veto&) = delete;
141 veto& operator=(const veto&) = delete;
146 TGeoVolume* make_geo_trapezoid(const TString& xname, Double_t wz,
147 Double_t wX_start, Double_t wX_end,
148 Double_t wY_start, Double_t wY_end,
149 Int_t color, TGeoMedium* material,
150 Bool_t sens);
151
157
158 TGeoVolume* GeoTrapezoidHollow(TString xname, Double_t thick, Double_t wz,
159 Double_t wX_start, Double_t wX_end,
160 Double_t wY_start, Double_t wY_end,
161 Int_t color, TGeoMedium* material,
162 Bool_t sens);
163
167 void add_block(TGeoVolumeAssembly* outer_wall,
168 TGeoVolumeAssembly* longitudinal_rib,
169 TGeoVolumeAssembly* vertical_rib, TGeoVolumeAssembly* lisc,
170 int block_number, int nx, int ny, double z1, double z2,
171 double z_shift, double cell_thickness_z, double wall_thickness,
172 double lisc_thickness_start, double lisc_thickness_end,
173 double rib_thickness);
176 TGeoVolumeAssembly* GeoCornerRib(const TString& xname, double rib_thickness,
177 double lt1, double lt2, double dz,
178 double slopeX, double slopeY, Int_t color,
179 TGeoMedium* material, Bool_t sens);
180
183 int makeId(double z, double x, double y);
186 int liscId(const TString& ShapeTypeName, int block_number, int Zlayer,
187 int number, int position);
189 double wx(double z);
191 double wy(double z);
194 TGeoVolume* GeoSideObj(const TString& xname, double dz, double a1, double b1,
195 double a2, double b2, double dA, double dB,
196 Int_t color, TGeoMedium* material, Bool_t sens);
199 TGeoVolume* GeoCornerLiSc1(const TString& xname, double dz, bool isClockwise,
200 double a1, double a2, double b1, double b2,
201 double dA, double dB, Int_t color,
202 TGeoMedium* material, Bool_t sens);
205 TGeoVolume* GeoCornerLiSc2(const TString& xname, double dz, bool isClockwise,
206 double a1, double a2, double b1, double b2,
207 double dA, double dB, Int_t color,
208 TGeoMedium* material, Bool_t sens);
209
210 TGeoVolume* make_segments();
211};
212
213#endif // VETO_VETO_H_
TGeoVolume * GeoTrapezoidHollow(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:99
TString supportMedIn_name
medium of internal support structure(Default = Aluminium).
Definition veto.h:110
TGeoVolumeAssembly * GeoCornerRib(const TString &xname, double rib_thickness, double lt1, double lt2, double dz, double slopeX, double slopeY, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:276
void SetFollowMuon()
Definition veto.h:45
TString decayVolumeMed_name
medium of decay volume(Default= helium).
Definition veto.h:114
Int_t fUseSupport
Definition veto.h:136
void SetUseSupport(Int_t use=1)
Definition veto.h:83
int makeId(double z, double x, double y)
Definition veto.cxx:326
void SetVesselDimensions(Float_t x1, Float_t x2, Float_t y1, Float_t y2, Float_t vesselstart)
Definition veto.h:48
Bool_t fFollowMuon
Definition veto.h:94
TGeoMedium * vetoMed
Definition veto.h:118
TGeoMedium * supportMedOut
Definition veto.h:120
TGeoMedium * decayVolumeMed
Definition veto.h:121
TGeoMedium * f_he_balloon_med
Definition veto.h:122
TGeoVolume * GeoCornerLiSc1(const TString &xname, double dz, bool isClockwise, double a1, double a2, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:200
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, Float_t he_balloon_thickness, TString he_balloon_med)
Definition veto.h:60
Float_t VetoStartInnerX
Width of the Vessel along X at the start.
Definition veto.h:125
double wy(double z)
slope along the length (y)
Definition veto.cxx:161
Float_t f_LidThickness
Thickness of the entrance/exit lid of the Decay Volume.
Definition veto.h:100
Float_t VetoEndInnerX
Width of the Vessel along X at the end.
Definition veto.h:129
TGeoVolume * make_geo_trapezoid(const 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:72
void PreTrack() override
Definition veto.cxx:844
veto & operator=(const veto &)=delete
Int_t GetLiquidVeto() const
Definition veto.h:87
TGeoVolume * GeoCornerLiSc2(const TString &xname, double dz, bool isClockwise, double a1, double a2, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:238
Float_t f_OuterSupportThickness
Definition veto.h:97
Float_t f_VetoThickness
Thickness of the liquid scintillator along z(Default = 20cm).
Definition veto.h:102
TGeoVolume * make_segments()
Definition veto.cxx:675
void SetLiquidVeto(Int_t liquid=1)
Definition veto.h:86
Bool_t ProcessHits(FairVolume *v=nullptr) override
Processes a hit in the veto detector.
Definition veto.cxx:798
void SetFastMuon()
Definition veto.h:44
Float_t f_he_balloon_thickness
Thickness of the He Balloon.
Definition veto.h:105
Float_t VetoEndInnerY
Length of the Vessel along Y at the end.
Definition veto.h:131
Float_t zStartDecayVol
z Position of the Decay Volume start in the global coordinate system
Definition veto.h:134
TGeoMedium * supportMedIn
Definition veto.h:119
TString supportMedOut_name
medium of external support structure(Default = Aluminium).
Definition veto.h:112
Bool_t fFastMuon
Definition veto.h:94
veto(const veto &)=delete
Float_t f_InnerSupportThickness
Definition veto.h:96
void ConstructGeometry() override
Constructs the detector geometry.
Definition veto.cxx:861
TString vetoMed_name
medium of veto counter, liquid or plastic scintillator
Definition veto.h:108
int liscId(const TString &ShapeTypeName, int block_number, int Zlayer, int number, int position)
Definition veto.cxx:340
TGeoVolume * GeoSideObj(const 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:171
TString f_he_balloon_med_name
medium of He Balloon(Default= PVC).
Definition veto.h:116
double wx(double z)
slope along the width (x)
Definition veto.cxx:151
Float_t f_RibThickness
Definition veto.h:103
veto()
Constructor for the Veto class.
Definition veto.cxx:64
Float_t VetoStartInnerY
Length of the Vessel along Y at the start.
Definition veto.h:127
Int_t fLiquidVeto
Flag option for Liquid Scintillator (Default=True).
Definition veto.h:138
Int_t GetUseSupport() const
Definition veto.h:84
void add_block(TGeoVolumeAssembly *outer_wall, TGeoVolumeAssembly *longitudinal_rib, TGeoVolumeAssembly *vertical_rib, TGeoVolumeAssembly *lisc, int block_number, int nx, int ny, double z1, double z2, double z_shift, double cell_thickness_z, double wall_thickness, double lisc_thickness_start, double lisc_thickness_end, double rib_thickness)
Definition veto.cxx:367