KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVFAZIALNS2016.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Tue Jan 27 11:38:09 2015
2 //Author: ,,,
3 
4 #include "KVFAZIALNS2016.h"
5 #include "KVUnits.h"
6 #include "KVFAZIABlock.h"
7 #include "TSystem.h"
8 #include "KVEnv.h"
9 
10 #include <TGeoMatrix.h>
11 
13 
14 // BEGIN_HTML <!--
16 /* -->
17 <h2>KVFAZIALNS2016</h2>
18 <h4>Description of the FAZIA set up</h4>
19 <!-- */
20 // --> END_HTML
22 
23 
24 
28  : KVFAZIA()
29 {
30  // Default constructor
31  SetTitle(ClassName());
32 }
33 
34 
35 
38 
40 {
41  // Destructor
42 }
43 
44 
45 
48 
50 {
51  //Defined number of blocks, the distance from the target and the minimum polar angle
52  fNblocks = 5;
53  fFDist = 80.0;
54  fFThetaMin = 2.1;
55 }
56 
57 
58 
64 
66 {
67  // Telescope for elastic scattering monitoring
68  // Two 5mm diameter silicon detectors of 525um thickness
69  // placed 2m20 from the target at theta=1.84deg phi=-90deg.
70  // distance between centres of detectors = 1mm
71 
72  KVMaterial silicon("Si");
73 
74  const double radius = 5 * KVUnits::mm / 2.;
75 
76  const double thick = 525 * KVUnits::um;
77  const double centre_dist = 1 * KVUnits::mm;
78  double total_thickness = thick + centre_dist;
79 
80  TGeoVolume* si_det = gGeoManager->MakeTube("DET_SI", silicon.GetGeoMedium(), 0., radius, thick / 2);
81 
82  TGeoVolumeAssembly* ruth_tel = gGeoManager->MakeVolumeAssembly("STRUCT_RUTH");
83 
84  ruth_tel->AddNode(si_det, 1, new TGeoTranslation(0, 0, -centre_dist / 2));
85  ruth_tel->AddNode(si_det, 2, new TGeoTranslation(0, 0, centre_dist / 2));
86 
87  // front entrance of first detector at 2 metres from target
88  const double distance = 2.20 * KVUnits::m + 0.5 * total_thickness;
89  const double theta = 1.84;
90  const double phi = -90;
91 
92  TGeoRotation rot1, rot2;
93  rot2.SetAngles(phi + 90, theta, 0);
94  rot1.SetAngles(-90, 0., 0.);
95  TGeoTranslation trans(0, 0, distance);
96  TGeoHMatrix h = rot2 * trans * rot1;
97  gGeoManager->GetTopVolume()->AddNode(ruth_tel, 1, new TGeoHMatrix(h));
98 }
99 
100 
101 
102 
108 
110 {
111  //Build geometry of FAZIASYM
112  //All telescopes are : Si(300µm)-Si(500µm)-CsI(10cm)
113  //No attempt has been made to implement real thicknesses
114  //
115  Info("BuildFAZIA", "Compact geometry, %f cm from target",
116  fFDist);
117 
119 
120  Double_t distance_block_cible = fFDist * KVUnits::cm;
121  Double_t thick_si1 = 300 * KVUnits::um;
122  TGeoTranslation trans;
123  trans.SetDz(distance_block_cible + thick_si1 / 2.);
124 
125  KVFAZIABlock* block = new KVFAZIABlock;
126 
127  TGeoRotation rot1, rot2;
128  TGeoHMatrix h;
129  TGeoHMatrix* ph = 0;
130  Double_t theta = 0;
131  Double_t phi = 0;
132 
133  Double_t theta_min = fFThetaMin;//smallest lab polar angle in degrees
134  Double_t centre_hole = 2.*tan(theta_min * TMath::DegToRad()) * distance_block_cible;
135  Double_t dx = (block->GetTotalSideWithBlindage()) / 2.;
136 
137  TVector3 centre;
138  for (Int_t bb = 0; bb < fNblocks; bb += 1) {
139 
140  if (bb == 1) centre.SetXYZ(-1 * (dx - centre_hole / 2), -dx - centre_hole / 2, distance_block_cible);
141  else if (bb == 2) centre.SetXYZ(-1 * (dx + centre_hole / 2), dx - centre_hole / 2, distance_block_cible);
142  else if (bb == 3) centre.SetXYZ(-1 * (-dx + centre_hole / 2), dx + centre_hole / 2, distance_block_cible);
143  else if (bb == 0) centre.SetXYZ(-1 * (-dx - centre_hole / 2), -dx + centre_hole / 2, distance_block_cible);
144  else if (bb == 4) centre.SetXYZ(-1 * (-dx - centre_hole / 2), -3 * dx + centre_hole / 2, distance_block_cible); //centre.SetXYZ(-1 * (dx - centre_hole / 2), -3 * dx - centre_hole / 2, distance_block_cible);
145  else {
146  Warning("BuildFAZIA", "Block position definition is done only for %d blocks", fNblocks);
147  }
148  theta = centre.Theta() * TMath::RadToDeg();
149  phi = centre.Phi() * TMath::RadToDeg();
150  printf("BLK #%d => theta=%1.2lf - phi=%1.2lf\n", bb, theta, phi);
151 
152  rot2.SetAngles(phi + 90., theta, 0.);
153  rot1.SetAngles(-1.*phi, 0., 0.);
154  h = rot2 * trans * rot1;
155  ph = new TGeoHMatrix(h);
156  top->AddNode(block, bb, ph);
157  }
158 
159  // add telescope for elastic scattering monitoring
160 // RutherfordTelescope();
161  // Change default geometry import angular range for rutherford telescope
162  SetGeometryImportParameters(.25, 1., 1.84);
163 }
164 
165 
166 
168 
170 {
171 
173  env.SetValue("RUTH_SI_1", "SI1-RUTH");
174  env.SetValue("RUTH_SI_2", "SI2-RUTH");
175 
176 }
177 
178 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
double Double_t
R__EXTERN TGeoManager * gGeoManager
double tan(double)
Extension of TEnv to allow the writing of comments in the file.
Definition: KVEnv.h:16
Standard geometry of 16-telescope FAZIA block.
Definition: KVFAZIABlock.h:16
Double_t GetTotalSideWithBlindage() const
Definition: KVFAZIABlock.h:68
FAZIA set-up for LNS 2016.
virtual void GetGeometryParameters()
Defined number of blocks, the distance from the target and the minimum polar angle.
virtual ~KVFAZIALNS2016()
Destructor.
virtual void BuildFAZIA()
void RutherfordTelescope()
virtual void SetNameOfDetectors(KVEnv &env)
Description of a FAZIA detector geometry.
Definition: KVFAZIA.h:32
Double_t fFDist
distance of FAZIA detectors from target (in cm)
Definition: KVFAZIA.h:35
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:208
Double_t fFThetaMin
minimum polar angle for compact geometry (in degrees)
Definition: KVFAZIA.h:36
virtual void SetNameOfDetectors(KVEnv &env)
Definition: KVFAZIA.cpp:223
Int_t fNblocks
number of blocks
Definition: KVFAZIA.h:37
Description of physical materials used to construct detectors; interface to range tables.
Definition: KVMaterial.h:41
virtual TGeoMedium * GetGeoMedium(const Char_t *="")
Definition: KVMaterial.cpp:971
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
TGeoVolume * MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz)
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
TGeoVolume * GetTopVolume() const
void SetAngles(Double_t phi, Double_t theta, Double_t psi)
virtual void SetDz(Double_t dz)
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 Warning(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
void SetXYZ(Double_t x, Double_t y, Double_t z)
Double_t Phi() const
Double_t Theta() const
RooCmdArg ClassName(const char *name)
TH1 * h
const long double mm
Definition: KVUnits.h:69
const long double um
Definition: KVUnits.h:68
const long double cm
Definition: KVUnits.h:66
const long double m
Definition: KVUnits.h:70
constexpr Double_t DegToRad()
constexpr Double_t RadToDeg()