KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVFAZIABeltConfig.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Wed Mar 18 15:02:46 2020
2 //Author: John Frankland,,,
3 
4 #include "KVFAZIABeltConfig.h"
5 #include "KVFAZIABlock.h"
6 #include <TVector3.h>
7 #include "KVMultiDetArray.h"
8 
9 ClassImp(KVFAZIABeltConfig)
10 
11 // BEGIN_HTML <!--
13 /* -->
14 <h2>KVFAZIABeltConfig</h2>
15 <h4>blocks of FAZIA in a belt of NxM blocks</h4>
16 <!-- */
17 // --> END_HTML
19 
20 
21 
24 void KVFAZIABeltConfig::BuildBelt(int nblocsX, int nblocsY, double distance_correction)
25 {
26  // set up blocks in grid
27 
28  SetMedium(gGeoManager->GetMedium("Vacuum"));//to avoid warnings about STRUCT_BLOCK has dummy medium
29  KVFAZIABlock* blocco = new KVFAZIABlock;
30  Int_t block_no(0);
31  double ymin = -(nblocsY - 1.) / 2.;
32  double ymax = -ymin;
33  for (int x = nblocsX - 1; x >= -(nblocsX - 1); x -= 2) {
34  for (double y = ymin; y <= ymax; ++y) {
35  double distance_to_block = fDist + y * distance_correction;
36  double inter_block_Y = fInterBlock + (10 * (fDist - distance_to_block) / fDist) * fInterBlock;
37  //std::cout << "distance = " << fDist-distance_to_block << " inter_block = " << inter_block_Y << std::endl;
38  TVector3 center(x * 0.5 * (blocco->GetTotalSideWithBlindage() + fInterBlock),
39  y * (blocco->GetTotalSideWithBlindage() + inter_block_Y),
40  fDist);
41  //center.Print();
42  TGeoTranslation invZ(0, 0, -distance_to_block);
43  AddNode(blocco, block_no,
45  TMath::RadToDeg()*center.Theta(),
46  TMath::RadToDeg()*center.Phi(), &invZ));
47  ++block_no;
48  }
49  }
50  // default visibility level (3) is not enough to see detectors
52 }
53 
54 
55 
56 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
R__EXTERN TGeoManager * gGeoManager
float ymin
float ymax
Standard geometry of 16-telescope FAZIA block.
Definition: KVFAZIABlock.h:16
Double_t GetNominalDistanceTargetBlockCentre(double dist_SI1=100.) const
Definition: KVFAZIABlock.h:73
Double_t GetTotalSideWithBlindage() const
Definition: KVFAZIABlock.h:68
static TGeoHMatrix * GetVolumePositioningMatrix(Double_t distance, Double_t theta, Double_t phi, TGeoTranslation *postTrans=nullptr)
void SetVisLevel(Int_t level=3)
TGeoMedium * GetMedium(const char *medium) const
Double_t y[n]
Double_t x[n]
constexpr Double_t RadToDeg()