Belle II Software  release-05-02-19
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 38 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 32 of file ARICHAerogelHist.cc.

32  : TH2Poly(), m_histName(name), m_histTitle(title)
33 {
34  SetName(m_histName.Data());
35  SetTitle(m_histTitle.Data());
38 
39  if (m_verboseLevel > 0) {
40  std::cout << setw(10) << "ring" << setw(10) << "nTiles" << setw(10) << "tileRmin" << setw(10) << "tileRmax" << std::endl;
41  for (unsigned int i = 0; i < m_nTiles.size(); i++)
42  std::cout << setw(10) << i + 1 << setw(10) << m_nTiles[i] << setw(10) << m_tileRmin[i] << setw(10) << m_tileRmax[i] << std::endl;
44  }
45 
46  unsigned int n;
47  double* x;
48  double* y;
49 
50  double xold;
51  double yold;
52  double xnew;
53  double ynew;
54  double phi;
55 
56  //Add "poly bins" to the histogram
57  //Loop over rings with different radiuses
58  unsigned int iR = 0;
59  for (auto& m : m_verticesMap) {
60  //Loop aerogel tiles (bins) within one ring.
61  double phi0 = m_tileDeltaPhiCenter[iR] / 2.0;
62  double deltaPhi = m_tileDeltaPhiCenter[iR] + m_aerogelAriGapDeltaPhiCenter[iR];
63  for (Int_t j = 0; j < m_nTiles[iR]; j++) {
64  phi = phi0 + deltaPhi * j;
65  n = m.second.size();
66  x = new double [n];
67  y = new double [n];
68  //Loop over polygonal points which defines bins.
69  for (unsigned int i = 0; i < n; i++) {
70  xold = m.second[i].X();
71  yold = m.second[i].Y();
72  makeRotation(xold, yold, xnew, ynew, phi);
73  x[i] = xnew;
74  y[i] = ynew;
75  }
76  AddBin(n, x, y);
77  delete []x;
78  delete []y;
79  }
80  iR++;
81  }// for (auto& m: m_verticesMap) {
82 
83 }

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 112 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 85 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 101 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 107 of file ARICHAerogelHist.h.


The documentation for this class was generated from the following files:
Belle2::ARICHAerogelHist::m_aerogelAriGapDeltaPhiCenter
std::vector< double > m_aerogelAriGapDeltaPhiCenter
Angle opening (phi) of the air gap between aerogel tiles.
Definition: ARICHAerogelHist.h:107
Belle2::ARICHAerogelHist::m_verboseLevel
Int_t m_verboseLevel
Verbose level.
Definition: ARICHAerogelHist.h:108
Belle2::ARICHAerogelHist::makeRotation
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.
Definition: ARICHAerogelHist.cc:101
Belle2::ARICHAerogelHist::m_tileRmin
std::vector< double > m_tileRmin
Minimum radius of aerogel ring.
Definition: ARICHAerogelHist.h:101
Belle2::ARICHAerogelHist::m_tileRmax
std::vector< double > m_tileRmax
Maximum radius of aerogel ring.
Definition: ARICHAerogelHist.h:102
Belle2::ARICHAerogelHist::SetInitialParametersByDefault
void SetInitialParametersByDefault()
Function which set initial values of input parameters.
Definition: ARICHAerogelHist.cc:214
Belle2::ARICHAerogelHist::dumpVerticesMap
void dumpVerticesMap()
Function to print vertices for one aerogel tile.
Definition: ARICHAerogelHist.cc:147
Belle2::ARICHAerogelHist::m_verticesMap
std::map< Int_t, std::vector< TVector2 > > m_verticesMap
Aerogel vertices map.
Definition: ARICHAerogelHist.h:113
Belle2::ARICHAerogelHist::SetUpVerticesMap
void SetUpVerticesMap()
Function for calculation vertices for one aerogel tile.
Definition: ARICHAerogelHist.cc:160
Belle2::ARICHAerogelHist::m_histName
TString m_histName
Histogram name.
Definition: ARICHAerogelHist.h:115
Belle2::ARICHAerogelHist::m_histTitle
TString m_histTitle
Histogram title.
Definition: ARICHAerogelHist.h:116
Belle2::ARICHAerogelHist::m_tileDeltaPhiCenter
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...
Definition: ARICHAerogelHist.h:105
Belle2::ARICHAerogelHist::m_nTiles
std::vector< Int_t > m_nTiles
Number of tiles per ring.
Definition: ARICHAerogelHist.h:100