#include <EgammaEcalExtractor.h>
Public Member Functions | |
virtual reco::IsoDeposit | deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const |
virtual reco::IsoDeposit | deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &c) const |
EgammaEcalExtractor (const edm::ParameterSet &par) | |
virtual void | fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks) |
virtual | ~EgammaEcalExtractor () |
Private Attributes | |
edm::InputTag | basicClusterTag_ |
double | conesize_ |
double | etMin_ |
bool | scmatch_ |
edm::InputTag | superClusterTag_ |
Definition at line 39 of file EgammaEcalExtractor.h.
egammaisolation::EgammaEcalExtractor::EgammaEcalExtractor | ( | const edm::ParameterSet & | par | ) | [inline] |
Definition at line 41 of file EgammaEcalExtractor.h.
: etMin_(par.getParameter<double>("etMin")), conesize_(par.getParameter<double>("extRadius")), scmatch_(par.getParameter<bool>("superClusterMatch")), basicClusterTag_(par.getParameter<edm::InputTag>("basicClusters")), superClusterTag_(par.getParameter<edm::InputTag>("superClusters")) { }
EgammaEcalExtractor::~EgammaEcalExtractor | ( | ) | [virtual] |
Definition at line 23 of file EgammaEcalExtractor.cc.
{}
virtual reco::IsoDeposit egammaisolation::EgammaEcalExtractor::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 52 of file EgammaEcalExtractor.h.
References Exception, and mergeVDriftHistosByStation::name.
{ throw cms::Exception("Configuration Error") << "This extractor " << (typeid(this).name()) << " is not made for tracks"; }
reco::IsoDeposit EgammaEcalExtractor::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 25 of file EgammaEcalExtractor.cc.
References reco::SuperCluster::clustersBegin(), reco::SuperCluster::clustersEnd(), create_public_lumi_plots::exp, reco::Candidate::get(), edm::Event::getByLabel(), reco::CaloCluster::position(), position, reco::SuperCluster::seed(), and funct::sin().
{ edm::Handle<reco::SuperClusterCollection> superClusterCollectionH; edm::Handle<reco::BasicClusterCollection> basicClusterCollectionH; ev.getByLabel(superClusterTag_, superClusterCollectionH); ev.getByLabel(basicClusterTag_, basicClusterCollectionH); reco::SuperClusterRef sc = candidate.get<reco::SuperClusterRef>(); math::XYZPoint position = sc->position(); // match the photon hybrid supercluster with those with Algo==0 (island) double delta1=1000.; double deltacur=1000.; const reco::SuperCluster *matchedsupercluster=0; bool MATCHEDSC = false; Direction candDir(position.eta(), position.phi()); reco::IsoDeposit deposit(candDir ); deposit.setVeto( reco::IsoDeposit::Veto(candDir, 0) ); // no veto is needed for this deposit deposit.addCandEnergy(sc->energy()*sin(2*atan(exp(-sc->eta())))); for(reco::SuperClusterCollection::const_iterator scItr = superClusterCollectionH->begin(); scItr != superClusterCollectionH->end(); ++scItr){ const reco::SuperCluster *supercluster = &(*scItr); if(supercluster->seed()->algo() == 0){ deltacur = ROOT::Math::VectorUtil::DeltaR(supercluster->position(), position); if (deltacur < delta1) { delta1=deltacur; matchedsupercluster = supercluster; MATCHEDSC = true; } } } const reco::BasicCluster *cluster= 0; //loop over basic clusters for(reco::BasicClusterCollection::const_iterator cItr = basicClusterCollectionH->begin(); cItr != basicClusterCollectionH->end(); ++cItr){ cluster = &(*cItr); // double ebc_bcchi2 = cluster->chi2(); int ebc_bcalgo = cluster->algo(); double ebc_bce = cluster->energy(); double ebc_bceta = cluster->eta(); double ebc_bcet = ebc_bce*sin(2*atan(exp(ebc_bceta))); double newDelta = 0.; if (ebc_bcet > etMin_ && ebc_bcalgo == 0) { // if (ebc_bcchi2 < 30.) { if(MATCHEDSC || !scmatch_ ){ //skip selection if user wants to fill all superclusters bool inSuperCluster = false; if( scmatch_ ){ // only try the matching if needed reco::CaloCluster_iterator theEclust = matchedsupercluster->clustersBegin(); // loop over the basic clusters of the matched supercluster for(;theEclust != matchedsupercluster->clustersEnd(); ++theEclust) { if ((**theEclust) == (*cluster) ) inSuperCluster = true; } } if (!inSuperCluster || !scmatch_ ) { //skip selection if user wants to fill all superclusters newDelta=ROOT::Math::VectorUtil::DeltaR(cluster->position(),position); if(newDelta < conesize_) { deposit.addDeposit( Direction(cluster->eta(), cluster->phi()), ebc_bcet); } } } // } // matches ebc_bcchi2 } // matches ebc_bcet && ebc_bcalgo } // std::cout << "Will return ecalIsol = " << ecalIsol << std::endl; return deposit; }
virtual void egammaisolation::EgammaEcalExtractor::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 51 of file EgammaEcalExtractor.h.
{ }
Definition at line 67 of file EgammaEcalExtractor.h.
double egammaisolation::EgammaEcalExtractor::conesize_ [private] |
Definition at line 64 of file EgammaEcalExtractor.h.
double egammaisolation::EgammaEcalExtractor::etMin_ [private] |
Definition at line 63 of file EgammaEcalExtractor.h.
bool egammaisolation::EgammaEcalExtractor::scmatch_ [private] |
Definition at line 65 of file EgammaEcalExtractor.h.
Definition at line 68 of file EgammaEcalExtractor.h.