Belle II Software  release-08-01-10
ARICHAerogelHist Class Reference

Base class for geometry parameters. More...

#include <ARICHAerogelHist.h>

Inheritance diagram for ARICHAerogelHist:
Collaboration diagram for ARICHAerogelHist:

Public Member Functions

 ARICHAerogelHist ()
 Default constructor.
 
 ~ARICHAerogelHist ()
 Default destructor.
 
 ARICHAerogelHist (const char *name, const char *title)
 Constructor with name, title. More...
 
Int_t GetBinIDFromRingColumn (Int_t ring, Int_t column)
 Function which return histogram bin id from ring and column id's. More...
 
void DrawHisto (TString opt, TString outDirName)
 Function to draw the histogram. More...
 

Protected Member Functions

void SetInitialParametersByDefault ()
 Function which set initial values of input parameters.
 
void SetUpVerticesMap ()
 Function for calculation vertices for one aerogel tile.
 
void dumpVerticesMap ()
 Function to print vertices for one aerogel tile.
 
void makeRotation (double xold, double yold, double &xnew, double &ynew, double phi)
 Function to rotate 2D point (x and y) around z axis by angle phi. More...
 
 ClassDef (ARICHAerogelHist, 1)
 ClassDef.
 

Protected Attributes

std::vector< Int_t > m_nTiles
 Number of tiles per ring.
 
std::vector< double > m_tileRmin
 Minimum radius of aerogel ring.
 
std::vector< double > m_tileRmax
 Maximum radius of aerogel ring.
 
std::vector< double > m_tileRcenter
 Center radius of aerogel ring.
 
std::vector< double > m_tileDeltaPhiCenter
 Angle opening (phi) of the aerogel tile measured between two rays (0.0,0.0 : and centre of the ring from left/right).
 
std::vector< double > m_aerogelAriGapDeltaPhiCenter
 Angle opening (phi) of the air gap between aerogel tiles. More...
 
Int_t m_verboseLevel
 Verbose level.
 
Int_t m_nCircularPoints
 Number of circular points.
 
double m_aerogelTileGap
 Distance between aerogel tiles.
 
std::map< Int_t, std::vector< TVector2 > > m_verticesMap
 Aerogel vertices map.
 
TString m_histName
 Histogram name.
 
TString m_histTitle
 Histogram title.
 

Detailed Description

Base class for geometry parameters.

Definition at line 28 of file ARICHAerogelHist.h.

Constructor & Destructor Documentation

◆ ARICHAerogelHist()

ARICHAerogelHist ( const char *  name,
const char *  title 
)

Constructor with name, title.

Parameters
namename.
titletitle.

Definition at line 30 of file ARICHAerogelHist.cc.

30  : TH2Poly(), m_histName(name), m_histTitle(title)
31 {
32  SetName(m_histName.Data());
33  SetTitle(m_histTitle.Data());
36 
37  if (m_verboseLevel > 0) {
38  std::cout << setw(10) << "ring" << setw(10) << "nTiles" << setw(10) << "tileRmin" << setw(10) << "tileRmax" << std::endl;
39  for (unsigned int i = 0; i < m_nTiles.size(); i++)
40  std::cout << setw(10) << i + 1 << setw(10) << m_nTiles[i] << setw(10) << m_tileRmin[i] << setw(10) << m_tileRmax[i] << std::endl;
42  }
43 
44  unsigned int n;
45  double* x;
46  double* y;
47 
48  double xold;
49  double yold;
50  double xnew;
51  double ynew;
52  double phi;
53 
54  //Add "poly bins" to the histogram
55  //Loop over rings with different radiuses
56  unsigned int iR = 0;
57  for (auto& m : m_verticesMap) {
58  //Loop aerogel tiles (bins) within one ring.
59  double phi0 = m_tileDeltaPhiCenter[iR] / 2.0;
60  double deltaPhi = m_tileDeltaPhiCenter[iR] + m_aerogelAriGapDeltaPhiCenter[iR];
61  for (Int_t j = 0; j < m_nTiles[iR]; j++) {
62  phi = phi0 + deltaPhi * j;
63  n = m.second.size();
64  x = new double [n];
65  y = new double [n];
66  //Loop over polygonal points which defines bins.
67  for (unsigned int i = 0; i < n; i++) {
68  xold = m.second[i].X();
69  yold = m.second[i].Y();
70  makeRotation(xold, yold, xnew, ynew, phi);
71  x[i] = xnew;
72  y[i] = ynew;
73  }
74  AddBin(n, x, y);
75  delete []x;
76  delete []y;
77  }
78  iR++;
79  }// for (auto& m: m_verticesMap) {
80 
81 }
TString m_histTitle
Histogram title.
TString m_histName
Histogram name.
std::map< Int_t, std::vector< TVector2 > > m_verticesMap
Aerogel vertices map.
Int_t m_verboseLevel
Verbose level.
std::vector< double > m_tileRmax
Maximum radius of aerogel ring.
void SetUpVerticesMap()
Function for calculation vertices for one aerogel tile.
std::vector< Int_t > m_nTiles
Number of tiles per ring.
void SetInitialParametersByDefault()
Function which set initial values of input parameters.
std::vector< double > m_tileDeltaPhiCenter
Angle opening (phi) of the aerogel tile measured between two rays (0.0,0.0 : and centre of the ring f...
std::vector< double > m_tileRmin
Minimum radius of aerogel ring.
void dumpVerticesMap()
Function to print vertices for one aerogel tile.
std::vector< double > m_aerogelAriGapDeltaPhiCenter
Angle opening (phi) of the air gap between aerogel tiles.
void makeRotation(double xold, double yold, double &xnew, double &ynew, double phi)
Function to rotate 2D point (x and y) around z axis by angle phi.

Member Function Documentation

◆ DrawHisto()

void DrawHisto ( TString  opt = "ZCOLOT text same",
TString  outDirName = "./" 
)

Function to draw the histogram.

Parameters
optdraw option string default value : "ZCOLOT text same".
outDirNamename of epe and pdf to save the plots.

Definition at line 110 of file ARICHAerogelHist.cc.

◆ GetBinIDFromRingColumn()

Int_t GetBinIDFromRingColumn ( Int_t  ring,
Int_t  column 
)

Function which return histogram bin id from ring and column id's.

Parameters
ringringID number.
columncolumnID number.

Definition at line 83 of file ARICHAerogelHist.cc.

◆ makeRotation()

void makeRotation ( double  xold,
double  yold,
double &  xnew,
double &  ynew,
double  phi 
)
protected

Function to rotate 2D point (x and y) around z axis by angle phi.

Parameters
xoldold x coordinate.
yoldold y coordinate.
xnewnew x coordinate.
ynewnew y coordinate.
phiroration angle.

Definition at line 99 of file ARICHAerogelHist.cc.

Member Data Documentation

◆ m_aerogelAriGapDeltaPhiCenter

std::vector<double> m_aerogelAriGapDeltaPhiCenter
protected

Angle opening (phi) of the air gap between aerogel tiles.

Measured between ray (0.0,0.0 : and centre of the ring from left/right).

Definition at line 97 of file ARICHAerogelHist.h.


The documentation for this class was generated from the following files: