KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVFAZIANFS.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Fri Feb 26 17:11:15 2016
2 //Author: bonnet,,,
3 
4 #include "KVFAZIANFS.h"
5 #include "KVUnits.h"
6 #include "KVMaterial.h"
7 #include "TMath.h"
8 #include "TGeoManager.h"
9 #include "TGeoMedium.h"
10 #include "TGeoVolume.h"
11 #include "TGeoMatrix.h"
12 
14 
15 // BEGIN_HTML <!--
17 /* -->
18 <h2>KVFAZIANFS</h2>
19 <h4>configuration of FAZIA telescopes for NFS experiments</h4>
20 <!-- */
21 // --> END_HTML
23 
24 
25 
28 void KVFAZIANFS::GetGeometryParameters()
29 {
30  //Defined number of blocks, the distance from the target and the minimum polar angle
31  fNblocks = 0;
32  fFDist = 25.0;
33  fFThetaMin = 15.0;
34  fBuildTarget = kTRUE;
35 }
36 
37 
38 
41 
43  : KVFAZIA()
44 {
45  // Default constructor
47 }
48 
49 
50 
53 
55 {
56  // Destructor
57 }
58 
59 
60 
66 
68 {
69  // Telescope for elastic scattering monitoring
70  // Two 5mm diameter silicon detectors of 525um thickness
71  // placed 2m20 from the target at theta=1.84deg phi=-90deg.
72  // distance between centres of detectors = 1mm
73  KVMaterial mat_csi("CsI");
74  TGeoMedium* CesiumIodide = mat_csi.GetGeoMedium();
75 
76  KVMaterial silicon("Si");
77  Double_t distance_si2_si1 = 0.220;
78  Double_t distance_csi_si2 = 0.434;
79 
80  Double_t side_si = 2;
81  Double_t side_csi_front = 2.050;
82  Double_t side_csi_back = 2.272;
83 
84  Double_t thick_si1 = 300 * KVUnits::um;
85  Double_t thick_si2 = 500 * KVUnits::um;
86  Double_t thick_csi = 10;
87  const double centre_dist = 1 * KVUnits::mm;
88  double total_thickness = thick_si1 + centre_dist;
89 
91  TGeoTranslation* tr = 0;
92  TGeoVolume* si = 0;
93  TGeoVolume* csi = 0;
94  si = gGeoManager->MakeBox(Form("DET_SI"), silicon.GetGeoMedium(), side_si / 2, side_si / 2, thick_si1 / 2.);
95  tr = new TGeoTranslation(0, 0, thick_si1 / 2.);
96  tel->AddNode(si, 1, tr);
97 
98  si = gGeoManager->MakeBox(Form("DET_SI"), silicon.GetGeoMedium(), side_si / 2, side_si / 2, thick_si2 / 2.);
99  tr = new TGeoTranslation(0, 0, thick_si2 / 2. + distance_si2_si1);
100  tel->AddNode(si, 2, tr);
101 
102  csi = gGeoManager->MakeTrd2(Form("DET_CSI"), CesiumIodide, side_csi_front / 2, side_csi_back / 2, side_csi_front / 2, side_csi_back / 2, thick_csi / 2.);
103  tr = new TGeoTranslation(0, 0, thick_csi / 2. + distance_csi_si2);
104  tel->AddNode(csi, 3, tr);
105 
106  // front entrance of first detector at 2 metres from target
107  const double distance = 0.25 * KVUnits::m + 0.5 * total_thickness;
108  Double_t tmin = 25;
109  Double_t tmax = 65;
110  Double_t dt = 20;
111 
112  Double_t pmin = -90;
113 
114  TGeoRotation rot1, rot2;
115  TGeoTranslation trans(0, 0, distance);
116  TGeoHMatrix h;
117 
118  //Six premiers telescopes
119  //25 45 65°
120  Int_t nt = 1;
121  Double_t ph = pmin;
122  Double_t th = 0;
123  for (th = tmin; th <= tmax; th += dt) {
124  rot1.SetAngles(ph, 0., 0.);
125  rot2.SetAngles(ph + 90, th, 0);
126  h = rot2 * trans * rot1;
127  gGeoManager->GetTopVolume()->AddNode(tel, nt++, new TGeoHMatrix(h));
128 
129  Double_t phi_comp = ph * -1;
130  Double_t th_comp = 90 - th;
131  rot1.SetAngles(phi_comp, 0., 0.);
132  rot2.SetAngles(phi_comp + 90, th_comp, 0);
133 
134  printf("nt=%d th=%lf th_comp=%lf\n", nt, th, th_comp);
135 
136  h = rot2 * trans * rot1;
137  gGeoManager->GetTopVolume()->AddNode(tel, nt++, new TGeoHMatrix(h));
138  }
139 
140  //Si 8 telescopes
141  //on le met a 30-60
142  /*
143  th = 30;
144  rot1.SetAngles(ph, 0., 0.);
145  rot2.SetAngles(ph + 90, th, 0);
146  h = rot2 * trans * rot1;
147  gGeoManager->GetTopVolume()->AddNode(tel, nt++, new TGeoHMatrix(h));
148 
149  Double_t phi_comp = ph * -1;
150  Double_t th_comp = 90 - th;
151  rot1.SetAngles(phi_comp, 0., 0.);
152  rot2.SetAngles(phi_comp + 90, th_comp, 0);
153 
154  printf("nt=%d th=%lf th_comp=%lf\n", nt, th, th_comp);
155 
156  h = rot2 * trans * rot1;
157  gGeoManager->GetTopVolume()->AddNode(tel, nt++, new TGeoHMatrix(h));
158  */
159 
160  SetGeometryImportParameters(dt / 2, TMath::Abs(2 * pmin), tmin, pmin, tmax + dt, -1 * pmin);
161 
162 }
163 
164 
165 
166 
168 
170 {
171 
172  KVMaterial target_holder_mat("NE102");
173 
174  TGeoVolume* target = gGeoManager->MakeEltu("TARGET", target_holder_mat.GetGeoMedium(), 4., 4., 30 * KVUnits::um / 2.);
175  TGeoTranslation* tr = new TGeoTranslation(0, 0, -0.1); //recule la cible pour qu elle ne soit pas vu qd on filtre
176  gGeoManager->GetTopVolume()->AddNode(target, 1, tr);
177 
178 }
179 
180 
181 
183 
185 {
186 
187  for (Int_t tt = 1; tt <= 8; tt += 1) {
188  env.SetValue(Form("TEL_%d_SI_1", tt), Form("SI1-T%d", tt));
189  env.SetValue(Form("TEL_%d_SI_2", tt), Form("SI2-T%d", tt));
190  env.SetValue(Form("TEL_%d_CSI_3", tt), Form("CSI-T%d", tt));
191  }
192 
193 }
194 
195 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
double Double_t
const Bool_t kTRUE
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
Extension of TEnv to allow the writing of comments in the file.
Definition: KVEnv.h:16
configuration of FAZIA telescopes for NFS experiments
Definition: KVFAZIANFS.h:15
KVFAZIANFS()
Default constructor.
Definition: KVFAZIANFS.cpp:42
void BuildTarget()
Definition: KVFAZIANFS.cpp:169
virtual ~KVFAZIANFS()
Destructor.
Definition: KVFAZIANFS.cpp:54
virtual void BuildFAZIA()
Definition: KVFAZIANFS.cpp:67
void SetNameOfDetectors(KVEnv &env)
Definition: KVFAZIANFS.cpp:184
Description of a FAZIA detector geometry.
Definition: KVFAZIA.h:32
void SetGeometryImportParameters(Double_t dt=0.25, Double_t dp=1.0, Double_t tmin=2., Double_t pmin=0, Double_t tmax=20., Double_t pmax=360., Double_t xorg=0, Double_t yorg=0, Double_t zorg=0)
Definition: KVFAZIA.h:233
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:93
virtual TGeoMedium * GetGeoMedium(const Char_t *="")
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
TGeoVolume * MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
TGeoVolume * GetTopVolume() const
TGeoVolume * MakeEltu(const char *name, TGeoMedium *medium, Double_t a, Double_t b, Double_t dz)
void SetAngles(Double_t phi, Double_t theta, Double_t psi)
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
virtual void SetTitle(const char *title="")
virtual const char * ClassName() const
TH1 * h
const long double mm
Definition: KVUnits.h:69
const long double um
Definition: KVUnits.h:68
const long double m
Definition: KVUnits.h:70
Double_t Abs(Double_t d)
auto * tt