7 |
|
|
8 |
#include "TrkChi2DeflTimeCut.h" |
#include "TrkChi2DeflTimeCut.h" |
9 |
|
|
10 |
double TrkChi2DeflTimeCut::_GetChi2(PamLevel2 *event){ |
double TrkChi2DeflTimeCut::_GetChi2(PamLevel2 *event) { |
11 |
return event->GetTrack(0)->GetTrkTrack()->chi2; |
return event->GetTrack(0)->GetTrkTrack()->chi2; |
12 |
} |
} |
13 |
|
|
23 |
// with 6-digits dates (YYMMDD) we must subtract 20000000 |
// with 6-digits dates (YYMMDD) we must subtract 20000000 |
24 |
|
|
25 |
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 |
26 |
|
|
27 |
for (UInt_t i=0; i<_iDayFirst.size(); i++) { |
bool found = false; |
28 |
if (_iDayFirst[i]<=iDaySel && iDaySel<=_iDayLast[i]) { |
for (UInt_t i = 0; i < _iDayFirst.size(); i++) { |
29 |
_p0sel=_p0[i]; |
if (_iDayFirst[i] <= iDaySel && iDaySel <= _iDayLast[i]) { |
30 |
_p1sel=_p1[i]; |
_p0sel = _p0[i]; |
31 |
_p2sel=_p2[i]; |
_p1sel = _p1[i]; |
32 |
_p3sel=_p3[i]; |
_p2sel = _p2[i]; |
33 |
// cout << "FOUND: day " << iDaySel << endl; |
_p3sel = _p3[i]; |
34 |
// cout << _iDayFirst[i] << " " << _iDayLast[i] << endl; |
// cout << "FOUND: day " << iDaySel << endl; |
35 |
// cout << _p0sel << " " << _p1sel << " " << _p2sel << " " << _p3sel << endl; |
// cout << _iDayFirst[i] << " " << _iDayLast[i] << endl; |
36 |
|
// cout << _p0sel << " " << _p1sel << " " << _p2sel << " " << _p3sel << endl; |
37 |
|
found = true; |
38 |
break; |
break; |
39 |
} |
} |
|
return 0; |
|
40 |
} |
} |
41 |
if (chi2 > _p0sel + _p1sel * pow(etaMod,_p2sel) * (1.+ pow(_p3sel*etaMod,2) ) ){ |
|
42 |
|
if (!found) |
43 |
|
return 0; |
44 |
|
|
45 |
|
if (chi2 > _p0sel + _p1sel * pow(etaMod, _p2sel) * (1. + pow(_p3sel * etaMod, 2))) { |
46 |
return 0; |
return 0; |
47 |
} |
} |
48 |
|
|