#include <RecoEgamma/EgammaIsolationAlgos/plugins/EgammaTowerExtractor.h>
Public Member Functions | |
virtual reco::IsoDeposit | deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &c) const |
make single IsoDeposit based on a candidate as input purely virtual: have to implement in concrete implementations | |
virtual reco::IsoDeposit | deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const |
make single IsoDeposit based on track as input purely virtual: have to implement in concrete implementations | |
EgammaTowerExtractor (const edm::ParameterSet &par) | |
virtual void | fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks) |
fill vetoes: to exclude deposits at IsoDeposit creation stage check concrete extractors if it's no-op ! | |
virtual | ~EgammaTowerExtractor () |
Private Attributes | |
edm::InputTag | caloTowerTag_ |
double | etLow_ |
double | extRadius2_ |
double | intRadius_ |
Definition at line 34 of file EgammaTowerExtractor.h.
egammaisolation::EgammaTowerExtractor::EgammaTowerExtractor | ( | const edm::ParameterSet & | par | ) | [inline] |
Definition at line 36 of file EgammaTowerExtractor.h.
References extRadius2_.
00036 : 00037 extRadius2_(par.getParameter<double>("extRadius")), 00038 intRadius_(par.getParameter<double>("intRadius")), 00039 etLow_(par.getParameter<double>("etMin")), 00040 caloTowerTag_(par.getParameter<edm::InputTag>("caloTowers")) 00041 { 00042 extRadius2_ *= extRadius2_; 00043 }
EgammaTowerExtractor::~EgammaTowerExtractor | ( | ) | [virtual] |
reco::IsoDeposit EgammaTowerExtractor::deposit | ( | const edm::Event & | ev, | |
const edm::EventSetup & | evSetup, | |||
const reco::Candidate & | track | |||
) | const [virtual] |
make single IsoDeposit based on a candidate as input purely virtual: have to implement in concrete implementations
Reimplemented from reco::isodeposit::IsoDepositExtractor.
Definition at line 33 of file EgammaTowerExtractor.cc.
References caloTowerTag_, deposit(), etLow_, funct::exp(), extRadius2_, reco::Candidate::get(), edm::Event::getByLabel(), intRadius_, and funct::sin().
00034 { 00035 00036 edm::Handle<CaloTowerCollection> towercollectionH; 00037 iEvent.getByLabel(caloTowerTag_, towercollectionH); 00038 00039 //Take the SC position 00040 reco::SuperClusterRef sc = emObject.get<reco::SuperClusterRef>(); 00041 math::XYZPoint caloPosition = sc->position(); 00042 00043 Direction candDir(caloPosition.eta(), caloPosition.phi()); 00044 reco::IsoDeposit deposit( candDir ); 00045 deposit.setVeto( reco::IsoDeposit::Veto(candDir, intRadius_) ); 00046 deposit.addCandEnergy(sc->energy()*sin(2*atan(exp(-sc->eta())))); 00047 00048 //loop over tracks 00049 for(CaloTowerCollection::const_iterator trItr = towercollectionH->begin(), trEnd = towercollectionH->end(); trItr != trEnd; ++trItr){ 00050 double depEt = trItr->hadEt(); 00051 if ( depEt < etLow_ ) continue ; 00052 00053 Direction towerDir( trItr->eta(), trItr->phi() ); 00054 double dR2 = candDir.deltaR2(towerDir); 00055 00056 if (dR2 < extRadius2_) { 00057 deposit.addDeposit( towerDir, depEt); 00058 } 00059 00060 }//end loop over tracks 00061 00062 return deposit; 00063 }
virtual reco::IsoDeposit egammaisolation::EgammaTowerExtractor::deposit | ( | const edm::Event & | ev, | |
const edm::EventSetup & | evSetup, | |||
const reco::Track & | track | |||
) | const [inline, virtual] |
make single IsoDeposit based on track as input purely virtual: have to implement in concrete implementations
Implements reco::isodeposit::IsoDepositExtractor.
Definition at line 49 of file EgammaTowerExtractor.h.
References Exception, and name.
Referenced by deposit().
00050 { 00051 throw cms::Exception("Configuration Error") << 00052 "This extractor " << (typeid(this).name()) << " is not made for tracks"; 00053 }
virtual void egammaisolation::EgammaTowerExtractor::fillVetos | ( | const edm::Event & | ev, | |
const edm::EventSetup & | evSetup, | |||
const reco::TrackCollection & | tracks | |||
) | [inline, virtual] |
fill vetoes: to exclude deposits at IsoDeposit creation stage check concrete extractors if it's no-op !
Implements reco::isodeposit::IsoDepositExtractor.
Definition at line 47 of file EgammaTowerExtractor.h.
double egammaisolation::EgammaTowerExtractor::etLow_ [private] |
double egammaisolation::EgammaTowerExtractor::extRadius2_ [private] |
Definition at line 58 of file EgammaTowerExtractor.h.
Referenced by deposit(), and EgammaTowerExtractor().
double egammaisolation::EgammaTowerExtractor::intRadius_ [private] |