StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTrackCutPossibleHitRatio.h
1 // -*- mode: c++;-*-
2 // $Id: StjTrackCutPossibleHitRatio.h,v 1.2 2010/04/13 13:30:51 pibero Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJTRACKCUTPOSSIBLEHITRATIO_H
5 #define STJTRACKCUTPOSSIBLEHITRATIO_H
6 
7 #include "StjTrackCut.h"
8 
10  // to avoid split tracks
11 
12 public:
13  StjTrackCutPossibleHitRatio(double minRatio = 0.51) :_minRatio(minRatio) { }
14  virtual ~StjTrackCutPossibleHitRatio() { }
15 
16  bool operator()(const StjTrack& track) const
17  {
18  if(static_cast<double>(track.nHits)/static_cast<double>(track.nHitsPoss) < _minRatio) return true;
19 
20  return false;
21  }
22 
23 private:
24 
25  double _minRatio;
26 
27  ClassDef(StjTrackCutPossibleHitRatio, 1)
28 
29 };
30 
31 #endif // STJTRACKCUTPOSSIBLEHITRATIO_H