Skip to content

Commit

Permalink
Merge pull request #13301 from rafaellopesdesa/EPcombination_protecti…
Browse files Browse the repository at this point in the history
…on_reco_76

Ep combination protection reco 76
  • Loading branch information
davidlange6 committed Feb 23, 2016
2 parents 55724ba + 09ad603 commit 7259bb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion RecoEgamma/EgammaTools/plugins/EGExtraInfoModifierFromDB.cc
Expand Up @@ -93,6 +93,7 @@ class EGExtraInfoModifierFromDB : public ModifyObjectValueBase {
edm::InputTag vtxTag_;
edm::EDGetTokenT<reco::VertexCollection> vtxToken_;
edm::Handle<reco::VertexCollection> vtxH_;
bool applyExtraHighEnergyProtection_;

const edm::EventSetup* iSetup_;

Expand All @@ -112,6 +113,7 @@ EGExtraInfoModifierFromDB::EGExtraInfoModifierFromDB(const edm::ParameterSet& co

bunchspacing_ = 450;
autoDetectBunchSpacing_ = conf.getParameter<bool>("autoDetectBunchSpacing");
applyExtraHighEnergyProtection_ = conf.getParameter<bool>("applyExtraHighEnergyProtection");

rhoTag_ = conf.getParameter<edm::InputTag>("rhoCollection");
vtxTag_ = conf.getParameter<edm::InputTag>("vertexCollection");
Expand Down Expand Up @@ -531,7 +533,9 @@ void EGExtraInfoModifierFromDB::modifyObject(reco::GsfElectron& ele) const {
// CODE FOR STANDARD BDT
double weight = 0.;
if ( eOverP > 0.025 &&
std::abs(ep-ecor) < 15.*std::sqrt( momentumError*momentumError + sigmacor*sigmacor ) ) {
std::abs(ep-ecor) < 15.*std::sqrt( momentumError*momentumError + sigmacor*sigmacor ) &&
(!applyExtraHighEnergyProtection_ || ((momentumError < 10.*ep) || (ecor < 200.)))
) {
// protection against crazy track measurement
weight = ep_forestH_weight_->GetResponse(eval_ep);
if(weight>1.)
Expand Down
1 change: 1 addition & 0 deletions RecoEgamma/EgammaTools/python/regressionModifier_cfi.py
Expand Up @@ -3,6 +3,7 @@
regressionModifier = \
cms.PSet( modifierName = cms.string('EGExtraInfoModifierFromDB'),
autoDetectBunchSpacing = cms.bool(True),
applyExtraHighEnergyProtection = cms.bool(False),
bunchSpacingTag = cms.InputTag("bunchSpacingProducer"),
manualBunchSpacing = cms.int32(50),
rhoCollection = cms.InputTag("fixedGridRhoFastjetAll"),
Expand Down

0 comments on commit 7259bb1

Please sign in to comment.