/*
 * TrkRigCut.cpp
 *
 *  Created on: 13-mar-2009
 *      Author: Sergio Ricciarini, Nicola Mori
 */

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

#include "TrkRigCut.h"

int TrkRigCut::Check(PamLevel2 *event) {

  float rig = 1. / event->GetTrack(0)->GetTrkTrack()->GetDeflection();

  if (_discardBelow) {
    if (rig < _thrRigidity) {
      return 0;
    }
  }
  else {
    if (rig > _thrRigidity) {
      return 0;
    }
  }

  return CUTOK;
}
