CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

HLTTauDQMSource Class Reference

#include <HLTTauDQMSource.h>

Inheritance diagram for HLTTauDQMSource:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze.
void beginJob ()
 BeginJob.
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 Luminosity Block.
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void endJob ()
 Endjob.
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.

Private Member Functions

LVColl getFilterCollection (size_t index, int id, const trigger::TriggerEvent &trigEv, double)

Private Attributes

std::vector< HLTTauDQMCaloPlottercaloPlotters
std::vector< edm::ParameterSetconfig_
std::vector< std::string > configType_
int counterEvt_
DQMStoredbe_
bool doRefAnalysis_
double EtMax_
double HLTMatchDr_
double L1MatchDr_
std::vector< HLTTauDQML1Plotterl1Plotters
std::vector
< HLTTauDQMLitePathPlotter
litePathPlotters
int NEtaBins_
int NPhiBins_
int NPtBins_
std::vector< HLTTauDQMPathPlotterpathPlotters
int prescaleEvt_
 counter
std::vector< double > ptThres_
std::vector< edm::InputTagrefFilter_
std::vector< int > refID_
std::vector
< HLTTauDQMSummaryPlotter
summaryPlotters
std::vector< HLTTauDQMTrkPlottertrackPlotters
edm::InputTag triggerEvent_
 every n events

Detailed Description

Definition at line 59 of file HLTTauDQMSource.h.


Constructor & Destructor Documentation

HLTTauDQMSource::HLTTauDQMSource ( const edm::ParameterSet ps)

Definition at line 7 of file HLTTauDQMSource.cc.

References caloPlotters, config_, configType_, doRefAnalysis_, EtMax_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTMatchDr_, i, L1MatchDr_, l1Plotters, litePathPlotters, NEtaBins_, NPhiBins_, NPtBins_, pathPlotters, prescaleEvt_, ptThres_, refFilter_, refID_, summaryPlotters, tmp, trackPlotters, and triggerEvent_.

                                                            :counterEvt_(0)
{

  //Get General Monitoring Parameters
  config_                 = ps.getParameter<std::vector<edm::ParameterSet> >("MonitorSetup");
  configType_             = ps.getParameter<std::vector<std::string> >("ConfigType");
  doRefAnalysis_          = ps.getParameter<bool>("doMatching");
  NPtBins_                = ps.getUntrackedParameter<int>("PtHistoBins",20);
  NEtaBins_               = ps.getUntrackedParameter<int>("EtaHistoBins",20);
  NPhiBins_               = ps.getUntrackedParameter<int>("PhiHistoBins",32);
  EtMax_                  = ps.getUntrackedParameter<double>("EtHistoMax",100);
  L1MatchDr_              = ps.getUntrackedParameter<double>("L1MatchDeltaR",0.5);
  HLTMatchDr_             = ps.getUntrackedParameter<double>("HLTMatchDeltaR",0.3);

  refFilter_              = ps.getUntrackedParameter<std::vector<edm::InputTag> >("matchFilter");
  refID_                  = ps.getUntrackedParameter<std::vector<int> >("matchObjectID");
  ptThres_                = ps.getUntrackedParameter<std::vector<double> >("matchObjectMinPt");
  prescaleEvt_            = ps.getUntrackedParameter<int>("prescaleEvt", -1);

  triggerEvent_           = ps.getParameter < edm::InputTag > ("TriggerEvent");

  //Read The Configuration
  for(unsigned int i=0;i<config_.size();++i)
    {

      if(configType_[i] == "L1")
        {
          HLTTauDQML1Plotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,L1MatchDr_);
          l1Plotters.push_back(tmp);
        }

      if(configType_[i] == "Calo")
        {
          HLTTauDQMCaloPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_);
          caloPlotters.push_back(tmp);
        }

      else if(configType_[i] == "Track")
        {
          HLTTauDQMTrkPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_);
          trackPlotters.push_back(tmp);
        }

      else if(configType_[i] == "Path")
        {
          HLTTauDQMPathPlotter tmp(config_[i],doRefAnalysis_);
          pathPlotters.push_back(tmp);
        }

      else if(configType_[i] == "LitePath")
        {
          HLTTauDQMLitePathPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_);
          litePathPlotters.push_back(tmp);
        }


      else if(configType_[i] == "Summary")
        {
          HLTTauDQMSummaryPlotter tmp(config_[i]);
          summaryPlotters.push_back(tmp);
        }


    }
}
HLTTauDQMSource::~HLTTauDQMSource ( )

Definition at line 73 of file HLTTauDQMSource.cc.

{
   
  // do anything here that needs to be done at desctruction time
  // (e.g. close files, deallocate resources etc.)
  
}

Member Function Documentation

void HLTTauDQMSource::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 101 of file HLTTauDQMSource.cc.

References caloPlotters, counterEvt_, doRefAnalysis_, exception, edm::Event::getByLabel(), getFilterCollection(), i, gen::k, l1Plotters, litePathPlotters, pathPlotters, prescaleEvt_, ptThres_, dt_dqm_sourceclient_common_cff::reco, refFilter_, refID_, trackPlotters, and triggerEvent_.

{  
  using namespace std;
  using namespace edm;
  using namespace reco;
  using namespace l1extra;
  using namespace trigger;


  //Apply the prescaler
  if(counterEvt_ > prescaleEvt_)
    {
      //Do Analysis here
      
      //Create dummy Match Collections
      std::vector<LVColl> refC;

      if(doRefAnalysis_)
        {
          Handle<TriggerEvent> trigEv;

          //get The triggerEvent
          bool gotTEV =true;
          try {
             gotTEV*= iEvent.getByLabel(triggerEvent_,trigEv);
              }
          catch (cms::Exception& exception) {
            gotTEV =false;
          }



            if(gotTEV)
              for(unsigned int i=0;i<refFilter_.size();++i)
                {
                  size_t ID =trigEv->filterIndex(refFilter_[i]);
                  refC.push_back(getFilterCollection(ID,refID_[i],*trigEv,ptThres_[i]));
                }
        }

      //fill the empty slots with empty collections
      LVColl dummy;
      for(int k=refFilter_.size();k<3;k++)
        {
          refC.push_back(dummy);
        }

     
      
      //Path Plotters
      for(unsigned int i=0;i<pathPlotters.size();++i)
        pathPlotters[i].analyze(iEvent,iSetup,refC);

      //Lite Path Plotters
      for(unsigned int i=0;i<litePathPlotters.size();++i)
        litePathPlotters[i].analyze(iEvent,iSetup,refC);

      //L1  Plotters
      for(unsigned int i=0;i<l1Plotters.size();++i)
        l1Plotters[i].analyze(iEvent,iSetup,refC);

      //Calo Plotters
      for(unsigned int i=0;i<caloPlotters.size();++i)
        caloPlotters[i].analyze(iEvent,iSetup,refC[0]);

      //Track Plotters
      for(unsigned int i=0;i<trackPlotters.size();++i)
        trackPlotters[i].analyze(iEvent,iSetup,refC[0]);

    }
  else
      counterEvt_++;

}
void HLTTauDQMSource::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 84 of file HLTTauDQMSource.cc.

                         {

}
void HLTTauDQMSource::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Luminosity Block.

Reimplemented from edm::EDAnalyzer.

Definition at line 94 of file HLTTauDQMSource.cc.

                                                                         {
  
}
void HLTTauDQMSource::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 89 of file HLTTauDQMSource.cc.

                                                                            {

}
void HLTTauDQMSource::endJob ( void  ) [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 191 of file HLTTauDQMSource.cc.

                            {
  return;
}
void HLTTauDQMSource::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [protected, virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 180 of file HLTTauDQMSource.cc.

References i, EcalCondTools::plot(), and summaryPlotters.

                                                                       {
                                         
        //Summary Plotters
     for(unsigned int i=0;i<summaryPlotters.size();++i) summaryPlotters[i].plot();
     
}
void HLTTauDQMSource::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 188 of file HLTTauDQMSource.cc.

                                                                         {
}
LVColl HLTTauDQMSource::getFilterCollection ( size_t  index,
int  id,
const trigger::TriggerEvent trigEv,
double  ptCut 
) [private]

Definition at line 197 of file HLTTauDQMSource.cc.

References a, abs, trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::getObjects(), i, trigger::TriggerObject::id(), dbtoconf::out, trigger::TriggerObject::px(), trigger::TriggerObject::py(), trigger::TriggerObject::pz(), trigger::TriggerEvent::sizeFilters(), and mathSSE::sqrt().

Referenced by analyze().

{
  using namespace trigger;
  //Create output Collection
  LVColl out;
      //get All the final trigger objects
      const TriggerObjectCollection& TOC(trigEv.getObjects());

     
      //filter index
      if(index!=trigEv.sizeFilters())
        {
          const Keys& KEYS = trigEv.filterKeys(index);
          for(size_t i = 0;i<KEYS.size();++i)
            {
              const TriggerObject& TO(TOC[KEYS[i]]);
              LV a(TO.px(),TO.py(),TO.pz(),sqrt(TO.px()*TO.px()+TO.py()*TO.py()+TO.pz()*TO.pz()));
            if(abs(TO.id()) == id)
                if(a.pt()>ptCut)
                  out.push_back(a);
            }
        }
  return out;
}

Member Data Documentation

Definition at line 126 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

Definition at line 91 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

std::vector<std::string> HLTTauDQMSource::configType_ [private]

Definition at line 92 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

Definition at line 114 of file HLTTauDQMSource.h.

Referenced by analyze().

Definition at line 90 of file HLTTauDQMSource.h.

Definition at line 95 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

double HLTTauDQMSource::EtMax_ [private]

Definition at line 99 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

double HLTTauDQMSource::HLTMatchDr_ [private]

Definition at line 101 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

double HLTTauDQMSource::L1MatchDr_ [private]

Definition at line 100 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

Definition at line 125 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

Definition at line 129 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

Definition at line 97 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

Definition at line 98 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

Definition at line 96 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

Definition at line 128 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

counter

Definition at line 115 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

std::vector<double> HLTTauDQMSource::ptThres_ [private]

Definition at line 106 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

Definition at line 104 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

std::vector<int> HLTTauDQMSource::refID_ [private]

Definition at line 105 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

Definition at line 130 of file HLTTauDQMSource.h.

Referenced by endLuminosityBlock(), and HLTTauDQMSource().

Definition at line 127 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

every n events

Definition at line 118 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().