13 #include "FairRootManager.h"
14 #include "FairRunAna.h"
15 #include "FairRuntimeDb.h"
18 #include "TClonesArray.h"
22 #include "TGeoManager.h"
27 #include "TPaveText.h"
28 #include "TPolyLine.h"
30 #include "TProfile2D.h"
31 #include "TStopwatch.h"
49 :
CbmTrdQa(
"TrdQa",
"",
"", 1e-6, radiator) {}
54 Double_t triggerThreshold,
75 , fModuleClusterMapIt()
78 , fModuleAveragePointsMap()
79 , fModuleAveragePointsMapIt()
80 , fModuleTrackableMap2()
81 , fModuleTrackableMap2It()
82 , fModuleTrackableMap()
83 , fModuleTrackableMapIt()
84 , fModuleClusterSizeMap()
85 , fModuleClusterSizeMapIt()
88 , fModuleTracklengthMap()
89 , fModuleTracklengthMapIt()
90 , fModuleMultiPointMap()
91 , fModuleMultiPointMapIt()
93 , fModuleDeltaEMapIt()
98 , fModuleEfficiencyMap()
99 , fModuleEfficiencyMapIt()
100 , fTriggerThreshold(triggerThreshold)
107 , fTrianglePads(false)
109 , fStsTrdPoints(NULL)
110 , fStsMuchPoints(NULL)
111 , fStsTofPoints(NULL)
112 , fStsTrdPointsTrackable(NULL)
113 , fTrdPointsPerMcTrack_PID(NULL)
114 , fTrdPointsPerMcTrack_PT(NULL)
115 , fTrdPointsPerMcTrack_P(NULL)
116 , fTrdTrackCrossedRadiator(NULL)
117 , fMultiHitSamePadPerMcTrack(NULL)
118 , fMultiHitSamePadPerMcTrack_angle(NULL)
119 , fMultiHitSamePadPerMcTrack_zBirth(NULL)
120 , fMultiHitSamePadPerMcTrack_PID(NULL)
121 , fMultiHitSamePadPerMcTrack_motherPID(NULL)
122 , fMultiHitSamePadPerMcTrack_motherzBirth(NULL)
123 , fMultiHitAdjacentPadPerMcTrack(NULL)
124 , fMultiHitAdjacentPadPerMcTrack_angle(NULL)
125 , fMultiHitAdjacentPadPerMcTrack_zBirth(NULL)
126 , fMultiHitAdjacentPadPerMcTrack_PID(NULL)
127 , fMultiHitAdjacentPadPerMcTrack_motherzBirth(NULL)
128 , fMultiHitAdjacentPadPerMcTrack_motherPID(NULL)
129 , fDistanceMcToHit(NULL)
130 , fDistanceMcToHitAll(NULL)
131 , fPositionResolutionShort(NULL)
132 , fPositionResolutionLong(NULL)
139 , fdEdxPionGhost(NULL)
140 , fdEdxElectronMc(NULL)
141 , fdEdxElectronHit(NULL)
142 , fdEdxElectronGhost(NULL)
144 , fPointsPerDigi(NULL)
145 , fDigiPerCluster(NULL)
146 , fClusterPerHit(NULL)
147 , fMultiPointssVsR(NULL)
148 , fGhostPointsVsR(NULL)
149 , fMultiHitsVsR(NULL)
151 , fLostPointVsR(NULL)
152 , fHitToPointEfficiencyVsR(NULL)
153 , fMultiHitsVsAlpha(NULL)
154 , fGhostHitVsAlpha(NULL)
155 , fLostPointVsAlpha(NULL)
156 , fHitToPointEfficiencyVsAlpha(NULL)
159 , fRadiator(radiator) {}
162 FairRootManager* ioman = FairRootManager::Instance();
331 cout <<
" * CbmTrdQa * :: SetParContainers() " << endl;
333 FairRunAna* ana = FairRunAna::Instance();
334 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
339 FairRunAna* ana = FairRunAna::Instance();
340 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
347 FairRootManager* ioman = FairRootManager::Instance();
348 fMCTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
350 cout <<
"-W CbmTrdQa::Init: No MCTrack array!" << endl;
351 cout <<
" Task will be inactive" << endl;
355 fPoints = (TClonesArray*) ioman->GetObject(
"TrdPoint");
357 cout <<
"-W CbmTrdQa::Init: No TrdPoint array!" << endl;
358 cout <<
" Task will be inactive" << endl;
365 fClusters = (TClonesArray*) ioman->GetObject(
"TrdCluster");
367 cout <<
"-W CbmTrdQa::Init: No TrdCluster array!" << endl;
368 cout <<
" Task will be inactive" << endl;
372 fHits = (TClonesArray*) ioman->GetObject(
"TrdHit");
374 cout <<
"-W CbmTrdQa::Init: No TrdHits array!" << endl;
375 cout <<
" Task will be inactive" << endl;
381 fLayerDummy =
new TH2I(
"LayerDummy",
"", 1, -600, 600, 1, -500, 500);
398 new TH2F(
"fStsTrdPoints",
"fStsTrdPoints", 12, -0.5, 11.5, 21, -0.5, 20.5);
405 "fStsMuchPoints",
"fStsMuchPoints", 12, -0.5, 11.5, 21, -0.5, 20.5);
412 new TH2F(
"fStsTofPoints",
"fStsTofPoints", 12, -0.5, 11.5, 21, -0.5, 20.5);
419 for (Int_t iStsPoints = 0; iStsPoints < 11; iStsPoints++) {
420 name.Form(
"_%02iStsPoints", iStsPoints);
423 "fMuchTrdPoints" + name,
436 "fMuchTofPoints" + name,
449 "fTrdTofPoints" + name,
463 "fStsTrdPointsTrackable",
477 "fTrdPointsPerMcTrack_PID",
487 for (Int_t bin = 1; bin <= 49; bin++) {
492 "fTrdPointsPerMcTrack_PT",
504 "fTrdPointsPerMcTrack_P",
516 "fTrdTrackCrossedRadiator",
529 new TH1I(
"DistanceMcToHit",
"DistanceMcToHit", 1500, 0, 150);
535 new TH1I(
"DistanceMcToHitAll",
"DistanceMcToHitAll", 1500, 0, 150);
540 fdEdxPionMc =
new TH1F(
"dEdxPionMc",
"dEdxPionMc", 250, 0, 30.0e-6);
546 fdEdxPionHit =
new TH1F(
"dEdxPionHit",
"dEdxPionHit", 250, 0, 30.0e-6);
552 fdEdxPionGhost =
new TH1F(
"dEdxPionGhost",
"dEdxPionGhost", 250, 0, 30.0e-6);
559 new TH1F(
"dEdxElectronMc",
"dEdxElectronMc", 250, 0, 30.0e-6);
566 new TH1F(
"dEdxElectronHit",
"dEdxElectronHit", 250, 0, 30.0e-6);
573 new TH1F(
"dEdxElectronGhost",
"dEdxElectronGhost", 250, 0, 30.0e-6);
579 fdEdxPoint =
new TH1F(
"dEdxPoint",
"dEdxPoint", 1.0e3, 0, 30.0e-6);
583 fdEdxDigi =
new TH1F(
"dEdxDigi",
"dEdxDigi", 1.0e3, 0, 30.0e-6);
587 fdEdxCluster =
new TH1F(
"dEdxCluster",
"dEdxCluster", 1.0e3, 0, 30.0e-6);
591 fdEdxHit =
new TH1F(
"dEdxHit",
"dEdxHit", 1.0e3, 0, 30.0e-6);
593 fdEdxHit->SetXTitle(
"dE/dx Hit [GeV]");
595 fMultiHitsVsR =
new TProfile(
"MultiHitVsR",
"MultiHitVsR", 785, 0, 785);
599 "hits per point on same pad/ all points per module [%]");
603 fGhostHitVsR =
new TProfile(
"GhostHitVsR",
"GhostHitVsR", 785, 0, 785);
606 fGhostHitVsR->SetYTitle(
"left over hits / all points per module [%]");
610 fLostPointVsR =
new TProfile(
"LostPointVsR",
"LostPointVsR", 785, 0, 785);
613 fLostPointVsR->SetYTitle(
"left over points / all points per module [%]");
618 "fHitToPointEfficiencyVsR",
"fHitToPointEfficiencyVsR", 785, 0, 785);
622 "point hit pairs / all points per module [%]");
634 "hits per point on same pad/ all points per module [%]");
661 "fHitToPointEfficiencyVsAlpha",
668 "point hit pairs / all points per module [%]");
673 "fPositionResolutionShort",
"fPositionResolutionShort", 20000, -10, 10);
676 "position deviation along short pad side [cm]");
679 "fPositionResolutionLong",
"fPositionResolutionLong", 20000, -10, 10);
682 "position deviation along long pad side [cm]");
684 fClusterSize =
new TH1I(
"fClusterSize",
"fClusterSize", 21, -0.5, 20.5);
689 new TH1I(
"fPointsPerDigi",
"fPointsPerDigi", 101, -0.5, 100.5);
694 new TH1I(
"fDigiPerCluster",
"fDigiPerCluster", 101, -0.5, 100.5);
699 new TH1I(
"fClusterPerHit",
"fClusterPerHit", 101, -0.5, 100.5);
703 fPRF_1D =
new TProfile(
"fPRF_1D",
"fPRF_1D", 30, -1.5, 1.5);
704 fPRF_2D =
new TH2I(
"fPRF_2D",
"fPRF_2D", 30, -1.5, 1.5, 10, 0, 1);
706 "fMultiHitSamePadPerMcTrack",
"fMultiHitSamePadPerMcTrack", 21, -0.5, 20.5);
711 new TH1I(
"fMultiHitSamePadPerMcTrack_angle",
712 "fMultiHitSamePadPerMcTrack_angle",
720 new TH2I(
"fMultiHitSamePadPerMcTrack_zBirth",
721 "fMultiHitSamePadPerMcTrack_zBirth",
731 "z_{Birth} multihits track a [cm]");
733 "z_{Birth} multihits track b [cm]");
735 "fMultiHitSamePadPerMcTrack_PID",
743 for (Int_t bin = 1; bin <= 49; bin++) {
755 new TH2I(
"fMultiHitSamePadPerMcTrack_motherzBirth",
756 "fMultiHitSamePadPerMcTrack_motherzBirth",
766 "z_{Birth} multihits track a [cm]");
768 "z_{Birth} multihits track b [cm]");
770 new TH2I(
"fMultiHitSamePadPerMcTrack_motherPID",
771 "fMultiHitSamePadPerMcTrack_motherPID",
779 for (Int_t bin = 1; bin <= 49; bin++) {
792 "fMultiHitAdjacentPadPerMcTrack",
800 new TH1I(
"fMultiHitAdjacentPadPerMcTrack_angle",
801 "fMultiHitAdjacentPadPerMcTrack_angle",
809 new TH2I(
"fMultiHitAdjacentPadPerMcTrack_zBirth",
810 "fMultiHitAdjacentPadPerMcTrack_zBirth",
820 "z_{Birth} multihits track a [cm]");
822 "z_{Birth} multihits track b [cm]");
824 new TH2I(
"fMultiHitAdjacentPadPerMcTrack_PID",
825 "fMultiHitAdjacentPadPerMcTrack_PID",
833 for (Int_t bin = 1; bin <= 49; bin++) {
845 new TH2I(
"fMultiHitAdjacentPadPerMcTrack_motherzBirth",
846 "fMultiHitAdjacentPadPerMcTrack_motherzBirth",
856 "z_{Birth} multihits track a [cm]");
858 "z_{Birth} multihits track b [cm]");
860 new TH2I(
"fMultiHitAdjacentPadPerMcTrack_motherPID",
861 "fMultiHitAdjacentPadPerMcTrack_motherPID",
869 for (Int_t bin = 1; bin <= 49; bin++) {
899 const Int_t nCoordinates = 4;
900 Double_t
x[nCoordinates] = {
901 column - 0.5, column + 0.5, column + 0.5, column - 0.5};
902 Double_t
y[nCoordinates] = {row - 0.5, row - 0.5, row + 0.5, row - 0.5};
907 TPolyLine* pad =
new TPolyLine(nCoordinates,
x,
y);
908 pad->SetFillColor(content);
913 Bool_t samePadMerge =
false;
917 cout << endl <<
"==================CbmTrdQa===================" << endl;
918 Int_t nEntries(0), iTrack(-1), mother_iTrack(-1), moduleAddress(-1),
919 Station(-1), Layer(-1), combiId(-1),
933 std::map<Int_t, Int_t> deltaEMap;
934 std::map<Int_t, Int_t> TrackableMap;
935 std::map<Int_t, std::map<Int_t, Int_t>>
936 doubleHitSinglePadMap;
937 std::map<Int_t, Int_t> channelAddressMap;
938 std::map<Int_t, Int_t> McTrackDoubleHitMap;
939 std::map<Int_t, Int_t> neighbourChannelAddressMap;
940 std::map<Int_t, Int_t> McTrackNeighbourHitMap;
943 nEntries =
fPoints->GetEntries();
944 printf(
"%02i Points\n", nEntries);
946 std::map<Int_t, Int_t> hasBeenUsedTrack;
947 for (Int_t iPoint = 0; iPoint < nEntries; iPoint++) {
950 moduleAddress = point->GetDetectorID();
958 combiId = 10 * Station + Layer;
959 iTrack = point->GetTrackID();
969 title.Form(
"G%i_S%i_L%i_(%.2f, %.2f, %.2f)",
978 "left over points / all points [%]");
980 title.Form(
"L%i_S%i_L%i_(%.2f, %.2f, %.2f)",
987 fModuleLostMap[moduleAddress] =
new TH1I(title, title, 200, 0, 200);
989 "left over hits / all points [%]");
991 title.Form(
"E%i_S%i_L%i_(%.2f, %.2f, %.2f)",
999 new TH1I(title, title, 200, 0, 200);
1001 "found point hit pairs / all points [%]");
1003 title.Form(
"M%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1009 fModuleGeo->
GetZ());
1011 new TH1I(title, title, 200, 0, 200);
1013 "multi point per channel / all points [%]");
1015 title.Form(
"D%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1021 fModuleGeo->
GetZ());
1025 title.Form(
"TL%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1031 fModuleGeo->
GetZ());
1033 new TH1I(title, title, 200, 0, 10);
1036 title.Form(
"dE%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1042 fModuleGeo->
GetZ());
1043 fModuledEdxMap[moduleAddress] =
new TH1I(title, title, 200, 0, 50);
1046 title.Form(
"CS%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1052 fModuleGeo->
GetZ());
1054 new TH1I(title, title, 200, 0, 200);
1056 "cluster size [channel]");
1058 title.Form(
"TA%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1064 fModuleGeo->
GetZ());
1066 new TH1I(title, title, 200, 0, 200);
1069 title.Form(
"TA2%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1075 fModuleGeo->
GetZ());
1077 new TH1I(title, title, 200, 0, 200);
1080 title.Form(
"AP%i_S%i_L%i_(%.2f, %.2f, %.2f)",
1086 fModuleGeo->
GetZ());
1088 new TH1I(title, title, 500, 0, 500);
1090 "average points per event");
1093 deltaEMap[moduleAddress] = 0;
1094 TrackableMap[moduleAddress] = 0;
1097 Double_t p_global[3] = {0.5 * (point->
GetXOut() + point->
GetXIn()),
1101 gGeoManager->FindNode(p_global[0], p_global[1], p_global[2]);
1102 if (!TString(gGeoManager->GetPath()).Contains(
"gas")) {
1103 cout << gGeoManager->GetPath() << endl;
1106 iTrack = point->GetTrackID();
1110 if (hasBeenUsedTrack.find(iTrack) != hasBeenUsedTrack.end()) {
1134 Int_t(trackLength / 1.0 + 0.9)
1136 deltaEMap[moduleAddress] += 1;
1139 if (nStsPoints >= 5) TrackableMap[moduleAddress] += 1;
1142 Int_t sectorId(0), columnId(0), rowId(0);
1143 fModuleInfo->
GetPadInfo(point, sectorId, columnId, rowId);
1145 Int_t channelAddress =
1152 if (channelAddressMap.find(channelAddress) == channelAddressMap.end()) {
1153 channelAddressMap[channelAddress] = 0;
1154 neighbourChannelAddressMap[channelAddress] = 0;
1156 channelAddressMap[channelAddress] += 1;
1159 if (McTrackDoubleHitMap.find(point->GetTrackID())
1160 == McTrackDoubleHitMap.end()) {
1161 McTrackDoubleHitMap[point->GetTrackID()] = 0;
1162 McTrackNeighbourHitMap[point->GetTrackID()] = 0;
1164 if (channelAddressMap[channelAddress] > 1) {
1165 McTrackDoubleHitMap[point->GetTrackID()] += 1;
1168 Int_t neighbourRow(-1), neighbourColumn(-1), neighbourSector(-1),
1169 neighbourChannelAddress(0);
1171 for (Int_t r = -1; r <= 1; r++) {
1172 for (Int_t c = -1; c <= 1; c++) {
1173 if (r == 0 && c == 0)
continue;
1174 if (r != 0 && c != 0)
continue;
1175 if (rowId < fModuleInfo->GetNofRowsInSector(sectorId) - 1
1177 neighbourSector = sectorId;
1178 neighbourRow = rowId + r;
1179 }
else if (rowId + r < 0 && sectorId > 0) {
1180 neighbourSector = sectorId - 1;
1183 && sectorId < fModuleInfo->GetNofSectors() - 1) {
1184 neighbourSector = sectorId + 1;
1187 if (columnId + c >= 0
1190 neighbourColumn = columnId + c;
1192 if (neighbourSector > -1 && neighbourRow > -1
1193 && neighbourColumn > -1) {
1200 if (channelAddressMap.find(neighbourChannelAddress)
1201 != channelAddressMap.end()) {
1203 neighbourChannelAddressMap[channelAddress] += 1;
1204 neighbourChannelAddressMap[neighbourChannelAddress] += 1;
1208 McTrackNeighbourHitMap[point->GetTrackID()] += 1;
1214 Double_t ELoss = point->GetEnergyLoss();
1223 title.Form(
"Station%i_Layer%i", Station, Layer);
1224 fLayerMap[combiId] =
new TCanvas(title, title, 1200, 1000);
1228 for (std::map<Int_t, Int_t>::iterator it = hasBeenUsedTrack.begin();
1229 it != hasBeenUsedTrack.end();
1242 printf(
"%i Digis \n", nEntries);
1243 for (Int_t iDigi = 0; iDigi < nEntries; iDigi++) {
1254 combiId = 10 * Station + Layer;
1259 title.Form(
"Station%i_Layer%i", Station, Layer);
1260 fLayerMap[combiId] =
new TCanvas(title, title, 1200, 1000);
1269 printf(
"%i\n", nEntries);
1270 for (Int_t iCluster = 0; iCluster < nEntries; iCluster++) {
1272 Double_t charge = 0;
1275 ->Get<CbmTrdDigi>(cluster->
GetDigi(0))
1279 for (Int_t iDigi = 0; iDigi < cluster->
GetNofDigis(); iDigi++) {
1312 nEntries =
fHits->GetEntries();
1313 printf(
"%i Hits\n", nEntries);
1314 for (Int_t iHit = 0; iHit < nEntries; iHit++) {
1322 combiId = 10 * Station + Layer;
1327 title.Form(
"Station%i_Layer%i", Station, Layer);
1328 fLayerMap[combiId] =
new TCanvas(title, title, 1200, 1000);
1334 for (std::map<Int_t, Int_t>::iterator McTrackDoubleHitMapIt =
1337 McTrackDoubleHitMapIt != McTrackDoubleHitMap.end();
1338 McTrackDoubleHitMapIt++) {
1342 for (std::map<Int_t, Int_t>::iterator McTrackNeighbourHitMapIt =
1343 McTrackNeighbourHitMap.begin();
1344 McTrackNeighbourHitMapIt != McTrackNeighbourHitMap.end();
1345 McTrackNeighbourHitMapIt++) {
1349 std::map<Int_t, Int_t> notMultiPointTRDPoints;
1359 std::map<Int_t, Int_t> hasBeenUsed;
1371 100. * TrackableMap[moduleAddress] / allPoints);
1376 Double_t multiHitCounterModule = 0;
1379 + fModuleGeo->
GetY()
1380 * fModuleGeo->
GetY());
1381 Double_t alpha = atan(r / fModuleGeo->
GetZ()) * 1000.;
1389 iTrack = point->GetTrackID();
1394 if (mother_iTrack >= 0)
1397 track_mother = NULL;
1398 if (notMultiPointTRDPoints.find(iTrack)
1399 == notMultiPointTRDPoints.end()) {
1409 if (nStsPoint < 11) {
1420 notMultiPointTRDPoints[iTrack] =
1432 Double_t p_global[3] = {0.5 * (point->
GetXOut() + point->
GetXIn()),
1436 gGeoManager->FindNode(p_global[0], p_global[1], p_global[2]);
1438 Double_t p_local[3] = {0.0};
1439 gGeoManager->MasterToLocal(p_global, p_local);
1443 Int_t xPpad(0), yPpad(0),
1446 fModuleInfo->
GetPadInfo(p_local, pSectorId, xPpad, yPpad);
1449 for (Int_t jPoint = 0; jPoint < iPoint; jPoint++) {
1452 Int_t jTrack = point2->GetTrackID();
1455 if (mother_jTrack >= 0)
1458 track2_mother = NULL;
1459 if (notMultiPointTRDPoints.find(jTrack)
1460 == notMultiPointTRDPoints.end()) {
1470 if (nStsPoint < 11) {
1481 notMultiPointTRDPoints[jTrack] =
1486 Double_t p_global2[3] = {0.5 * (point2->
GetXOut() + point2->
GetXIn()),
1491 gGeoManager->FindNode(p_global2[0], p_global2[1], p_global2[2]);
1493 Double_t p_local2[3] = {0.0};
1494 gGeoManager->MasterToLocal(p_global2, p_local2);
1495 Int_t xPpad2(0), yPpad2(0),
1498 fModuleInfo->
GetPadInfo(p_local2, pSectorId2, xPpad2, yPpad2);
1499 yPpad2 = fModuleInfo->
GetModuleRow(pSectorId2, yPpad2);
1501 if ((xPpad2 == xPpad) && (yPpad2 == yPpad)) {
1510 if (NULL != track_mother && NULL != track2_mother) {
1518 == hasBeenUsed.end()) {
1520 multiHitCounterModule++;
1521 if (notMultiPointTRDPoints.find(iTrack)
1522 != notMultiPointTRDPoints.end())
1523 if (notMultiPointTRDPoints[iTrack] > 0)
1524 notMultiPointTRDPoints[iTrack]--;
1527 == hasBeenUsed.end()) {
1529 multiHitCounterModule++;
1530 if (notMultiPointTRDPoints.find(jTrack)
1531 != notMultiPointTRDPoints.end())
1532 if (notMultiPointTRDPoints[jTrack] > 0)
1533 notMultiPointTRDPoints[jTrack]--;
1535 }
else if ((
fabs(xPpad - xPpad2) <= 1
1536 &&
fabs(yPpad - yPpad2)
1538 if ((xPpad2 == xPpad) || (yPpad2 == yPpad)) {
1546 if (NULL != track_mother && NULL != track2_mother) {
1554 == hasBeenUsed.end()) {
1556 multiHitCounterModule++;
1559 == hasBeenUsed.end()) {
1561 multiHitCounterModule++;
1570 Double_t xPPadSize(fModuleInfo->
GetPadSizeX(pSectorId)),
1574 if (point->GetEnergyLoss() > 0.0) {
1575 if (Pdg_code == 211 || Pdg_code == -211)
1577 if (Pdg_code == 11 || Pdg_code == -11)
1580 Double_t minimumDistance =
1581 sqrt(xPPadSize * xPPadSize + yPPadSize * yPPadSize);
1582 Double_t xDiviation(0), yDiviation(0);
1583 Int_t minDHitId = -1;
1584 Double_t mergedELoss = 0.0;
1585 Double_t hitELoss = 0.0;
1587 for (Int_t iHit = 0; iHit < Int_t(
fModuleHitMap[moduleAddress].size());
1590 Double_t h_global[3] = {hit->
GetX(), hit->
GetY(), hit->
GetZ()};
1591 gGeoManager->FindNode(h_global[0], h_global[1], h_global[2]);
1593 Double_t h_local[3] = {0.0};
1594 gGeoManager->MasterToLocal(h_global, h_local);
1597 Int_t xHpad(0), yHpad(0),
1599 fModuleInfo->
GetPadInfo(h_local, hSectorId, xHpad, yHpad);
1608 sqrt((p_local[0] - h_local[0]) * (p_local[0] - h_local[0])
1609 + (p_local[1] - h_local[1]) * (p_local[1] - h_local[1]));
1613 distance < minimumDistance
1618 minimumDistance = distance;
1620 xDiviation = p_local[0] - h_local[0];
1621 yDiviation = p_local[1] - h_local[1];
1645 || Pdg_code == -211)
1647 if (Pdg_code == 11 || Pdg_code == -11)
1651 || Pdg_code == -211)
1653 if (Pdg_code == 11 || Pdg_code == -11)
1670 alpha, 100. * multiHitCounterModule / Float_t(allPoints));
1671 fMultiHitsVsR->Fill(r, 100. * multiHitCounterModule / Float_t(allPoints));
1677 / Float_t(allPoints));
1680 / Float_t(allPoints));
1684 / Float_t(allPoints));
1688 / Float_t(allPoints));
1692 / Float_t(allPoints));
1696 / Float_t(allPoints));
1700 / Float_t(allPoints));
1704 / Float_t(allPoints));
1707 100. * (Float_t(multiHitCounterModule)) / Float_t(allPoints));
1710 for (std::map<Int_t, Int_t>::iterator notMultiPointTRDPointsIt =
1711 notMultiPointTRDPoints.begin();
1712 notMultiPointTRDPointsIt != notMultiPointTRDPoints.end();
1713 notMultiPointTRDPointsIt++) {
1719 Double_t rtime = timer.RealTime();
1720 Double_t ctime = timer.CpuTime();
1722 printf(
"\n\n******************** Reading Test **********************\n");
1723 printf(
" RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
1724 printf(
"*********************************************************\n\n");
1732 TString origpath = gDirectory->GetPath();
1733 printf(
"\n%s\n", origpath.Data());
1734 TString newpath = origpath;
1735 newpath.ReplaceAll(
"eds",
"trd_qa");
1736 newpath.ReplaceAll(
":/",
"");
1737 TFile* tempFile =
new TFile(newpath,
"recreate");
1738 gDirectory = tempFile->CurrentDirectory();
1744 if (!gDirectory->Cd(
"TrdQa")) gDirectory->mkdir(
"TrdQa");
1745 gDirectory->Cd(
"TrdQa");
1746 TCanvas* c =
new TCanvas(
"c",
"c", 800, 600);
1748 TLegend* l =
new TLegend(0.65, 0.65, 0.85, 0.85);
1749 l->SetTextSize(0.025);
1764 c->SaveAs(
"pics/TrdQadEdx" + title +
".pdf");
1765 c->SaveAs(
"pics/TrdQadEdx" + title +
".png");
1785 c->SaveAs(
"pics/TrdQaStatisticVsR" + title +
".pdf");
1786 c->SaveAs(
"pics/TrdQaStatisticVsR" + title +
".png");
1792 c->SaveAs(
"pics/TrdQaStatisticVsAlpha" + title +
".pdf");
1793 c->SaveAs(
"pics/TrdQaStatisticVsAlpha" + title +
".png");
1796 fdEdxDigi->Write(
"", TObject::kOverwrite);
1797 c->cd()->SetLogx(1);
1798 c->cd()->SetLogy(1);
1800 c->SaveAs(
"pics/TrdQadEdxDigi.pdf");
1801 c->SaveAs(
"pics/TrdQadEdxDigi.png");
1804 c->SaveAs(
"pics/TrdQadEdxCluster" + title +
".pdf");
1805 c->SaveAs(
"pics/TrdQadEdxCluster" + title +
".png");
1806 c->cd()->SetLogx(0);
1807 c->cd()->SetLogy(0);
1808 fdEdxHit->Write(
"", TObject::kOverwrite);
1827 c->SaveAs(
"pics/TrdQaPositionResolutionShort" + title +
".pdf");
1828 c->SaveAs(
"pics/TrdQaPositionResolutionShort" + title +
".png");
1831 c->SaveAs(
"pics/TrdQaPositionResolutionLong" + title +
".pdf");
1832 c->SaveAs(
"pics/TrdQaPositionResolutionLong" + title +
".png");
1837 fPRF_1D->Write(
"", TObject::kOverwrite);
1838 fPRF_2D->Write(
"", TObject::kOverwrite);
1841 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack" + title +
".pdf");
1842 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack" + title +
".png");
1846 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_angle" + title +
".pdf");
1847 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_angle" + title +
".png");
1853 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_zBirth" + title +
".pdf");
1854 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_zBirth" + title +
".png");
1857 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_motherzBirth" + title
1859 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_motherzBirth" + title
1864 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_PID" + title +
".pdf");
1865 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_PID" + title +
".png");
1868 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_motherPID" + title +
".pdf");
1869 c->SaveAs(
"pics/TrdQaMultiHitSamePadPerMcTrack_motherPID" + title +
".png");
1874 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack" + title +
".pdf");
1875 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack" + title +
".png");
1879 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_angle" + title +
".pdf");
1880 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_angle" + title +
".png");
1886 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_zBirth" + title +
".pdf");
1887 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_zBirth" + title +
".png");
1890 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_motherzBirth" + title
1892 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_motherzBirth" + title
1897 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_motherPID" + title
1899 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_motherPID" + title
1903 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_PID" + title +
".pdf");
1904 c->SaveAs(
"pics/TrdQaMultiHitAdjacentPadPerMcTrack_PID" + title +
".png");
1907 printf(
"------------->>>>>> TRD tracks:%i TRD tracks "
1908 "trackable:%i <<<<<<-------------\n",
1916 c->SaveAs(
"pics/TrdQaStsTrdPoints" + title +
".pdf");
1917 c->SaveAs(
"pics/TrdQaStsTrdPoints" + title +
".png");
1925 c->SaveAs(
"pics/TrdQaStsMuchPoints" + title +
".pdf");
1926 c->SaveAs(
"pics/TrdQaStsMuchPoints" + title +
".png");
1934 c->SaveAs(
"pics/TrdQaStsTofPoints" + title +
".pdf");
1935 c->SaveAs(
"pics/TrdQaStsTofPoints" + title +
".png");
1938 for (Int_t iStsPoints = 0; iStsPoints < 11; iStsPoints++) {
1939 name.Form(
"_%02iStsPoints", iStsPoints);
1945 c->SaveAs(
"pics/TrdQaMuchTrdPoints" + name + title +
".pdf");
1946 c->SaveAs(
"pics/TrdQaMuchTrdPoints" + name + title +
".png");
1949 name.Form(
"_%iStsPoints", iStsPoints);
1955 c->SaveAs(
"pics/TrdQaMuchTofPoints" + name + title +
".pdf");
1956 c->SaveAs(
"pics/TrdQaMuchTofPoints" + name + title +
".png");
1959 name.Form(
"_%iStsPoints", iStsPoints);
1965 c->SaveAs(
"pics/TrdQaTrdTofPoints" + name + title +
".pdf");
1966 c->SaveAs(
"pics/TrdQaTrdTofPoints" + name + title +
".png");
1977 c->SaveAs(
"pics/TrdQaStsTrdPointsTrackable" + title +
".pdf");
1978 c->SaveAs(
"pics/TrdQaStsTrdPointsTrackable" + title +
".png");
1983 c->SaveAs(
"pics/TrdQaPointsPerMcTrack_PID" + title +
".pdf");
1984 c->SaveAs(
"pics/TrdQaPointsPerMcTrack_PID" + title +
".png");
1987 c->SaveAs(
"pics/TrdQaPointsPerMcTrack_PT" + title +
".pdf");
1988 c->SaveAs(
"pics/TrdQaPointsPerMcTrack_PT" + title +
".png");
1991 c->SaveAs(
"pics/TrdQaPointsPerMcTrack_P" + title +
".pdf");
1992 c->SaveAs(
"pics/TrdQaPointsPerMcTrack_P" + title +
".png");
1997 c->SaveAs(
"pics/TrdQaTrackCrossedRadiator" + title +
".pdf");
1998 c->SaveAs(
"pics/TrdQaTrackCrossedRadiator" + title +
".png");
2001 gDirectory->Cd(
"..");
2003 gDirectory->Cd(origpath);
2056 Double_t& padSizeY) {
2064 Int_t iSectorX(0), iSectorY(0);
2067 Double_t iPadSizeX = fModuleInfo->
GetPadSizeX(iSectorX);
2068 Double_t iPadSizeY = fModuleInfo->
GetPadSizeY(iSectorY);
2072 ||
x < 0 ||
y < 0) {
2073 printf(
"point out of module::\n module %i (%.2f, %.2f) (%.2f, %.2f)\n",
2080 while (
x > iSectorSizeX && iSectorX < nSector) {
2082 iPadX += iSectorSizeX / iPadSizeX;
2087 padSizeX = iPadSizeX;
2088 iPadX += Int_t((
x / padSizeX) + 0.5);
2090 while (
y > iSectorSizeY && iSectorY < nSector) {
2092 iPadY += iSectorSizeY / iPadSizeY;
2097 padSizeY = iPadSizeY;
2098 iPadY += Int_t((
x / padSizeX) + 0.5);
2109 TString origpath = gDirectory->GetPath();
2110 printf(
"\n%s\n", origpath.Data());
2111 TString newpath = origpath;
2112 newpath.ReplaceAll(
"eds",
"trd_qa");
2113 newpath.ReplaceAll(
":/",
"");
2114 TFile* tempFile =
new TFile(newpath,
"recreate");
2115 gDirectory = tempFile->CurrentDirectory();
2117 TString title(
""), name(
"");
2119 TPaveText* text = NULL;
2120 std::map<Int_t, TH1*>::iterator MapIt;
2121 std::vector<Int_t> fColors;
2122 std::vector<Double_t> fZLevel;
2124 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2125 fColors.push_back(TColor::GetColorPalette(
i));
2130 TMath::Log10(fmax) / TColor::GetNumberOfColors()
2134 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2138 if (!gDirectory->Cd(folder)) gDirectory->mkdir(folder);
2139 gDirectory->Cd(folder);
2141 for (MapIt = Map.begin(); MapIt != Map.end(); MapIt++) {
2142 Double_t value = MapIt->second->GetMean(1);
2143 Double_t valueE = MapIt->second->GetRMS(1);
2152 Int_t combiId = 10 * Station + Layer;
2154 if (MapIt == Map.begin()) {
2156 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2159 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2163 text->SetFillStyle(1001);
2164 text->SetLineColor(1);
2167 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2171 text->SetFillColor(fColors[j]);
2172 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2174 if (fColors[j] < 65) text->SetTextColor(kWhite);
2175 title.Form(
"%.1f#pm%.1f", value, valueE);
2176 text->AddText(title);
2181 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2182 title.Form(
"pics/TrdQa%s_S%i_L%i_%s%s.pdf",
2189 title.ReplaceAll(
"pdf",
"png");
2192 for (MapIt = Map.begin(); MapIt != Map.end(); MapIt++) {
2193 MapIt->second->Write(
"", TObject::kOverwrite);
2195 gDirectory->Cd(
"..");
2198 gDirectory->Cd(origpath);
2203 TString origpath = gDirectory->GetPath();
2204 printf(
"\n%s\n", origpath.Data());
2205 TString newpath = origpath;
2206 newpath.ReplaceAll(
"eds",
"trd_qa");
2207 newpath.ReplaceAll(
":/",
"");
2208 TFile* tempFile =
new TFile(newpath,
"recreate");
2209 gDirectory = tempFile->CurrentDirectory();
2211 TString title(
""), name(
"");
2212 TPaveText* text = NULL;
2214 std::vector<Int_t> fColors;
2215 std::vector<Double_t> fZLevel;
2216 Double_t fmax(20), fmin(0);
2217 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2218 fColors.push_back(TColor::GetColorPalette(
i));
2221 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2225 if (!gDirectory->Cd(
"TrdQa")) gDirectory->mkdir(
"TrdQa");
2226 gDirectory->Cd(
"TrdQa");
2248 Int_t combiId = 10 * Station + Layer;
2252 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2256 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2260 text->SetFillStyle(1001);
2261 text->SetLineColor(1);
2264 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2268 text->SetFillColor(fColors[j]);
2269 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2271 if (fColors[j] < 65) text->SetTextColor(kWhite);
2272 title.Form(
"%.1f#pm%.1f", value, valueE);
2273 text->AddText(title);
2278 std::vector<Int_t> fColors;
2279 std::vector<Double_t> fZLevel;
2280 Double_t fmax(20), fmin(0);
2281 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2282 fColors.push_back(TColor::GetColorPalette(
i));
2285 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2288 if (!gDirectory->Cd(
"Ghost")) gDirectory->mkdir(
"Ghost");
2289 gDirectory->Cd(
"Ghost");
2292 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2294 "pics/TrdQaGhost_S%i_L%i_%s%s.pdf",
2301 title.ReplaceAll(
"pdf",
"png");
2309 gDirectory->Cd(
"..");
2324 Int_t combiId = 10 * Station + Layer;
2328 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2332 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2336 text->SetFillStyle(1001);
2337 text->SetLineColor(1);
2339 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2343 text->SetFillColor(fColors[j]);
2344 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2346 if (fColors[j] < 65) text->SetTextColor(kWhite);
2347 title.Form(
"%.1f#pm%.1f", value, valueE);
2348 text->AddText(title);
2355 if (!gDirectory->Cd(
"Lost")) gDirectory->mkdir(
"Lost");
2356 gDirectory->Cd(
"Lost");
2360 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2362 "pics/TrdQaLost_S%i_L%i_%s%s.pdf",
2369 title.ReplaceAll(
"pdf",
"png");
2377 gDirectory->Cd(
"..");
2379 std::vector<Int_t> fColors;
2380 std::vector<Double_t> fZLevel;
2381 Double_t fmax(100), fmin(0);
2382 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2383 fColors.push_back(TColor::GetColorPalette(
i));
2386 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2404 Int_t combiId = 10 * Station + Layer;
2408 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2412 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2416 text->SetFillStyle(1001);
2417 text->SetLineColor(1);
2419 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2424 text->SetFillColor(fColors[j]);
2425 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2427 if (fColors[j] < 65) text->SetTextColor(kWhite);
2429 title.Form(
"%.1f#pm%.1f", value, valueE);
2430 text->AddText(title);
2436 if (!gDirectory->Cd(
"Efficiency")) gDirectory->mkdir(
"Efficiency");
2437 gDirectory->Cd(
"Efficiency");
2441 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2443 "pics/TrdQaEfficiency_S%i_L%i_%s%s.pdf",
2450 title.ReplaceAll(
"pdf",
"png");
2458 gDirectory->Cd(
"..");
2462 std::vector<Int_t> fColors;
2463 std::vector<Double_t> fZLevel;
2464 Double_t fmax(20), fmin(0);
2465 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2466 fColors.push_back(TColor::GetColorPalette(
i));
2469 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2488 Int_t combiId = 10 * Station + Layer;
2492 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2496 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2500 text->SetFillStyle(1001);
2501 text->SetLineColor(1);
2503 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2507 text->SetFillColor(fColors[j]);
2508 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2510 if (fColors[j] < 65) text->SetTextColor(kWhite);
2512 title.Form(
"%.1f#pm%.1f", value, valueE);
2513 text->AddText(title);
2519 if (!gDirectory->Cd(
"MultiPoint")) gDirectory->mkdir(
"MultiPoint");
2520 gDirectory->Cd(
"MultiPoint");
2524 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2526 "pics/TrdQaMultiPoint_S%i_L%i_%s%s.pdf",
2533 title.ReplaceAll(
"pdf",
"png");
2541 gDirectory->Cd(
"..");
2545 std::vector<Int_t> fColors;
2546 std::vector<Double_t> fZLevel;
2547 Double_t fmax(10), fmin(0);
2548 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2549 fColors.push_back(TColor::GetColorPalette(
i));
2552 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2569 Int_t combiId = 10 * Station + Layer;
2573 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2577 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2581 text->SetFillStyle(1001);
2582 text->SetLineColor(1);
2584 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2588 text->SetFillColor(fColors[j]);
2589 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2591 if (fColors[j] < 65) text->SetTextColor(kWhite);
2593 title.Form(
"%.1f#pm%.1f", value, valueE);
2594 text->AddText(title);
2600 if (!gDirectory->Cd(
"dEdx")) gDirectory->mkdir(
"dEdx");
2601 gDirectory->Cd(
"dEdx");
2605 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2607 "pics/TrdQadEdx_S%i_L%i_%s%s.pdf",
2614 title.ReplaceAll(
"pdf",
"png");
2622 gDirectory->Cd(
"..");
2626 std::vector<Int_t> fColors;
2627 std::vector<Double_t> fZLevel;
2628 Double_t fmax(2), fmin(0);
2629 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2630 fColors.push_back(TColor::GetColorPalette(
i));
2633 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2653 Int_t combiId = 10 * Station + Layer;
2657 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2661 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2665 text->SetFillStyle(1001);
2666 text->SetLineColor(1);
2668 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2672 text->SetFillColor(fColors[j]);
2673 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2675 if (fColors[j] < 65) text->SetTextColor(kWhite);
2677 title.Form(
"%.1f#pm%.1f", value, valueE);
2678 text->AddText(title);
2684 if (!gDirectory->Cd(
"Tracklength")) gDirectory->mkdir(
"Tracklength");
2685 gDirectory->Cd(
"Tracklength");
2689 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2691 "pics/TrdQaTracklength_S%i_L%i_%s%s.pdf",
2698 title.ReplaceAll(
"pdf",
"png");
2706 gDirectory->Cd(
"..");
2710 std::vector<Int_t> fColors;
2711 std::vector<Double_t> fZLevel;
2712 Double_t fmax(1), fmin(0);
2713 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2714 fColors.push_back(TColor::GetColorPalette(
i));
2717 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2734 Int_t combiId = 10 * Station + Layer;
2738 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2742 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2746 text->SetFillStyle(1001);
2747 text->SetLineColor(1);
2749 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2753 text->SetFillColor(fColors[j]);
2754 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2756 if (fColors[j] < 65) text->SetTextColor(kWhite);
2758 title.Form(
"%.1f#pm%.1f", value, valueE);
2759 text->AddText(title);
2765 if (!gDirectory->Cd(
"DeltaE")) gDirectory->mkdir(
"DeltaE");
2766 gDirectory->Cd(
"DeltaE");
2770 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2772 "pics/TrdQaDeltaE_S%i_L%i_%s%s.pdf",
2779 title.ReplaceAll(
"pdf",
"png");
2787 gDirectory->Cd(
"..");
2791 std::vector<Int_t> fColors;
2792 std::vector<Double_t> fZLevel;
2793 Double_t fmax(15), fmin(0);
2794 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2795 fColors.push_back(TColor::GetColorPalette(
i));
2798 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2818 Int_t combiId = 10 * Station + Layer;
2822 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2826 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2830 text->SetFillStyle(1001);
2831 text->SetLineColor(1);
2833 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2837 text->SetFillColor(fColors[j]);
2838 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2840 if (fColors[j] < 65) text->SetTextColor(kWhite);
2842 title.Form(
"%.1f#pm%.1f", value, valueE);
2843 text->AddText(title);
2850 if (!gDirectory->Cd(
"ClusterSize")) gDirectory->mkdir(
"ClusterSize");
2851 gDirectory->Cd(
"ClusterSize");
2855 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2857 "pics/TrdQaClusterSize_S%i_L%i_%s%s.pdf",
2864 title.ReplaceAll(
"pdf",
"png");
2872 gDirectory->Cd(
"..");
2876 std::vector<Int_t> fColors;
2877 std::vector<Double_t> fZLevel;
2878 Double_t fmax(100), fmin(0);
2879 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2880 fColors.push_back(TColor::GetColorPalette(
i));
2883 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2902 Int_t combiId = 10 * Station + Layer;
2906 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2910 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2914 text->SetFillStyle(1001);
2915 text->SetLineColor(1);
2917 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
2921 text->SetFillColor(fColors[j]);
2922 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
2924 if (fColors[j] < 65) text->SetTextColor(kWhite);
2926 title.Form(
"%.1f#pm%.1f", value, valueE);
2927 text->AddText(title);
2933 if (!gDirectory->Cd(
"TrackableRatio")) gDirectory->mkdir(
"TrackableRatio");
2934 gDirectory->Cd(
"TrackableRatio");
2938 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
2940 "pics/TrdQaTrackableRatio_S%i_L%i_%s%s.pdf",
2947 title.ReplaceAll(
"pdf",
"png");
2955 gDirectory->Cd(
"..");
2959 std::vector<Int_t> fColors;
2960 std::vector<Double_t> fZLevel;
2961 Double_t fmax(50), fmin(0);
2962 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
2963 fColors.push_back(TColor::GetColorPalette(
i));
2966 fmin + (fmax / TColor::GetNumberOfColors() *
i));
2985 Int_t combiId = 10 * Station + Layer;
2989 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
2993 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
2997 text->SetFillStyle(1001);
2998 text->SetLineColor(1);
3000 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
3004 text->SetFillColor(fColors[j]);
3005 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
3007 if (fColors[j] < 65) text->SetTextColor(kWhite);
3009 title.Form(
"%.1f#pm%.1f", value, valueE);
3010 text->AddText(title);
3016 if (!gDirectory->Cd(
"Trackable")) gDirectory->mkdir(
"Trackable");
3017 gDirectory->Cd(
"Trackable");
3021 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
3023 "pics/TrdQaTrackable_S%i_L%i_%s%s.pdf",
3030 title.ReplaceAll(
"pdf",
"png");
3038 gDirectory->Cd(
"..");
3041 std::vector<Int_t> fColors;
3042 std::vector<Double_t> fZLevel;
3043 Double_t fmax(100), fmin(0);
3044 for (Int_t
i = 0;
i < TColor::GetNumberOfColors();
i++) {
3045 fColors.push_back(TColor::GetColorPalette(
i));
3048 fmin + (fmax / TColor::GetNumberOfColors() *
i));
3051 printf(
"fModuleAveragePointsMap: %i\n",
3069 Int_t combiId = 10 * Station + Layer;
3073 fLayerDummy->GetZaxis()->SetRangeUser(fmin, fmax);
3077 text =
new TPaveText(fModuleGeo->
GetX() - fModuleInfo->
GetSizeX(),
3081 text->SetFillStyle(1001);
3082 text->SetLineColor(1);
3084 while ((value > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
3088 text->SetFillColor(fColors[j]);
3089 if (j >= (Int_t) fZLevel.size()) text->SetFillColor(2);
3091 if (fColors[j] < 65) text->SetTextColor(kWhite);
3093 title.Form(
"%.1f#pm%.1f", value, valueE);
3094 text->AddText(title);
3100 if (!gDirectory->Cd(
"Trackable")) gDirectory->mkdir(
"Trackable");
3101 gDirectory->Cd(
"Trackable");
3105 fLayerMapIt->second->Write(
"", TObject::kOverwrite);
3107 "pics/TrdQaAveragePoints_S%i_L%i_%s%s.pdf",
3114 title.ReplaceAll(
"pdf",
"png");
3122 gDirectory->Cd(
"..");
3123 gDirectory->Cd(
"..");
3126 gDirectory->Cd(origpath);