KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVFAZIAMidRapExplorer.cpp
1//Created by KVClassFactory on Thu Mar 19 12:53:22 2020
2//Author: John Frankland,,,
3
4#include "KVFAZIAMidRapExplorer.h"
5#include "KVFAZIABeltConfig.h"
6
8
9
10
11
12void KVFAZIAMidRapExplorer::BuildFAZIA()
13{
14 KVFAZIABeltConfig* belt_left =
15 new KVFAZIABeltConfig(fBlockParams[0].fNblocsX, fBlockParams[0].fNblocsY,
16 fBlockParams[0].fBeltDistanceTarget, fBlockParams[0].fInterBlockSpacing,
17 -fBlockParams[0].fDistanceOffset);
19 top->AddNode(belt_left, 0,
20 GetVolumePositioningMatrix(fBlockParams[0].fBeltDistanceTarget, fBlockParams[0].fThetaBelt, fBlockParams[0].fPhiBelt));
21 KVFAZIABeltConfig* belt_right =
22 new KVFAZIABeltConfig(fBlockParams[1].fNblocsX, fBlockParams[1].fNblocsY,
23 fBlockParams[1].fBeltDistanceTarget, fBlockParams[1].fInterBlockSpacing,
24 fBlockParams[1].fDistanceOffset);
25 top->AddNode(belt_right, 1,
26 GetVolumePositioningMatrix(fBlockParams[1].fBeltDistanceTarget, fBlockParams[1].fThetaBelt, fBlockParams[1].fPhiBelt));
27}
28
29
30
32
34{
35 for (int ibelt = 0; ibelt < 2; ++ibelt) {
36 fBlockParams[ibelt].fNblocsX = (int)GetDataSetEnv(fDataSet, Form("KVFAZIAMidRapExplorer.BELT%d.BlocksX", ibelt), 0.0);
37 fBlockParams[ibelt].fNblocsY = (int)GetDataSetEnv(fDataSet, Form("KVFAZIAMidRapExplorer.BELT%d.BlocksY", ibelt), 0.0);
38 fBlockParams[ibelt].fBeltDistanceTarget = GetDataSetEnv(fDataSet, Form("KVFAZIAMidRapExplorer.BELT%d.BeltDistanceTarget", ibelt), -1.0);
39 fBlockParams[ibelt].fThetaBelt = GetDataSetEnv(fDataSet, Form("KVFAZIAMidRapExplorer.BELT%d.ThetaBelt", ibelt), -1.0);
40 fBlockParams[ibelt].fPhiBelt = GetDataSetEnv(fDataSet, Form("KVFAZIAMidRapExplorer.BELT%d.PhiBelt", ibelt), -1.0);
41 fBlockParams[ibelt].fInterBlockSpacing = GetDataSetEnv(fDataSet, Form("KVFAZIAMidRapExplorer.BELT%d.InterBlockSpacing", ibelt), -1.0);
42 fBlockParams[ibelt].fDistanceOffset = GetDataSetEnv(fDataSet, Form("KVFAZIAMidRapExplorer.BELT%d.DistanceOffset", ibelt), -1.0);
43 }
46
47}
48
49
50
58
60{
61 //define the format of detectors name
62 // label-index
63 // where index = block*100+quartet*10+telescope
64 // example :
65 // SI1-123 is the Silicon 1 of the block 1, the quartet 2 and the telescope 3
66 // block number increases continuously from 1st block of belt 0 to last block of belt 1
67
68 int block_offset = 0;
69 for (int belt = 0; belt <= 1; ++belt) {
70 for (Int_t bb = 0; bb < fBlockParams[belt].fNblocsX * fBlockParams[belt].fNblocsY; bb += 1) {
71 for (Int_t qq = 1; qq <= 4; qq += 1) {
72 for (Int_t tt = 1; tt <= 4; tt += 1) {
74 while (!fDetectorLabels.End()) {
76 env.SetValue(
77 Form("BELT_%d_BLOCK_%d_QUARTET_%d_%s-T%d", belt, bb, qq, sdet.Data(), tt),
78 Form("%s-%d", sdet.Data(), (bb + block_offset) * 100 + 10 * qq + tt)
79 );
80 }
81 }
82 }
83 }
84 block_offset += fBlockParams[belt].fNblocsX * fBlockParams[belt].fNblocsY;
85 }
86}
87
88
89
int Int_t
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
static const Char_t * GetDataSetEnv(const Char_t *dataset, const Char_t *type, const Char_t *defval)
Definition KVBase.cpp:1619
Extension of TEnv to allow the writing of comments in the file.
Definition KVEnv.h:17
A rectangular array of FAZIA blocks.
FAZIA setup with two belts of 6 blocks.
struct KVFAZIAMidRapExplorer::@1 fBlockParams[2]
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:238
KVString fDetectorLabels
Definition KVFAZIA.h:42
TString fDataSet
name of associated dataset, used with MakeMultiDetector()
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition KVString.h:73
void Begin(TString delim) const
Definition KVString.cpp:565
Bool_t End() const
Definition KVString.cpp:634
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition KVString.cpp:695
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
TGeoVolume * GetTopVolume() const
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
const char * Data() const
Double_t Min(Double_t a, Double_t b)
Double_t Max(Double_t a, Double_t b)
auto * tt
ClassImp(TPyArg)