diff --git a/EcalAlCaRecoProducers/python/alcaSkimming.py b/EcalAlCaRecoProducers/python/alcaSkimming.py index 4e0e7dc35b3..d7751eaca71 100644 --- a/EcalAlCaRecoProducers/python/alcaSkimming.py +++ b/EcalAlCaRecoProducers/python/alcaSkimming.py @@ -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 @@ -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 diff --git a/ZNtupleDumper/plugins/ZNtupleDumper.cc b/ZNtupleDumper/plugins/ZNtupleDumper.cc index 28399d7da30..3e1533f8033 100644 --- a/ZNtupleDumper/plugins/ZNtupleDumper.cc +++ b/ZNtupleDumper/plugins/ZNtupleDumper.cc @@ -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 @@ -486,6 +486,7 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): hltPaths(iConfig.getParameter< std::vector >("hltPaths")), SelectEvents(iConfig.getParameter >("SelectEvents")), ntupleFileName(iConfig.getParameter("foutName")), + fixRecalToNTuple_(iConfig.getParameter("fixRecalToNTuple")), doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), doExtraStudyTree(iConfig.getParameter("doExtraStudyTree")), doEleIDTree(iConfig.getParameter("doEleIDTree")), @@ -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<