17 |
if (chi2 < 0.) |
if (chi2 < 0.) |
18 |
return 0; |
return 0; |
19 |
Double_t etaMod = fabs(event->GetTrack(0)->GetTrkTrack()->GetDeflection()); |
Double_t etaMod = fabs(event->GetTrack(0)->GetTrkTrack()->GetDeflection()); |
20 |
|
Int_t nHitX = event->GetTrack(0)->GetTrkTrack()->GetNX(); |
21 |
|
|
22 |
|
// cout << " nHitX " << nHitX << endl; |
23 |
|
|
24 |
|
if (nHitX == 3) { |
25 |
|
for (UInt_t i = 0; i < _iDayFirst_nHitX3.size(); i++) { |
26 |
|
_iDayFirst.push_back(_iDayFirst_nHitX3[i]); |
27 |
|
_iDayLast.push_back(_iDayLast_nHitX3[i]); |
28 |
|
for (int iPar=0; iPar<_nPar; iPar++) { |
29 |
|
_p[iPar].push_back(_p_nHitX3[iPar][i]); |
30 |
|
} |
31 |
|
} |
32 |
|
} |
33 |
|
else if (nHitX >= 4) { |
34 |
|
for (UInt_t i = 0; i < _iDayFirst_nHitX4.size(); i++) { |
35 |
|
_iDayFirst.push_back(_iDayFirst_nHitX4[i]); |
36 |
|
_iDayLast.push_back(_iDayLast_nHitX4[i]); |
37 |
|
for (int iPar=0; iPar<_nPar; iPar++) { |
38 |
|
_p[iPar].push_back(_p_nHitX4[iPar][i]); |
39 |
|
} |
40 |
|
} |
41 |
|
} |
42 |
|
else { |
43 |
|
return 0; |
44 |
|
} |
45 |
|
|
46 |
_time.Set(event->GetOrbitalInfo()->absTime, kFALSE, 0, kFALSE); |
_time.Set(event->GetOrbitalInfo()->absTime, kFALSE, 0, kFALSE); |
47 |
// TTimestamp::GetDate() returns date in format YYYYMMDD so to compare it |
// TTimestamp::GetDate() returns date in format YYYYMMDD so to compare it |
48 |
// with 6-digits dates (YYMMDD) we must subtract 20000000 |
// with 6-digits dates (YYMMDD) we must subtract 20000000 |
49 |
|
|
50 |
Int_t iDaySel = (_time.GetDate(kFALSE) - 20000000); // note: GetDate returns an unsigned integer |
Int_t iDaySel = (_time.GetDate(kFALSE) - 20000000); // note: GetDate returns an unsigned integer |
51 |
|
// cout << "day " << iDaySel << endl; |
52 |
|
|
53 |
bool found = false; |
bool found = false; |
54 |
for (UInt_t i = 0; i < _iDayFirst.size(); i++) { |
for (UInt_t i = 0; i < _iDayFirst.size(); i++) { |
66 |
} |
} |
67 |
} |
} |
68 |
|
|
69 |
if (!found) |
if (!found) { |
70 |
|
cout << "not found" << endl; |
71 |
|
cout << endl; |
72 |
return 0; |
return 0; |
73 |
|
} |
74 |
|
|
75 |
|
// for (int iPar=0; iPar<_nPar; iPar++) { |
76 |
|
// cout << " p" << iPar << ": " << _pSel[iPar] << endl; |
77 |
|
// } |
78 |
|
// cout << endl; |
79 |
|
|
80 |
double chi2max; |
double chi2max; |
81 |
|
|