#include <ReflectedIterator.h>
Public Member Functions | |
virtual void | calculatePedestal (std::vector< fastjet::PseudoJet > const &coll) |
double | getEt (const reco::CandidatePtr &in) const |
double | getEta (const reco::CandidatePtr &in) const |
virtual void | offsetCorrectJets () |
ReflectedIterator (const edm::ParameterSet &iConfig) | |
void | rescaleRMS (double s) |
virtual void | subtractPedestal (std::vector< fastjet::PseudoJet > &coll) |
~ReflectedIterator () | |
Public Attributes | |
bool | dropZeroTowers_ |
bool | sumRecHits_ |
Definition at line 6 of file ReflectedIterator.h.
ReflectedIterator::ReflectedIterator | ( | const edm::ParameterSet & | iConfig | ) | [inline] |
Definition at line 8 of file ReflectedIterator.h.
: PileUpSubtractor(iConfig), sumRecHits_(iConfig.getParameter<bool>("sumRecHits")), dropZeroTowers_(iConfig.getUntrackedParameter<bool>("dropZeroTowers",true)) {;}
ReflectedIterator::~ReflectedIterator | ( | ) | [inline] |
Definition at line 21 of file ReflectedIterator.h.
{;}
virtual void ReflectedIterator::calculatePedestal | ( | std::vector< fastjet::PseudoJet > const & | coll | ) | [virtual] |
Reimplemented from PileUpSubtractor.
double ReflectedIterator::getEt | ( | const reco::CandidatePtr & | in | ) | const |
Definition at line 184 of file ReflectedIterator.cc.
References CaloTower::emEnergy(), relval_parameters_module::energy, edm::Ptr< T >::get(), CaloTower::hadEnergy(), CaloTower::id(), pos, funct::sin(), and PV3DBase< T, PVType, FrameType >::theta().
double ReflectedIterator::getEta | ( | const reco::CandidatePtr & | in | ) | const |
Definition at line 192 of file ReflectedIterator.cc.
References eta(), PV3DBase< T, PVType, FrameType >::eta(), edm::Ptr< T >::get(), CaloTower::id(), and pos.
void ReflectedIterator::offsetCorrectJets | ( | ) | [virtual] |
Reimplemented from PileUpSubtractor.
Definition at line 16 of file ReflectedIterator.cc.
References def, LogDebug, dt_dqm_sourceclient_common_cff::reco, and edm::second().
{ LogDebug("PileUpSubtractor")<<"The subtractor correcting jets...\n"; jetOffset_.clear(); using namespace reco; (*fjInputs_) = fjOriginalInputs_; rescaleRMS(nSigmaPU_); subtractPedestal(*fjInputs_); const fastjet::JetDefinition& def = fjClusterSeq_->jet_def(); if ( !doAreaFastjet_ && !doRhoFastjet_) { fastjet::ClusterSequence newseq( *fjInputs_, def ); (*fjClusterSeq_) = newseq; } else { fastjet::ClusterSequenceArea newseq( *fjInputs_, def , *fjActiveArea_ ); (*fjClusterSeq_) = newseq; } (*fjJets_) = fastjet::sorted_by_pt(fjClusterSeq_->inclusive_jets(jetPtMin_)); jetOffset_.reserve(fjJets_->size()); vector<fastjet::PseudoJet>::iterator pseudojetTMP = fjJets_->begin (), jetsEnd = fjJets_->end(); for (; pseudojetTMP != jetsEnd; ++pseudojetTMP) { int ijet = pseudojetTMP - fjJets_->begin(); jetOffset_[ijet] = 0; std::vector<fastjet::PseudoJet> towers = sorted_by_pt(fjClusterSeq_->constituents(*pseudojetTMP)); double newjetet = 0.; for(vector<fastjet::PseudoJet>::const_iterator ito = towers.begin(), towEnd = towers.end(); ito != towEnd; ++ito) { const reco::CandidatePtr& originalTower = (*inputs_)[ito->user_index()]; int it = ieta( originalTower ); double Original_Et = originalTower->et(); double etnew = Original_Et - (*emean_.find(-it)).second - (*esigma_.find(-it)).second; if(etnew < 0.) etnew = 0; newjetet = newjetet + etnew; jetOffset_[ijet] += Original_Et - etnew; } } }
void ReflectedIterator::rescaleRMS | ( | double | s | ) |
Definition at line 8 of file ReflectedIterator.cc.
virtual void ReflectedIterator::subtractPedestal | ( | std::vector< fastjet::PseudoJet > & | coll | ) | [virtual] |
Reimplemented from PileUpSubtractor.
Definition at line 20 of file ReflectedIterator.h.
Definition at line 19 of file ReflectedIterator.h.