4 #include "KVFAZIAMidRapExplorer.h"
5 #include "KVFAZIABeltConfig.h"
12 void KVFAZIAMidRapExplorer::BuildFAZIA()
33 void KVFAZIAMidRapExplorer::GetGeometryParameters()
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);
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) {
73 fDetectorLabels.Begin(
",");
74 while (!fDetectorLabels.End()) {
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)
84 block_offset += fBlockParams[belt].fNblocsX * fBlockParams[belt].fNblocsY;
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
static ValType GetDataSetEnv(const KVString &dataset, const KVString &type, const ValType &defval={})
Extension of TEnv to allow the writing of comments in the file.
A rectangular array of FAZIA blocks.
FAZIA setup with two belts of 6 blocks.
void SetNameOfDetectors(KVEnv &) override
Double_t fInterBlockSpacing
Double_t fBeltDistanceTarget
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)
static TGeoHMatrix * GetFAZIAVolumePositioningMatrix(Double_t distance, Double_t theta, Double_t phi, TGeoTranslation *postTrans=nullptr)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
KVString Next(Bool_t strip_whitespace=kFALSE) const
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)