/* * 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) { int trkSeqNo; if(_standAlone) trkSeqNo = 0; else trkSeqNo = event->GetTrack(0)->GetToFTrack()->trkseqno; float beta = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12]; //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.06)) - 2.) return 0; if (dEdx > 1 / (0.25 * (beta - 0.12))) return 1; if (dEdx < 11. * beta - 7.7) return 2; return CUTOK; }