KaliVeda
Toolkit for HIC analysis
KVFAZIASYM.cpp
1 //Created by KVClassFactory on Tue Jan 27 11:38:09 2015
2 //Author: ,,,
3 
4 #include "KVFAZIASYM.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>KVFAZIASYM</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 = 4;
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 = 10 * KVUnits::cm / 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::cm + 0.5 * total_thickness;
89  const double theta = 1.84;
90  const double phi = -90;
91 
92  gGeoManager->GetTopVolume()->AddNode(ruth_tel, 1,
93  GetFAZIAVolumePositioningMatrix(distance, theta, phi));
94 }
95 
96 
97 
98 
104 
106 {
107  //Build geometry of FAZIASYM
108  //All telescopes are : Si(300µm)-Si(500µm)-CsI(10cm)
109  //No attempt has been made to implement real thicknesses
110  //
111  Info("BuildFAZIA", "Compact geometry, %f cm from target",
112  fFDist);
113 
115 
116  Double_t distance_block_cible = fFDist * KVUnits::cm;
117 
118  KVFAZIABlock* block = new KVFAZIABlock;
119  block->Build();
120 
121  Double_t theta = 0;
122  Double_t phi = 0;
123 
124  Double_t theta_min = fFThetaMin;//smallest lab polar angle in degrees
125  Double_t centre_hole = 2.*tan(theta_min * TMath::DegToRad()) * distance_block_cible;
126  Double_t dx = (block->GetTotalSideWithBlindage()) / 2.;
127 
128  TVector3 centre;
129  for (Int_t bb = 0; bb < fNblocks; bb += 1) {
130 
131  if (bb == 1) centre.SetXYZ(-1 * (dx - centre_hole / 2), -dx - centre_hole / 2, distance_block_cible);
132  else if (bb == 2) centre.SetXYZ(-1 * (dx + centre_hole / 2), dx - centre_hole / 2, distance_block_cible);
133  else if (bb == 3) centre.SetXYZ(-1 * (-dx + centre_hole / 2), dx + centre_hole / 2, distance_block_cible);
134  else if (bb == 0) centre.SetXYZ(-1 * (-dx - centre_hole / 2), -dx + centre_hole / 2, distance_block_cible);
135  else {
136  Warning("BuildFAZIA", "Block position definition is done only for %d blocks", fNblocks);
137  }
138  theta = centre.Theta() * TMath::RadToDeg();
139  phi = centre.Phi() * TMath::RadToDeg();
140  printf("BLK #%d => theta=%1.2lf - phi=%1.2lf\n", bb, theta, phi);
141 
142  top->AddNode(block, bb,
144  block->GetNominalDistanceTargetBlockCentre(distance_block_cible),
145  theta, phi));
146  }
147 
148  // add telescope for elastic scattering monitoring
150 
151  // Change default geometry import angular range for rutherford telescope
152  SetGeometryImportParameters(.25, 1., 1.84);
153 }
154 
155 
156 
158 
160 {
161 
163  env.SetValue("RUTH_SI_1", "SI1-RUTH");
164  env.SetValue("RUTH_SI_2", "SI2-RUTH");
165 
166 }
167 
168 
int Int_t
double Double_t
R__EXTERN TGeoManager * gGeoManager
void Warning(const char *method, const char *msgfmt,...) const override
Definition: KVBase.cpp:1670
Extension of TEnv to allow the writing of comments in the file.
Definition: KVEnv.h:18
Standard geometry of 16-telescope FAZIA block.
Definition: KVFAZIABlock.h:17
virtual void Build()
Set default dimensions for all parts of geometry.
Double_t GetNominalDistanceTargetBlockCentre(double dist_SI1=100.) const
Definition: KVFAZIABlock.h:76
Double_t GetTotalSideWithBlindage() const
Definition: KVFAZIABlock.h:71
FAZIA setup, FAZIASYM experiment.
Definition: KVFAZIASYM.h:15
void BuildFAZIA() override
Definition: KVFAZIASYM.cpp:105
void RutherfordTelescope()
Definition: KVFAZIASYM.cpp:65
void SetNameOfDetectors(KVEnv &env) override
Definition: KVFAZIASYM.cpp:159
virtual ~KVFAZIASYM()
Destructor.
Definition: KVFAZIASYM.cpp:39
void GetGeometryParameters() override
Defined number of blocks, the distance from the target and the minimum polar angle.
Definition: KVFAZIASYM.cpp:49
Description of a FAZIA detector geometry.
Definition: KVFAZIA.h:33
Double_t fFDist
distance of FAZIA detectors from target (in cm)
Definition: KVFAZIA.h:36
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:243
Double_t fFThetaMin
minimum polar angle for compact geometry (in degrees)
Definition: KVFAZIA.h:37
static TGeoHMatrix * GetFAZIAVolumePositioningMatrix(Double_t distance, Double_t theta, Double_t phi, TGeoTranslation *postTrans=nullptr)
Definition: KVFAZIA.h:273
virtual void SetNameOfDetectors(KVEnv &env)
Definition: KVFAZIA.cpp:354
Int_t fNblocks
number of blocks
Definition: KVFAZIA.h:38
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:90
virtual TGeoMedium * GetGeoMedium(const Char_t *="")
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
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="") override
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
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)
RVec< PromoteType< T > > tan(const RVec< T > &v)
constexpr Double_t DegToRad()
constexpr Double_t RadToDeg()
ClassImp(TPyArg)