CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

GeneralHLTOffline Class Reference

Inheritance diagram for GeneralHLTOffline:
edm::EDAnalyzer edm::EDConsumerBase

List of all members.

Public Member Functions

 GeneralHLTOffline (const edm::ParameterSet &)
 ~GeneralHLTOffline ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
virtual void endJob ()
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
virtual void endRun (edm::Run const &, edm::EventSetup const &)
virtual void fillHltMatrix (const std::string &, const std::string &, double, double, bool)
virtual void setupHltMatrix (const std::string &, int)

Private Attributes

std::vector< std::string > AddedDatasets
MonitorElementcppath_
DQMStoredbe_
bool debugPrint
HLTConfigProvider hlt_config_
std::string hlt_menu_
std::string hltTag
bool outputPrint
std::vector< std::vector
< std::string > > 
PDsVectorPathsVector
std::string plotDirectoryName
bool streamA_found_

Detailed Description

Description: [one line class summary] Implementation: [Notes on implementation]

Definition at line 48 of file GeneralHLTOffline.cc.


Constructor & Destructor Documentation

GeneralHLTOffline::GeneralHLTOffline ( const edm::ParameterSet ps) [explicit]

Definition at line 89 of file GeneralHLTOffline.cc.

References gather_cfg::cout, debugPrint, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltTag, outputPrint, plotDirectoryName, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                             :streamA_found_(false),
                                                                  hlt_menu_(""),
                                                                  dbe_(0),
                                                                  cppath_(0) {
  debugPrint  = false;
  outputPrint = false;

  plotDirectoryName = ps.getUntrackedParameter<std::string>("dirname",
                                                            "HLT/General");

  hltTag = ps.getParameter<std::string> ("HltProcessName");

  if (debugPrint) {
    std::cout << "Inside Constructor" << std::endl;
    std::cout << "Got plot dirname = " << plotDirectoryName << std::endl;
  }
}
GeneralHLTOffline::~GeneralHLTOffline ( )

Definition at line 108 of file GeneralHLTOffline.cc.

                                      {
}

Member Function Documentation

void GeneralHLTOffline::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 113 of file GeneralHLTOffline.cc.

References gather_cfg::cout, cppath_, makeLayoutFileForGui::datasetNames, dbe_, debugPrint, trigger::TriggerObject::eta(), MonitorElement::Fill(), fillHltMatrix(), DQMStore::get(), edm::Event::getByLabel(), MonitorElement::getTH1F(), hlt_config_, hlt_menu_, hltTag, trigger::TriggerObject::id(), edm::EventBase::id(), getHLTprescales::index, edm::HandleBase::isValid(), relativeConstraints::keys, diffTwoXMLs::label, edm::EventID::luminosityBlock(), HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), NULL, outputPrint, EgammaValidation_cff::pathName, PDsVectorPathsVector, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), edm::EventID::run(), HLTConfigProvider::saveTags(), findQualityFiles::size, streamA_found_, HLTConfigProvider::streamContent(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerIndex(), and patRefSel_triggerSelection_cff::triggerResults.

                                                        {
  if (debugPrint)
    std::cout << "Inside analyze - run, block, event "
              << iEvent.id().run() << " , " << iEvent.id().luminosityBlock()
              << " , " << iEvent.id() << " , " << std::endl;


  // Access Trigger Results
  edm::Handle<edm::TriggerResults> triggerResults;
  iEvent.getByLabel(edm::InputTag("TriggerResults", "", hltTag), triggerResults);

  if (!triggerResults.isValid()) {
    if (debugPrint)
      std::cout << "Trigger results not valid" << std::endl;
    return;
  }

  if (debugPrint)
    std::cout << "Found triggerResults" << std::endl;

  edm::Handle<trigger::TriggerEvent> aodTriggerEvent;
  iEvent.getByLabel(edm::InputTag("hltTriggerSummaryAOD", "", hltTag),
                    aodTriggerEvent);

  if (!aodTriggerEvent.isValid()) {
    if (debugPrint)
      std::cout << "No AOD trigger summary found! Returning...";
    return;
  }

  const trigger::TriggerObjectCollection objects = aodTriggerEvent->getObjects();

  if (streamA_found_) {
    const std::vector<std::string> &datasetNames =  hlt_config_.streamContent("A");
    // Loop over PDs
    for (unsigned int iPD = 0; iPD < datasetNames.size(); iPD++) {
      // Loop over Paths in each PD
      bool first_count = true;
      for (unsigned int iPath = 0;
           iPath < PDsVectorPathsVector[iPD].size(); iPath++) {
        std::string &pathName = PDsVectorPathsVector[iPD][iPath];
        unsigned int index = hlt_config_.triggerIndex(pathName);
        if (debugPrint) {
          std::cout << "Looking at path " << pathName << std::endl;
          std::cout << "Index = " << index
                    << " triggerResults->size() = " << triggerResults->size()
                    << std::endl;
        }

        // fill the histos with empty weights......
        const std::string &label = datasetNames[iPD];
        std::string fullPathToCPP = "HLT/GeneralHLTOffline/"
            + label + "/cppath_" + label + hlt_menu_;
        MonitorElement * ME_mini_cppath = dbe_->get(fullPathToCPP);
        TH1F * hist_mini_cppath = NULL;
        if (ME_mini_cppath)
          hist_mini_cppath = ME_mini_cppath->getTH1F();

        if (hist_mini_cppath) {
          TAxis * axis = hist_mini_cppath->GetXaxis();
          if (axis) {
            int bin_num = axis->FindBin(pathName.c_str());
            int bn = bin_num - 1;
            hist_mini_cppath->Fill(bn, 0);
            hist_mini_cppath->SetEntries(hist_mini_cppath->Integral());
          }
        }

        if (index < triggerResults->size()) {
          if (triggerResults->accept(index)) {
            cppath_->Fill(index, 1);
            if (debugPrint)
              std::cout << "Check Event " <<  iEvent.id()
                        << " Run " << iEvent.id().run()
                        << " fired path " << pathName << std::endl;

            // look up module labels for this path
            const std::vector<std::string> &modulesThisPath =
                hlt_config_.moduleLabels(pathName);

            if (debugPrint)
              std::cout << "Looping over module labels " << std::endl;

            // Loop backward through module names
            for (int iModule = (modulesThisPath.size() - 1);
                 iModule >= 0; iModule--) {
              if (debugPrint)
                std::cout << "Module name is "
                          << modulesThisPath[iModule] << std::endl;
              // check to see if you have savetags information
              if (hlt_config_.saveTags(modulesThisPath[iModule])) {
                if (debugPrint)
                  std::cout << "For path " << pathName
                            << " this module " << modulesThisPath[iModule]
                            <<" is a saveTags module of type "
                            << hlt_config_.moduleType(modulesThisPath[iModule])
                            << std::endl;
                if (hlt_config_.moduleType(modulesThisPath[iModule])
                    == "HLTLevel1GTSeed")
                  break;
                edm::InputTag moduleWhoseResultsWeWant(modulesThisPath[iModule],
                                                       "",
                                                       hltTag);
                unsigned int idx_module_aod_trg =
                    aodTriggerEvent->filterIndex(moduleWhoseResultsWeWant);
                if (idx_module_aod_trg < aodTriggerEvent->sizeFilters()) {
                  const trigger::Keys &keys =
                      aodTriggerEvent->filterKeys(idx_module_aod_trg);
                  if (debugPrint)
                    std::cout << "Got Keys for index "
                              << idx_module_aod_trg
                              <<", size of keys is " << keys.size()
                              << std::endl;
                  if (keys.size() >= 1000)
                    edm::LogWarning("GeneralHLTOffline")
                        << "WARNING!! size of keys is " << keys.size()
                        << " for path " << pathName << " and module "
                        << modulesThisPath[iModule]<< std::endl;

                  // There can be > 100 keys (3-vectors) for some
                  // modules with no ID filled the first one has the
                  // highest value for single-object triggers for
                  // multi-object triggers, seems reasonable to use
                  // the first one as well So loop here has been
                  // commented out for ( size_t iKey = 0; iKey <
                  // keys.size(); iKey++ ) {

                  if (keys.size() > 0) {
                    trigger::TriggerObject foundObject = objects[keys[0]];
                    if (debugPrint || outputPrint)
                      std::cout << "This object has id (pt, eta, phi) = "
                                << " " << foundObject.id() << " "
                                << std::setw(10) << foundObject.pt()
                                << ", " << std::setw(10) << foundObject.eta()
                                << ", " << std::setw(10) << foundObject.phi()
                                << "   for path = " << std::setw(20) << pathName
                                << " module " << std::setw(40)
                                << modulesThisPath[iModule] << std::endl;
                    if (debugPrint)
                      std::cout << "CHECK RUN " << iEvent.id().run() << " "
                                << iEvent.id() << " " << pathName << " "
                                << modulesThisPath[iModule] << " "
                                << datasetNames[iPD] << " "
                                << hlt_config_.moduleType(modulesThisPath[iModule])
                                << " " << keys.size() << " "
                                << std::setprecision(4) << foundObject.pt() << " "
                                << foundObject.eta() << " "
                                << foundObject.phi() << std::endl;

                    // first_count is to make sure that the top-level
                    // histograms of each dataset don't get filled
                    // more than once
                    fillHltMatrix(datasetNames[iPD], pathName,
                                  foundObject.eta(), foundObject.phi(),
                                  first_count);
                    first_count = false;
                  }  // at least one key
                }  // end if filter in aodTriggerEvent
                // OK, we found the last module. No need to look at
                // the others.  get out of the loop
                break;
              }  // end if saveTags
            }  // end Loop backward through module names
          }  // end if(triggerResults->accept(index))
        }  // end if (index < triggerResults->size())
      }  // end Loop over Paths in each PD
    }  // end Loop over PDs
  }
}
void GeneralHLTOffline::beginJob ( void  ) [private, virtual]
void GeneralHLTOffline::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 683 of file GeneralHLTOffline.cc.

                                                                   {
}
void GeneralHLTOffline::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 303 of file GeneralHLTOffline.cc.

References AddedDatasets, DQMStore::book1D(), compare_using_db::compare, gather_cfg::cout, cppath_, HLTConfigProvider::datasetContent(), makeLayoutFileForGui::datasetNames, dbe_, debugPrint, alignCSCRings::e, newFWLiteAna::found, hlt_config_, hlt_menu_, hltTag, i, HLTConfigProvider::init(), n, PDsVectorPathsVector, HLTConfigProvider::processName(), HLTConfigProvider::removeVersion(), DQMStore::setCurrentFolder(), setupHltMatrix(), HLTConfigProvider::size(), streamA_found_, HLTConfigProvider::streamContent(), HLTConfigProvider::streamNames(), and HLTConfigProvider::tableName().

                                                         {
  if (debugPrint)
    std::cout << "Inside beginRun" << std::endl;

  // Reset "condition" variables that could have memory of previous
  // runs.

  PDsVectorPathsVector.clear();
  AddedDatasets.clear();

  bool changed = true;
  if (!hlt_config_.init(iRun, iSetup, hltTag, changed)) {
    if (debugPrint) {
      std::cout << "Warning, didn't find process HLT" << std::endl;
      return;
    }
  } else {
    if (debugPrint)
      std::cout << " HLTConfig processName " << hlt_config_.processName()
                << " tableName " << hlt_config_.tableName()
                << " size " << hlt_config_.size() << std::endl;
  }
  hlt_menu_ = hlt_config_.tableName();
  for (unsigned int n = 0, e = hlt_menu_.length(); n != e; ++n)
    if (hlt_menu_[n] == '/' || hlt_menu_[n] == '.')
      hlt_menu_[n] = '_';



  dbe_->setCurrentFolder("HLT/GeneralHLTOffline/");
  cppath_ = dbe_->book1D("cppath" + hlt_menu_,
                         "Counts/Path",
                         hlt_config_.size(), 0, hlt_config_.size());

  const std::vector<std::string> &nameStreams = hlt_config_.streamNames();
  std::vector<std::string>::const_iterator si = nameStreams.begin();
  std::vector<std::string>::const_iterator se = nameStreams.end();
  for ( ; si != se; ++si) {
    if ((*si) == "A") {
      streamA_found_ = true;
      break;
    }
  }

  if (streamA_found_) {
    const std::vector<std::string> &datasetNames =  hlt_config_.streamContent("A");
    if (debugPrint)
      std::cout << "Number of Stream A datasets "
                << datasetNames.size() << std::endl;

    for (unsigned int i = 0; i < datasetNames.size(); i++) {
      const std::vector<std::string> &datasetPaths = hlt_config_.datasetContent(datasetNames[i]);
      if (debugPrint) {
        std::cout << "This is dataset " << datasetNames[i]
                  << "datasetPaths.size() = " << datasetPaths.size() << std::endl;
        for (unsigned int iPath = 0;
             iPath < datasetPaths.size(); iPath++) {
          std::cout << "Before setupHltMatrix -  MET dataset "
                    << datasetPaths[iPath] << std::endl;
        }
      }
      // Check if dataset has been added - if not add it
      // need to loop through AddedDatasets and compare
      bool foundDataset = false;
      int datasetNum = -1;
      for (unsigned int d = 0; d < AddedDatasets.size(); d++) {
        if (AddedDatasets[d].compare(datasetNames[i]) == 0) {
          foundDataset = true;
          datasetNum = d;
          if (debugPrint)
            std::cout << "Dataset " << datasetNames[i]
                      << " found in AddedDatasets at position " << d << std::endl;
          break;
        }
      }

      if (!foundDataset) {
        if (debugPrint)
          std::cout << " Fill trigger paths for dataset "
                    << datasetNames[i] << std::endl;
        PDsVectorPathsVector.push_back(datasetPaths);
        // store dataset pathname
        AddedDatasets.push_back(datasetNames[i]);
      } else {
        // This trigger path has already been added - this implies that
        // this is a new run What we want to do is check if there is a
        // new trigger that was not in the original dataset For a given
        // dataset, loop over the stored list of triggers, and compare
        // to the current list of triggers If any of the triggers are
        // missing, add them to the end of the appropriate dataset
        if (debugPrint)
          std::cout << " Additional runs : Check for additional"
                    << "trigger paths per dataset " << std::endl;
        // Loop over correct path of PDsVectorPathsVector
        bool found = false;

        // Loop over triggers in the path
        for (unsigned int iTrig = 0; iTrig < datasetPaths.size(); iTrig++) {
          if (debugPrint)
            std::cout << "Looping over trigger list in dataset "
                      <<  iTrig <<  "  "
                      << datasetPaths[iTrig] << std::endl;
          found = false;
          // Loop over triggers already on the list
          for (unsigned int od = 0; od < PDsVectorPathsVector[datasetNum].size(); od++) {
            if (debugPrint)
              std::cout << "Looping over existing trigger list " << od
                        <<  "  " << PDsVectorPathsVector[datasetNum][od] << std::endl;
            // Compare, see if match is found
            if (hlt_config_.removeVersion(datasetPaths[iTrig]).compare(
                    hlt_config_.removeVersion(PDsVectorPathsVector[datasetNum][od])) == 0) {
              found = true;
              if (debugPrint)
                std::cout << " FOUND " << datasetPaths[iTrig] << std::endl;
              break;
            }
          }
          // If match is not found, add trigger to correct path of PDsVectorPathsVector
          if (!found)
            PDsVectorPathsVector[datasetNum].push_back(datasetPaths[iTrig]);
          if (debugPrint)
            std::cout << datasetPaths[iTrig]
                      << "  NOT FOUND - so we added it to the correct dataset "
                      << datasetNames[i] << std::endl;
        }
      }
      // Let's check this whole big structure
      if (debugPrint) {
        for (unsigned int is = 0; is < PDsVectorPathsVector.size(); is++) {
          std::cout << "   PDsVectorPathsVector[" << is << "] is "
                    << PDsVectorPathsVector[is].size() << std::endl;
          for (unsigned int ip = 0; ip < PDsVectorPathsVector[is].size(); ip++) {
            std::cout << "    trigger " << ip << " path "
                      << PDsVectorPathsVector[is][ip] << std::endl;
          }
        }
      }

      if (debugPrint)
        std::cout <<"Found PD: " << datasetNames[i] << std::endl;

      setupHltMatrix(datasetNames[i], i);
    }  // end of loop over dataset names
  }  // if stream A found
}  // end of beginRun
void GeneralHLTOffline::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 298 of file GeneralHLTOffline.cc.

                          {
}
void GeneralHLTOffline::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 688 of file GeneralHLTOffline.cc.

                                                            {
}
void GeneralHLTOffline::endRun ( edm::Run const &  ,
edm::EventSetup const &   
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 452 of file GeneralHLTOffline.cc.

References gather_cfg::cout, and debugPrint.

                                                                  {
  if (debugPrint)
    std::cout << " endRun called " << std::endl;
}
void GeneralHLTOffline::fillHltMatrix ( const std::string &  label,
const std::string &  path,
double  Eta,
double  Phi,
bool  first_count 
) [private, virtual]

Definition at line 570 of file GeneralHLTOffline.cc.

References gather_cfg::cout, dbe_, debugPrint, DQMStore::get(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), hlt_config_, hlt_menu_, NULL, HLTConfigProvider::removeVersion(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

                                                        {
  if (debugPrint)
    std::cout << "Inside fillHltMatrix( " << label << " , "
              << path << " ) " << std::endl;

  std::string fullPathToME;
  std::string fullPathToME1dEta;
  std::string fullPathToME1dPhi;
  std::string fullPathToME1dEtaPath;
  std::string fullPathToME1dPhiPath;
  std::string fullPathToCPP;


  fullPathToME = "HLT/GeneralHLTOffline/HLT_" + label + "_EtaVsPhi";
  fullPathToME1dEta = "HLT/GeneralHLTOffline/HLT_" + label + "_1dEta";
  fullPathToME1dPhi = "HLT/GeneralHLTOffline/HLT_" + label + "_1dPhi";
  fullPathToCPP = "HLT/GeneralHLTOffline/" + label
      + "/cppath_" + label + "_" + hlt_menu_;

  if (label != "SingleMu" && label != "SingleElectron" && label != "Jet") {
    fullPathToME = "HLT/GeneralHLTOffline/"
        + label + "/HLT_" + label + "_EtaVsPhi";
    fullPathToME1dEta = "HLT/GeneralHLTOffline/"
        + label + "/HLT_" + label + "_1dEta";
    fullPathToME1dPhi = "HLT/GeneralHLTOffline/"
        + label + "/HLT_" + label + "_1dPhi";
  }

  fullPathToME1dEtaPath = "HLT/GeneralHLTOffline/"
      + label + "/Paths/HLT_"
      + hlt_config_.removeVersion(path) + "_1dEta";
  fullPathToME1dPhiPath = "HLT/GeneralHLTOffline/"
      + label + "/Paths/HLT_"
      + hlt_config_.removeVersion(path) + "_1dPhi";

  TH1F * hist_mini_cppath = NULL;
  MonitorElement * ME_mini_cppath = dbe_->get(fullPathToCPP);
  if (ME_mini_cppath)
    hist_mini_cppath = ME_mini_cppath->getTH1F();

  // fill top-level histograms
  if (first_count) {
    if (debugPrint)
      std::cout << " label " << label << " fullPathToME1dPhi "
                << fullPathToME1dPhi << " path "  << path
                << " Phi " << Phi << " Eta " << Eta << std::endl;

    if (label != "MET" && label != "HT") {
      MonitorElement * ME_1dEta = dbe_->get(fullPathToME1dEta);
      if (ME_1dEta) {
        TH1F * hist_1dEta = ME_1dEta->getTH1F();
        if (hist_1dEta)
          hist_1dEta->Fill(Eta);
      }
    }
    if (label != "HT") {
      MonitorElement * ME_1dPhi = dbe_->get(fullPathToME1dPhi);
      if (ME_1dPhi) {
        TH1F * hist_1dPhi = ME_1dPhi->getTH1F();
        if (hist_1dPhi)
          hist_1dPhi->Fill(Phi);
        if (debugPrint)
          std::cout << "  **FILLED** label " << label << " fullPathToME1dPhi "
                    << fullPathToME1dPhi << " path "  << path
                    << " Phi " << Phi << " Eta " << Eta << std::endl;
      }
    }
    if (label != "MET" && label != "HT") {
      MonitorElement * ME_2d = dbe_->get(fullPathToME);
      if (ME_2d) {
        TH2F * hist_2d = ME_2d->getTH2F();
        if (hist_2d)
          hist_2d->Fill(Eta, Phi);
      }
    }
  }  // end fill top-level histograms

  if (label != "MET" && label != "HT") {
    MonitorElement * ME_1dEtaPath = dbe_->get(fullPathToME1dEtaPath);
    if (ME_1dEtaPath) {
      TH1F * hist_1dEtaPath = ME_1dEtaPath->getTH1F();
      if (hist_1dEtaPath)
        hist_1dEtaPath->Fill(Eta);
    }
  }
  if (label != "HT") {
    MonitorElement * ME_1dPhiPath = dbe_->get(fullPathToME1dPhiPath);
    if (ME_1dPhiPath) {
      TH1F * hist_1dPhiPath = ME_1dPhiPath->getTH1F();
      if (hist_1dPhiPath)
        hist_1dPhiPath->Fill(Phi);
    }
  }

  if (debugPrint)
    if (label == "MET")
      std::cout << " MET Eta is " << Eta << std::endl;

  if (hist_mini_cppath) {
    TAxis * axis = hist_mini_cppath->GetXaxis();
    int bin_num = axis->FindBin(path.c_str());
    int bn = bin_num - 1;
    hist_mini_cppath->Fill(bn, 1);
  }

  if (debugPrint)
    std::cout << "hist->Fill" << std::endl;
}  // End fillHltMatrix
void GeneralHLTOffline::setupHltMatrix ( const std::string &  label,
int  iPD 
) [private, virtual]

Definition at line 1025 of file TrigResRateMon.cc.

References DQMStore::book1D(), DQMStore::bookProfile(), TrigResRateMon::dbe_, MonitorElement::getTH1F(), MonitorElement::getTProfile(), i, TrigResRateMon::pathsSummaryFolder_, and DQMStore::setCurrentFolder().

Referenced by beginRun().

                                                                                    {

    //string groupLabelAny = "HLT_"+label+"_Any";
    //paths.push_back(groupLabelAny.c_str());
    //paths.push_back("HLT_"+label+"_L1_Any");
    paths.push_back("");
    paths.push_back("Total "+label);
    //paths.push_back("HLT_Any");

    string h_name; 
    string h_title; 

    dbe_->setCurrentFolder(pathsSummaryFolder_.c_str());

// //     h_name= "HLT_"+label+"_PassPass";
// //     h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass);;; ";
// //     MonitorElement* ME = dbe_->book2D(h_name.c_str(), h_title.c_str(),
// //                            paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);

    // This is counts per path per for a specific PD
    // it will be corrected for prescales
    h_name= "HLT_"+label+"_Pass_Any";
    h_title = "HLT_"+label+"_Pass -- Prescale*Counts Per Path;Path;PS*Counts";
    MonitorElement* ME_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
                           paths.size(), -0.5, paths.size()-0.5);

    // This is RAW counts per path per for a specific PD
    // it will be corrected for
    h_name= "HLT_"+label+"_RawCounts";
    h_title = "HLT_"+label+"_Pass (x=Pass, An) normalized to HLT_Any Pass;;Counts";
    MonitorElement* ME_RawCounts = dbe_->book1D(h_name.c_str(), h_title.c_str(),
                           paths.size(), -0.5, paths.size()-0.5);


    // Make a similar histogram that is xsec per path for a specific PD
    // this is actually a profile of the average xsec per path 
    h_name= "HLT_"+label+"_Xsec";
    h_title = "HLT_"+label+"_Xsec -- Profile shows Average Xsec per path;;#sigma (#mu b)";

    TProfile tempProfile(h_name.c_str(), h_title.c_str(),
                         paths.size(), -0.5, paths.size()-0.5);
    MonitorElement* ME_Xsec = dbe_->bookProfile(h_name.c_str(), &tempProfile);


    // Make a similar histogram that is xsec per path for a specific PD
    // this is actually a profile of the average xsec per path
    // this histogram is scaled to the cross section of a reference path
    h_name= "HLT_"+label+"_XsecScaled";
    h_title = "HLT_"+label+"_Xsec -- Profile shows Average Xsec per path Scaled to Reference;;Ratio (#sigma/#sigma_{ref}";

    TProfile tempProfileScaled(h_name.c_str(), h_title.c_str(),
                         paths.size(), -0.5, paths.size()-0.5);
    MonitorElement* ME_XsecScaled = dbe_->bookProfile(h_name.c_str(), &tempProfileScaled);

    h_name= "HLT_"+label+"_Rate";
    h_title = "HLT_"+label+"_Rate -- histogram shows Average Rate per LS;LS;Rate [Hz]";

    // MonitorElement* ME_Rate = dbe_->book1D(h_name.c_str(), h_title.c_str(),nLS_, 0, nLS_);


//     dbe_->setCurrentFolder(pathsSummaryHLTCorrelationsFolder_.c_str());
//     h_name= "HLT_"+label+"_PassPass_Normalized";
//     h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
//     MonitorElement* ME_Normalized = dbe_->book2D(h_name.c_str(), h_title.c_str(),
//                            paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
//     h_name= "HLT_"+label+"_Pass_Normalized_Any";
//     h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
//     MonitorElement* ME_Normalized_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
//                            paths.size(), -0.5, paths.size()-0.5);

//     dbe_->setCurrentFolder(pathsSummaryHLTPathsPerLSFolder_.c_str());
//     h_name= "HLT_"+label+"_Total_LS";
//     h_title = label+" HLT paths total combined rate [Hz]";
//     MonitorElement* ME_Total_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
//     ME_Total_LS->setAxisTitle("LS");

//     h_name= "HLT_"+label+"_LS";
//     h_title = label+" HLT paths rate [Hz]";
//     MonitorElement* ME_Group_LS = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, paths.size(), -0.5, paths.size()-0.5);
//     ME_Group_LS->setAxisTitle("LS");
//     /// add this path to the vector of 2D LS paths
//     v_ME_HLTAll_LS.push_back(ME_Group_LS);

    /*
    h_name= "HLT_"+label+"_L1_Total_LS";
    h_title = label+" HLT paths total combined rate [Hz]";
    MonitorElement* ME_Total_L1_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
    ME_Total_L1_LS->setAxisTitle("LS");

    h_name= "HLT_"+label+"_L1_LS";
    h_title = label+" HLT L1s rate [Hz]";
    MonitorElement* ME_Group_L1_LS = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, paths.size(), -0.5, paths.size()-0.5);
    ME_Group_L1_LS->setAxisTitle("LS");

    dbe_->setCurrentFolder(pathsSummaryHLTPathsPerBXFolder_.c_str());
    h_name= "HLT_"+label+"_BX_LS";
    h_title = label+" HLT paths total count combined per BX ";
    MonitorElement* ME_Total_BX = dbe_->book2D(h_name.c_str(), h_title.c_str(),  nLS_, 0, nLS_, 5, -2.5, 2.5);
    ME_Total_BX->setAxisTitle("LS",1);
    v_ME_Total_BX.push_back(ME_Total_BX);

    h_name= "HLT_"+label+"_BX_LS_Norm";
    h_title = label+" HLT paths total count combined per BX Normalized to LS";
    MonitorElement* ME_Total_BX_Norm = dbe_->book2D(h_name.c_str(), h_title.c_str(),  nLS_, 0, nLS_, 5, -2.5, 2.5);
    ME_Total_BX_Norm->setAxisTitle("LS",1);
    v_ME_Total_BX_Norm.push_back(ME_Total_BX_Norm);
    */

    for(unsigned int i = 0; i < paths.size(); i++){

// //       ME->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
// //       ME->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
//       ME_Group_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());

//       ME_Normalized->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
//       ME_Normalized->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
//       ME_Normalized_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
      ME_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
      ME_Xsec->getTProfile()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
      ME_XsecScaled->getTProfile()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
      ME_RawCounts->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
    }
    
}

Member Data Documentation

std::vector<std::string> GeneralHLTOffline::AddedDatasets [private]

Definition at line 80 of file GeneralHLTOffline.cc.

Referenced by beginRun().

Definition at line 83 of file GeneralHLTOffline.cc.

Referenced by analyze(), and beginRun().

Definition at line 82 of file GeneralHLTOffline.cc.

Referenced by analyze(), beginJob(), beginRun(), and fillHltMatrix().

Definition at line 74 of file GeneralHLTOffline.cc.

Referenced by analyze(), beginRun(), and fillHltMatrix().

std::string GeneralHLTOffline::hlt_menu_ [private]

Definition at line 78 of file GeneralHLTOffline.cc.

Referenced by analyze(), beginRun(), and fillHltMatrix().

std::string GeneralHLTOffline::hltTag [private]

Definition at line 77 of file GeneralHLTOffline.cc.

Referenced by analyze(), beginRun(), and GeneralHLTOffline().

Definition at line 72 of file GeneralHLTOffline.cc.

Referenced by analyze(), and GeneralHLTOffline().

std::vector< std::vector<std::string> > GeneralHLTOffline::PDsVectorPathsVector [private]

Definition at line 79 of file GeneralHLTOffline.cc.

Referenced by analyze(), and beginRun().

std::string GeneralHLTOffline::plotDirectoryName [private]

Definition at line 76 of file GeneralHLTOffline.cc.

Referenced by beginJob(), and GeneralHLTOffline().

Definition at line 73 of file GeneralHLTOffline.cc.

Referenced by analyze(), and beginRun().