Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 EcalAlCaRecoProducers/python/alcaSkimming.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@

if(options.type=="MINIAODNTUPLE" ):
myEleCollection= cms.InputTag("slimmedElectrons")
process.zNtupleDumper.fixRecalToNTuple= cms.bool(False)
recalibElectronSrc = cms.InputTag("electronRecalibSCAssociator") #now done by EcalRecal(process)

process.MinEleNumberFilter.src = myEleCollection
Expand Down Expand Up @@ -821,8 +822,8 @@
process.outputALCARECO.outputCommands += process.OutALCARECOEcalRecalElectron.outputCommands
process.outputALCARECO.fileName=cms.untracked.string('EcalRecalElectron.root')
# process.MinEleNumberFilter.src = recalibElectronSrc
process.zNtupleDumper.WZSkimResultsCollection = cms.InputTag('TriggerResults::RECO') ## how and why and where is it used?

# process.zNtupleDumper.WZSkimResultsCollection = cms.InputTag('TriggerResults::RECO') ## how and why and where is it used?
process.zNtupleDumper.WZSkimResultsCollection = cms.InputTag('TriggerResults')
for ps in process.egmGsfElectronIDs.physicsObjectIDs:
for cutflow in ps.idDefinition.cutFlow:
if(cutflow.cutName == cms.string('GsfEleCalPFClusterIsoCut') or
Expand Down
8 changes: 5 additions & 3 deletions ZNtupleDumper/plugins/ZNtupleDumper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class ZNtupleDumper : public edm::EDAnalyzer
std::vector< std::string> hltPaths, SelectEvents;
private:
std::string ntupleFileName;

bool fixRecalToNTuple_;
bool doExtraCalibTree; ///< bool to activate the dump of the extra calib tree for E/p ICs
bool doExtraStudyTree; ///< bool to activate the dump of the extra tree for study with values for single recHits
bool doEleIDTree; ///< bool to activate the dump of the electronID variables in a separate tree
Expand Down Expand Up @@ -486,6 +486,7 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig):
hltPaths(iConfig.getParameter< std::vector<std::string> >("hltPaths")),
SelectEvents(iConfig.getParameter<std::vector<std::string> >("SelectEvents")),
ntupleFileName(iConfig.getParameter<std::string>("foutName")),
fixRecalToNTuple_(iConfig.getParameter<bool>("fixRecalToNTuple")),
doExtraCalibTree(iConfig.getParameter<bool>("doExtraCalibTree")),
doExtraStudyTree(iConfig.getParameter<bool>("doExtraStudyTree")),
doEleIDTree(iConfig.getParameter<bool>("doEleIDTree")),
Expand Down Expand Up @@ -688,10 +689,11 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe
//std::cout << "skip event: " << skipEvent << "\t" << eventType << std::endl;
//assert(!skipEvent);
eventTypeCounter[eventType]++;
if(skipEvent) return; // event not coming from any skim or paths
if(skipEvent && !fixRecalToNTuple_) return; // event not coming from any skim or paths
}
}

// std::cout<<std::endl<<" Event Type = "<<eventType<<std::endl;
if(fixRecalToNTuple_) eventType = UNKNOWN;
//------------------------------ CONVERSIONS
iEvent.getByToken(conversionsProducerToken_, conversionsHandle);

Expand Down
1 change: 1 addition & 0 deletions ZNtupleDumper/python/zntupledumper_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
metCollection = cms.InputTag('pfMet'),
triggerResultsCollection = cms.InputTag('TriggerResults::HLT'),
foutName = cms.string("ZShervinNtuple.root"),
fixRecalToNTuple = cms.bool(False),
doStandardTree = cms.bool(True),
doExtraCalibTree = cms.bool(False),
doExtraStudyTree = cms.bool(False),
Expand Down