6 #include "KVFAZIABlock.h"
29 SetTitle(ClassName());
116 Info(
"BuildFAZIA",
"Compact geometry, %f cm from target, theta-min=%f deg.",
119 TGeoVolume* top = gGeoManager->GetTopVolume();
122 Double_t nominal_distance_block_cible = 100.0 *
KVUnits::cm;
126 TGeoTranslation final_trans;
127 final_trans.SetDz(distance_block_cible - nominal_distance_block_cible);
134 Double_t centre_hole = 2.*tan(theta_min * TMath::DegToRad()) * nominal_distance_block_cible;
139 KVString block_numbers =
KVBase::GetDataSetEnv(
fDataSet,
"FAZIETO.BlockNumbers",
"0,1,2,3,4,5,6,7,8,9,10,11");
140 block_numbers.
Begin(
",");
141 KVString block_positions =
KVBase::GetDataSetEnv(
fDataSet,
"FAZIETO.BlockPositions",
"0,1,2,3,4,5,6,7,8,9,10,11");
142 block_positions.
Begin(
",");
144 for (Int_t i = 0; i <
fNblocks; i += 1) {
146 Int_t block_number = block_numbers.
Next().Atoi();
147 Int_t bb = block_positions.
Next().Atoi();
150 if (bb == 3) centre.SetXYZ(-1 * (dx - centre_hole / 2), 1 * (-dx - centre_hole / 2), nominal_distance_block_cible);
151 else if (bb == 2) centre.SetXYZ(-1 * (dx + centre_hole / 2), 1 * (dx - centre_hole / 2), nominal_distance_block_cible);
152 else if (bb == 1) centre.SetXYZ(-1 * (-dx + centre_hole / 2), 1 * (dx + centre_hole / 2), nominal_distance_block_cible);
153 else if (bb == 0) centre.SetXYZ(-1 * (-dx - centre_hole / 2), 1 * (-dx + centre_hole / 2), nominal_distance_block_cible);
154 else if (bb == 10) centre.SetXYZ(-1 * (3 * dx - centre_hole / 2), 1 * (-dx - centre_hole / 2), nominal_distance_block_cible);
155 else if (bb == 11) centre.SetXYZ(-1 * (dx - centre_hole / 2), 1 * (-3 * dx - centre_hole / 2), nominal_distance_block_cible);
156 else if (bb == 9) centre.SetXYZ(-1 * (3 * dx + centre_hole / 2), 1 * (dx - centre_hole / 2), nominal_distance_block_cible);
157 else if (bb == 8) centre.SetXYZ(-1 * (dx + centre_hole / 2), 1 * (3 * dx - centre_hole / 2), nominal_distance_block_cible);
158 else if (bb == 7) centre.SetXYZ(-1 * (-dx + centre_hole / 2), 1 * (3 * dx + centre_hole / 2), nominal_distance_block_cible);
159 else if (bb == 6) centre.SetXYZ(-1 * (-3 * dx + centre_hole / 2), 1 * (dx + centre_hole / 2), nominal_distance_block_cible);
160 else if (bb == 5)centre.SetXYZ(-1 * (-3 * dx - centre_hole / 2), 1 * (-dx + centre_hole / 2), nominal_distance_block_cible);
161 else if (bb == 4)centre.SetXYZ(-1 * (-dx - centre_hole / 2), 1 * (-3 * dx + centre_hole / 2), nominal_distance_block_cible);
165 Warning(
"BuildFAZIA",
"Block position definition is done only for %d blocks",
fNblocks);
167 theta = centre.Theta() * TMath::RadToDeg();
168 phi = centre.Phi() * TMath::RadToDeg();
169 printf(
"BLK #%d => (theoretical) theta=%1.2lf - phi=%1.2lf\n", block_number, theta, phi);
172 distance_block_cible - nominal_distance_block_cible);
173 TVector3 real_centre = offset + centre;
175 fBlocCentrePhi[block_number] = real_centre.Phi() * TMath::RadToDeg();
176 top->AddNode(block, block_number,
178 theta, phi, &final_trans));
static const Char_t * GetDataSetEnv(const Char_t *dataset, const Char_t *type, const Char_t *defval)
Standard geometry of 16-telescope FAZIA block.
Double_t GetNominalDistanceTargetBlockCentre(double dist_SI1=100.) const
Double_t GetTotalSideWithBlindage() const
Description of a FAZIA detector geometry.
Double_t fFDist
distance of FAZIA detectors from target (in cm)
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)
Double_t fFThetaMin
minimum polar angle for compact geometry (in degrees)
Int_t fNblocks
number of blocks
FAZIA 12-block demonstrator.
virtual void GetGeometryParameters()
defined configuration of the blocks
std::map< int, double > fBlocCentrePhi
phi angle of block centres
std::map< int, double > fBlocCentreTheta
polar angle of block centres
virtual ~KVFAZIETO()
Destructor.
virtual void BuildFAZIA()
static TGeoHMatrix * GetVolumePositioningMatrix(Double_t distance, Double_t theta, Double_t phi, TGeoTranslation *postTrans=nullptr)
TString fDataSet
name of associated dataset, used with MakeMultiDetector()
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const