From 0f0363a6f6c511762dec2b9c836ab724cf4389f5 Mon Sep 17 00:00:00 2001 From: tresreid Date: Thu, 15 Sep 2022 08:22:17 -0500 Subject: [PATCH] add rho2 for already included rho --- plugins/ScoutingNanoAOD.cc | 7 +++++++ test/ScoutingNanoAOD_cfg.py | 1 + 2 files changed, 8 insertions(+) diff --git a/plugins/ScoutingNanoAOD.cc b/plugins/ScoutingNanoAOD.cc index ca32f18..3311cc7 100644 --- a/plugins/ScoutingNanoAOD.cc +++ b/plugins/ScoutingNanoAOD.cc @@ -131,6 +131,7 @@ class ScoutingNanoAOD : public edm::one::EDAnalyzer > gensToken; //const edm::EDGetTokenT genEvtInfoToken; const edm::EDGetTokenT rhoToken; + const edm::EDGetTokenT rhoToken2; std::vector triggerPathsVector; std::map triggerPathsMap; @@ -334,6 +335,7 @@ class ScoutingNanoAOD : public edm::one::EDAnalyzer Vertex_isValidVtx; float rho; + float rho2; // Event shape variables float event_isotropy; @@ -371,6 +373,7 @@ ScoutingNanoAOD::ScoutingNanoAOD(const edm::ParameterSet& iConfig): pileupInfoToken (consumes > (iConfig.getParameter("pileupinfo"))), gensToken (consumes > (iConfig.getParameter("gens"))), rhoToken (consumes (iConfig.getParameter("rho"))), + rhoToken2 (consumes (iConfig.getParameter("rho2"))), //genEvtInfoToken (consumes (iConfig.getParameter("geneventinfo"))), doL1 (iConfig.existsAs("doL1") ? iConfig.getParameter ("doL1") : false), doData (iConfig.existsAs("doData") ? iConfig.getParameter ("doData") : false), @@ -566,6 +569,7 @@ ScoutingNanoAOD::ScoutingNanoAOD(const edm::ParameterSet& iConfig): tree->Branch("FatJet_nconst" ,&FatJet_nconst ); tree->Branch("rho", &rho); + tree->Branch("rho2", &rho2); tree->Branch("event_isotropy" ,&event_isotropy ); tree->Branch("event_circularity" ,&event_circularity ); @@ -1266,6 +1270,9 @@ for(int e = 0; e < static_cast(truth_pts.size()); e++){//loop over pf cands Handle rhoH; iEvent.getByToken(rhoToken, rhoH); rho = *rhoH; + Handle rhoH2; + iEvent.getByToken(rhoToken2, rhoH2); + rho2 = *rhoH2; // done for all events, no need to reset? EventShapeVariables event_algo(event_tracks); diff --git a/test/ScoutingNanoAOD_cfg.py b/test/ScoutingNanoAOD_cfg.py index bd7fe31..f31c0f5 100644 --- a/test/ScoutingNanoAOD_cfg.py +++ b/test/ScoutingNanoAOD_cfg.py @@ -262,6 +262,7 @@ #vertices = cms.InputTag("hltScoutingMuonPacker","displacedVtx"), #geneventinfo = cms.InputTag("generator"), rho = cms.InputTag("fixedGridRhoFastjetAllScouting"), + rho2 = cms.InputTag("hltScoutingPFPacker","rho"), # for JEC corrections eventually #L1corrAK4_DATA = cms.FileInPath('CMSDIJET/DijetScoutingRootTreeMaker/data/80X_dataRun2_HLT_v12/80X_dataRun2_HLT_v12_L1FastJet_AK4CaloHLT.txt'),