--- PamCut/TrkCuts/TrkChi2DeflTimeCut/TrkChi2DeflTimeCut.cpp 2011/05/27 14:01:39 1.5 +++ PamCut/TrkCuts/TrkChi2DeflTimeCut/TrkChi2DeflTimeCut.cpp 2011/09/02 16:28:17 1.6 @@ -17,12 +17,38 @@ if (chi2 < 0.) return 0; Double_t etaMod = fabs(event->GetTrack(0)->GetTrkTrack()->GetDeflection()); + Int_t nHitX = event->GetTrack(0)->GetTrkTrack()->GetNX(); + +// cout << " nHitX " << nHitX << endl; + + if (nHitX == 3) { + for (UInt_t i = 0; i < _iDayFirst_nHitX3.size(); i++) { + _iDayFirst.push_back(_iDayFirst_nHitX3[i]); + _iDayLast.push_back(_iDayLast_nHitX3[i]); + for (int iPar=0; iPar<_nPar; iPar++) { + _p[iPar].push_back(_p_nHitX3[iPar][i]); + } + } + } + else if (nHitX >= 4) { + for (UInt_t i = 0; i < _iDayFirst_nHitX4.size(); i++) { + _iDayFirst.push_back(_iDayFirst_nHitX4[i]); + _iDayLast.push_back(_iDayLast_nHitX4[i]); + for (int iPar=0; iPar<_nPar; iPar++) { + _p[iPar].push_back(_p_nHitX4[iPar][i]); + } + } + } + else { + return 0; + } _time.Set(event->GetOrbitalInfo()->absTime, kFALSE, 0, kFALSE); // TTimestamp::GetDate() returns date in format YYYYMMDD so to compare it // with 6-digits dates (YYMMDD) we must subtract 20000000 Int_t iDaySel = (_time.GetDate(kFALSE) - 20000000); // note: GetDate returns an unsigned integer +// cout << "day " << iDaySel << endl; bool found = false; for (UInt_t i = 0; i < _iDayFirst.size(); i++) { @@ -40,8 +66,16 @@ } } - if (!found) + if (!found) { + cout << "not found" << endl; + cout << endl; return 0; + } + +// for (int iPar=0; iPar<_nPar; iPar++) { +// cout << " p" << iPar << ": " << _pSel[iPar] << endl; +// } +// cout << endl; double chi2max;