7 #include "StjTowerRegion.h"
11 StjTowerEnergyList StjTowerRegion::Do(
const StjTowerEnergyList& towerList,
const StJetCandidate* leadingjet,
const TString bname)
13 StjTowerEnergyList elist;
15 for (StjTowerEnergyList::const_iterator iTower = towerList.begin(); iTower != towerList.end(); ++iTower) {
17 if(bname ==
"toward"){
18 if(TMath::Abs(TVector2::Phi_mpi_pi( leadingjet->phi() - tower.towerPhi)) < (mphiplus * TMath::DegToRad()) && TMath::Abs(tower.towerEta) < mdeta ){
19 elist.push_back(tower);
23 if(TMath::Abs(TVector2::Phi_mpi_pi( leadingjet->phi() - tower.towerPhi)) > (mphiplus * TMath::DegToRad()) && TMath::Abs(tower.towerEta) < mdeta ){
24 elist.push_back(tower);
27 if(bname ==
"transP" || bname ==
"transM"){
28 if(TVector2::Phi_mpi_pi( leadingjet->phi() - tower.towerPhi) < (mphiplus * TMath::DegToRad()) && TVector2::Phi_mpi_pi( leadingjet->phi() - tower.towerPhi) > (mphiminus * TMath::DegToRad()) && TMath::Abs(tower.towerEta) < mdeta ){
29 elist.push_back(tower);