@@ -82,10 +82,12 @@ JetAnalyzer::JetAnalyzer(const edm::ParameterSet& pSet)
8282 // isJPTJet_ = (std::string("jpt") ==jetType_);
8383 isPFJet_ = (std::string (" pf" ) == jetType_);
8484 isPUPPIJet_ = (std::string (" puppi" ) == jetType_);
85- isScoutingJet_ = (std::string (" scouting" ) == jetType_ );
85+ isScoutingJet_ = (jetType_. find (" scouting" ) != std::string::npos );
8686 isMiniAODJet_ = (std::string (" miniaod" ) == jetType_);
8787 jetCorrectorTag_ = pSet.getParameter <edm::InputTag>(" JetCorrections" );
8888
89+ isOnlineDQM_ = (jetType_.find (" Online" ) != std::string::npos);
90+
8991 if (!isMiniAODJet_) { // in MiniAOD jet is already corrected
9092 jetCorrectorToken_ = consumes<reco::JetCorrector>(jetCorrectorTag_);
9193 }
@@ -313,12 +315,14 @@ JetAnalyzer::~JetAnalyzer() {
313315// ***********************************************************
314316void JetAnalyzer::bookHistograms (DQMStore::IBooker& ibooker, edm::Run const & iRun, edm::EventSetup const &) {
315317 if (isScoutingJet_) {
318+ std::string baseDir = isOnlineDQM_ ? " HLT/ScoutingOnline/Jet/" : " HLT/ScoutingOffline/Jet/" ;
319+
316320 if (jetCleaningFlag_) {
317- ibooker.setCurrentFolder (" HLT/ScoutingOffline/Jet/ Cleaned" + mInputCollection_ .label ());
318- DirName = " HLT/ScoutingOffline/Jet/ Cleaned" + mInputCollection_ .label ();
321+ ibooker.setCurrentFolder (baseDir + " Cleaned" + mInputCollection_ .label ());
322+ DirName = baseDir + " Cleaned" + mInputCollection_ .label ();
319323 } else {
320- ibooker.setCurrentFolder (" HLT/ScoutingOffline/Jet/ Uncleaned" + mInputCollection_ .label ());
321- DirName = " HLT/ScoutingOffline/Jet/ Uncleaned" + mInputCollection_ .label ();
324+ ibooker.setCurrentFolder (baseDir + " Uncleaned" + mInputCollection_ .label ());
325+ DirName = baseDir + " Uncleaned" + mInputCollection_ .label ();
322326 }
323327 } else {
324328 if (jetCleaningFlag_) {
@@ -2615,10 +2619,12 @@ void JetAnalyzer::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetu
26152619void JetAnalyzer::analyze (const edm::Event& iEvent, const edm::EventSetup& iSetup) {
26162620 // set general folders first --> change later on for different folders
26172621 if (isScoutingJet_) {
2622+ std::string baseDir = isOnlineDQM_ ? " HLT/ScoutingOnline/Jet/" : " HLT/ScoutingOffline/Jet/" ;
2623+
26182624 if (jetCleaningFlag_) {
2619- DirName = " HLT/ScoutingOffline/Jet/ Cleaned" + mInputCollection_ .label ();
2625+ DirName = baseDir + " Cleaned" + mInputCollection_ .label ();
26202626 } else {
2621- DirName = " HLT/ScoutingOffline/Jet/ Uncleaned" + mInputCollection_ .label ();
2627+ DirName = baseDir + " Uncleaned" + mInputCollection_ .label ();
26222628 }
26232629 } else {
26242630 if (jetCleaningFlag_) {
0 commit comments