214 gStyle->SetNumberContours(99);
225 printf(
"Introduction:\n");
231 Double_t ZRangeL = 1e00;
232 Double_t ZRangeU = 1e05;
233 Double_t mm2bin = 2.5;
239 TFile* oldFile = gFile;
240 TDirectory* oldDir = gDirectory;
242 tFile =
new TFile(
"CbmTrdHitRateQa.root",
"RECREATE",
" ROOT file with histograms");
248 TH1F* h1HitPad = NULL;
249 TH2F* h2Layer = NULL;
250 TH2F* h2Topview[3] = {NULL, NULL, NULL};
255 c0 =
new TCanvas(
"c0",
"c0", 1800, 450);
258 const Int_t z_cave = 12000;
260 new TH2F(
"TopView",
"TopView",
int(2 *
winsize / mm2bin), -
winsize,
winsize,
int(z_cave / mm2bin), 0, z_cave);
261 h2Topview[0]->SetXTitle(
"x-Coordinate [mm]");
262 h2Topview[0]->SetYTitle(
"z-Coordinate [mm]");
263 h2Topview[0]->SetZTitle(
"#");
266 h2Topview[1]->SetXTitle(
"x-Coordinate [mm]");
267 h2Topview[1]->SetYTitle(
"y-Coordinate [mm]");
268 h2Topview[1]->SetZTitle(
"#");
270 new TH2F(
"SideView",
"SideView",
int(z_cave / mm2bin), 0, z_cave,
int(2 *
winsize / mm2bin), -
winsize,
winsize);
271 h2Topview[2]->SetXTitle(
"z-Coordinate [mm]");
272 h2Topview[2]->SetYTitle(
"y-Coordinate [mm]");
273 h2Topview[2]->SetZTitle(
"#");
274 for (Int_t i = 0; i < 3; i++) {
275 h2Topview[i]->SetContour(99);
276 h2Topview[i]->SetStats(kFALSE);
277 h2Topview[i]->GetXaxis()->SetLabelSize(0.02);
278 h2Topview[i]->GetYaxis()->SetLabelSize(0.02);
279 h2Topview[i]->GetZaxis()->SetLabelSize(0.02);
280 h2Topview[i]->GetXaxis()->SetTitleSize(0.02);
281 h2Topview[i]->GetXaxis()->SetTitleOffset(1.5);
282 h2Topview[i]->GetYaxis()->SetTitleSize(0.02);
283 h2Topview[i]->GetYaxis()->SetTitleOffset(2);
284 h2Topview[i]->GetZaxis()->SetTitleSize(0.02);
285 h2Topview[i]->GetZaxis()->SetTitleOffset(-2);
288 h2Topview[i]->Draw(
"colz");
291 for (Int_t i = 0; i < TColor::GetNumberOfColors(); i++)
292 printf(
"%2i %3i\n", i, TColor::GetColorPalette(i));
314 for (Int_t i = 0; i < NofModules; i++) {
324 cout <<
"module " << i + 1 <<
": ID " << ModuleID <<
" - P" <<
fPlane <<
" S" <<
fStation <<
" L" <<
fLayer << endl;
327 if (
fPlane == 0) Plane01.push_back(ModuleID);
328 if (
fPlane == 1) Plane02.push_back(ModuleID);
329 if (
fPlane == 2) Plane03.push_back(ModuleID);
330 if (
fPlane == 3) Plane04.push_back(ModuleID);
331 if (
fPlane == 4) Plane05.push_back(ModuleID);
332 if (
fPlane == 5) Plane06.push_back(ModuleID);
333 if (
fPlane == 6) Plane07.push_back(ModuleID);
334 if (
fPlane == 7) Plane08.push_back(ModuleID);
335 if (
fPlane == 8) Plane09.push_back(ModuleID);
336 if (
fPlane == 9) Plane10.push_back(ModuleID);
339 vector<vector<int>> LiSi;
346 LiSi.push_back(Plane01);
347 LiSi.push_back(Plane02);
348 LiSi.push_back(Plane03);
349 LiSi.push_back(Plane04);
350 LiSi.push_back(Plane05);
351 LiSi.push_back(Plane06);
352 LiSi.push_back(Plane07);
353 LiSi.push_back(Plane08);
354 LiSi.push_back(Plane09);
355 LiSi.push_back(Plane10);
357 size_t buf_size = 200;
358 Char_t OutFile1[buf_size];
359 Char_t OutFile2[buf_size];
361 TImage* Outimage1 = NULL;
362 TImage* Outimage2 = NULL;
364 TLine* MaxHitRatePerPad =
new TLine(1e05, 0, 1e05, 1e04);
365 MaxHitRatePerPad->SetLineColor(2);
366 MaxHitRatePerPad->SetLineWidth(8);
376 for (vector<vector<int>>::size_type j = 0; j < LiSi.size(); j++) {
383 UInt_t nModulesInThisLayer = LiSi[j].size();
386 h2Topview[0]->Reset();
387 h2Topview[1]->Reset();
388 h2Topview[2]->Reset();
390 snprintf(OutFile1, buf_size - 1,
"pics/HitRateLayerPadView_S%d_L%d.png",
fStation,
fLayer);
391 snprintf(OutFile2, buf_size - 1,
"pics/HitRateLayerSpectrum_S%d_L%d.png",
fStation,
fLayer);
393 HistoInit(c1, c2, h2Layer, h1HitPad, ZRangeL, ZRangeU, mm2bin);
395 if (
fDraw) MaxHitRatePerPad->Draw(
"same");
400 for (vector<int>::size_type i = 0; i < nModulesInThisLayer; i++)
401 GetModuleInformationFromDigiPar(GeoPara, Fast, Lines, LiSi[j][i], h2Layer, c1, h1HitPad, c2, h2Topview, c0,
405 c1->cd(1)->SetLogz(1);
406 h2Layer->Draw(
"colz");
410 for (vector<int>::size_type i = 0; i < nModulesInThisLayer; i++)
411 GetModuleInformationFromDigiPar(GeoPara, Fast, Lines, LiSi[j][i], h2Layer, c1, h1HitPad, c2, h2Topview, c0,
416 Outimage1 = TImage::Create();
417 Outimage1->FromPad(c1);
418 Outimage1->WriteImage(OutFile1);
424 h1HitPad->Draw(
"same");
425 Outimage2 = TImage::Create();
426 Outimage2->FromPad(c2);
427 Outimage2->WriteImage(OutFile2);
447 if (
fDraw) c0->Update();
450 if (
fDraw) c0->Update();
461 Double_t ZRangeU, Double_t mm2bin)
463 size_t buf_size = 50;
464 Char_t name[buf_size];
465 Char_t title[buf_size];
468 snprintf(title, buf_size - 1,
"Station %d, Layer %d",
fStation,
fLayer);
469 printf(
"%s\n", title);
473 Layer->SetContour(99);
474 Layer->SetXTitle(
"x-Coordinate [mm]");
475 Layer->SetYTitle(
"y-Coordinate [mm]");
476 Layer->SetZTitle(
"Hits/Pad [Hz]");
477 Layer->SetStats(kFALSE);
478 Layer->GetXaxis()->SetLabelSize(0.02);
479 Layer->GetYaxis()->SetLabelSize(0.02);
480 Layer->GetZaxis()->SetLabelSize(0.02);
481 Layer->GetXaxis()->SetTitleSize(0.02);
482 Layer->GetXaxis()->SetTitleOffset(1.5);
483 Layer->GetYaxis()->SetTitleSize(0.02);
484 Layer->GetYaxis()->SetTitleOffset(2);
485 Layer->GetZaxis()->SetTitleSize(0.02);
486 Layer->GetZaxis()->SetTitleOffset(-2);
487 Layer->GetZaxis()->SetRangeUser(ZRangeL, ZRangeU);
490 snprintf(title, buf_size - 1,
"HitPad_Station %d, Layer %d",
fStation,
fLayer);
491 HitPad =
new TH1F(name, title, 10000, 1e00, 1e06);
492 HitPad->SetXTitle(
"Hits/Pad [Hz]");
493 HitPad->SetYTitle(
"count");
494 HitPad->GetYaxis()->SetRangeUser(1, 1e04);
497 snprintf(title, buf_size - 1,
"c1 Station %d, Layer %d",
fStation,
fLayer);
499 c1 =
new TCanvas(name, title, 1000, 900);
501 c1->cd(1)->SetLogz(1);
505 snprintf(title, buf_size - 1,
"c2 Station %d, Layer %d",
fStation,
fLayer);
507 c2 =
new TCanvas(name, title, 1000, 900 / 2);
509 c2->cd(1)->SetLogx(1);
510 c2->cd(1)->SetLogy(1);
511 c2->cd(1)->SetGridx(1);
512 c2->cd(1)->SetGridy(1);
571 Int_t VolumeID, TH2F* Layer, TCanvas* c1, TH1F* HitPad,
572 TCanvas* c2, TH2F* Topview[3], TCanvas* c0, Double_t mm2bin)
582 if (fModuleInfo != NULL) {
593 GeoPara->
mPos[0] = fModuleGeo->
GetX() * 10;
594 GeoPara->
mPos[1] = fModuleGeo->
GetY() * 10;
595 GeoPara->
mPos[2] = fModuleGeo->
GetZ() * 10;
599 GeoPara->
mSize[2] = 0;
604 for (Int_t s = 0; s < GeoPara->
nSec; s++)
606 GeoPara->
sCol[s] = 0;
607 GeoPara->
sRow[s] = 0;
609 fModuleInfo->
GetPosition( s, 0, 0, padPos, padSize);
610 GeoPara->
pSize[s][2] = 0;
612 for (Int_t i = 0; i < 2; i++)
614 GeoPara->
pSize[s][i] = padSize[i] * 10;
619 if (GeoPara->
sSize[s][i] < 2 * GeoPara->
mSize[i])
621 GeoPara->
sCol[s] = round(GeoPara->
sSize[s][i] / GeoPara->
pSize[s][i]);
626 GeoPara->
sCol[s] = round(GeoPara->
sSize[s][i] / GeoPara->
pSize[s][i]);
628 GeoPara->
sCol[s] = 0;
636 if (GeoPara->
sSize[s][i] < 2 * GeoPara->
mSize[i])
638 GeoPara->
sRow[s] = round(GeoPara->
sSize[s][i] / GeoPara->
pSize[s][i]);
643 GeoPara->
sRow[s] = round(GeoPara->
sSize[s][i] / GeoPara->
pSize[s][i]);
645 GeoPara->
sRow[s] = 0;
658 itemp = GeoPara->
nRow;
660 GeoPara->
nCol = itemp;
662 for (Int_t s = 0; s < GeoPara->
nSec; s++)
664 dtemp = GeoPara->
sRow[s];
665 GeoPara->
sRow[s] = GeoPara->
sCol[s];
666 GeoPara->
sCol[s] = dtemp;
668 dtemp = GeoPara->
sSize[s][0];
670 GeoPara->
sSize[s][1] = dtemp;
672 dtemp = GeoPara->
pSize[s][0];
674 GeoPara->
pSize[s][1] = dtemp;
676 cout <<
"swapped x and y" << endl;
680 fModuleInfo->
GetPosition( 0, 0, 0, padPos, padSize);
681 GeoPara->
vOrigin[0] = padPos[0] * 10;
682 GeoPara->
vOrigin[1] = padPos[1] * 10;
683 GeoPara->
vOrigin[2] = padPos[2] * 10;
686 fModuleInfo->
GetPosition( 0, 1, 0, padPos, padSize);
687 GeoPara->
vX[0] = padPos[0] * 10 - GeoPara->
vOrigin[0];
688 GeoPara->
vX[1] = padPos[1] * 10 - GeoPara->
vOrigin[1];
689 GeoPara->
vX[2] = padPos[2] * 10 - GeoPara->
vOrigin[2];
693 fModuleInfo->
GetPosition( 1, 0, 0, padPos, padSize);
694 GeoPara->
vY[0] = padPos[0] * 10 - GeoPara->
vOrigin[0];
695 GeoPara->
vY[1] = padPos[1] * 10 - GeoPara->
vOrigin[1];
696 GeoPara->
vY[2] = padPos[2] * 10 - GeoPara->
vOrigin[2];
699 GeoPara->
vN[0] = GeoPara->
vX[1] * GeoPara->
vY[2] - GeoPara->
vX[2] * GeoPara->
vY[1];
700 GeoPara->
vN[1] = GeoPara->
vX[2] * GeoPara->
vY[0] - GeoPara->
vX[0] * GeoPara->
vY[2];
701 GeoPara->
vN[2] = GeoPara->
vX[0] * GeoPara->
vY[1] - GeoPara->
vX[1] * GeoPara->
vY[0];
708 GeoPara->
cosX = (GeoPara->
vX[0] * 1 + GeoPara->
vX[1] * 0 + GeoPara->
vX[2] * 0)
709 /
sqrt(pow(GeoPara->
vX[0], 2) + pow(GeoPara->
vX[1], 2) + pow(GeoPara->
vX[2], 2));
711 GeoPara->
cosY = (GeoPara->
vY[0] * 0 + GeoPara->
vY[1] * 1 + GeoPara->
vY[2] * 0)
712 /
sqrt(pow(GeoPara->
vY[0], 2) + pow(GeoPara->
vY[1], 2) + pow(GeoPara->
vY[2], 2));
717 if (GeoPara->
cosX > 1) GeoPara->
cosX = 1;
718 if (GeoPara->
cosX < -1) GeoPara->
cosX = -1;
719 if (GeoPara->
cosY > 1) GeoPara->
cosY = 1;
720 if (GeoPara->
cosY < -1) GeoPara->
cosY = -1;
724 if (GeoPara->
vX[0] != 0)
726 fabs(GeoPara->
vX[0]) / (GeoPara->
vX[0]);
729 -fabs(GeoPara->
vX[1]) / (GeoPara->
vX[1]);
731 if (GeoPara->
vY[1] != 0)
733 fabs(GeoPara->
vY[1]) / (GeoPara->
vY[1]);
736 -fabs(GeoPara->
vY[0]) / (GeoPara->
vY[0]);
741 for (Int_t i = 0; i < 3; i++)
743 Mpos[i] = GeoPara->
mPos[i];
744 Msize[i] = GeoPara->
mSize[i];
747 cout.setf(ios::fixed);
750 cout <<
"pos " << setw(6) << Mpos[0] << setw(6) << Mpos[1] << setw(6) << Mpos[2] <<
" size " << setw(6)
751 << Msize[0] << setw(6) << Msize[1] << setw(6) << Msize[2] << endl;
756 Double_t Ssize[3 * nSec];
757 Double_t Psize[3 * nSec];
758 for (Int_t iSec = 0; iSec < nSec; iSec++)
760 Ssize[0 + iSec * nSec] = GeoPara->
sSize[iSec][0];
761 Ssize[1 + iSec * nSec] = GeoPara->
sSize[iSec][1];
762 Ssize[2 + iSec * nSec] = 0;
764 Psize[0 + iSec * nSec] = GeoPara->
pSize[iSec][0];
765 Psize[1 + iSec * nSec] = GeoPara->
pSize[iSec][1];
766 Psize[2 + iSec * nSec] = 0;
770 cout <<
"sec " << setw(10) << Ssize[0] << setw(10) << Ssize[1] << setw(10) << Ssize[3] << setw(10) << Ssize[4]
771 << setw(10) << Ssize[6] << setw(10) << Ssize[7] << endl;
775 cout <<
"pad " << setw(10) << Psize[0] << setw(10) << Psize[1] << setw(10) << Psize[3] << setw(10) << Psize[4]
776 << setw(10) << Psize[6] << setw(10) << Psize[7] << endl;
779 Int_t nCol = GeoPara->
nCol;
780 Int_t nRow = GeoPara->
nRow;
786 cout <<
"col0 " << setw(10) << GeoPara->
sCol[0] <<
" row0 " << setw(10) << GeoPara->
sRow[0] << endl;
787 cout <<
"col1 " << setw(10) << GeoPara->
sCol[1] <<
" row1 " << setw(10) << GeoPara->
sRow[1] << endl;
788 cout <<
"col2 " << setw(10) << GeoPara->
sCol[2] <<
" row2 " << setw(10) << GeoPara->
sRow[2] << endl;
789 cout <<
"col " << setw(10) << nCol <<
" row " << setw(10) << nRow << endl;
791 cout <<
"mcol " << setw(10) << mCol <<
" mrow " << setw(10) << mRow << endl;
830 cout <<
"vX0 " << setw(10) << GeoPara->
vX[0] << endl;
831 cout <<
"vX1 " << setw(10) << GeoPara->
vX[1] << endl;
832 cout <<
"vY0 " << setw(10) << GeoPara->
vY[0] << endl;
833 cout <<
"vY1 " << setw(10) << GeoPara->
vY[1] << endl;
835 cout <<
"cos " << setw(10) << GeoPara->
cosX << setw(10) << GeoPara->
cosY << endl;
836 cout <<
"v00xy " << setw(10) << GeoPara->
mPos[0] - GeoPara->
vOrigin[0] << setw(10)
875 if (Lines) cout <<
"------------------------------------------------------" << endl;
877 Topview[0]->Fill(GeoPara->
mPos[0], GeoPara->
mPos[2]);
878 Topview[1]->Fill(GeoPara->
mPos[0], GeoPara->
mPos[1]);
879 Topview[2]->Fill(GeoPara->
mPos[2], GeoPara->
mPos[1]);
886 Histo(GeoPara, Fast, Layer, c1, HitPad, c2, Topview, c0, mm2bin);
890 for (Int_t s = 0; s < GeoPara->
nSec; s++)
892 fModuleInfo->
GetPosition( s, 0, 0, padPos, padSize);
894 TPolyMarker* start =
new TPolyMarker(1);
895 start->SetPoint(0, padPos(0) * 10, padPos(1) * 10);
896 start->SetMarkerStyle(22);
897 start->SetMarkerSize(.8);
906 TPolyMarker* end =
new TPolyMarker(1);
907 end->SetPoint(0, padPos(0) * 10, padPos(1) * 10);
908 end->SetMarkerStyle(20);
909 end->SetMarkerSize(.8);
919 printf(
"fModuleInfo == NULL\n");
924 Double_t StartY, Double_t , Int_t ySteps, Double_t* ,
925 TH2F* Topview[3], TCanvas* )
928 Double_t HitRate = 0;
935 Double_t xStepWidth = GeoPara->
cosX;
936 Double_t yStepWidth = GeoPara->
cosY;
937 Double_t
x = StartX + 0.5 * GeoPara->
cosX;
938 Double_t
y = StartY + 0.5 * GeoPara->
cosY;
944 Double_t z = (GeoPara->
lambda - (
x * GeoPara->
vN[0] +
y * GeoPara->
vN[1])) / GeoPara->
vN[2];
945 for (Int_t yStep = 0; yStep < ySteps; yStep++) {
946 x = StartX + 0.5 * GeoPara->
cosX;
948 for (Int_t xStep = 0; xStep < xSteps; xStep++) {
949 z = (GeoPara->
lambda - (
x * GeoPara->
vN[0] +
y * GeoPara->
vN[1])) / GeoPara->
vN[2];
950 r =
sqrt(pow(
x, 2) + pow(
y, 2));
951 alpha = atan(r / z) * 1000.;
960 exp(4.536355e00 + -8.393716e-03 * alpha) +
exp(2.400547e01 + -1.208306e-02 * alpha) / (z * z);
962 Topview[0]->Fill(
x, z);
963 Topview[1]->Fill(
x,
y);
964 Topview[2]->Fill(z,
y);
975 TCanvas* , TH2F* Topview[3], TCanvas* c0, Double_t mm2bin)
977 Double_t ZRangeL = 1e00;
978 Double_t ZRangeU = 1e05;
982 name.Form(
"ModuleID %5d", GeoPara->
moduleId);
984 cout <<
" " << name <<
"\n" << flush;
986 name.Form(
"Module%05d", GeoPara->
moduleId);
988 if (GeoPara->
mSize[0] < 500)
989 h2Module =
new TH2F(name, name, 600 / mm2bin + 1, -300.5, 300.5, 600 / mm2bin + 1, -300.5,
992 h2Module =
new TH2F(name, name, 1000 / mm2bin + 1, -500.5, 500.5, 1000 / mm2bin + 1, -500.5,
995 h2Module->GetZaxis()->SetRangeUser(ZRangeL, ZRangeU);
997 name.Form(
"Module%05dHitPad", GeoPara->
moduleId);
998 TH1F* h1HitPadModule =
new TH1F(name, name, 1200, 0, 120000);
1006 Double_t HiteRate = 0;
1011 Double_t planeStartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1012 Double_t planeStopX = planeStartX + GeoPara->
pSize[iSecX][0];
1014 Double_t planeStartY = GeoPara->
mPos[1] - GeoPara->
mSize[1];
1015 Double_t planeStopY = planeStartY + GeoPara->
pSize[iSecY][1];
1017 Double_t StartX = GeoPara->
vOrigin[0]
1018 + 0.5 * GeoPara->
pSize[iSecX][0] * GeoPara->
cosX;
1019 Double_t StopX = StartX + GeoPara->
pSize[iSecX][0] * GeoPara->
cosX;
1021 Double_t StartY = GeoPara->
vOrigin[1] + 0.5 * GeoPara->
pSize[iSecY][1] * GeoPara->
cosY;
1022 Double_t StopY = StartY + GeoPara->
pSize[iSecY][1] * GeoPara->
cosY;
1038 for (Int_t iR = 0; iR < GeoPara->
nRow; iR++)
1040 StartX = GeoPara->
vOrigin[0] + 0.5 * GeoPara->
pSize[iSecX][0] * GeoPara->
cosX;
1041 StopX = StartX + GeoPara->
pSize[iSecX][0] * GeoPara->
cosX;
1042 planeStartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1043 planeStopX = planeStartX + GeoPara->
pSize[iSecX][0];
1045 for (Int_t iC = 0; iC < GeoPara->
nCol; iC++)
1047 xSteps = GeoPara->
pSize[iSecX][0] - 1;
1048 ySteps = GeoPara->
pSize[iSecY][1] - 1;
1053 if (GeoPara->
mPos[0] < 1 && GeoPara->
mPos[1] < 1)
1055 HiteRate =
CalcHitRate(GeoPara, StartX, StopX, xSteps, StartY, StopY, ySteps, GeoPara->
mPos, Topview, c0);
1056 h1HitPad->Fill(HiteRate, 4);
1062 HiteRate =
CalcHitRate(GeoPara, StartX, StopX, xSteps, StartY, StopY, ySteps, GeoPara->
mPos, Topview, c0);
1063 h1HitPad->Fill(HiteRate);
1064 h1HitPadModule->Fill(HiteRate);
1069 Int_t mStepX = Int_t((planeStartX - GeoPara->
mPos[0]));
1070 Int_t mStepY = Int_t((planeStartY - GeoPara->
mPos[1]));
1072 for (Int_t stepY =
int(planeStartY / mm2bin); stepY < int(planeStopY / mm2bin); stepY++) {
1075 for (Int_t stepX =
int(planeStartX / mm2bin); stepX < int(planeStopX / mm2bin); stepX++) {
1080 if (GeoPara->
mPos[0] < 1 && GeoPara->
mPos[1] < 1) {
1082 h2Layer->SetBinContent(stepX +
int(
winsize / mm2bin), stepY +
int(
winsize / mm2bin),
1084 h2Layer->SetBinContent(-1 * stepX +
int(
winsize / mm2bin), stepY +
int(
winsize / mm2bin),
1086 h2Layer->SetBinContent(stepX +
int(
winsize / mm2bin), -1 * stepY +
int(
winsize / mm2bin),
1088 h2Layer->SetBinContent(-1 * stepX +
int(
winsize / mm2bin), -1 * stepY +
int(
winsize / mm2bin),
1093 h2Module->Fill(mStepX, mStepY,
1102 h2Layer->SetBinContent(stepX +
int(
winsize / mm2bin), stepY +
int(
winsize / mm2bin),
1108 cout <<
"filling 5 " << mStepX <<
" " << mStepY <<
" " << HiteRate << endl;
1109 h2Module->Fill(mStepX, mStepY,
1124 if (iC == GeoPara->
sCol[iSecX]) {
1141 if (iR == GeoPara->
sRow[iSecY]) {
1158 for (Int_t i = 0; i < 3; i++)
1159 Topview[i]->Write(
"", TObject::kOverwrite);
1161 h2Layer->Write(
"", TObject::kOverwrite);
1162 h1HitPad->Write(
"", TObject::kOverwrite);
1163 h2Module->Write(
"", TObject::kOverwrite);
1164 h1HitPadModule->Write(
"", TObject::kOverwrite);
1167 delete h1HitPadModule;
1174 Double_t SecXStart = 0.0;
1175 Double_t SecYStart = 0.0;
1176 Double_t SecXStop = 0.0;
1177 Double_t SecYStop = 0.0;
1179 for (Int_t iSec = 0; iSec < GeoPara->
nSec - 1; iSec++)
1182 if (GeoPara->
sSize[iSec][0] < 2 * GeoPara->
mSize[0] && GeoPara->
sSize[iSec][0] > 0)
1184 SecXStart += GeoPara->
sSize[iSec][0];
1185 SecXStop = SecXStart;
1189 SecXStop = GeoPara->
sSize[iSec][0];
1192 if (GeoPara->
sSize[iSec][1] < 2 * GeoPara->
mSize[1] && GeoPara->
sSize[iSec][1] > 0)
1194 SecYStart += GeoPara->
sSize[iSec][1];
1195 SecYStop = SecYStart;
1199 SecYStop = GeoPara->
sSize[iSec][1];
1204 new TLine(GeoPara->
mPos[0] - GeoPara->
mSize[0] + SecXStart, GeoPara->
mPos[1] - GeoPara->
mSize[1] + SecYStart,
1205 GeoPara->
mPos[0] - GeoPara->
mSize[0] + SecXStop, GeoPara->
mPos[1] - GeoPara->
mSize[1] + SecYStop);
1206 sector->SetLineColor(15);
1207 sector->SetLineStyle(2);
1209 TPolyMarker* corner =
new TPolyMarker(1);
1212 corner->SetMarkerStyle(21);
1213 corner->SetMarkerSize(.8);
1217 sector->Draw(
"same");
1218 corner->Draw(
"same");
1224 TBox* module =
new TBox(GeoPara->
mPos[0] - GeoPara->
mSize[0], GeoPara->
mPos[1] - GeoPara->
mSize[1],
1226 module->SetFillStyle(0);
1227 module->SetLineColor(1);
1230 new TBox(GeoPara->
mPos[0] - 100, GeoPara->
mPos[1] - 100, GeoPara->
mPos[0] + 100, GeoPara->
mPos[1] + 100);
1232 M_inner->SetFillColor(kWhite);
1236 module->Draw("same");
1238 c1->Write(
"", TObject::kOverwrite);
1253 Double_t StartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1254 Double_t StartY = GeoPara->
mPos[1] - GeoPara->
mSize[1];
1256 Int_t SecCol = GeoPara->
sCol[iSecX];
1257 Int_t SecRow = GeoPara->
sRow[iSecY];
1259 for (Int_t iR = 0; iR < GeoPara->
nRow; iR++)
1261 StartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1262 for (Int_t iC = 0; iC < GeoPara->
nCol; iC++)
1264 TLine* Pa =
new TLine(StartX,
1265 StartY, StartX + GeoPara->
pSize[iSecX][0], StartY);
1266 TLine* Pb =
new TLine(StartX,
1267 StartY + GeoPara->
pSize[iSecY][1], StartX + GeoPara->
pSize[iSecX][0],
1268 StartY + GeoPara->
pSize[iSecY][1]);
1269 TLine* Pc =
new TLine(StartX,
1270 StartY, StartX, StartY + GeoPara->
pSize[iSecY][1]);
1271 TLine* Pd =
new TLine(StartX + GeoPara->
pSize[iSecX][0],
1272 StartY, StartX + GeoPara->
pSize[iSecX][0], StartY + GeoPara->
pSize[iSecY][1]);
1274 Pa->SetLineColor(17);
1278 Pb->SetLineColor(17);
1282 Pc->SetLineColor(17);
1286 Pd->SetLineColor(17);
1292 if (iC == SecCol - 1) {
1294 SecCol += GeoPara->
sCol[iSecX];
1296 StartX += GeoPara->
pSize[iSecX][0];
1299 if (iR == SecRow - 1) {
1301 SecRow += GeoPara->
sRow[iSecY];
1303 StartY += GeoPara->
pSize[iSecY][1];