13 #include "TDatabasePDG.h"
14 #include "TGeoManager.h"
55 #ifdef MAKE_DISPERSE_2D_HISTOS
59 #endif //MAKE_DISPERSE_2D_HISTOS
61 #ifdef MAKE_TRIGGERING_HISTOS
66 #endif //MAKE_TRIGGERING_HISTOS
75 : useForWrite(false), fd(-1), evBuf(0), bufSize(0), evPtr(0), evEnd(0) {}
83 fd = open(fileName.Data(),
84 O_CREAT | O_WRONLY | O_TRUNC,
85 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
87 fd = open(fileName.Data(), O_RDONLY);
93 off_t curOff = lseek(
fd, 0, SEEK_CUR);
95 if (-1 == curOff)
return false;
98 bufSize = (2 *
sizeof(Int_t) + 6 *
sizeof(Double_t)) * nEnt;
123 if (
evPtr + 2 *
sizeof(Int_t) + 6 *
sizeof(Double_t) >
evEnd)
return false;
125 memcpy(
evPtr, &stationNumber,
sizeof(stationNumber));
126 evPtr +=
sizeof(stationNumber);
127 memcpy(
evPtr, &layerNumber,
sizeof(layerNumber));
128 evPtr +=
sizeof(layerNumber);
133 memcpy(
evPtr, &z,
sizeof(z));
135 memcpy(
evPtr, &xErr,
sizeof(xErr));
136 evPtr +=
sizeof(xErr);
137 memcpy(
evPtr, &yErr,
sizeof(yErr));
138 evPtr +=
sizeof(yErr);
139 memcpy(
evPtr, &zErr,
sizeof(zErr));
140 evPtr +=
sizeof(zErr);
145 off_t footerOfFooterOff = lseek(
fd, -
sizeof(off_t), SEEK_END);
147 if (-1 == footerOfFooterOff)
return false;
150 ssize_t readBytes = read(
fd, &footerOff,
sizeof(footerOff));
152 if (-1 == readBytes)
return false;
154 Int_t numFooterEntries = (footerOfFooterOff - footerOff) /
sizeof(off_t);
160 fd, &eventOff,
sizeof(eventOff), footerOff +
eventNumber *
sizeof(off_t));
162 if (-1 == readBytes)
return false;
167 nextEvOff = footerOff;
169 readBytes = pread(
fd,
174 if (-1 == readBytes)
return false;
181 bufSize = nextEvOff - eventOff;
207 if (
evPtr + 2 *
sizeof(Int_t) + 6 *
sizeof(Double_t) >
evEnd)
return false;
209 memcpy(&stationNumber,
evPtr,
sizeof(stationNumber));
210 evPtr +=
sizeof(stationNumber);
211 memcpy(&layerNumber,
evPtr,
sizeof(layerNumber));
212 evPtr +=
sizeof(layerNumber);
217 memcpy(&z,
evPtr,
sizeof(z));
219 memcpy(&xErr,
evPtr,
sizeof(xErr));
220 evPtr +=
sizeof(xErr);
221 memcpy(&yErr,
evPtr,
sizeof(yErr));
222 evPtr +=
sizeof(yErr);
223 memcpy(&zErr,
evPtr,
sizeof(zErr));
224 evPtr +=
sizeof(zErr);
231 off_t footerOff = lseek(
fd, 0, SEEK_CUR);
237 res = write(
fd, &o,
sizeof(o));
239 if (-1 == res)
goto end;
242 res = write(
fd, &footerOff,
sizeof(footerOff));
246 return -1 != res && -1 != res2;
252 listMuchPixelDigiMatches(0), listStsTracks(0), listStsMatches(0), listStsPts(0), listRecoTracks(0),
256 parallMode(false), hitFileName(
""), fileSaveSuffix(
""),
particleType(
"jpsi"),
pPtCut(true),
266 , falseSignalTriggerings(0)
267 , trueSignalTriggerings(0)
268 , hasSignalInEvent(false)
272 #ifdef CALC_MUCH_DETECTORS_EFF
273 , mcPointsCount(0), mcPointsTriggered(0)
275 , saveOnlyTriggeringTracks(true)
294 sprintf(name,
"%s/%s.root", dir_name, histoNameBase);
296 sprintf(name,
"%s/%s_%d.root", dir_name, histoNameBase, histoNumber);
298 TFile* curFile = TFile::CurrentFile();
299 TFile*
f =
new TFile(name);
301 if (!
f->IsZombie()) {
303 sprintf(name,
"%s", histoNameBase);
305 sprintf(name,
"%s_%d", histoNameBase, histoNumber);
307 TH1F*
h =
static_cast<TH1F*
>(
f->Get(name));
308 retVal =
h->GetRMS();
313 TFile::CurrentFile() = curFile;
329 sprintf(name,
"%s/%s_%d.root", dir_name, histoNameBase, histoNumber);
330 TFile* curFile = TFile::CurrentFile();
331 TFile*
f =
new TFile(name);
333 if (!
f->IsZombie()) {
334 sprintf(name,
"%s_%d", histoNameBase, histoNumber);
335 TH2F*
h =
static_cast<TH2F*
>(
f->Get(name));
336 retVal =
h->GetCovariance(axis1, axis2);
341 TFile::CurrentFile() = curFile;
348 cout <<
"LxFinder::Init() called at " <<
nTimes++ <<
" time" << endl;
357 FairRootManager* fRootManager = 0;
360 fRootManager = FairRootManager::Instance();
362 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"MuchPixelHit"));
364 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"MCTrack"));
366 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"MuchPoint"));
368 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"MuchCluster"));
370 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"MuchDigiMatch"));
372 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"StsTrack"));
374 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"StsTrackMatch"));
376 LX_DYNAMIC_CAST<TClonesArray*>(fRootManager->GetObject(
"StsPoint"));
401 for (Int_t j = 0; j <
LXLAYERS; ++j) {
404 TString muchStLrPath =
405 Form(
"/cave_1/much_0/muchstation%02i_0/muchstation%02ilayer%01i_0",
409 gGeoManager->cd(muchStLrPath.Data());
410 Double_t localCoords[3] = {0., 0., 0.};
411 Double_t globalCoords[3];
412 gGeoManager->LocalToMaster(localCoords, globalCoords);
413 aStation->
layers[j]->zCoord = globalCoords[2];
414 #ifdef MAKE_DISPERSE_2D_HISTOS
416 #endif //MAKE_DISPERSE_2D_HISTOS
425 if (!
GetHistoRMS(
"muchInStationXDispLeft",
i, rms))
return kFATAL;
430 if (!
GetHistoRMS(
"muchInStationYDispLeft",
i, rms))
return kFATAL;
435 if (!
GetHistoRMS(
"muchInStationXDispRight",
i, rms))
return kFATAL;
440 if (!
GetHistoRMS(
"muchInStationYDispRight",
i, rms))
return kFATAL;
446 if (!
GetHistoRMS(
"muchLongSegmentTxHisto",
i, rms))
return kFATAL;
452 if (!
GetHistoRMS(
"muchLongSegmentTyHisto",
i, rms))
return kFATAL;
459 if (!
GetHistoRMS(
"muchClusterXDispHisto",
i, rms))
return kFATAL;
461 aStation->clusterXLimit = rms;
462 aStation->clusterXLimit2 = rms * rms;
464 if (!
GetHistoRMS(
"muchClusterYDispHisto",
i, rms))
return kFATAL;
466 aStation->clusterYLimit = rms;
467 aStation->clusterYLimit2 = rms * rms;
469 if (!
GetHistoRMS(
"muchClusterTxDispHisto",
i, rms))
return kFATAL;
471 aStation->clusterTxLimit = rms;
472 aStation->clusterTxLimit2 = rms * rms;
474 if (!
GetHistoRMS(
"muchClusterTyDispHisto",
i, rms))
return kFATAL;
476 aStation->clusterTyLimit = rms;
477 aStation->clusterTyLimit2 = rms * rms;
478 #endif //CLUSTER_MODE
481 if (!
GetHistoRMS(
"muchSegmentTxBreakHisto",
i, rms))
return kFATAL;
486 if (!
GetHistoRMS(
"muchSegmentTyBreakHisto",
i, rms))
return kFATAL;
493 #ifdef USE_KALMAN_FIT
495 for (Int_t j = 0; j <= 1; ++j) {
496 for (Int_t k = 0; k <= 1; ++k) {
498 "muchXTxCovHisto",
i, j + 1, k + 1, aStation->MSNoise[0][j][k]))
502 "muchYTyCovHisto",
i, j + 1, k + 1, aStation->MSNoise[1][j][k]))
507 #endif //USE_KALMAN_FIT
511 cout <<
"LxFinder::Init(): Failed to read RMS from muchStsBreakX" << endl;
516 cout <<
"LxFinder::Init(): Failed to read RMS from muchStsBreakY" << endl;
521 cout <<
"LxFinder::Init(): Failed to read RMS from muchStsBreakTx" << endl;
526 cout <<
"LxFinder::Init(): Failed to read RMS from muchStsBreakTy" << endl;
533 fRootManager->Register(
"MuchTrack",
536 IsOutputBranchPersistent(
"MuchTrack"));
541 massHisto =
new TH1F(
"jpsi_mass",
"jpsi_mass", 100, 2., 4.);
546 new TTree(
"SuperEventTracks",
"Tracks for building a super event");
551 signalChi2Histo =
new TH1F(
"signal_chi2",
"signal_chi2", 100, 0., 20.);
553 new TH1F(
"background_chi2",
"background_chi2", 100, 0., 20.);
560 for (
int i = 0;
i < 6; ++
i) {
561 #ifdef MAKE_DISPERSE_2D_HISTOS
562 sprintf(histoName,
"disperseL_%d",
i);
564 new TProfile2D(histoName, histoName, 30, -3., 3., 30, -3., 3.);
566 sprintf(histoName,
"disperseR_%d",
i);
568 new TProfile2D(histoName, histoName, 30, -3., 3., 30, -3., 3.);
570 sprintf(histoName,
"disperseD_%d",
i);
572 new TProfile2D(histoName, histoName, 30, -3., 3., 30, -3., 3.);
574 #endif //MAKE_DISPERSE_2D_HISTOS
581 new TH1F(
"muPlusDtxHisto",
"Mu+ Tx difference", 200, -0.15, 0.15);
584 new TH1F(
"muMinusDtxHisto",
"Mu- Tx difference", 200, -0.15, 0.15);
587 new TH1F(
"signalXAtZ0",
"Signal track X at Z=0", 200, -40.0, 40.0);
590 new TH1F(
"signalYAtZ0",
"Signal track Y at Z=0", 200, -40.0, 40.0);
593 new TH1F(
"bgrXAtZ0",
"Background track X at Z=0", 200, -40.0, 40.0);
596 new TH1F(
"bgrYAtZ0",
"Background track Y at Z=0", 200, -40.0, 40.0);
599 "Distance between signal tracks",
605 "Distance between background tracks",
611 "Signs of signal tracks tangents products",
617 "Signs of signal tracks coordinates products",
623 "Signs of background tracks tangents products",
629 "Signs of background tracks coordinates products",
635 "The number of reconstructed tracks in an event",
641 new TH1F(
"signalInterTracksDistanceOn1st",
642 "Distance between signal tracks on the 1st station",
648 new TH1F(
"bgrInterTracksDistanceOn1st",
649 "Distance between background tracks on the 1st station",
655 "bgrInterTracksDistanceOn1stSigns",
656 "Distance between background tracks on the 1st station separated by signs",
662 new TH1F(
"signalInterTracksAngle",
663 "Angle between signal tracks by hits on 1st station",
669 new TH1F(
"bgrInterTracksAngle",
670 "Angle between background tracks by hits on 1st station",
676 "signalInterTrackCorrDA",
685 "bgrInterTrackCorrDA",
694 "Momentum determination error for signal",
700 "Momentum determination error for background",
707 "Reconstruction efficiency by momentum",
715 #ifdef MAKE_TRIGGERING_HISTOS
717 "triggeringAllTracksVertices",
723 "triggeringDistTracksVertices",
729 "triggeringSignTracksVertices",
735 "triggeringTrigTracksVertices",
740 #endif //MAKE_TRIGGERING_HISTOS
743 stsTrackChi2 =
new TH1F(
"stsTrackChi2",
"stsTrackChi2", 200, 0., 10.);
745 stsTrackX =
new TH1F(
"stsTrackX",
"stsTrackX", 200, -0.2, 0.2);
747 stsTrackY =
new TH1F(
"stsTrackY",
"stsTrackY", 200, -0.2, 0.2);
753 #endif //MAKE_EFF_CALC
763 cout <<
"LxFinder::Exec() called at " <<
nTimes <<
" time" << endl;
764 timeval bTime, eTime;
766 gettimeofday(&bTime, 0);
773 for (
int i = 0;
i < 8; ++
i)
776 #ifdef MAKE_DISPERSE_2D_HISTOS
781 #endif //MAKE_DISPERSE_2D_HISTOS
792 cout <<
"There are: " << nEnt <<
" of MC tracks" << endl;
796 Int_t* root2lxmctrackmap =
new Int_t[nEnt];
799 for (
int i = 0;
i < nEnt; ++
i) {
801 mcTrack.
p = mct->
GetP();
804 if (abs(pdgCode) >= 10000) {
805 root2lxmctrackmap[
i] = -1;
809 root2lxmctrackmap[
i] = mapCnt++;
811 mcTrack.
q = TDatabasePDG::Instance()->GetParticle(pdgCode)->Charge() / 3.0;
820 mcTrack.
pdg = pdgCode;
826 cout <<
"There are: " << nEnt <<
" of STS MC points" << endl;
828 for (
int i = 0;
i < nEnt; ++
i) {
829 TVector3 xyzI,
PI, xyzO, PO;
832 if (0 == stsPt)
continue;
835 stsPt->Position(xyzI);
839 TVector3 xyz = .5 * (xyzI + xyzO);
840 TVector3 P = .5 * (
PI + PO);
841 stsMCPoint.
x = xyz.X();
842 stsMCPoint.
y = xyz.Y();
843 stsMCPoint.
z = xyz.Z();
844 stsMCPoint.
px = P.X();
845 stsMCPoint.
py = P.Y();
846 stsMCPoint.
pz = P.Z();
849 + stsMCPoint.
pz * stsMCPoint.
pz));
852 Int_t trackId = root2lxmctrackmap[stsPt->GetTrackID()];
865 cout <<
"There are: " << nEnt <<
" of MUCH MC points" << endl;
869 Int_t* root2lxmcpointmap =
new Int_t
874 Int_t maxReferencedPtsIndex = 0;
876 for (
int i = 0;
i < nEnt; ++
i) {
877 TVector3 xyzI,
PI, xyzO, PO;
881 root2lxmcpointmap[
i] = -1;
885 Int_t trackId = root2lxmctrackmap[pt->GetTrackID()];
888 root2lxmcpointmap[
i] = -1;
895 root2lxmcpointmap[
i] = mapCnt++;
901 TVector3 xyz = .5 * (xyzI + xyzO);
902 TVector3 P = .5 * (
PI + PO);
910 + mcPoint.
pz * mcPoint.
pz));
915 Int_t ptId = root2lxmcpointmap[
i];
924 #ifdef MAKE_DISPERSE_2D_HISTOS
927 #endif //MAKE_DISPERSE_2D_HISTOS
936 if ((13 != track.
pdg && -13 == track.
pdg) || track.
mother_ID >= 0)
continue;
938 if (track.
p < 3)
continue;
942 if (pt2 < 1)
continue;
947 for (vector<LxMCPoint*>::iterator j = track.
Points.begin();
955 #ifdef MAKE_DISPERSE_2D_HISTOS
965 for (list<LxMCPoint*>::iterator k = lPoints.begin(); k != lPoints.end();
976 x = mPoint->
x + tx * diffZ;
977 y = mPoint->
y + ty * diffZ;
980 for (list<LxMCPoint*>::iterator k = rPoints.begin(); k != rPoints.end();
1000 for (list<LxMCPoint*>::iterator k = lPoints.begin(); k != lPoints.end();
1010 #endif //MAKE_DISPERSE_2D_HISTOS
1014 #endif //MAKE_HISTOS
1016 #endif //MAKE_EFF_CALC
1023 gettimeofday(&bTime, 0);
1025 gettimeofday(&eTime, 0);
1027 (eTime.tv_sec - bTime.tv_sec) * 1000000 + eTime.tv_usec - bTime.tv_usec;
1028 Int_t runTime = exeDuration;
1029 bTime.tv_sec = eTime.tv_sec;
1030 bTime.tv_usec = eTime.tv_usec;
1035 Int_t stationNumber, layerNumber,
i = 0;
1036 Double_t
x,
y, z, errX, errY, errZ;
1041 stationNumber, layerNumber,
i++,
x,
y, z, errX, errY, errZ);
1044 caSpace.
x_errs[stationNumber][layerNumber][point_number] = errX;
1046 caSpace.
y_errs[stationNumber][layerNumber][point_number] = errY;
1055 cout <<
"There are: " << nEnt <<
" of MUCH pixel hits" << endl;
1059 for (Int_t
i = 0;
i < nEnt; ++
i) {
1075 if (minXErr > err.X()) minXErr = err.X();
1077 if (minYErr > err.Y()) minYErr = err.Y();
1083 stationNumber, layerNumber,
i,
x,
y, z, err.X(), err.Y(), err.Z());
1086 caSpace.
x_errs[stationNumber][layerNumber][point_number] = err.X();
1088 caSpace.
y_errs[stationNumber][layerNumber][point_number] = err.Y();
1104 #ifdef MAKE_EFF_CALC
1110 for (Int_t j = 0; j < nDigis; ++j) {
1115 for (Int_t k = 0; k < nMCs; ++k) {
1119 if (-1 == mcIndex)
continue;
1121 if (mcIndex > maxReferencedPtsIndex) maxReferencedPtsIndex = mcIndex;
1123 Int_t mcIndexMapped = root2lxmcpointmap[mcIndex];
1125 if (-1 == mcIndexMapped)
continue;
1128 MCPoints[mcIndexMapped].lxPoints.push_back(lxPoint);
1129 #ifdef MAKE_EFF_CALC
1131 #endif //MAKE_EFF_CALC
1133 #ifdef MAKE_EFF_CALC
1134 else if (
MCPoints[mcIndexMapped].lxPoints.empty()) {
1145 MCPoints[mcIndexMapped].lxPoints.push_back(lxPoint);
1148 #endif //MAKE_EFF_CALC
1151 #endif //MAKE_EFF_CALC
1157 cout <<
"minXErr = " << minXErr <<
" ; minYErr = " << minYErr << endl << endl;
1160 gettimeofday(&eTime, 0);
1162 (eTime.tv_sec - bTime.tv_sec) * 1000000 + eTime.tv_usec - bTime.tv_usec;
1165 cout <<
"Execution duration 1 was: " << exeDuration << endl;
1169 bTime.tv_sec = eTime.tv_sec;
1170 bTime.tv_usec = eTime.tv_usec;
1171 gettimeofday(&eTime, 0);
1173 (eTime.tv_sec - bTime.tv_sec) * 1000000 + eTime.tv_usec - bTime.tv_usec;
1176 cout <<
"Execution duration 2 was: " << exeDuration << endl;
1179 #else //CLUSTER_MODE
1183 #endif //CLUSTER_MODE
1184 bTime.tv_sec = eTime.tv_sec;
1185 bTime.tv_usec = eTime.tv_usec;
1186 gettimeofday(&eTime, 0);
1188 (eTime.tv_sec - bTime.tv_sec) * 1000000 + eTime.tv_usec - bTime.tv_usec;
1190 runTime += exeDuration;
1193 cout <<
"Execution duration 3 was: " << exeDuration << endl;
1197 #else //CLUSTER_MODE
1199 #endif //CLUSTER_MODE
1200 bTime.tv_sec = eTime.tv_sec;
1201 bTime.tv_usec = eTime.tv_usec;
1202 gettimeofday(&eTime, 0);
1204 (eTime.tv_sec - bTime.tv_sec) * 1000000 + eTime.tv_usec - bTime.tv_usec;
1205 runTime += exeDuration;
1208 cout <<
"Execution duration 4 was: " << exeDuration << endl;
1211 #else //CLUSTER_MODE
1213 #endif //CLUSTER_MODE
1215 bTime.tv_sec = eTime.tv_sec;
1216 bTime.tv_usec = eTime.tv_usec;
1217 gettimeofday(&eTime, 0);
1219 (eTime.tv_sec - bTime.tv_sec) * 1000000 + eTime.tv_usec - bTime.tv_usec;
1220 runTime += exeDuration;
1224 cout <<
"Average execution duration 3 + 4 + 5 was: " <<
averageDuration
1228 Int_t* pOutRunTime =
reinterpret_cast<Int_t*
>(
const_cast<char*
>(opt));
1229 *pOutRunTime = runTime;
1233 cout <<
"Execution duration 5 was: " << exeDuration << endl;
1248 for (
int i = 0;
i < nEnt; ++
i) {
1253 static_cast<Float_t
>(stsTrack->
GetParamLast()->GetX()),
1254 static_cast<Float_t
>(stsTrack->
GetParamLast()->GetY()),
1255 static_cast<Float_t
>(stsTrack->
GetParamLast()->GetTx()),
1256 static_cast<Float_t
>(stsTrack->
GetParamLast()->GetTy()),
1257 static_cast<Float_t
>(stsTrack->
GetParamLast()->GetQp())};
1259 if (lpa[0] != lpa[0] || lpa[1] != lpa[1] || lpa[2] != lpa[2]
1260 || lpa[3] != lpa[3] || lpa[4] != lpa[4])
1273 FairTrackParam params;
1278 if (p2 < 3.0 * 3.0)
continue;
1288 scaltype tx2 = params.GetTx() * params.GetTx();
1289 scaltype ty2 = params.GetTy() * params.GetTy();
1290 scaltype pt2 = p2 * (tx2 + ty2) / (1 + tx2 + ty2);
1292 if (pt2 < 1.0)
continue;
1295 extTrack.
track = stsTrack;
1298 #ifdef MAKE_EFF_CALC
1306 Int_t mappedId = root2lxmctrackmap[mcTrackId];
1308 if (-1 != mappedId) {
1309 MCTracks[mappedId].externalTrack = stsTrack;
1317 #endif //MAKE_HISTOS
1321 #endif //MAKE_EFF_CALC
1326 cout <<
"External tracks are read" << endl;
1330 cout <<
"External tracks are connected" << endl;
1334 #ifdef MAKE_EFF_CALC
1339 #endif //MAKE_EFF_CALC
1349 cout <<
"Signal true hypotheses: " << result <<
"% ( "
1402 #ifdef MAKE_EFF_CALC
1404 delete[] root2lxmctrackmap;
1405 delete[] root2lxmcpointmap;
1406 #endif //MAKE_EFF_CALC
1420 if (recoTrack->
clone)
continue;
1426 if (0 == stsTrack)
continue;
1441 FairTrackParam parFirst;
1445 FairTrackParam parLast(parFirst);
1449 new ((*listRecoTracks)[trackNo++])
CbmMuchTrack(muchTrack);
1492 if (mcTrack2 && (mcTrack2->
pdg == 13 || mcTrack2->
pdg == -13)
1499 if (!mcTrack2 || (mcTrack2->
pdg != 13 && mcTrack2->
pdg != -13)
1505 FairTrackParam t1param;
1508 if (t1param.GetQp() <= 0)
continue;
1511 scaltype tx12 = t1param.GetTx() * t1param.GetTx();
1512 scaltype ty12 = t1param.GetTy() * t1param.GetTy();
1513 scaltype pt12 = p1 * p1 * (tx12 + ty12) / (1 + tx12 + ty12);
1515 if (pt12 < 1)
continue;
1529 || (mcSecondTrack->
pdg != 13 && mcSecondTrack->
pdg != -13)
1536 FairTrackParam t2param;
1539 if (t2param.GetQp() >= 0)
continue;
1542 scaltype tx22 = t2param.GetTx() * t2param.GetTx();
1543 scaltype ty22 = t2param.GetTy() * t2param.GetTy();
1544 scaltype pt22 = p2 * p2 * (tx22 + ty22) / (1 + tx22 + ty22);
1546 if (pt22 < 1)
continue;
1549 vector<CbmKFTrackInterface*> kfData;
1550 kfData.push_back(&muPlus);
1551 kfData.push_back(&muMinus);
1561 #endif //MAKE_HISTOS
1567 TFile fh(name,
"RECREATE");
1574 TFile fh(name,
"RECREATE");
1582 TString complexFileName;
1607 TFile* curFile = TFile::CurrentFile();
1609 #ifdef MAKE_DISPERSE_2D_HISTOS
1610 char histoFileName[128];
1612 for (
int i = 0;
i < 6; ++
i) {
1613 sprintf(histoFileName,
"disperseL_histo_%d.root",
i);
1615 sprintf(histoFileName,
"disperseR_histo_%d.root",
i);
1617 sprintf(histoFileName,
"disperseD_histo_%d.root",
i);
1620 #endif //MAKE_DISPERSE_2D_HISTOS
1621 #endif //MAKE_HISTOS
1625 TFile fh(
"effByMomentumProfile.root",
"RECREATE");
1649 "signalInterTracksDistanceOn1st.root");
1652 "bgrInterTracksDistanceOn1stSigns.root");
1659 #ifdef MAKE_TRIGGERING_HISTOS
1660 complexFileName =
"triggeringAllTracksVertices";
1662 complexFileName +=
".root";
1664 complexFileName =
"triggeringDistTracksVertices";
1666 complexFileName +=
".root";
1668 complexFileName =
"triggeringSignTracksVertices";
1670 complexFileName +=
".root";
1672 complexFileName =
"triggeringTrigTracksVertices";
1674 complexFileName +=
".root";
1676 #endif //MAKE_TRIGGERING_HISTOS
1678 #endif //MAKE_HISTOS
1680 TFile::CurrentFile() = curFile;
1682 #ifdef MAKE_EFF_CALC
1684 #endif //MAKE_EFF_CALC
1688 #ifdef MAKE_EFF_CALC
1689 ofstream fjtofs(
"../false_jpsi_triggerings.txt",
1690 ios_base::out | ios_base::app);
1692 #endif //MAKE_EFF_CALC
1694 complexFileName =
"particles_count_all";
1696 complexFileName +=
".txt";
1697 ofstream pcaofs(complexFileName);
1702 pcaofs <<
i->first <<
": " <<
i->second << endl;
1704 complexFileName =
"particles_count_sign";
1706 complexFileName +=
".txt";
1707 ofstream pcsofs(complexFileName);
1712 pcsofs <<
i->first <<
": " <<
i->second << endl;
1714 complexFileName =
"particles_count_dist";
1716 complexFileName +=
".txt";
1717 ofstream pcdofs(complexFileName);
1722 pcdofs <<
i->first <<
": " <<
i->second << endl;
1724 complexFileName =
"particles_count_trig";
1726 complexFileName +=
".txt";
1727 ofstream pctofs(complexFileName);
1732 pctofs <<
i->first <<
": " <<
i->second << endl;
1736 FairTask::FinishTask();
1741 TFile* curFile = TFile::CurrentFile();
1743 TFile fh(
"jpsi_inv_mass_histo.root",
"RECREATE");
1748 TFile::CurrentFile() = curFile;
1749 #endif //MAKE_HISTOS
1765 vector<CbmKFTrackInterface*> kfData;
1766 kfData.push_back(&muPlus);
1767 kfData.push_back(&muMinus);
1779 TFile* curFile = TFile::CurrentFile();
1781 TFile fh(
"tracks_tree.root",
"RECREATE");
1786 TFile::CurrentFile() = curFile;
1787 #endif //MAKE_HISTOS
1792 TFile* curFile = TFile::CurrentFile();
1794 TFile fh(
"signal_chi2_histo.root",
"RECREATE");
1799 TFile::CurrentFile() = curFile;
1800 #endif //MAKE_HISTOS
1805 TFile* curFile = TFile::CurrentFile();
1807 TFile fh(
"background_chi2_histo.root",
"RECREATE");
1812 TFile::CurrentFile() = curFile;
1813 #endif //MAKE_HISTOS