12 #include "FairRootManager.h"
13 #include "FairRunAna.h"
14 #include "FairRuntimeDb.h"
18 #include "TClonesArray.h"
20 #include "TGeoManager.h"
25 #include "TPolyMarker.h"
29 #include "Riostream.h"
35 #define winsize 2000 // 1500 // 5500 // 6000
103 , fPRFHitPositionLL(0.)
104 , fPRFHitPositionC(0.)
107 , fDigiCollection(NULL)
108 , fDigiMatchCollection(NULL)
131 cout <<
" * CbmTrdHitRateQa * :: SetParContainers() " << endl;
135 FairRunAna* ana = FairRunAna::Instance();
136 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
147 cout <<
" * CbmTrdHitRateQa * :: ReInit() " << endl;
150 FairRunAna* ana = FairRunAna::Instance();
151 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
164 cout <<
" * CbmTrdHitRate * :: Init() " << endl;
166 FairRootManager* ioman = FairRootManager::Instance();
167 if (!ioman) Fatal(
"Init",
"No FairRootManager");
169 fTrdPoints = (TClonesArray*) ioman->GetObject(
"TrdPoint");
171 cout <<
"-W CbmTrdCluster::Init: No TrdPoints array!" << endl;
172 cout <<
" Task will be inactive" << endl;
176 fMCStacks = (TClonesArray*) ioman->GetObject(
"MCTrack");
178 cout <<
"-W CbmTrdCluster::Init: No MCTrack array!" << endl;
179 cout <<
" Task will be inactive" << endl;
201 gStyle->SetNumberContours(99);
212 printf(
"Introduction:\n");
219 Double_t ZRangeL = 1e00;
220 Double_t ZRangeU = 1e05;
221 Double_t mm2bin = 2.5;
226 new TFile(
"CbmTrdHitRateQa.root",
"RECREATE",
" ROOT file with histograms");
228 TH1F* h1HitPad = NULL;
229 TH2F* h2Layer = NULL;
230 TH2F* h2Topview[3] = {NULL, NULL, NULL};
235 c0 =
new TCanvas(
"c0",
"c0", 1800, 450);
238 const Int_t z_cave = 12000;
239 h2Topview[0] =
new TH2F(
"TopView",
244 int(z_cave / mm2bin),
247 h2Topview[0]->SetXTitle(
"x-Coordinate [mm]");
248 h2Topview[0]->SetYTitle(
"z-Coordinate [mm]");
249 h2Topview[0]->SetZTitle(
"#");
250 h2Topview[1] =
new TH2F(
"FrontView",
258 h2Topview[1]->SetXTitle(
"x-Coordinate [mm]");
259 h2Topview[1]->SetYTitle(
"y-Coordinate [mm]");
260 h2Topview[1]->SetZTitle(
"#");
261 h2Topview[2] =
new TH2F(
"SideView",
263 int(z_cave / mm2bin),
269 h2Topview[2]->SetXTitle(
"z-Coordinate [mm]");
270 h2Topview[2]->SetYTitle(
"y-Coordinate [mm]");
271 h2Topview[2]->SetZTitle(
"#");
272 for (Int_t
i = 0;
i < 3;
i++) {
273 h2Topview[
i]->SetContour(99);
274 h2Topview[
i]->SetStats(kFALSE);
275 h2Topview[
i]->GetXaxis()->SetLabelSize(0.02);
276 h2Topview[
i]->GetYaxis()->SetLabelSize(0.02);
277 h2Topview[
i]->GetZaxis()->SetLabelSize(0.02);
278 h2Topview[
i]->GetXaxis()->SetTitleSize(0.02);
279 h2Topview[
i]->GetXaxis()->SetTitleOffset(1.5);
280 h2Topview[
i]->GetYaxis()->SetTitleSize(0.02);
281 h2Topview[
i]->GetYaxis()->SetTitleOffset(2);
282 h2Topview[
i]->GetZaxis()->SetTitleSize(0.02);
283 h2Topview[
i]->GetZaxis()->SetTitleOffset(-2);
286 h2Topview[
i]->Draw(
"colz");
289 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++)
290 printf(
"%2i %3i\n",
i, TColor::GetColorPalette(
i));
312 for (Int_t
i = 0;
i < NofModules;
i++) {
322 cout <<
"module " <<
i + 1 <<
": ID " << ModuleID <<
" - P" <<
fPlane
326 if (
fPlane == 0) Plane01.push_back(ModuleID);
327 if (
fPlane == 1) Plane02.push_back(ModuleID);
328 if (
fPlane == 2) Plane03.push_back(ModuleID);
329 if (
fPlane == 3) Plane04.push_back(ModuleID);
330 if (
fPlane == 4) Plane05.push_back(ModuleID);
331 if (
fPlane == 5) Plane06.push_back(ModuleID);
332 if (
fPlane == 6) Plane07.push_back(ModuleID);
333 if (
fPlane == 7) Plane08.push_back(ModuleID);
334 if (
fPlane == 8) Plane09.push_back(ModuleID);
335 if (
fPlane == 9) Plane10.push_back(ModuleID);
338 vector<vector<int>> LiSi;
345 LiSi.push_back(Plane01);
346 LiSi.push_back(Plane02);
347 LiSi.push_back(Plane03);
348 LiSi.push_back(Plane04);
349 LiSi.push_back(Plane05);
350 LiSi.push_back(Plane06);
351 LiSi.push_back(Plane07);
352 LiSi.push_back(Plane08);
353 LiSi.push_back(Plane09);
354 LiSi.push_back(Plane10);
356 Char_t OutFile1[200];
357 Char_t OutFile2[200];
359 TImage* Outimage1 = NULL;
360 TImage* Outimage2 = NULL;
362 TLine* MaxHitRatePerPad =
363 new TLine(1e05, 0, 1e05, 1e04);
364 MaxHitRatePerPad->SetLineColor(2);
365 MaxHitRatePerPad->SetLineWidth(8);
375 for (vector<vector<int>>::size_type j = 0; j < LiSi.size(); j++) {
382 UInt_t nModulesInThisLayer = LiSi[j].size();
385 h2Topview[0]->Reset();
386 h2Topview[1]->Reset();
387 h2Topview[2]->Reset();
389 sprintf(OutFile1,
"pics/HitRateLayerPadView_S%d_L%d.png",
fStation,
fLayer);
391 OutFile2,
"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++)
414 c1->cd(1)->SetLogz(1);
415 h2Layer->Draw(
"colz");
419 for (vector<int>::size_type
i = 0;
i < nModulesInThisLayer;
i++)
434 Outimage1 = TImage::Create();
435 Outimage1->FromPad(c1);
436 Outimage1->WriteImage(OutFile1);
442 h1HitPad->Draw(
"same");
443 Outimage2 = TImage::Create();
444 Outimage2->FromPad(c2);
445 Outimage2->WriteImage(OutFile2);
465 if (
fDraw) c0->Update();
468 if (
fDraw) c0->Update();
490 printf(
"%s\n", title);
492 Layer =
new TH2F(name,
500 Layer->SetContour(99);
501 Layer->SetXTitle(
"x-Coordinate [mm]");
502 Layer->SetYTitle(
"y-Coordinate [mm]");
503 Layer->SetZTitle(
"Hits/Pad [Hz]");
504 Layer->SetStats(kFALSE);
505 Layer->GetXaxis()->SetLabelSize(0.02);
506 Layer->GetYaxis()->SetLabelSize(0.02);
507 Layer->GetZaxis()->SetLabelSize(0.02);
508 Layer->GetXaxis()->SetTitleSize(0.02);
509 Layer->GetXaxis()->SetTitleOffset(1.5);
510 Layer->GetYaxis()->SetTitleSize(0.02);
511 Layer->GetYaxis()->SetTitleOffset(2);
512 Layer->GetZaxis()->SetTitleSize(0.02);
513 Layer->GetZaxis()->SetTitleOffset(-2);
514 Layer->GetZaxis()->SetRangeUser(ZRangeL, ZRangeU);
518 HitPad =
new TH1F(name, title, 10000, 1e00, 1e06);
519 HitPad->SetXTitle(
"Hits/Pad [Hz]");
520 HitPad->SetYTitle(
"count");
521 HitPad->GetYaxis()->SetRangeUser(1, 1e04);
526 c1 =
new TCanvas(name, title, 1000, 900);
528 c1->cd(1)->SetLogz(1);
534 c2 =
new TCanvas(name, title, 1000, 900 / 2);
536 c2->cd(1)->SetLogx(1);
537 c2->cd(1)->SetLogy(1);
538 c2->cd(1)->SetGridx(1);
539 c2->cd(1)->SetGridy(1);
567 TString path = gGeoManager->GetPath();
568 cout <<
"Path: " << path << endl;
569 TStringToken* bla =
new TStringToken(path,
"/");
571 while (bla->NextToken()) {
572 if (bla->Contains(
"layer")) {
573 TString bla3 = (TString) *bla;
574 Ssiz_t
pos = bla3.Last(
'_');
575 Ssiz_t substringLength = bla3.Length() -
pos - 1;
576 TString bla2 = bla3((bla3.Last(
'_') + 1), substringLength);
577 TString bla1 = bla3(3, 1);
581 if (bla->Contains(
"mod")) {
582 TString bla3 = (TString) *bla;
583 Ssiz_t
pos = bla3.Last(
'_');
584 Ssiz_t substringLength = bla3.Length() -
pos - 1;
585 TString bla2 = bla3(
pos + 1, substringLength);
586 substringLength =
pos - 7;
587 TString bla1 = bla3(7, substringLength);
616 if (fModuleInfo != NULL) {
627 GeoPara->
mPos[0] = fModuleGeo->
GetX() * 10;
628 GeoPara->
mPos[1] = fModuleGeo->
GetY() * 10;
629 GeoPara->
mPos[2] = fModuleGeo->
GetZ() * 10;
633 GeoPara->
mSize[2] = 0;
638 for (Int_t s = 0; s < GeoPara->
nSec; s++)
640 GeoPara->
sCol[s] = 0;
641 GeoPara->
sRow[s] = 0;
643 fModuleInfo->
GetPosition( s, 0, 0, padPos, padSize);
644 GeoPara->
pSize[s][2] = 0;
646 for (Int_t
i = 0;
i < 2;
i++)
648 GeoPara->
pSize[s][
i] = padSize[
i] * 10;
657 round(GeoPara->
sSize[s][
i]
663 round(GeoPara->
sSize[s][
i]
666 GeoPara->
sCol[s] = 0;
683 round(GeoPara->
sSize[s][
i]
686 GeoPara->
sRow[s] = 0;
699 itemp = GeoPara->
nRow;
701 GeoPara->
nCol = itemp;
703 for (Int_t s = 0; s < GeoPara->
nSec; s++)
705 dtemp = GeoPara->
sRow[s];
706 GeoPara->
sRow[s] = GeoPara->
sCol[s];
707 GeoPara->
sCol[s] = dtemp;
709 dtemp = GeoPara->
sSize[s][0];
711 GeoPara->
sSize[s][1] = dtemp;
713 dtemp = GeoPara->
pSize[s][0];
715 GeoPara->
pSize[s][1] = dtemp;
717 cout <<
"swapped x and y" << endl;
721 fModuleInfo->
GetPosition( 0, 0, 0, padPos, padSize);
722 GeoPara->
vOrigin[0] = padPos[0] * 10;
723 GeoPara->
vOrigin[1] = padPos[1] * 10;
724 GeoPara->
vOrigin[2] = padPos[2] * 10;
727 fModuleInfo->
GetPosition( 0, 1, 0, padPos, padSize);
728 GeoPara->
vX[0] = padPos[0] * 10 - GeoPara->
vOrigin[0];
729 GeoPara->
vX[1] = padPos[1] * 10 - GeoPara->
vOrigin[1];
730 GeoPara->
vX[2] = padPos[2] * 10 - GeoPara->
vOrigin[2];
734 fModuleInfo->
GetPosition( 1, 0, 0, padPos, padSize);
735 GeoPara->
vY[0] = padPos[0] * 10 - GeoPara->
vOrigin[0];
736 GeoPara->
vY[1] = padPos[1] * 10 - GeoPara->
vOrigin[1];
737 GeoPara->
vY[2] = padPos[2] * 10 - GeoPara->
vOrigin[2];
741 GeoPara->
vX[1] * GeoPara->
vY[2] - GeoPara->
vX[2] * GeoPara->
vY[1];
743 GeoPara->
vX[2] * GeoPara->
vY[0] - GeoPara->
vX[0] * GeoPara->
vY[2];
745 GeoPara->
vX[0] * GeoPara->
vY[1] - GeoPara->
vX[1] * GeoPara->
vY[0];
754 (GeoPara->
vX[0] * 1 + GeoPara->
vX[1] * 0 + GeoPara->
vX[2] * 0)
755 /
sqrt(pow(GeoPara->
vX[0], 2) + pow(GeoPara->
vX[1], 2)
756 + pow(GeoPara->
vX[2], 2));
759 (GeoPara->
vY[0] * 0 + GeoPara->
vY[1] * 1 + GeoPara->
vY[2] * 0)
760 /
sqrt(pow(GeoPara->
vY[0], 2) + pow(GeoPara->
vY[1], 2)
761 + pow(GeoPara->
vY[2], 2));
766 if (GeoPara->
cosX > 1) GeoPara->
cosX = 1;
767 if (GeoPara->
cosX < -1) GeoPara->
cosX = -1;
768 if (GeoPara->
cosY > 1) GeoPara->
cosY = 1;
769 if (GeoPara->
cosY < -1) GeoPara->
cosY = -1;
773 if (GeoPara->
vX[0] != 0)
784 if (GeoPara->
vY[1] != 0)
798 for (Int_t
i = 0;
i < 3;
i++)
800 Mpos[
i] = GeoPara->
mPos[
i];
804 cout.setf(ios::fixed);
807 cout <<
"pos " << setw(6) << Mpos[0] << setw(6) << Mpos[1] << setw(6)
808 << Mpos[2] <<
" size " << setw(6) << Msize[0] << setw(6) << Msize[1]
809 << setw(6) << Msize[2] << endl;
814 Double_t Ssize[3 * nSec];
815 Double_t Psize[3 * nSec];
816 for (Int_t iSec = 0; iSec < nSec; iSec++)
818 Ssize[0 + iSec * nSec] = GeoPara->
sSize[iSec][0];
819 Ssize[1 + iSec * nSec] = GeoPara->
sSize[iSec][1];
820 Ssize[2 + iSec * nSec] = 0;
822 Psize[0 + iSec * nSec] = GeoPara->
pSize[iSec][0];
823 Psize[1 + iSec * nSec] = GeoPara->
pSize[iSec][1];
824 Psize[2 + iSec * nSec] = 0;
828 cout <<
"sec " << setw(10) << Ssize[0] << setw(10) << Ssize[1]
829 << setw(10) << Ssize[3] << setw(10) << Ssize[4] << setw(10)
830 << Ssize[6] << setw(10) << Ssize[7] << endl;
834 cout <<
"pad " << setw(10) << Psize[0] << setw(10) << Psize[1]
835 << setw(10) << Psize[3] << setw(10) << Psize[4] << setw(10)
836 << Psize[6] << setw(10) << Psize[7] << endl;
839 Int_t nCol = GeoPara->
nCol;
840 Int_t nRow = GeoPara->
nRow;
846 cout <<
"col0 " << setw(10) << GeoPara->
sCol[0] <<
" row0 " << setw(10)
847 << GeoPara->
sRow[0] << endl;
848 cout <<
"col1 " << setw(10) << GeoPara->
sCol[1] <<
" row1 " << setw(10)
849 << GeoPara->
sRow[1] << endl;
850 cout <<
"col2 " << setw(10) << GeoPara->
sCol[2] <<
" row2 " << setw(10)
851 << GeoPara->
sRow[2] << endl;
852 cout <<
"col " << setw(10) << nCol <<
" row " << setw(10) << nRow
855 cout <<
"mcol " << setw(10) << mCol <<
" mrow " << setw(10) << mRow
898 cout <<
"vX0 " << setw(10) << GeoPara->
vX[0] << endl;
899 cout <<
"vX1 " << setw(10) << GeoPara->
vX[1] << endl;
900 cout <<
"vY0 " << setw(10) << GeoPara->
vY[0] << endl;
901 cout <<
"vY1 " << setw(10) << GeoPara->
vY[1] << endl;
902 cout <<
"step " << setw(10) << GeoPara->
stepDirection[0] << setw(10)
904 cout <<
"cos " << setw(10) << GeoPara->
cosX << setw(10) << GeoPara->
cosY
906 cout <<
"v00xy " << setw(10) << GeoPara->
mPos[0] - GeoPara->
vOrigin[0]
907 << setw(10) << GeoPara->
mPos[1] - GeoPara->
vOrigin[1] << endl;
929 <<
" rot " << setw(10) << GeoPara->
rot_angle << endl;
950 cout <<
"------------------------------------------------------" << endl;
952 Topview[0]->Fill(GeoPara->
mPos[0], GeoPara->
mPos[2]);
953 Topview[1]->Fill(GeoPara->
mPos[0], GeoPara->
mPos[1]);
954 Topview[2]->Fill(GeoPara->
mPos[2], GeoPara->
mPos[1]);
960 Histo(GeoPara, Fast, Layer, c1, HitPad, c2, Topview, c0, mm2bin);
964 for (Int_t s = 0; s < GeoPara->
nSec; s++)
966 fModuleInfo->
GetPosition( s, 0, 0, padPos, padSize);
968 TPolyMarker* start =
new TPolyMarker(1);
969 start->SetPoint(0, padPos(0) * 10, padPos(1) * 10);
970 start->SetMarkerStyle(22);
971 start->SetMarkerSize(.8);
979 GeoPara->
sCol[0] - 1,
980 GeoPara->
sRow[s] - 1,
984 TPolyMarker* end =
new TPolyMarker(1);
985 end->SetPoint(0, padPos(0) * 10, padPos(1) * 10);
986 end->SetMarkerStyle(20);
987 end->SetMarkerSize(.8);
998 printf(
"fModuleInfo == NULL\n");
1013 Double_t HitRate = 0;
1020 Double_t xStepWidth = GeoPara->
cosX;
1021 Double_t yStepWidth = GeoPara->
cosY;
1023 StartX + 0.5 * GeoPara->
cosX;
1024 Double_t
y = StartY + 0.5 * GeoPara->
cosY;
1030 Double_t z = (GeoPara->
lambda - (
x * GeoPara->
vN[0] +
y * GeoPara->
vN[1]))
1032 for (Int_t yStep = 0; yStep < ySteps; yStep++) {
1033 x = StartX + 0.5 * GeoPara->
cosX;
1035 for (Int_t xStep = 0; xStep < xSteps; xStep++) {
1036 z = (GeoPara->
lambda - (
x * GeoPara->
vN[0] +
y * GeoPara->
vN[1]))
1038 r =
sqrt(pow(
x, 2) + pow(
y, 2));
1039 alpha = atan(r / z) * 1000.;
1048 exp(4.536355e00 + -8.393716e-03 * alpha)
1049 +
exp(2.400547e01 + -1.208306e-02 * alpha) / (z * z);
1051 Topview[0]->Fill(
x, z);
1052 Topview[1]->Fill(
x,
y);
1053 Topview[2]->Fill(z,
y);
1073 Double_t ZRangeL = 1e00;
1074 Double_t ZRangeU = 1e05;
1078 name.Form(
"ModuleID %5d", GeoPara->
moduleId);
1080 cout <<
" " << name <<
"\n" << flush;
1082 name.Form(
"Module%05d", GeoPara->
moduleId);
1084 if (GeoPara->
mSize[0] < 500)
1085 h2Module =
new TH2F(name,
1094 h2Module =
new TH2F(name,
1103 h2Module->GetZaxis()->SetRangeUser(ZRangeL, ZRangeU);
1105 name.Form(
"Module%05dHitPad", GeoPara->
moduleId);
1106 TH1F* h1HitPadModule =
new TH1F(name, name, 1200, 0, 120000);
1114 Double_t HiteRate = 0;
1119 Double_t planeStartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1120 Double_t planeStopX = planeStartX + GeoPara->
pSize[iSecX][0];
1122 Double_t planeStartY = GeoPara->
mPos[1] - GeoPara->
mSize[1];
1123 Double_t planeStopY = planeStartY + GeoPara->
pSize[iSecY][1];
1127 + 0.5 * GeoPara->
pSize[iSecX][0]
1129 Double_t StopX = StartX + GeoPara->
pSize[iSecX][0] * GeoPara->
cosX;
1133 Double_t StopY = StartY + GeoPara->
pSize[iSecY][1] * GeoPara->
cosY;
1149 for (Int_t iR = 0; iR < GeoPara->
nRow; iR++)
1153 + 0.5 * GeoPara->
pSize[iSecX][0] * GeoPara->
cosX;
1154 StopX = StartX + GeoPara->
pSize[iSecX][0] * GeoPara->
cosX;
1155 planeStartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1156 planeStopX = planeStartX + GeoPara->
pSize[iSecX][0];
1158 for (Int_t iC = 0; iC < GeoPara->
nCol; iC++)
1160 xSteps = GeoPara->
pSize[iSecX][0] - 1;
1161 ySteps = GeoPara->
pSize[iSecY][1] - 1;
1166 if (GeoPara->
mPos[0] < 1
1167 && GeoPara->
mPos[1] < 1)
1179 h1HitPad->Fill(HiteRate, 4);
1195 h1HitPad->Fill(HiteRate);
1196 h1HitPadModule->Fill(HiteRate);
1201 Int_t mStepX = Int_t((planeStartX - GeoPara->
mPos[0]));
1202 Int_t mStepY = Int_t((planeStartY - GeoPara->
mPos[1]));
1204 for (Int_t stepY =
int(planeStartY / mm2bin);
1205 stepY < int(planeStopY / mm2bin);
1209 for (Int_t stepX =
int(planeStartX / mm2bin);
1210 stepX < int(planeStopX / mm2bin);
1216 if (GeoPara->
mPos[0] < 1
1217 && GeoPara->
mPos[1] < 1) {
1219 h2Layer->SetBinContent(stepX +
int(
winsize / mm2bin),
1220 stepY + int(
winsize / mm2bin),
1222 h2Layer->SetBinContent(-1 * stepX +
int(
winsize / mm2bin),
1223 stepY + int(
winsize / mm2bin),
1225 h2Layer->SetBinContent(stepX +
int(
winsize / mm2bin),
1226 -1 * stepY + int(
winsize / mm2bin),
1228 h2Layer->SetBinContent(-1 * stepX +
int(
winsize / mm2bin),
1229 -1 * stepY + int(
winsize / mm2bin),
1234 h2Module->Fill(mStepX,
1244 h2Layer->SetBinContent(stepX +
int(
winsize / mm2bin),
1245 stepY + int(
winsize / mm2bin),
1251 cout <<
"filling 5 " << mStepX <<
" " << mStepY <<
" " << HiteRate
1253 h2Module->Fill(mStepX,
1269 if (iC == GeoPara->
sCol[iSecX]) {
1288 if (iR == GeoPara->
sRow[iSecY]) {
1307 for (Int_t
i = 0;
i < 3;
i++)
1308 Topview[
i]->Write(
"", TObject::kOverwrite);
1310 h2Layer->Write(
"", TObject::kOverwrite);
1311 h1HitPad->Write(
"", TObject::kOverwrite);
1312 h2Module->Write(
"", TObject::kOverwrite);
1313 h1HitPadModule->Write(
"", TObject::kOverwrite);
1316 delete h1HitPadModule;
1324 Double_t SecXStart = 0.0;
1325 Double_t SecYStart = 0.0;
1326 Double_t SecXStop = 0.0;
1327 Double_t SecYStop = 0.0;
1329 for (Int_t iSec = 0; iSec < GeoPara->
nSec - 1;
1333 if (GeoPara->
sSize[iSec][0] < 2 * GeoPara->
mSize[0]
1334 && GeoPara->
sSize[iSec][0] > 0)
1336 SecXStart += GeoPara->
sSize[iSec][0];
1337 SecXStop = SecXStart;
1340 SecXStop = GeoPara->
sSize[iSec][0];
1343 if (GeoPara->
sSize[iSec][1] < 2 * GeoPara->
mSize[1]
1344 && GeoPara->
sSize[iSec][1] > 0)
1346 SecYStart += GeoPara->
sSize[iSec][1];
1347 SecYStop = SecYStart;
1350 SecYStop = GeoPara->
sSize[iSec][1];
1354 TLine* sector =
new TLine(GeoPara->
mPos[0] - GeoPara->
mSize[0] + SecXStart,
1355 GeoPara->
mPos[1] - GeoPara->
mSize[1] + SecYStart,
1356 GeoPara->
mPos[0] - GeoPara->
mSize[0] + SecXStop,
1357 GeoPara->
mPos[1] - GeoPara->
mSize[1] + SecYStop);
1358 sector->SetLineColor(15);
1359 sector->SetLineStyle(2);
1361 TPolyMarker* corner =
new TPolyMarker(1);
1366 corner->SetMarkerStyle(21);
1367 corner->SetMarkerSize(.8);
1371 sector->Draw(
"same");
1372 corner->Draw(
"same");
1378 TBox* module =
new TBox(GeoPara->
mPos[0] - GeoPara->
mSize[0],
1382 module->SetFillStyle(0);
1383 module->SetLineColor(1);
1385 TBox* M_inner =
new TBox(GeoPara->
mPos[0] - 100,
1386 GeoPara->
mPos[1] - 100,
1387 GeoPara->
mPos[0] + 100,
1388 GeoPara->
mPos[1] + 100);
1390 M_inner->SetFillColor(kWhite);
1394 module->Draw(
"same");
1396 c1->Write(
"", TObject::kOverwrite);
1412 Double_t StartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1413 Double_t StartY = GeoPara->
mPos[1] - GeoPara->
mSize[1];
1415 Int_t SecCol = GeoPara->
sCol[iSecX];
1416 Int_t SecRow = GeoPara->
sRow[iSecY];
1418 for (Int_t iR = 0; iR < GeoPara->
nRow; iR++)
1420 StartX = GeoPara->
mPos[0] - GeoPara->
mSize[0];
1421 for (Int_t iC = 0; iC < GeoPara->
nCol; iC++)
1423 TLine* Pa =
new TLine(StartX,
1425 StartX + GeoPara->
pSize[iSecX][0],
1427 TLine* Pb =
new TLine(StartX,
1428 StartY + GeoPara->
pSize[iSecY][1],
1429 StartX + GeoPara->
pSize[iSecX][0],
1430 StartY + GeoPara->
pSize[iSecY][1]);
1431 TLine* Pc =
new TLine(StartX,
1434 StartY + GeoPara->
pSize[iSecY][1]);
1435 TLine* Pd =
new TLine(StartX + GeoPara->
pSize[iSecX][0],
1437 StartX + GeoPara->
pSize[iSecX][0],
1438 StartY + GeoPara->
pSize[iSecY][1]);
1440 Pa->SetLineColor(17);
1444 Pb->SetLineColor(17);
1448 Pc->SetLineColor(17);
1452 Pd->SetLineColor(17);
1458 if (iC == SecCol - 1) {
1460 SecCol += GeoPara->
sCol[iSecX];
1462 StartX += GeoPara->
pSize[iSecX][0];
1465 if (iR == SecRow - 1) {
1467 SecRow += GeoPara->
sRow[iSecY];
1469 StartY += GeoPara->
pSize[iSecY][1];