Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ep protection at high energy against crazy tracks .. RECO part #13302

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion RecoEgamma/EgammaTools/plugins/EGExtraInfoModifierFromDB.cc
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
regressionModifier = \
cms.PSet( modifierName = cms.string('EGExtraInfoModifierFromDB'),
autoDetectBunchSpacing = cms.bool(True),
applyExtraHighEnergyProtection = cms.bool(True),
bunchSpacingTag = cms.InputTag("bunchSpacingProducer"),
manualBunchSpacing = cms.int32(50),
rhoCollection = cms.InputTag("fixedGridRhoFastjetAll"),
Expand Down