KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVFAZIA_2B.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Thu Jan 22 16:02:02 2015
2 //Author: ,,,
3 
4 #include "KVFAZIA_2B.h"
5 
6 #include "KVUnits.h"
7 #include "KVFAZIABlock.h"
8 
10 
11 
12 
13 
17  : KVFAZIA()
18 {
19  // Default constructor
20  SetTitle(ClassName());
21 }
22 
23 
24 
26 
28 {
29 
30  fNblocks = 2;
31  fFGeoType = "";
32  fFThetaMin = 6.1;
33  fFDist = 100.0;
34 
35 }
36 
37 
38 
39 
42 
44 {
45  // Destructor
46 }
47 
48 
49 
51 
53 {
54  Info("BuildFAZIA", "Compact geometry, %f cm from target, theta-min=%f deg.",
56 
58 
59  Double_t distance_block_cible = fFDist * KVUnits::cm;
60  Double_t thick_si1 = 300 * KVUnits::um;
61  TGeoTranslation trans;
62  trans.SetDz(distance_block_cible + thick_si1 / 2.);
63 
64  KVFAZIABlock* block = new KVFAZIABlock;
65 
66  Int_t block_starting_number = fStartingBlockNumber;
67 
68  TGeoRotation rot1, rot2;
69  TGeoHMatrix h;
70  TGeoHMatrix* ph = 0;
71  Double_t theta = 0;
72  Double_t phi = 0;
73 
74  Double_t theta_min = fFThetaMin;//smallest lab polar angle in degrees
75  Double_t centre_hole = 2.*tan(theta_min * TMath::DegToRad()) * distance_block_cible;
76  Double_t dx = (block->GetTotalSideWithBlindage()) / 2.;
77 
78  printf("centre_hole=%lf - dx=%lf\n", centre_hole, dx);
79 
80  Double_t arc = block->GetTotalSideWithBlindage() / (distance_block_cible + thick_si1 / 2.);
81  arc /= 2;
82  arc *= TMath::RadToDeg();
83 
84  TVector3 centre;
85  for (Int_t bb = 0; bb < fNblocks; bb += 1) {
86  /*
87  if (bb==0) centre.SetXYZ(dx - centre_hole / 2, 0, distance_block_cible);
88  else if (bb==1) centre.SetXYZ(dx + centre_hole / 2, 0, distance_block_cible);
89  else {
90  Warning("BuildFAZIA","Block position definition is done only for %d blocks",fNblocks);
91  }
92  */
93  /*
94  theta = centre.Theta() * TMath::RadToDeg();
95  phi = centre.Phi() * TMath::RadToDeg();
96  */
97  theta = theta_min + arc;
98  if (bb == 0) phi = 90;
99  else if (bb == 1) phi = 360 - 90;
100 
101  rot2.SetAngles(phi + 90., theta, 0.);
102  rot1.SetAngles(-1.*phi, 0., 0.);
103  h = rot2 * trans * rot1;
104  ph = new TGeoHMatrix(h);
105  top->AddNode(block, block_starting_number++, ph);
106 
107  }
108 
109 }
110 
111 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
double Double_t
R__EXTERN TGeoManager * gGeoManager
double tan(double)
Standard geometry of 16-telescope FAZIA block.
Definition: KVFAZIABlock.h:16
Double_t GetTotalSideWithBlindage() const
Definition: KVFAZIABlock.h:68
FAZIA set-up with two blocks used in LNS 2014 commissioning.
Definition: KVFAZIA_2B.h:15
virtual void BuildFAZIA()
methods to be implemented in child classes
Definition: KVFAZIA_2B.cpp:52
virtual ~KVFAZIA_2B()
Destructor.
Definition: KVFAZIA_2B.cpp:43
virtual void GetGeometryParameters()
Called by the Build method.
Definition: KVFAZIA_2B.cpp:27
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
TString fFGeoType
type of FAZIA geometry (="compact",...)
Definition: KVFAZIA.h:34
Double_t fFThetaMin
minimum polar angle for compact geometry (in degrees)
Definition: KVFAZIA.h:36
Int_t fStartingBlockNumber
Definition: KVFAZIA.h:38
Int_t fNblocks
number of blocks
Definition: KVFAZIA.h:37
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 Info(const char *method, const char *msgfmt,...) const
RooCmdArg ClassName(const char *name)
TH1 * h
const long double um
Definition: KVUnits.h:68
const long double cm
Definition: KVUnits.h:66
constexpr Double_t DegToRad()
constexpr Double_t RadToDeg()