CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
HLTTauDQMSource Class Reference

#include <HLTTauDQMSource.h>

Inheritance diagram for HLTTauDQMSource:
edm::EDAnalyzer

Public Member Functions

 HLTTauDQMSource (const edm::ParameterSet &)
 
 ~HLTTauDQMSource ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze. More...
 
void beginJob ()
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 Luminosity Block. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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 More...
 
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 More...
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

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_.

7  :counterEvt_(0)
8 {
9 
10  //Get General Monitoring Parameters
11  config_ = ps.getParameter<std::vector<edm::ParameterSet> >("MonitorSetup");
12  configType_ = ps.getParameter<std::vector<std::string> >("ConfigType");
13  doRefAnalysis_ = ps.getParameter<bool>("doMatching");
14  NPtBins_ = ps.getUntrackedParameter<int>("PtHistoBins",20);
15  NEtaBins_ = ps.getUntrackedParameter<int>("EtaHistoBins",20);
16  NPhiBins_ = ps.getUntrackedParameter<int>("PhiHistoBins",32);
17  EtMax_ = ps.getUntrackedParameter<double>("EtHistoMax",100);
18  L1MatchDr_ = ps.getUntrackedParameter<double>("L1MatchDeltaR",0.5);
19  HLTMatchDr_ = ps.getUntrackedParameter<double>("HLTMatchDeltaR",0.3);
20 
21  refFilter_ = ps.getUntrackedParameter<std::vector<edm::InputTag> >("matchFilter");
22  refID_ = ps.getUntrackedParameter<std::vector<int> >("matchObjectID");
23  ptThres_ = ps.getUntrackedParameter<std::vector<double> >("matchObjectMinPt");
24  prescaleEvt_ = ps.getUntrackedParameter<int>("prescaleEvt", -1);
25 
26  triggerEvent_ = ps.getParameter < edm::InputTag > ("TriggerEvent");
27 
28  //Read The Configuration
29  for(unsigned int i=0;i<config_.size();++i)
30  {
31 
32  if(configType_[i] == "L1")
33  {
35  l1Plotters.push_back(tmp);
36  }
37 
38  if(configType_[i] == "Calo")
39  {
41  caloPlotters.push_back(tmp);
42  }
43 
44  else if(configType_[i] == "Track")
45  {
47  trackPlotters.push_back(tmp);
48  }
49 
50  else if(configType_[i] == "Path")
51  {
53  pathPlotters.push_back(tmp);
54  }
55 
56  else if(configType_[i] == "LitePath")
57  {
59  litePathPlotters.push_back(tmp);
60  }
61 
62 
63  else if(configType_[i] == "Summary")
64  {
66  summaryPlotters.push_back(tmp);
67  }
68 
69 
70  }
71 }
T getParameter(std::string const &) const
std::vector< double > ptThres_
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< edm::InputTag > refFilter_
int prescaleEvt_
counter
std::vector< HLTTauDQMPathPlotter > pathPlotters
std::vector< int > refID_
std::vector< edm::ParameterSet > config_
std::vector< std::string > configType_
std::vector< HLTTauDQMCaloPlotter > caloPlotters
std::vector< HLTTauDQMTrkPlotter > trackPlotters
std::vector< HLTTauDQML1Plotter > l1Plotters
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< HLTTauDQMLitePathPlotter > litePathPlotters
edm::InputTag triggerEvent_
every n events
std::vector< HLTTauDQMSummaryPlotter > summaryPlotters
HLTTauDQMSource::~HLTTauDQMSource ( )

Definition at line 73 of file HLTTauDQMSource.cc.

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

Member Function Documentation

void HLTTauDQMSource::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 101 of file HLTTauDQMSource.cc.

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

102 {
103  using namespace std;
104  using namespace edm;
105  using namespace reco;
106  using namespace l1extra;
107  using namespace trigger;
108 
109 
110  //Apply the prescaler
112  {
113  //Do Analysis here
114 
115  //Create dummy Match Collections
116  std::vector<LVColl> refC;
117 
118  if(doRefAnalysis_)
119  {
120  Handle<TriggerEvent> trigEv;
121 
122  //get The triggerEvent
123  bool gotTEV =true;
124  try {
125  gotTEV*= iEvent.getByLabel(triggerEvent_,trigEv);
126  }
127  catch (cms::Exception& exception) {
128  gotTEV =false;
129  }
130 
131 
132 
133  if(gotTEV)
134  for(unsigned int i=0;i<refFilter_.size();++i)
135  {
136  size_t ID =trigEv->filterIndex(refFilter_[i]);
137  refC.push_back(getFilterCollection(ID,refID_[i],*trigEv,ptThres_[i]));
138  }
139  }
140 
141  //fill the empty slots with empty collections
142  LVColl dummy;
143  for(int k=refFilter_.size();k<3;k++)
144  {
145  refC.push_back(dummy);
146  }
147 
148 
149 
150  //Path Plotters
151  for(unsigned int i=0;i<pathPlotters.size();++i)
152  pathPlotters[i].analyze(iEvent,iSetup,refC);
153 
154  //Lite Path Plotters
155  for(unsigned int i=0;i<litePathPlotters.size();++i)
156  litePathPlotters[i].analyze(iEvent,iSetup,refC);
157 
158  //L1 Plotters
159  for(unsigned int i=0;i<l1Plotters.size();++i)
160  l1Plotters[i].analyze(iEvent,iSetup,refC);
161 
162  //Calo Plotters
163  for(unsigned int i=0;i<caloPlotters.size();++i)
164  caloPlotters[i].analyze(iEvent,iSetup,refC[0]);
165 
166  //Track Plotters
167  for(unsigned int i=0;i<trackPlotters.size();++i)
168  trackPlotters[i].analyze(iEvent,iSetup,refC[0]);
169 
170  }
171  else
172  counterEvt_++;
173 
174 }
std::vector< double > ptThres_
int i
Definition: DBlmapReader.cc:9
uint32_t ID
Definition: Definitions.h:26
std::vector< edm::InputTag > refFilter_
int prescaleEvt_
counter
std::vector< HLTTauDQMPathPlotter > pathPlotters
LVColl getFilterCollection(size_t index, int id, const trigger::TriggerEvent &trigEv, double)
std::vector< int > refID_
int iEvent
Definition: GenABIO.cc:243
void analyze(const edm::Event &e, const edm::EventSetup &c)
Fake Analyze.
std::vector< LV > LVColl
int k[5][pyjets_maxn]
std::vector< HLTTauDQMCaloPlotter > caloPlotters
std::vector< HLTTauDQMTrkPlotter > trackPlotters
std::vector< HLTTauDQML1Plotter > l1Plotters
std::vector< HLTTauDQMLitePathPlotter > litePathPlotters
edm::InputTag triggerEvent_
every n events
void HLTTauDQMSource::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 84 of file HLTTauDQMSource.cc.

84  {
85 
86 }
void HLTTauDQMSource::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Luminosity Block.

Reimplemented from edm::EDAnalyzer.

Definition at line 94 of file HLTTauDQMSource.cc.

95  {
96 
97 }
void HLTTauDQMSource::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 89 of file HLTTauDQMSource.cc.

89  {
90 
91 }
void HLTTauDQMSource::endJob ( void  )
protectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 191 of file HLTTauDQMSource.cc.

191  {
192  return;
193 }
void HLTTauDQMSource::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 180 of file HLTTauDQMSource.cc.

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

181  {
182 
183  //Summary Plotters
184  for(unsigned int i=0;i<summaryPlotters.size();++i) summaryPlotters[i].plot();
185 
186 }
int i
Definition: DBlmapReader.cc:9
std::vector< HLTTauDQMSummaryPlotter > summaryPlotters
void HLTTauDQMSource::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 188 of file HLTTauDQMSource.cc.

188  {
189 }
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().

198 {
199  using namespace trigger;
200  //Create output Collection
201  LVColl out;
202  //get All the final trigger objects
203  const TriggerObjectCollection& TOC(trigEv.getObjects());
204 
205 
206  //filter index
207  if(index!=trigEv.sizeFilters())
208  {
209  const Keys& KEYS = trigEv.filterKeys(index);
210  for(size_t i = 0;i<KEYS.size();++i)
211  {
212  const TriggerObject& TO(TOC[KEYS[i]]);
213  LV a(TO.px(),TO.py(),TO.pz(),sqrt(TO.px()*TO.px()+TO.py()*TO.py()+TO.pz()*TO.pz()));
214  if(abs(TO.id()) == id)
215  if(a.pt()>ptCut)
216  out.push_back(a);
217  }
218  }
219  return out;
220 }
int i
Definition: DBlmapReader.cc:9
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:130
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:106
#define abs(x)
Definition: mlp_lapack.h:159
math::XYZTLorentzVectorD LV
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:100
T sqrt(T t)
Definition: SSEVec.h:28
std::vector< LV > LVColl
tuple out
Definition: dbtoconf.py:99
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
double a
Definition: hdecay.h:121

Member Data Documentation

std::vector<HLTTauDQMCaloPlotter> HLTTauDQMSource::caloPlotters
private

Definition at line 126 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

std::vector<edm::ParameterSet> HLTTauDQMSource::config_
private

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().

int HLTTauDQMSource::counterEvt_
private

Definition at line 114 of file HLTTauDQMSource.h.

Referenced by analyze().

DQMStore* HLTTauDQMSource::dbe_
private

Definition at line 90 of file HLTTauDQMSource.h.

bool HLTTauDQMSource::doRefAnalysis_
private

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().

std::vector<HLTTauDQML1Plotter> HLTTauDQMSource::l1Plotters
private

Definition at line 125 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

std::vector<HLTTauDQMLitePathPlotter> HLTTauDQMSource::litePathPlotters
private

Definition at line 129 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

int HLTTauDQMSource::NEtaBins_
private

Definition at line 97 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

int HLTTauDQMSource::NPhiBins_
private

Definition at line 98 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

int HLTTauDQMSource::NPtBins_
private

Definition at line 96 of file HLTTauDQMSource.h.

Referenced by HLTTauDQMSource().

std::vector<HLTTauDQMPathPlotter> HLTTauDQMSource::pathPlotters
private

Definition at line 128 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

int HLTTauDQMSource::prescaleEvt_
private

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().

std::vector<edm::InputTag> HLTTauDQMSource::refFilter_
private

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().

std::vector<HLTTauDQMSummaryPlotter> HLTTauDQMSource::summaryPlotters
private

Definition at line 130 of file HLTTauDQMSource.h.

Referenced by endLuminosityBlock(), and HLTTauDQMSource().

std::vector<HLTTauDQMTrkPlotter> HLTTauDQMSource::trackPlotters
private

Definition at line 127 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().

edm::InputTag HLTTauDQMSource::triggerEvent_
private

every n events

Definition at line 118 of file HLTTauDQMSource.h.

Referenced by analyze(), and HLTTauDQMSource().