KaliVeda
Toolkit for HIC analysis
KVFAZIA3DBlock.cpp
1 //Created by KVClassFactory on Thu May 30 10:13:17 2013
2 //Author: Eric Bonnet
3 
4 #include "KVFAZIA3DBlock.h"
5 #include "KVUnits.h"
6 #include "KVMaterial.h"
7 #include "TMath.h"
8 //#include "KVFAZIA.h"
9 #include "TGeoManager.h"
10 #include "TGeoMedium.h"
11 #include "TGeoVolume.h"
12 #include "TGeoMatrix.h"
13 #include "KVDataSet.h"
14 
16 
17 // BEGIN_HTML <!--
19 /* -->
20 <h2>KVFAZIA3DBlock</h2>
21 <h4>Block of 16 telescopes FAZIA</h4>
22 <!-- */
23 // --> END_HTML
25 
26 
27 
30 {
31  idb = block_id;
32  // Default constructor
33 }
34 
35 
36 
38 
40 {
41  quartet_position.ReadFile(Form("%s/%s/FAZIA3D.Quartet.Position.env", gDataSet->GetDATADIRFilePath(), gDataSet->GetName()), kEnvLocal);
42 
43  // Set default dimensions for all parts of geometry
44  frame_side = 4.415;
45  centre_cross_thick = 0.12;
46  side_thick = 0.0475;
47  si_holder_side = 2.1;
49  front_frame_depth = 0.3;
50  frame_depth_300 = 0.273;
51  frame_depth_500 = 0.24;
52  frame_edge_depth = 0.16;
56  dist_si2_csi = 0.;// should be ~1mm between si2 ergal edge and csi
57  csi_depth = 10;
59  thick_si1 = 300 * KVUnits::um;
60  thick_si2 = 500 * KVUnits::um;
61  dist_csi_sarco = 4.25;
62  sarco_length = 49.7;
63  sarco_width = 9.6;
64  sarco_height = 10.4;
65  sarco_epaisseur = 0.4;
66  sarco_uplift = 0.5; //how much the sarco sides overlap the copper plate
67 
68  SetMedium(gGeoManager->GetMedium("Vacuum"));//to avoid warnings about STRUCT_BLOCK has dummy medium
69 
70  TGeoVolume* quartet = MakeQuartet();
71 
72  for (Int_t nq = 1; nq <= 4; nq += 1) {
73  KVString qn = Form("B%03d-Q%d", idb, nq);
74 
75  // initial translation to set the Si1 entrance window at Z=0
76  TGeoTranslation trans0;
77  trans0.SetDz(4.9615 + front_frame_depth);
78 
79  // tree rotations around random axes to set the proper quartet orientation
80  double psi = quartet_position.GetValue(Form("%s.Psi", qn.Data()), 0.);
81  double theta = quartet_position.GetValue(Form("%s.Theta", qn.Data()), 0.);
82  double phi = quartet_position.GetValue(Form("%s.Phi", qn.Data()), 0.);
83 
84  TGeoRotation rot1;
85  rot1.RotateZ(psi);
86 
87  TGeoRotation rot2;
88  rot2.RotateY(theta);
89 
90  TGeoRotation rot3;
91  rot3.RotateZ(phi);
92 
93  // translation to set the quartet center in place
94  TGeoTranslation trans;
95  trans.SetDx(quartet_position.GetValue(Form("%s.X", qn.Data()), 0.));
96  trans.SetDy(quartet_position.GetValue(Form("%s.Y", qn.Data()), 0.));
97  trans.SetDz(quartet_position.GetValue(Form("%s.Z", qn.Data()), 0.));
98 
99  TGeoHMatrix h = trans * rot3 * rot2 * rot1 * trans0;
100  TGeoHMatrix* ph = new TGeoHMatrix(h);
101 
102  AddNode(quartet, nq, ph);
103  }
104 
105 }
106 
107 
108 
int Int_t
kEnvLocal
R__EXTERN TGeoManager * gGeoManager
int idb
char * Form(const char *fmt,...)
static const Char_t * GetDATADIRFilePath(const Char_t *namefile="")
Definition: KVBase.cpp:68
Geometry of 16-telescope FAZIA block where each quartet is placed in absolute using [DATASET]/FAZIA3D...
KVEnv quartet_position
void Build() override
Standard geometry of 16-telescope FAZIA block.
Definition: KVFAZIABlock.h:17
double full_width
Definition: KVFAZIABlock.h:32
double si_centre
Definition: KVFAZIABlock.h:25
double dist_si2_csi
Definition: KVFAZIABlock.h:33
double thick_si1
Definition: KVFAZIABlock.h:36
double frame_depth_300
Definition: KVFAZIABlock.h:27
double centre_cross_thick
Definition: KVFAZIABlock.h:22
double frame_edge_depth
Definition: KVFAZIABlock.h:29
double dist_csi_sarco
Definition: KVFAZIABlock.h:38
double full_length_quartet
Definition: KVFAZIABlock.h:35
double sarco_length
Definition: KVFAZIABlock.h:39
double sarco_epaisseur
Definition: KVFAZIABlock.h:42
double si_holder_side
Definition: KVFAZIABlock.h:24
double si300_position
Definition: KVFAZIABlock.h:30
double si500_position
Definition: KVFAZIABlock.h:31
double sarco_uplift
Definition: KVFAZIABlock.h:43
double thick_si2
Definition: KVFAZIABlock.h:37
double sarco_height
Definition: KVFAZIABlock.h:41
double frame_depth_500
Definition: KVFAZIABlock.h:28
double front_frame_depth
Definition: KVFAZIABlock.h:26
double frame_side
Definition: KVFAZIABlock.h:21
double side_thick
Definition: KVFAZIABlock.h:23
double sarco_width
Definition: KVFAZIABlock.h:40
TGeoVolume * MakeQuartet()
double csi_depth
Definition: KVFAZIABlock.h:34
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
virtual const char * GetValue(const char *name, const char *dflt) const
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
TGeoMedium * GetMedium(const char *medium) const
void RotateY(Double_t angle) override
void RotateZ(Double_t angle) override
void SetDy(Double_t dy) override
void SetDz(Double_t dz) override
void SetDx(Double_t dx) override
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="") override
virtual void SetMedium(TGeoMedium *medium)
const char * GetName() const override
const char * Data() const
TH1 * h
ClassImp(TPyArg)