KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVFAZIA_2B.cpp
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
15
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;
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
double Double_t
R__EXTERN TGeoManager * gGeoManager
Standard geometry of 16-telescope FAZIA block.
Double_t GetTotalSideWithBlindage() const
FAZIA set-up with two blocks used in LNS 2014 commissioning.
Definition KVFAZIA_2B.h:16
virtual void BuildFAZIA()
virtual ~KVFAZIA_2B()
Destructor.
virtual void GetGeometryParameters()
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
TString fFGeoType
type of FAZIA geometry (="compact",...)
Definition KVFAZIA.h:35
Double_t fFThetaMin
minimum polar angle for compact geometry (in degrees)
Definition KVFAZIA.h:37
Int_t fStartingBlockNumber
Definition KVFAZIA.h:39
Int_t fNblocks
number of blocks
Definition KVFAZIA.h:38
TGeoVolume * GetTopVolume() const
void SetAngles(Double_t phi, Double_t theta, Double_t psi)
void SetDz(Double_t dz) 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
RooCmdArg ClassName(const char *name)
RVec< PromoteType< T > > tan(const RVec< T > &v)
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()
ClassImp(TPyArg)