00001
00002
00003
00004 #ifndef STJTOWERENERGYCUTET_H
00005 #define STJTOWERENERGYCUTET_H
00006
00007 #include "StjTowerEnergyCut.h"
00008
00009 #include <TVector3.h>
00010 #include <TMath.h>
00011
00012 class StjTowerEnergyCutEt : public StjTowerEnergyCut {
00013
00014 public:
00015 StjTowerEnergyCutEt(double min = 0, double max = 50000.0)
00016 : _min(min), _max(max) { }
00017 virtual ~StjTowerEnergyCutEt() { }
00018
00019 bool operator()(const StjTowerEnergy& deposit)
00020 {
00021 TVector3 vec3;
00022 vec3.SetPtEtaPhi(deposit.towerR, deposit.towerEta, deposit.towerPhi);
00023 double Et = (deposit.energy)*TMath::Sin(vec3.Theta());
00024
00025 if(Et <= _min) return true;
00026
00027 if(Et > _max) return true;
00028
00029 return false;
00030 }
00031
00032 private:
00033
00034 double _min;
00035 double _max;
00036
00037 ClassDef(StjTowerEnergyCutEt, 1)
00038
00039 };
00040
00041 #endif // STJTOWERENERGYCUTET_H