/* * TofDedxHeCut.cpp * * Created on: 03/ago/2009 * Author: Nicola Mori */ /*! @file TofDedxHeCut.cpp The TofDedxHeCut class implementation file. */ #include "TofDedxHeCut.h" int TofDedxHeCut::Check(PamLevel2 *event) { float beta = event->GetTrack(0)->GetToFTrack()->beta[12]; int trkSeqNo = event->GetTrack(0)->GetToFTrack()->trkseqno; float dEdx = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100) + event->GetToFLevel2()->GetdEdx(trkSeqNo, 1, 100) + event->GetToFLevel2()->GetdEdx(trkSeqNo, 2, 100) + event->GetToFLevel2()->GetdEdx(trkSeqNo, 3, 100); dEdx /= 4; if (dEdx < 1 / (0.2 * (beta - 0.05)) - 2.) return 0; if (dEdx > 1 / (0.25 * (beta - 0.1))) return 1; if (dEdx < 11. * beta - 7.7) return 2; return CUTOK; }