12 #include <arich/utility/ARICHAerogelHist.h>
32 ARICHAerogelHist::ARICHAerogelHist(
const char* name,
const char* title) : TH2Poly(), m_histName(name), m_histTitle(title)
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++)
63 for (Int_t j = 0; j <
m_nTiles[iR]; j++) {
64 phi = phi0 + deltaPhi * j;
69 for (
unsigned int i = 0; i < n; i++) {
70 xold = m.second[i].X();
71 yold = m.second[i].Y();
89 unsigned int ringu = ring;
91 if (ringu >
m_nTiles.size() || ringu < 1)
93 if (column >
m_nTiles[ring - 1] || column < 1)
95 for (Int_t i = 1; i < ring; i++)
97 return binID + column;
104 TVector2 v(xold, yold);
106 vrot = v.Rotate(phi);
115 TCanvas* c1 =
new TCanvas(
"c1",
"c1", 1000, 1000);
118 c1->SetRightMargin(0.17);
119 c1->SetLeftMargin(0.12);
120 c1->SetTopMargin(0.15);
121 c1->SetBottomMargin(0.15);
123 TH2F* frame =
new TH2F(
"h2",
"h2", 40, -1200, 1200, 40, -1200, 1200);
125 frame->GetXaxis()->SetTitle(
"x (mm)");
126 frame->GetYaxis()->SetTitle(
"y (mm)");
127 frame->GetXaxis()->CenterTitle();
128 frame->GetYaxis()->CenterTitle();
129 frame->GetYaxis()->SetTitleOffset(1.5);
130 frame->SetStats(kFALSE);
137 if (outDirName.Length() > 0) {
138 std::cout <<
"outDirName.Length() " << outDirName.Length() << std::endl;
139 TString outnamePDF = outDirName; outnamePDF +=
m_histName; outnamePDF +=
".pdf";
140 TString outnameEPS = outDirName; outnameEPS +=
m_histName; outnameEPS +=
".eps";
141 c1->SaveAs(outnamePDF.Data());
142 c1->SaveAs(outnameEPS.Data());
152 std::cout <<
" --> Aerogel ring : " << m.first <<
'\n';
153 for (i = 0; i < m.second.size(); i++) {
154 std::cout <<
" " << setw(15) << m.second[i].X() << setw(15) << m.second[i].Y() << std::endl;
163 for (
unsigned int i = 0; i <
m_nTiles.size(); i++) {
164 std::vector<TVector2> vecTvec;
170 double phimin = lmin / rmin;
171 double phimax = lmax / rmax;
172 double x1 = rmin * TMath::Cos(phimin / 2.0);
173 double y1 = rmin * TMath::Sin(phimin / 2.0);
175 vecTvec.push_back(v1);
176 double x2 = rmax * TMath::Cos(phimax / 2.0);
177 double y2 = rmax * TMath::Sin(phimax / 2.0);
179 vecTvec.push_back(v2);
185 v.SetMagPhi(rmax, (phimax / 2.0 - dPhi * (j + 1)));
186 vecTvec.push_back(v);
193 vecTvec.push_back(v3);
197 vecTvec.push_back(v4);
203 v.SetMagPhi(rmin, (-phimax / 2.0 + dPhi * (j + 1)));
204 vecTvec.push_back(v);
208 vecTvec.push_back(v1);
238 for (
unsigned int i = 0; i <
m_nTiles.size(); i++) {