/*
 * TrkDeflCut.cpp
 *
 *  Created on: 14-sep-2010
 *      Author: Nicola Mori
 */

/*! @file TrkDeflCut.cpp The TrkDeflCut class implementation file */

#include "TrkDeflCut.h"

int TrkDeflCut::Check(PamLevel2 *event) {

  float defl = event->GetTrack(0)->GetTrkTrack()->GetDeflection();

  if (_discardBelow) {
    if (defl < _thrDeflection) {
      return 0;
    }
  }
  else {
    if (defl > _thrDeflection) {
      return 0;
    }
  }

  return CUTOK;
}
