StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTowerEnergyCutEnergy.h
1 // -*- mode: c++;-*-
2 // $Id: StjTowerEnergyCutEnergy.h,v 1.1 2008/11/27 07:35:29 tai Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJTOWERENERGYCUTENERGY_H
5 #define STJTOWERENERGYCUTENERGY_H
6 
7 #include "StjTowerEnergyCut.h"
8 
10 
11 public:
12  StjTowerEnergyCutEnergy(double min = 0, double max = 50000.0)
13  : _min(min), _max(max) { }
14  virtual ~StjTowerEnergyCutEnergy() { }
15 
16  bool operator()(const StjTowerEnergy& deposit)
17  {
18  if(deposit.energy <= _min) return true;
19 
20  if(deposit.energy > _max) return true;
21 
22  return false;
23  }
24 
25 private:
26 
27  double _min;
28  double _max;
29 
30  ClassDef(StjTowerEnergyCutEnergy, 1)
31 
32 };
33 
34 #endif // STJTOWERENERGYCUTENERGY_H