10#include <arich/utility/ARICHAerogelHist.h>
37 std::cout << setw(10) <<
"ring" << setw(10) <<
"nTiles" << setw(10) <<
"tileRmin" << setw(10) <<
"tileRmax" << std::endl;
38 for (
unsigned int i = 0; i <
m_nTiles.size(); i++)
60 for (Int_t j = 0; j <
m_nTiles[iR]; j++) {
61 phi = phi0 + deltaPhi * j;
66 for (
unsigned int i = 0; i < n; i++) {
67 xold = m.second[i].X();
68 yold = m.second[i].Y();
86 unsigned int ringu = ring;
88 if (ringu >
m_nTiles.size() || ringu < 1)
90 if (column >
m_nTiles[ring - 1] || column < 1)
92 for (Int_t i = 1; i < ring; i++)
94 return binID + column;
100 xnew = xold * std::cos(phi) - yold * std::sin(phi);
101 ynew = xold * std::sin(phi) + yold * std::cos(phi);
107 TCanvas* c1 =
new TCanvas(
"c1",
"c1", 1000, 1000);
110 c1->SetRightMargin(0.17);
111 c1->SetLeftMargin(0.12);
112 c1->SetTopMargin(0.15);
113 c1->SetBottomMargin(0.15);
115 TH2F* frame =
new TH2F(
"h2",
"h2", 40, -1200, 1200, 40, -1200, 1200);
117 frame->GetXaxis()->SetTitle(
"x (mm)");
118 frame->GetYaxis()->SetTitle(
"y (mm)");
119 frame->GetXaxis()->CenterTitle();
120 frame->GetYaxis()->CenterTitle();
121 frame->GetYaxis()->SetTitleOffset(1.5);
122 frame->SetStats(kFALSE);
129 if (outDirName.Length() > 0) {
130 std::cout <<
"outDirName.Length() " << outDirName.Length() << std::endl;
131 TString outnamePDF = outDirName; outnamePDF +=
m_histName; outnamePDF +=
".pdf";
132 TString outnameEPS = outDirName; outnameEPS +=
m_histName; outnameEPS +=
".eps";
133 c1->SaveAs(outnamePDF.Data());
134 c1->SaveAs(outnameEPS.Data());
144 std::cout <<
" --> Aerogel ring : " << m.first <<
'\n';
145 for (i = 0; i < m.second.size(); i++) {
146 std::cout <<
" " << setw(15) << m.second[i].X() << setw(15) << m.second[i].Y() << std::endl;
155 for (
unsigned int i = 0; i <
m_nTiles.size(); i++) {
156 std::vector<ROOT::Math::XYVector> vecTvec;
162 double phimin = lmin / rmin;
163 double phimax = lmax / rmax;
164 double x1 = rmin * TMath::Cos(phimin / 2.0);
165 double y1 = rmin * TMath::Sin(phimin / 2.0);
166 ROOT::Math::XYVector v1(x1, y1);
167 vecTvec.push_back(v1);
168 double x2 = rmax * TMath::Cos(phimax / 2.0);
169 double y2 = rmax * TMath::Sin(phimax / 2.0);
170 ROOT::Math::XYVector v2(x2, y2);
171 vecTvec.push_back(v2);
176 const double phi = phimax / 2.0 - dPhi * (j + 1);
177 ROOT::Math::XYVector v(rmax * std::cos(phi), rmax * std::sin(phi));
178 vecTvec.push_back(v);
184 ROOT::Math::XYVector v3(x3, y3);
185 vecTvec.push_back(v3);
188 ROOT::Math::XYVector v4(x4, y4);
189 vecTvec.push_back(v4);
194 const double phi = -phimax / 2.0 + dPhi * (j + 1);
195 ROOT::Math::XYVector v(rmax * std::cos(phi), rmax * std::sin(phi));
196 vecTvec.push_back(v);
200 vecTvec.push_back(v1);
230 for (
unsigned int i = 0; i <
m_nTiles.size(); i++) {
TString m_histTitle
Histogram title.
TString m_histName
Histogram name.
Int_t m_verboseLevel
Verbose level.
std::vector< double > m_tileRmax
Maximum radius of aerogel ring.
std::map< Int_t, std::vector< ROOT::Math::XYVector > > m_verticesMap
Aerogel vertices map.
void SetUpVerticesMap()
Function for calculation vertices for one aerogel tile.
std::vector< Int_t > m_nTiles
Number of tiles per ring.
std::vector< double > m_tileRcenter
Center radius of aerogel ring.
void SetInitialParametersByDefault()
Function which set initial values of input parameters.
Int_t m_nCircularPoints
Number of circular points.
ARICHAerogelHist()
Default constructor.
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.
Int_t GetBinIDFromRingColumn(Int_t ring, Int_t column)
Function which return histogram bin id from ring and column id's.
double m_aerogelTileGap
Distance 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.
void DrawHisto(TString opt, TString outDirName)
Function to draw the histogram.
Abstract base class for different kinds of events.