3 #include "StjeBemcEnergySumCalculator.h"
6 #include "StjTowerEnergyListCut.h"
16 void StjeBemcEnergySumCalculatorImp::Init()
21 void StjeBemcEnergySumCalculatorImp::Make()
23 StjTowerEnergyList energyList = _bemc->getEnergyList();
25 energyList = (*_cut)(energyList);
27 _SumEmcEt = sumEnergyOverBemcTowers(0.4, energyList);
29 _DylanPoints = numberOfBemcTowersWithEnergyAbove(0.4, energyList);
32 void StjeBemcEnergySumCalculatorImp::Clear()
38 double StjeBemcEnergySumCalculatorImp::sumEnergyOverBemcTowers(
double minE,
const StjTowerEnergyList &energyDepositList)
42 for(StjTowerEnergyList::const_iterator it = energyDepositList.begin(); it != energyDepositList.end(); ++it)
43 if((*it).energy > minE) ret += (*it).energy;
48 int StjeBemcEnergySumCalculatorImp::numberOfBemcTowersWithEnergyAbove(
double minE,
const StjTowerEnergyList &energyDepositList)
52 for(StjTowerEnergyList::const_iterator it = energyDepositList.begin(); it != energyDepositList.end(); ++it)
53 if((*it).energy > minE) ret ++;