270 cout <<
"===========================================================" << endl;
272 cout << GetName() <<
": Initialising..." << endl;
275 FairRootManager* ioman = FairRootManager::Instance();
277 cout <<
"-E- " << GetName() <<
"::Init: "
278 <<
"RootManager not instantised!" << endl;
285 cout <<
"-E- " << GetName() <<
"::Init: No MCTrack array!" << endl;
299 cout <<
"-E- " << GetName() <<
"::Init: No StsHit array!" << endl;
306 cout <<
"-E- " << GetName() <<
"::Init: No StsTrack array!" << endl;
313 cout <<
"-E- " << GetName() <<
"::Init: No StsTrackMatch array!" << endl;
320 cout <<
"-E- " << GetName() <<
"::Init: No StsDigi array!" << endl;
335 if (geoStatus != kSUCCESS) {
336 cout <<
"-E- " << GetName() <<
"::Init: Error in reading geometry!" << endl;
346 fOnlinePad[0] =
new TPad(
"titlePad",
"Title pad", 0.01, 0.91, 0.99, 0.99);
347 fOnlinePad[1] =
new TPad(
"efficiencyPad",
"Efficiency pad", 0.01, 0.61, 0.39, 0.89);
348 fOnlinePad[2] =
new TPad(
"resolutionPad",
"Momentum resolution pad", 0.01, 0.31, 0.39, 0.59);
349 fOnlinePad[3] =
new TPad(
"hNpAccAll",
"Nof points reconstructuble tracks", 0.41, 0.66, 0.69, 0.89);
350 fOnlinePad[4] =
new TPad(
"hNpRecAll",
"Nof points reconstructed track", 0.71, 0.66, 0.99, 0.89);
351 fOnlinePad[5] =
new TPad(
"hStsTrackFPosZ",
"Param First pos Z", 0.41, 0.41, 0.69, 0.64);
352 fOnlinePad[6] =
new TPad(
"hStsTrackLPosZ",
"Param Last pos Z", 0.71, 0.41, 0.99, 0.64);
353 fOnlinePad[7] =
new TPad(
"hMomPrim",
"Momentum of primary tracks", 0.41, 0.16, 0.69, 0.41);
354 fOnlinePad[8] =
new TPad(
"hMomSec",
"Momentum of secondary tracks", 0.71, 0.16, 0.99, 0.41);
355 fOnlinePad[9] =
new TPad(
"printoutPad",
"Print information pad", 0.01, 0.01, 0.39, 0.29);
358 for (
Int_t ipad = 0; ipad < 10; ipad++) {
365 TLegend* brp =
new TLegend(0.1, 0.1, 0.9, 0.9,
"Online STS reconstruction");
376 cout <<
" Minimum number of STS hits : " <<
fMinHits << endl;
377 cout <<
" Matching quota : " <<
fQuota << endl;
380 cout <<
" Number of STS stations : " <<
fNStations << endl;
382 cout <<
" ***** Task is ACTIVE *****" << endl;
383 cout <<
"===========================================================" << endl << endl;
443 for (
Int_t iside = 0; iside < 2; iside++) {
445 for (
Int_t ichip = 0; ichip < 8; ichip++)
456 for (
Int_t iMC = 0; iMC < nMC; iMC++) {
459 cout <<
"-E- " << GetName() <<
"::Exec: "
460 <<
"No MCTrack at index " << iMC << endl;
461 Fatal(
"Exec",
"No MCTrack in array");
503 minHits = minHits - 1;
505 if (nHits < (minHits))
519 if (mom > 1. && isPrim) {
557 cout <<
"-E- " << GetName() <<
"::Exec: "
558 <<
"No StsTrack for matched MCTrack " << iMC << endl;
559 Fatal(
"Exec",
"No StsTrack for matched MCTrack");
563 cout <<
"-E- " << GetName() <<
"::Exec: "
564 <<
"Matched StsTrack " << iRec <<
" is below matching "
565 <<
"criterion ( " << quali <<
")" << endl;
566 Fatal(
"Exec",
"Match below matching quota");
570 cout <<
"-E- " << GetName() <<
"::Exec: "
571 <<
"No StsTrackMatch for matched MCTrack " << iMC << endl;
572 Fatal(
"Exec",
"No StsTrackMatch for matched MCTrack");
578 if (nTrue + nWrong + nFake != nAllHits) {
579 cout <<
"True " << nTrue <<
" wrong " << nWrong <<
" Fake " << nFake <<
" Hits " << nAllHits << endl;
580 Fatal(
"Exec",
"Wrong number of hits");
585 cout <<
"-I- " << GetName() <<
": "
586 <<
"MCTrack " << iMC <<
", hits " << nAllHits <<
", StsTrack " << iRec <<
", hits " << nHits
587 <<
", true hits " << nTrue << endl;
623 for (
Int_t itemp = 0; itemp < 10; itemp++) {
638 Int_t hitStationLimits[2][100];
641 hitStationLimits[0][ist] = -1;
642 hitStationLimits[1][ist] = -1;
647 for (
Int_t idigi = 0; idigi < nofStsDigis; idigi++) {
656 for (
Int_t ihit = 0; ihit < nofStsHits; ihit++) {
659 if (hitStationLimits[0][stsHit->
GetStationNr() - 1] == -1)
662 if (hitStationLimits[1][stsHitBack->
GetStationNr() - 1] == -1) {
663 hitStationLimits[1][stsHitBack->
GetStationNr() - 1] = nofStsHits - ihit;
730 cout <<
"---------- StsReconstructionQa : Event " <<
fNEvents + 1 <<
" summary ------------" << endl;
731 cout <<
"MCTracks : " << nAll <<
", reconstructable: " << nAcc <<
", reconstructed: " << nRecAll << endl;
732 cout <<
"Vertex : reconstructable: " << nPrim <<
", reconstructed: " << nRecPrim <<
", efficiency "
733 << effPrim * 100. <<
"%" << endl;
734 cout <<
"Reference : reconstructable: " << nRef <<
", reconstructed: " << nRecRef <<
", efficiency "
735 << effRef * 100. <<
"%" << endl;
736 cout <<
"Non-vertex : reconstructable: " << nSec <<
", reconstructed: " << nRecSec <<
", efficiency "
737 << effSec * 100. <<
"%" << endl;
738 cout <<
"STSTracks " << nRec <<
", ghosts " << nGhosts <<
", clones " << nClones << endl;
739 cout <<
"-----------------------------------------------------------" << endl;
743 cout <<
"\r+ " << setw(15) << left << fName <<
": event " <<
fNEvents + 1 <<
" " << setprecision(4) << setw(8)
744 << fixed << right <<
fTimer.RealTime() <<
" s, efficiency all " << effAll * 100. <<
" %, vertex "
745 << effPrim * 100. <<
" %, reference " << effRef * 100. <<
" %" << endl;
790 TLine* oneLine =
new TLine(0.0, 1.0, 10.0, 1.0);
801 TF1* gausFit =
new TF1(
"gausFit",
"gaus");
803 tempProjY->
Fit(
"gausFit",
"QN",
"", -5., 5.);
867 TF1* allEffFit =
new TF1(
"allEffFit",
"pol0", 1., 10.);
873 TF1* primEffFit =
new TF1(
"primEffFit",
"pol0", 1., 10.);
879 TF1* secEffFit =
new TF1(
"secEffFit",
"pol0", 1., 10.);
886 TF1* momentumResFuncPrim =
new TF1(
"momentumResFuncPrim",
"gaus", -10., 10.);
888 momentumResHistPrim->
Fit(momentumResFuncPrim,
"QN",
"", -10., 10.);
890 TF1* momentumResFuncAll =
new TF1(
"momentumResFuncAll",
"gaus", -10., 10.);
892 momentumResHistAll->
Fit(momentumResFuncAll,
"QN",
"", -10., 10.);
903 printoutPave->
AddText(
Form(
"%3.2f prim, %3.2f sec, %3.2f gh, %3.2f cl",
911 printoutPave->
AddText(
"Tracking efficiencies (p>1.0 GeV/c):");
912 printoutPave->
AddText(
Form(
"all = %2.2f%%(%2.2f%%)", 100. * effAll, 100. * allEff));
913 printoutPave->
AddText(
Form(
"vertex = %2.2f%%(%2.2f%%)", 100. * effPrim, 100. * primEff));
914 printoutPave->
AddText(
Form(
"reference = %2.2f%%", 100. * effRef));
915 printoutPave->
AddText(
Form(
"non-vertex = %2.2f%%(%2.2f%%)", 100. * effSec, 100. * secEff));
917 Form(
"Momentum resolution = %3.2f%%(%3.2f%%)", momentumResolutionAll, momentumResolutionPrim));
919 printoutPave->
Draw();
1018 cout <<
"-W- " << GetName() <<
"::GetGeometry: No passive geometry!" << endl;
1024 cout <<
"-W- " << GetName() <<
"::GetGeometry: No passive node array" << endl;
1028 FairGeoNode* target = (FairGeoNode*)passNodes->
FindObject(
"targ");
1030 cout <<
"-E- " << GetName() <<
"::GetGeometry: No target node" << endl;
1034 FairGeoVector targetPos = target->getLabTransform()->getTranslation();
1035 FairGeoVector centerPos = target->getCenterPosition().getTranslation();
1036 Double_t targetX = targetPos.X() + centerPos.X();
1037 Double_t targetY = targetPos.Y() + centerPos.Y();
1038 Double_t targetZ = targetPos.Z() + centerPos.Z();
1039 fTargetPos.SetXYZ(targetX, targetY, targetZ);
1043 cout <<
"-W- " << GetName() <<
"::GetGeometry: No passive geometry!" << endl;
1049 cout <<
"-E- " << GetName() <<
"::GetGeometry: No STS node array" << endl;
1056 cout <<
"There are " << tempNofStations <<
" nodes" << (tempNofStations > 10 ?
"!!!" :
"") << endl;
1063 for (
Int_t istat = 0; istat < 20; istat++)
1066 for (
Int_t ist = 0; ist < tempNofStations; ist++) {
1068 FairGeoNode* stsNode = (FairGeoNode*)stsNodes->
At(ist);
1070 cout <<
"-W- CbmStsDigiScheme::Init: station#" << ist <<
" not found among sensitive nodes " << endl;
1073 geoNodeName = stsNode->
GetName();
1078 FairGeoVector* pt1 = stsNode->getPoint(0);
1079 FairGeoVector* pt2 = stsNode->getPoint(1);
1085 if (geoNodeName.Contains(stationNames[ikst])) {
1087 stationKnown =
kTRUE;
1103 geoNodeName.Remove(12, geoNodeName.Length() - 12);
1108 cout <<
"station #" <<
fNStations <<
" has MCID = " << stsNode->getMCid() <<
" and name "
1109 << stsNode->GetName() << endl;
1113 cout <<
" Stations: " <<
fNStations <<
" contain" << flush;
1115 cout <<
" " <<
fNSectors[istat] << flush;
1116 cout <<
" sensors" << endl;
1133 Int_t nBinsMom = 40;
1134 fhMomAccAll =
new TH1F(
"hMomAccAll",
"all reconstructable tracks", nBinsMom, minMom, maxMom);
1135 fhMomRecAll =
new TH1F(
"hMomRecAll",
"all reconstructed tracks", nBinsMom, minMom, maxMom);
1136 fhMomEffAll =
new TH1F(
"hMomEffAll",
"efficiency all tracks", nBinsMom, minMom, maxMom);
1139 fhMomAccPrim =
new TH1F(
"hMomAccPrim",
"reconstructable vertex tracks", nBinsMom, minMom, maxMom);
1140 fhMomRecPrim =
new TH1F(
"hMomRecPrim",
"reconstructed vertex tracks", nBinsMom, minMom, maxMom);
1141 fhMomEffPrim =
new TH1F(
"hMomEffPrim",
"efficiency vertex tracks", nBinsMom, minMom, maxMom);
1142 fhMomAccSec =
new TH1F(
"hMomAccSec",
"reconstructable non-vertex tracks", nBinsMom, minMom, maxMom);
1143 fhMomRecSec =
new TH1F(
"hMomRecSec",
"reconstructed non-vertex tracks", nBinsMom, minMom, maxMom);
1144 fhMomEffSec =
new TH1F(
"hMomEffSec",
"efficiency non-vertex tracks", nBinsMom, minMom, maxMom);
1145 fhMomGhosts =
new TH1F(
"hMomGhosts",
"momenta of ghosts", nBinsMom, minMom, maxMom);
1146 fhMomClones =
new TH1F(
"hMomClones",
"momenta of clones", nBinsMom, minMom, maxMom);
1192 for (
Int_t itemp = 0; itemp < 10; itemp++) {
1196 cout <<
"fpart pdg table content for itemp = " << itemp <<
" equals " <<
fPartPdgTable[itemp] << endl;
1199 Form(
"reconstruable particle%d tracks",
fPartPdgTable[itemp]), nBinsMom, minMom, maxMom);
1202 Form(
"reconstructed particle%d tracks",
fPartPdgTable[itemp]), nBinsMom, minMom, maxMom);
1205 Form(
"efficiency particle%d tracks",
fPartPdgTable[itemp]), nBinsMom, minMom, maxMom);
1215 fhNpAccAll =
new TH1F(
"hNpAccAll",
"all reconstructable tracks", nBinsNp, minNp, maxNp);
1216 fhNpRecAll =
new TH1F(
"hNpRecAll",
"all reconstructed tracks", nBinsNp, minNp, maxNp);
1217 fhNpEffAll =
new TH1F(
"hNpEffAll",
"efficiency all tracks", nBinsNp, minNp, maxNp);
1218 fhNpAccPrim =
new TH1F(
"hNpAccPrim",
"reconstructable vertex tracks", nBinsNp, minNp, maxNp);
1219 fhNpRecPrim =
new TH1F(
"hNpRecPrim",
"reconstructed vertex tracks", nBinsNp, minNp, maxNp);
1220 fhNpEffPrim =
new TH1F(
"hNpEffPrim",
"efficiency vertex tracks", nBinsNp, minNp, maxNp);
1221 fhNpAccSec =
new TH1F(
"hNpAccSec",
"reconstructable non-vertex tracks", nBinsNp, minNp, maxNp);
1222 fhNpRecSec =
new TH1F(
"hNpRecSec",
"reconstructed non-vertex tracks", nBinsNp, minNp, maxNp);
1223 fhNpEffSec =
new TH1F(
"hNpEffSec",
"efficiency non-vertex tracks", nBinsNp, minNp, maxNp);
1238 fhZAccSec =
new TH1F(
"hZAccSec",
"reconstructable non-vertex tracks", nBinsZ, minZ, maxZ);
1239 fhZRecSec =
new TH1F(
"hZRecSecl",
"reconstructed non-vertex tracks", nBinsZ, minZ, maxZ);
1240 fhZEffSec =
new TH1F(
"hZEffRec",
"efficiency non-vertex tracks", nBinsZ, minZ, maxZ);
1246 fhNhClones =
new TH1F(
"hNhClones",
"number of hits for clones", nBinsNp, minNp, maxNp);
1247 fhNhGhosts =
new TH1F(
"hNhGhosts",
"number of hits for ghosts", nBinsNp, minNp, maxNp);
1254 new TH2F(
"hMomResAll",
"momentum resolution vs p for all tracks", nBinsMom, minMom, maxMom, 20, -10., 10.);
1256 new TH2F(
"hMomResPrim",
"momentum resolution vs p for vertex tracks", nBinsMom, minMom, maxMom, 20, -10., 10.);
1259 fhMomResSec =
new TH2F(
"hMomResSec",
"momentum resolution vs p for non-vertex tracks", nBinsMom, minMom, maxMom, 20,
1264 fhLowBand =
new TH1F(
"hLowBand",
"Lower Band", nBinsMom, minMom, maxMom);
1265 fhHigBand =
new TH1F(
"hHigBand",
"Higher band", nBinsMom, minMom, maxMom);
1278 fhPrimaryVertex =
new TH3F(
"hPrimaryVertex",
"Primary vertex", 200, -0.1, 0.1, 200, -0.1, 0.1, 200, -0.1, 0.1);
1281 fhRefTracks =
new TH1F(
"hRefTracks",
"Nof reconstructed reference tracks", 100, -0.5, 999.5);
1282 fhRecRefTracks =
new TH1F(
"hRecRefTracks",
"Nof reconstruable reference tracks", 100, -0.5, 999.5);
1286 Char_t lett[5] = {
'X',
'Y',
'Z',
'x',
'y'};
1288 for (
Int_t itemp = 0; itemp < 15; itemp++) {
1340 Form(
"StsTrack ParamFirst pos %c", lett[itemp]), nof, beg, end);
1342 Form(
"StsTrack ParamLast pos %c", lett[itemp]), nof, beg, end);
1349 Form(
"StsTrack ParamFirst dir %c", lett[itemp + 3]), 10, -1.5, 1.5);
1351 Form(
"StsTrack ParamLast dir %c", lett[itemp + 3]), 10, -1.5, 1.5);
1355 fhStsTrackFMom =
new TH1F(
"hStsTrackFMom",
"Momentum of rec. tracks ParFirst", 100, -50., 50.);
1356 fhStsTrackLMom =
new TH1F(
"hStsTrackLMom",
"Momentum of rec. tracks ParLast", 100, -50., 50.);
1357 fhStsTrackChiSq =
new TH1F(
"hStsTrackChiSq",
"Chi square of rec. tracks", 100, 0., 1000.);
1472 cout <<
"-E- " << GetName() <<
"::Exec: Number of StsMatches (" << nMtc
1473 <<
") does not equal number of StsTracks (" << nRec <<
")" << endl;
1474 Fatal(
"Exec",
"Inequal number of StsTrack and StsTrackMatch");
1476 for (
Int_t iRec = 0; iRec < nRec; iRec++) {
1480 cout <<
"-E- " << GetName() <<
"::Exec: "
1481 <<
"No StsTrack at index " << iRec << endl;
1482 Fatal(
"Exec",
"No StsTrack in array");
1486 FairTrackParam* trParF = (FairTrackParam*)stsTrack->
GetParamFirst();
1487 FairTrackParam* trParL = (FairTrackParam*)stsTrack->
GetParamLast();
1499 for (
Int_t ixx = 0; ixx < 5; ixx++) {
1500 for (
Int_t iyy = ixx; iyy < 5; iyy++) {
1512 cout <<
"-E- " << GetName() <<
"::Exec: "
1513 <<
"No StsTrackMatch at index " << iRec << endl;
1514 Fatal(
"Exec",
"No StsTrackMatch in array");
1521 cout <<
"-I- " << GetName() <<
":"
1522 <<
"No MC match for StsTrack " << iRec << endl;
1546 cout <<
"-I- " << GetName() <<
": "
1547 <<
"MCTrack " << iMC <<
" doubly matched."
1548 <<
"Current match " << iRec <<
", previous match " <<
fMatchMap[iMC] << endl;
1570 cout <<
"-I- " << GetName() <<
":"
1571 <<
"StsTrack " << iRec <<
" below matching criterion "
1572 <<
"(" << quali <<
")" << endl;
virtual void SetTextAlign(Short_t align=11)
virtual void SetTextColor(Color_t tcolor=1)
virtual void SetTextSize(Float_t tsize=1)
virtual TText * AddText(const char *label)
void Draw(Option_t *option="") override