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

/validation/RecoEgamma PHASE2 modifications #35192

Merged
merged 8 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Validation/RecoEgamma/plugins/ElectronMcFakeValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ ElectronMcFakeValidator::ElectronMcFakeValidator(const edm::ParameterSet &conf)
maxPt_ = conf.getParameter<double>("MaxPt");
maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
deltaR_ = conf.getParameter<double>("DeltaR");
deltaR2_ = deltaR_ * deltaR_;
inputFile_ = conf.getParameter<std::string>("InputFile");
outputFile_ = conf.getParameter<std::string>("OutputFile");
inputInternalPath_ = conf.getParameter<std::string>("InputFolderName");
Expand Down Expand Up @@ -2556,8 +2557,8 @@ void ElectronMcFakeValidator::analyze(const edm::Event &iEvent, const edm::Event
if (std::abs(dphi) > CLHEP::pi) {
dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
}
double deltaR = sqrt(pow((gsfIter3->eta() - moIter->eta()), 2) + pow(dphi, 2));
if (deltaR < deltaR_) {
double deltaR2 = (gsfIter3->eta() - moIter->eta()) * (gsfIter3->eta() - moIter->eta()) + dphi * dphi;
if (deltaR2 < deltaR2_) {
double tmpGsfRatio = gsfIter3->p() / moIter->energy();
if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
gsfOkRatio = tmpGsfRatio;
Expand Down
2 changes: 1 addition & 1 deletion Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase {

double maxPt_;
double maxAbsEta_;
double deltaR_;
double deltaR_, deltaR2_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point. deltaR_ is not needed any more as class member, and it can be removed from them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, deltaR_ is removed. Please note that we have planned a PR during november/december in order to do such a modifications.


std::string inputFile_;
std::string outputFile_;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import FWCore.ParameterSet.Config as cms

electronMcFakeHistosCfg = cms.PSet(
Expand Down Expand Up @@ -67,17 +66,17 @@
electronMcFakeValidator,
electronCollectionEndcaps = 'ecalDrivenGsfElectronsHGC',
electronCoreCollection = 'ecalDrivenGsfElectronCoresHGC',
MaxAbsEta = cms.double(3.0),
MaxAbsEta = 3.0,
histosCfg = dict(
Nbineta = 60 ,
Nbineta2D = 60 ,
Etamin = -3.0 ,
Etamax = 3.0 ,

NbinOPV = cms.int32(125), OPV_min = cms.double(-0.5), OPV_max = cms.double(249.5) ,
NbinELE = cms.int32(100), ELE_min = cms.double(-0.5), ELE_max = cms.double(999.5) ,
NbinCORE = cms.int32(100), CORE_min = cms.double(-0.5), CORE_max = cms.double(999.5) ,
NbinTRACK = cms.int32(100), TRACK_min = cms.double(-0.5), TRACK_max = cms.double(999.5) ,
NbinSEED = cms.int32(100), SEED_min = cms.double(-0.5), SEED_max = cms.double(9999.5) ,
NbinOPV = 125, OPV_min = -0.5, OPV_max = 249.5,
NbinELE = 100, ELE_min = -0.5, ELE_max = 999.5,
NbinCORE = 100, CORE_min = -0.5, CORE_max = 999.5,
NbinTRACK = 100, TRACK_min = -0.5, TRACK_max = 999.5,
NbinSEED = 100, SEED_min = -0.5, SEED_max = 9999.5,
),
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
phase2_hgcal.toModify(
electronMcSignalValidatorMiniAOD,
electrons_endcaps=cms.InputTag("slimmedElectronsHGC"),
MaxAbsEta=cms.double(3.0),
MaxAbsEta=3.0,
histosCfg=dict(
Nbineta=60,
Nbineta2D=60,
Etamin=-3.0,
Etamax=3.0,
),
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,17 @@
electronMcSignalValidatorPt1000,
electronCollectionEndcaps = cms.InputTag("ecalDrivenGsfElectronsHGC"),
electronCoreCollection = 'ecalDrivenGsfElectronCoresHGC',
MaxAbsEta = cms.double(3.0),
MaxAbsEta = 3.0,
histosCfg = dict(
Nbineta = 60 ,
Nbineta2D = 60 ,
Etamin = -3.0 ,
Etamax = 3.0 ,

NbinOPV = cms.int32(125), OPV_min = cms.double(-0.5), OPV_max = cms.double(249.5) ,
NbinELE = cms.int32(100), ELE_min = cms.double(-0.5), ELE_max = cms.double(999.5) ,
NbinCORE = cms.int32(100), CORE_min = cms.double(-0.5), CORE_max = cms.double(999.5) ,
NbinTRACK = cms.int32(100), TRACK_min = cms.double(-0.5), TRACK_max = cms.double(999.5) ,
NbinSEED = cms.int32(100), SEED_min = cms.double(-0.5), SEED_max = cms.double(9999.5) ,
NbinOPV = 125, OPV_min = -0.5, OPV_max = 249.5,
NbinELE = 100, ELE_min = -0.5, ELE_max = 999.5,
NbinCORE = 100, CORE_min = -0.5, CORE_max = 999.5,
NbinTRACK = 100, TRACK_min = -0.5, TRACK_max = 999.5,
NbinSEED = 100, SEED_min = -0.5, SEED_max = 9999.5,
),
)


Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
electronMcSignalHistosCfg = cms.PSet(
Nbinxyz = cms.int32(50),
Nbinp = cms.int32(50), Nbinp2D = cms.int32(50), Pmax = cms.double(300.0),
Nbinpt = cms.int32(50), Nbinpt2D = cms.int32(50), Nbinpteff = cms.int32(19),Ptmax = cms.double(100.0),
Nbinpt = cms.int32(50), Nbinpt2D = cms.int32(50), Nbinpteff = cms.int32(19), Ptmax = cms.double(100.0),
Nbinfhits = cms.int32(30), Fhitsmax = cms.double(30.0),
Nbinlhits = cms.int32(5), Lhitsmax = cms.double(10.0),
Nbineta = cms.int32(50), Nbineta2D = cms.int32(50),Etamin = cms.double(-2.5), Etamax = cms.double(2.5),
Nbineta = cms.int32(50), Nbineta2D = cms.int32(50), Etamin = cms.double(-2.5), Etamax = cms.double(2.5),
Nbindeta = cms.int32(100), Detamin = cms.double(-0.005), Detamax = cms.double(0.005),
Nbindetamatch = cms.int32(100), Nbindetamatch2D = cms.int32(50), Detamatchmin = cms.double(-0.05), Detamatchmax = cms.double(0.05),
Nbinphi = cms.int32(64), Nbinphi2D = cms.int32(32), Phimin = cms.double(-3.2), Phimax = cms.double(3.2),
Expand Down Expand Up @@ -67,17 +67,17 @@
electronMcSignalValidator,
electronCollectionEndcaps = 'ecalDrivenGsfElectronsHGC',
electronCoreCollection = 'ecalDrivenGsfElectronCoresHGC',
MaxAbsEta = cms.double(3.0),
MaxAbsEta = 3.0,
histosCfg = dict(
Nbineta = 60 ,
Nbineta2D = 60 ,
Etamin = -3.0 ,
Etamax = 3.0 ,

NbinOPV = cms.int32(125), OPV_min = cms.double(-0.5), OPV_max = cms.double(249.5) ,
NbinELE = cms.int32(100), ELE_min = cms.double(-0.5), ELE_max = cms.double(999.5) ,
NbinCORE = cms.int32(100), CORE_min = cms.double(-0.5), CORE_max = cms.double(999.5) ,
NbinTRACK = cms.int32(100), TRACK_min = cms.double(-0.5), TRACK_max = cms.double(999.5) ,
NbinSEED = cms.int32(100), SEED_min = cms.double(-0.5), SEED_max = cms.double(9999.5) ,
NbinOPV = 125, OPV_min = -0.5, OPV_max = 249.5 ,
NbinELE = 100, ELE_min = -0.5, ELE_max = 999.5,
NbinCORE = 100, CORE_min = -0.5, CORE_max = 999.5,
NbinTRACK = 100, TRACK_min = -0.5, TRACK_max = 999.5,
NbinSEED = 100, SEED_min = -0.5, SEED_max = 9999.5,
),
)