--- PamCut/TrkCuts/TrkChi2DeflTimeCut/TrkChi2DeflTimeCut.cpp 2011/09/02 16:28:17 1.6 +++ PamCut/TrkCuts/TrkChi2DeflTimeCut/TrkChi2DeflTimeCut.cpp 2015/03/25 17:38:08 1.7 @@ -8,7 +8,8 @@ #include "TrkChi2DeflTimeCut.h" double TrkChi2DeflTimeCut::_GetChi2(PamLevel2 *event) { - return event->GetTrack(0)->GetTrkTrack()->chi2; +// return event->GetTrack(0)->GetTrkTrack()->chi2; + return (event->GetNTracks(_trkAlg)<=0 ? -1. : event->GetTrack(0,_trkAlg)->GetExtTrack()->chi2); } int TrkChi2DeflTimeCut::Check(PamLevel2 *event) { @@ -16,8 +17,10 @@ double chi2 = _GetChi2(event); if (chi2 < 0.) return 0; - Double_t etaMod = fabs(event->GetTrack(0)->GetTrkTrack()->GetDeflection()); - Int_t nHitX = event->GetTrack(0)->GetTrkTrack()->GetNX(); +// Double_t etaMod = fabs(event->GetTrack(0)->GetTrkTrack()->GetDeflection()); +// Int_t nHitX = event->GetTrack(0)->GetTrkTrack()->GetNX(); + Double_t etaMod = fabs(event->GetTrack(0,_trkAlg)->GetExtTrack()->GetDeflection()); + Int_t nHitX = event->GetTrack(0,_trkAlg)->GetExtTrack()->GetNX(); // cout << " nHitX " << nHitX << endl;