CMS 3D CMS Logo

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

#include <HLTTauDQML1Plotter.h>

Classes

struct  ComparePt
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &, const std::vector< LVColl > &)
 
 HLTTauDQML1Plotter (const edm::ParameterSet &, int, int, int, double, bool, double)
 
 ~HLTTauDQML1Plotter ()
 

Private Member Functions

void endJob ()
 
std::pair< bool, LVmatch (const LV &, const LVColl &, double)
 

Private Attributes

int binsEt_
 
int binsEta_
 
int binsPhi_
 
bool doRefAnalysis_
 
MonitorElementfirstTauEt_
 
MonitorElementinputEvents_
 
MonitorElementl1doubleTauPath_
 
MonitorElementl1electronEt_
 
MonitorElementl1electronEta_
 
MonitorElementl1electronPhi_
 
MonitorElementl1electronTauPath_
 
edm::InputTag l1ExtraElectrons_
 
edm::InputTag l1ExtraJets_
 
edm::InputTag l1ExtraMuons_
 
edm::InputTag l1ExtraTaus_
 
MonitorElementl1jetEt_
 
MonitorElementl1jetEta_
 
MonitorElementl1jetEtaEffDenom_
 
MonitorElementl1jetEtaEffNum_
 
MonitorElementl1jetEtEffDenom_
 
MonitorElementl1jetEtEffNum_
 
MonitorElementl1jetPhi_
 
MonitorElementl1jetPhiEffDenom_
 
MonitorElementl1jetPhiEffNum_
 
MonitorElementl1muonEt_
 
MonitorElementl1muonEta_
 
MonitorElementl1muonPhi_
 
MonitorElementl1muonTauPath_
 
MonitorElementl1tauEt_
 
MonitorElementl1tauEta_
 
MonitorElementl1tauEtaEffDenom_
 
MonitorElementl1tauEtaEffNum_
 
MonitorElementl1tauEtEffDenom_
 
MonitorElementl1tauEtEffNum_
 
MonitorElementl1tauEtRes_
 
MonitorElementl1tauPhi_
 
MonitorElementl1tauPhiEffDenom_
 
MonitorElementl1tauPhiEffNum_
 
double matchDeltaR_
 
double maxEt_
 
ComparePt ptSort
 
MonitorElementsecondTauEt_
 
std::string triggerTag_
 

Detailed Description

Definition at line 26 of file HLTTauDQML1Plotter.h.

Constructor & Destructor Documentation

HLTTauDQML1Plotter::HLTTauDQML1Plotter ( const edm::ParameterSet ps,
int  etbins,
int  etabins,
int  phibins,
double  maxpt,
bool  ref,
double  dr 
)

Definition at line 4 of file HLTTauDQML1Plotter.cc.

References binsEt_, binsEta_, binsPhi_, DQMStore::book1D(), DQMStore::book2D(), doRefAnalysis_, firstTauEt_, MonitorElement::getTH1F(), MonitorElement::getTH2F(), inputEvents_, l1doubleTauPath_, l1electronEt_, l1electronEta_, l1electronPhi_, l1electronTauPath_, l1jetEt_, l1jetEta_, l1jetEtaEffDenom_, l1jetEtaEffNum_, l1jetEtEffDenom_, l1jetEtEffNum_, l1jetPhi_, l1jetPhiEffDenom_, l1jetPhiEffNum_, l1muonEt_, l1muonEta_, l1muonPhi_, l1muonTauPath_, l1tauEt_, l1tauEta_, l1tauEtaEffDenom_, l1tauEtaEffNum_, l1tauEtEffDenom_, l1tauEtEffNum_, l1tauEtRes_, l1tauPhi_, l1tauPhiEffDenom_, l1tauPhiEffNum_, maxEt_, secondTauEt_, DQMStore::setCurrentFolder(), and triggerTag_.

4  :
5  triggerTag_(ps.getParameter<std::string>("DQMFolder")),
8  l1ExtraElectrons_(ps.getParameter<edm::InputTag>("L1Electrons")),
10  doRefAnalysis_(ref),
11  matchDeltaR_(dr),
12  maxEt_(maxpt),
13  binsEt_(etbins),
14  binsEta_(etabins),
15  binsPhi_(phibins)
16 {
17  //Declare DQM Store
18  DQMStore* store = &*edm::Service<DQMStore>();
19 
20  if(store)
21  {
22  //Create the histograms
24 
25  l1tauEt_ = store->book1D("L1TauEt","L1 #tau E_{t}",binsEt_,0,maxEt_);
26  l1tauEt_->getTH1F()->GetXaxis()->SetTitle("L1 #tau E_{T}");
27  l1tauEt_->getTH1F()->GetYaxis()->SetTitle("entries");
28 
29  l1tauEta_ = store->book1D("L1TauEta","L1 #tau #eta",binsEta_,-2.5,2.5);
30  l1tauEta_->getTH1F()->GetXaxis()->SetTitle("L1 #tau #eta");
31  l1tauEta_->getTH1F()->GetYaxis()->SetTitle("entries");
32 
33  l1tauPhi_ = store->book1D("L1TauPhi","L1 #tau #phi",binsPhi_,-3.2,3.2);
34  l1tauPhi_->getTH1F()->GetXaxis()->SetTitle("L1 #tau #phi");
35  l1tauPhi_->getTH1F()->GetYaxis()->SetTitle("entries");
36 
37  l1jetEt_ = store->book1D("L1JetEt","L1 jet E_{t}",binsEt_,0,maxEt_);
38  l1jetEt_->getTH1F()->GetXaxis()->SetTitle("L1 Central Jet E_{T}");
39  l1jetEt_->getTH1F()->GetYaxis()->SetTitle("entries");
40 
41  l1jetEta_ = store->book1D("L1JetEta","L1 jet #eta",binsEta_,-2.5,2.5);
42  l1jetEta_->getTH1F()->GetXaxis()->SetTitle("L1 Central Jet #eta");
43  l1jetEta_->getTH1F()->GetYaxis()->SetTitle("entries");
44 
45  l1jetPhi_ = store->book1D("L1JetPhi","L1 jet #phi",binsPhi_,-3.2,3.2);
46  l1jetPhi_->getTH1F()->GetXaxis()->SetTitle("L1 Central Jet #phi");
47  l1jetPhi_->getTH1F()->GetYaxis()->SetTitle("entries");
48 
49 
50  inputEvents_ = store->book1D("InputEvents","Events Read",2,0,2);
51  inputEvents_->getTH1F()->GetYaxis()->SetTitle("entries");
52 
53  l1electronEt_ = store->book1D("L1ElectronEt","L1 electron E_{t}",binsEt_,0,maxEt_);
54  l1electronEt_->getTH1F()->GetXaxis()->SetTitle("L1 e/#gamma E_{T}");
55  l1electronEt_->getTH1F()->GetYaxis()->SetTitle("entries");
56 
57  l1electronEta_ = store->book1D("L1ElectronEta","L1 electron #eta",binsEta_,-2.5,2.5);
58  l1electronEta_->getTH1F()->GetXaxis()->SetTitle("L1 e/#gamma #eta");
59  l1electronEta_->getTH1F()->GetYaxis()->SetTitle("entries");
60 
61  l1electronPhi_ = store->book1D("L1ElectronPhi","L1 electron #phi",binsPhi_,-3.2,3.2);
62  l1electronPhi_->getTH1F()->GetXaxis()->SetTitle("L1 e/#gamma #phi");
63  l1electronPhi_->getTH1F()->GetYaxis()->SetTitle("entries");
64 
65  l1muonEt_ = store->book1D("L1MuonEt","L1 muon p_{t}",binsEt_,0,maxEt_);
66  l1muonEt_->getTH1F()->GetXaxis()->SetTitle("L1 #mu p_{T}");
67  l1muonEt_->getTH1F()->GetYaxis()->SetTitle("entries");
68 
69  l1muonEta_ = store->book1D("L1MuonEta","L1 muon #eta",binsEta_,-2.5,2.5);
70  l1muonEta_->getTH1F()->GetXaxis()->SetTitle("L1 #mu #eta");
71  l1muonEta_->getTH1F()->GetYaxis()->SetTitle("entries");
72 
73  l1muonPhi_ = store->book1D("L1MuonPhi","L1 muon #phi",binsPhi_,-3.2,3.2);
74  l1muonPhi_->getTH1F()->GetXaxis()->SetTitle("L1 #mu #phi");
75  l1muonPhi_->getTH1F()->GetYaxis()->SetTitle("entries");
76 
77 
78  l1doubleTauPath_ = store->book2D("L1DoubleTau","L1 Double Tau Path Et",binsEt_,0,maxEt_,binsEt_,0,maxEt_);
79  l1doubleTauPath_->getTH2F()->GetXaxis()->SetTitle("first L1 #tau p_{T}");
80  l1doubleTauPath_->getTH2F()->GetYaxis()->SetTitle("second L1 #tau p_{T}");
81 
82  l1muonTauPath_ = store->book2D("L1MuonTau","L1 Muon Tau Path Et",binsEt_,0,maxEt_,binsEt_,0,maxEt_);
83  l1muonTauPath_->getTH2F()->GetXaxis()->SetTitle("first L1 #tau p_{T}");
84  l1muonTauPath_->getTH2F()->GetYaxis()->SetTitle("first L1 #gamma p_{T}");
85 
86  l1electronTauPath_ = store->book2D("L1ElectronTau","L1 Electron Tau Path Et",binsEt_,0,maxEt_,binsEt_,0,maxEt_);
87  l1electronTauPath_->getTH2F()->GetXaxis()->SetTitle("first L1 #mu p_{T}");
88  l1electronTauPath_->getTH2F()->GetYaxis()->SetTitle("second L1 #mu p_{T}");
89 
90  firstTauEt_ = store->book1D("L1LeadTauEt","L1 lead #tau ET",binsEt_,0,maxEt_);
91  firstTauEt_->getTH1F()->Sumw2();
92 
93  secondTauEt_ = store->book1D("L1SecondTauEt","L1 second #tau ET",binsEt_,0,maxEt_);
94  secondTauEt_->getTH1F()->Sumw2();
95 
96  if(doRefAnalysis_)
97  {
98  l1tauEtRes_ = store->book1D("L1TauEtResol","L1 #tau E_{t} resolution",40,-2,2);
99  l1tauEtRes_->getTH1F()->GetXaxis()->SetTitle("[L1 #tau E_{T}-Ref #tau E_{T}]/Ref #tau E_{T}");
100  l1tauEtRes_->getTH1F()->GetYaxis()->SetTitle("entries");
101 
102  store->setCurrentFolder(triggerTag_+"/EfficiencyHelpers");
103  l1tauEtEffNum_ = store->book1D("L1TauEtEffNum","L1 #tau E_{t} Efficiency Numerator",binsEt_,0,maxEt_);
104  l1tauEtEffNum_->getTH1F()->Sumw2();
105 
106 
107  l1tauEtEffDenom_ = store->book1D("L1TauEtEffDenom","L1 #tau E_{t} Denominator",binsEt_,0,maxEt_);
108  l1tauEtEffDenom_->getTH1F()->Sumw2();
109 
110  l1tauEtaEffNum_ = store->book1D("L1TauEtaEffNum","L1 #tau #eta Efficiency",binsEta_,-2.5,2.5);
111  l1tauEtaEffNum_->getTH1F()->Sumw2();
112 
113  l1tauEtaEffDenom_ = store->book1D("L1TauEtaEffDenom","L1 #tau #eta Denominator",binsEta_,-2.5,2.5);
114  l1tauEtaEffDenom_->getTH1F()->Sumw2();
115 
116  l1tauPhiEffNum_ = store->book1D("L1TauPhiEffNum","L1 #tau #phi Efficiency",binsPhi_,-3.2,3.2);
117  l1tauPhiEffNum_->getTH1F()->Sumw2();
118 
119  l1tauPhiEffDenom_ = store->book1D("L1TauPhiEffDenom","L1 #tau #phi Denominator",binsPhi_,-3.2,3.2);
120  l1tauPhiEffDenom_->getTH1F()->Sumw2();
121 
122  l1jetEtEffNum_ = store->book1D("L1JetEtEffNum","L1 jet E_{t} Efficiency",binsEt_,0,maxEt_);
123  l1jetEtEffNum_->getTH1F()->Sumw2();
124 
125  l1jetEtEffDenom_ = store->book1D("L1JetEtEffDenom","L1 jet E_{t} Denominator",binsEt_,0,maxEt_);
126  l1jetEtEffDenom_->getTH1F()->Sumw2();
127 
128  l1jetEtaEffNum_ = store->book1D("L1JetEtaEffNum","L1 jet #eta Efficiency",binsEta_,-2.5,2.5);
129  l1jetEtaEffNum_->getTH1F()->Sumw2();
130 
131  l1jetEtaEffDenom_ = store->book1D("L1JetEtaEffDenom","L1 jet #eta Denominator",binsEta_,-2.5,2.5);
132  l1jetEtaEffDenom_->getTH1F()->Sumw2();
133 
134  l1jetPhiEffNum_ = store->book1D("L1JetPhiEffNum","L1 jet #phi Efficiency",binsPhi_,-3.2,3.2);
135  l1jetPhiEffNum_->getTH1F()->Sumw2();
136 
137  l1jetPhiEffDenom_ = store->book1D("L1JetPhiEffDenom","L1 jet #phi Denominator",binsPhi_,-3.2,3.2);
138  l1jetPhiEffDenom_->getTH1F()->Sumw2();
139 
140 // l1electronEtEffNum_ = store->book1D("L1ElectronEtEffNum","L1 Electron p_t Efficiency",binsEt_,0,maxEt_);
141 // l1electronEtEffNum_->getTH1F()->Sumw2();
142 
143 // l1electronEtEffDenom_ = store->book1D("L1ElectronEtEffDenom","L1 Electron p_{t} Denominator",binsEt_,0,maxEt_);
144 // l1electronEtEffDenom_->getTH1F()->Sumw2();
145 
146 // l1electronEtaEffNum_ = store->book1D("L1ElectronEtaEffNum","L1 Electron #eta Efficiency",binsEta_,-2.5,2.5);
147 // l1electronEtaEffNum_->getTH1F()->Sumw2();
148 
149 // l1electronEtaEffDenom_ = store->book1D("L1ElectronEtaEffDenom","L1 Electron #eta Denominator",binsEta_,-2.5,2.5);
150 // l1electronEtaEffDenom_->getTH1F()->Sumw2();
151 
152 // l1electronPhiEffNum_ = store->book1D("L1ElectronPhiEffNum","L1 Electron #phi Efficiency",binsPhi_,-3.2,3.2);
153 // l1electronPhiEffNum_->getTH1F()->Sumw2();
154 
155 // l1electronPhiEffDenom_ = store->book1D("L1ElectronPhiEffDenom","L1 Electron #phi Denominator",binsPhi_,-3.2,3.2);
156 // l1electronPhiEffDenom_->getTH1F()->Sumw2();
157 
158 // l1muonEtEffNum_ = store->book1D("L1MuonEtEffNum","L1 Muon E_{t} Efficiency",binsEt_,0,maxEt_);
159 // l1muonEtEffNum_->getTH1F()->Sumw2();
160 
161 // l1muonEtEffDenom_ = store->book1D("L1MuonEtEffDenom","L1 Muon E_{t} Denominator",binsEt_,0,maxEt_);
162 // l1muonEtEffDenom_->getTH1F()->Sumw2();
163 
164 // l1muonEtaEffNum_ = store->book1D("L1MuonEtaEffNum","L1 Muon #eta Efficiency",binsEta_,-2.5,2.5);
165 // l1muonEtaEffNum_->getTH1F()->Sumw2();
166 
167 // l1muonEtaEffDenom_ = store->book1D("L1MuonEtaEffDenom","L1 Muon #eta Denominator",binsEta_,-2.5,2.5);
168 // l1muonEtaEffDenom_->getTH1F()->Sumw2();
169 
170 // l1muonPhiEffNum_ = store->book1D("L1MuonPhiEffNum","L1 Muon #phi Efficiency",binsPhi_,-3.2,3.2);
171 // l1muonPhiEffNum_->getTH1F()->Sumw2();
172 
173 // l1muonPhiEffDenom_ = store->book1D("L1MuonPhiEffDenom","L1 Muon #phi Denominator",binsPhi_,-3.2,3.2);
174 // l1muonPhiEffDenom_->getTH1F()->Sumw2();
175  }
176  }
177 
178 
179 }
T getParameter(std::string const &) const
MonitorElement * l1doubleTauPath_
MonitorElement * l1muonTauPath_
MonitorElement * l1jetEta_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
MonitorElement * l1jetEtEffNum_
edm::InputTag l1ExtraMuons_
MonitorElement * l1jetPhiEffDenom_
MonitorElement * l1jetEtaEffNum_
MonitorElement * l1muonEta_
MonitorElement * l1tauEt_
MonitorElement * secondTauEt_
MonitorElement * l1tauEtEffDenom_
MonitorElement * l1jetPhiEffNum_
MonitorElement * l1electronTauPath_
MonitorElement * l1muonPhi_
MonitorElement * l1tauEtaEffNum_
MonitorElement * firstTauEt_
MonitorElement * l1electronPhi_
MonitorElement * l1jetEtEffDenom_
MonitorElement * l1tauEtEffNum_
MonitorElement * l1tauPhi_
edm::InputTag l1ExtraTaus_
MonitorElement * l1tauEta_
MonitorElement * l1muonEt_
MonitorElement * l1tauPhiEffDenom_
TH1F * getTH1F(void) const
edm::InputTag l1ExtraJets_
MonitorElement * l1electronEt_
MonitorElement * l1tauEtaEffDenom_
MonitorElement * l1tauEtRes_
MonitorElement * l1jetPhi_
MonitorElement * l1jetEt_
MonitorElement * l1electronEta_
MonitorElement * l1jetEtaEffDenom_
edm::InputTag l1ExtraElectrons_
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
MonitorElement * l1tauPhiEffNum_
MonitorElement * inputEvents_
HLTTauDQML1Plotter::~HLTTauDQML1Plotter ( )

Definition at line 181 of file HLTTauDQML1Plotter.cc.

182 {
183 }

Member Function Documentation

void HLTTauDQML1Plotter::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const std::vector< LVColl > &  refC 
)

Definition at line 190 of file HLTTauDQML1Plotter.cc.

References doRefAnalysis_, end, eta(), MonitorElement::Fill(), firstTauEt_, edm::Event::getByLabel(), i, inputEvents_, edm::HandleBase::isValid(), j, analyzePatCleaning_cfg::jets, l1doubleTauPath_, l1electronEt_, l1electronEta_, l1electronPhi_, l1electronTauPath_, l1ExtraElectrons_, l1ExtraJets_, l1ExtraMuons_, l1ExtraTaus_, l1jetEt_, l1jetEta_, l1jetEtaEffDenom_, l1jetEtaEffNum_, l1jetEtEffDenom_, l1jetEtEffNum_, l1jetPhi_, l1jetPhiEffDenom_, l1jetPhiEffNum_, l1muonEt_, l1muonEta_, l1muonPhi_, l1muonTauPath_, l1tauEt_, l1tauEta_, l1tauEtaEffDenom_, l1tauEtaEffNum_, l1tauEtEffDenom_, l1tauEtEffNum_, l1tauEtRes_, l1tauPhi_, l1tauPhiEffDenom_, l1tauPhiEffNum_, m, match(), matchDeltaR_, patZpeak::muons, phi, ptSort, secondTauEt_, findQualityFiles::size, and python.multivaluedict::sort().

191 {
192 
193  // if(!doRefAnalysis)
194  // inputEvents_->Fill(0.5);
195 
196  if(doRefAnalysis_)
197  {
198  if(refC.size()>0)
199  for(size_t j = 0;j<(refC[0]).size();++j)
200  {
201  l1tauEtEffDenom_->Fill((refC[0])[j].pt());
202  l1jetEtEffDenom_->Fill((refC[0])[j].pt());
203 
204  l1tauEtaEffDenom_->Fill((refC[0])[j].eta());
205  l1jetEtaEffDenom_->Fill((refC[0])[j].eta());
206 
207  l1tauPhiEffDenom_->Fill((refC[0])[j].phi());
208  l1jetPhiEffDenom_->Fill((refC[0])[j].phi());
209 
210  }
211 // if(refC.size()>1)
212 // for(size_t j = 0;j<(refC)[1].size();++j)
213 // {
214 // l1electronEtEffDenom_->Fill((refC[1])[j].pt());
215 // l1electronEtaEffDenom_->Fill((refC[1])[j].eta());
216 // l1electronEtaEffDenom_->Fill((refC[1])[j].phi());
217 // }
218 // if(refC.size()>2)
219 // for(size_t j = 0;j<(refC)[2].size();++j)
220 // {
221 // l1muonEtEffDenom_->Fill((refC[2])[j].pt());
222 // l1muonEtaEffDenom_->Fill((refC[2])[j].eta());
223 // l1muonEtaEffDenom_->Fill((refC[2])[j].phi());
224 // }
225 
226  }
227 
228 
229  //Analyze L1 Objects(Tau+Jets)
234 
235 
236  LVColl pathTaus;
237  LVColl pathMuons;
238  LVColl pathElectrons;
239 
240  //Set Variables for the threshold plot
241  LVColl l1taus;
242  LVColl l1electrons;
243  LVColl l1muons;
244  LVColl l1jets;
245 
246 
247 
248 
249  bool gotL1Taus=iEvent.getByLabel(l1ExtraTaus_,taus) &&taus.isValid();
250  bool gotL1Jets=iEvent.getByLabel(l1ExtraJets_,jets) && jets.isValid();
251  bool gotL1Electrons=iEvent.getByLabel(l1ExtraElectrons_,electrons) &&electrons.isValid();
252  bool gotL1Muons=iEvent.getByLabel(l1ExtraMuons_,muons) && muons.isValid();
253 
254 
255 
256 
257  if(gotL1Taus)
258  if(taus->size()>0)
259  {
260  if(!doRefAnalysis_)
261  {
262  firstTauEt_->Fill((*taus)[0].pt());
263  if(taus->size()>1)
264  secondTauEt_->Fill((*taus)[0].pt());
265 
266  }
267  for(l1extra::L1JetParticleCollection::const_iterator i = taus->begin();i!=taus->end();++i)
268  {
269  l1taus.push_back(i->p4());
270  if(!doRefAnalysis_)
271  {
272  l1tauEt_->Fill(i->et());
273  l1tauEta_->Fill(i->eta());
274  l1tauPhi_->Fill(i->phi());
275  pathTaus.push_back(i->p4());
276  }
277 
278  }
279 
280  }
281  if(gotL1Jets)
282  if(jets->size()>0)
283  for(l1extra::L1JetParticleCollection::const_iterator i = jets->begin();i!=jets->end();++i)
284  {
285  l1jets.push_back(i->p4());
286  if(!doRefAnalysis_)
287  {
288  l1jetEt_->Fill(i->et());
289  l1jetEta_->Fill(i->eta());
290  l1jetPhi_->Fill(i->phi());
291  pathTaus.push_back(i->p4());
292  }
293 
294  }
295 
296 
297  if(gotL1Electrons)
298  if(electrons->size()>0)
299  for(l1extra::L1EmParticleCollection::const_iterator i = electrons->begin();i!=electrons->end();++i)
300  {
301  l1electrons.push_back(i->p4());
302  l1electronEt_->Fill(i->et());
303  l1electronEta_->Fill(i->eta());
304  l1electronPhi_->Fill(i->phi());
305  pathElectrons.push_back(i->p4());
306  }
307 
308 
309  if(gotL1Muons)
310  if(muons->size()>0)
311  for(l1extra::L1MuonParticleCollection::const_iterator i = muons->begin();i!=muons->end();++i)
312  {
313  l1muons.push_back(i->p4());
314  l1muonEt_->Fill(i->et());
315  l1muonEta_->Fill(i->eta());
316  l1muonPhi_->Fill(i->phi());
317  pathMuons.push_back(i->p4());
318  }
319 
320 
321 
322 
323  //Now do the efficiency matching
324 
325  if(doRefAnalysis_)
326  {
327 
328  //printf("Reference Taus = %d\n",refC[0].size());
329  if(refC.size()>0)
330  if(refC[0].size()>0)
331  for(LVColl::const_iterator i=(refC[0]).begin();i!=(refC[0]).end();++i)
332  {
333  std::pair<bool,LV> m= match(*i,l1taus,matchDeltaR_);
334  if(m.first)
335  {
336  l1tauEt_->Fill(m.second.pt());
337  l1tauEta_->Fill(m.second.eta());
338  l1tauPhi_->Fill(m.second.phi());
339  l1tauEtEffNum_->Fill(i->pt());
340  l1tauEtaEffNum_->Fill(i->eta());
341  l1tauPhiEffNum_->Fill(i->phi());
342  l1tauEtRes_->Fill((m.second.pt()-i->pt())/i->pt());
343  pathTaus.push_back(m.second);
344  }
345  }
346 
347  if(refC.size()>0)
348  if(refC[0].size()>0)
349  for(LVColl::const_iterator i=(refC[0]).begin();i!=(refC[0]).end();++i)
350  {
351  std::pair<bool,LV> m= match(*i,l1jets,matchDeltaR_);
352  if(m.first)
353  {
354  l1jetEt_->Fill(m.second.pt());
355  l1jetEta_->Fill(m.second.eta());
356  l1jetPhi_->Fill(m.second.phi());
357  l1jetEtEffNum_->Fill(i->pt());
358  l1jetEtaEffNum_->Fill(i->eta());
359  l1jetPhiEffNum_->Fill(i->phi());
360  }
361  }
362 
363  if(refC.size()>1)
364  if(refC[1].size()>0)
365  for(LVColl::const_iterator i=(refC[1]).begin();i!=(refC[1]).end();++i)
366  {
367  std::pair<bool,LV> m= match(*i,l1electrons,matchDeltaR_);
368  if(m.first)
369  {
370  l1electronEt_->Fill(m.second.pt());
371  l1electronEta_->Fill(m.second.eta());
372  l1electronPhi_->Fill(m.second.phi());
373 // l1electronEtEffNum_->Fill(i->pt());
374 // l1electronEtaEffNum_->Fill(i->eta());
375 // l1electronPhiEffNum_->Fill(i->phi());
376  pathElectrons.push_back(m.second);
377 
378  }
379  }
380  if(refC.size()>2)
381  if(refC[2].size()>0)
382  for(LVColl::const_iterator i=(refC[2]).begin();i!=(refC[2]).end();++i)
383  {
384  std::pair<bool,LV> m= match(*i,l1muons,matchDeltaR_);
385  if(m.first)
386  {
387  l1muonEt_->Fill(m.second.pt());
388  l1muonEta_->Fill(m.second.eta());
389  l1muonPhi_->Fill(m.second.phi());
390 // l1muonEtEffNum_->Fill(i->pt());
391 // l1muonEtaEffNum_->Fill(i->eta());
392 // l1muonPhiEffNum_->Fill(i->phi());
393  pathMuons.push_back(m.second);
394  }
395  }
396  }
397 
398 
399  //Fill the Threshold Monitoring
400 
401 
402  if(pathTaus.size()>1)
403  std::sort(pathTaus.begin(),pathTaus.end(),ptSort);
404  if(pathElectrons.size()>1)
405  std::sort(pathElectrons.begin(),pathElectrons.end(),ptSort);
406  if(pathMuons.size()>1)
407  std::sort(pathMuons.begin(),pathMuons.end(),ptSort);
408 
409 
410  if(pathTaus.size()>0)
411  {
412  firstTauEt_->Fill(pathTaus[0].pt());
413  inputEvents_->Fill(0.5);
414  }
415  if(pathTaus.size()>1)
416  {
417  secondTauEt_->Fill(pathTaus[1].pt());
418  inputEvents_->Fill(1.5);
419  }
420 
421  if(pathTaus.size()>=2)
422  {
423 
424  l1doubleTauPath_->Fill(pathTaus[0].pt(),pathTaus[1].pt());
425  }
426  if(pathTaus.size()>=1&&pathElectrons.size()>=1)
427  {
428  l1electronTauPath_->Fill(pathTaus[0].pt(),pathElectrons[0].pt());
429  }
430  if(pathTaus.size()>=1&&pathMuons.size()>=1)
431  {
432  l1muonTauPath_->Fill(pathTaus[0].pt(),pathMuons[0].pt());
433  }
434 }
MonitorElement * l1doubleTauPath_
int i
Definition: DBlmapReader.cc:9
MonitorElement * l1muonTauPath_
MonitorElement * l1jetEta_
MonitorElement * l1jetEtEffNum_
edm::InputTag l1ExtraMuons_
MonitorElement * l1jetPhiEffDenom_
MonitorElement * l1jetEtaEffNum_
MonitorElement * l1muonEta_
T eta() const
MonitorElement * l1tauEt_
MonitorElement * secondTauEt_
MonitorElement * l1tauEtEffDenom_
void Fill(long long x)
MonitorElement * l1jetPhiEffNum_
MonitorElement * l1electronTauPath_
std::pair< bool, LV > match(const LV &, const LVColl &, double)
MonitorElement * l1muonPhi_
MonitorElement * l1tauEtaEffNum_
MonitorElement * firstTauEt_
MonitorElement * l1electronPhi_
MonitorElement * l1jetEtEffDenom_
MonitorElement * l1tauEtEffNum_
int j
Definition: DBlmapReader.cc:9
MonitorElement * l1tauPhi_
std::vector< LV > LVColl
#define end
Definition: vmac.h:38
edm::InputTag l1ExtraTaus_
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
MonitorElement * l1tauEta_
MonitorElement * l1muonEt_
MonitorElement * l1tauPhiEffDenom_
edm::InputTag l1ExtraJets_
MonitorElement * l1electronEt_
MonitorElement * l1tauEtaEffDenom_
MonitorElement * l1tauEtRes_
tuple muons
Definition: patZpeak.py:38
MonitorElement * l1jetPhi_
MonitorElement * l1jetEt_
MonitorElement * l1electronEta_
MonitorElement * l1jetEtaEffDenom_
edm::InputTag l1ExtraElectrons_
tuple size
Write out results.
MonitorElement * l1tauPhiEffNum_
MonitorElement * inputEvents_
Definition: DDAxes.h:10
void HLTTauDQML1Plotter::endJob ( )
private
std::pair< bool, LV > HLTTauDQML1Plotter::match ( const LV jet,
const LVColl McInfo,
double  dr 
)
private

Definition at line 438 of file HLTTauDQML1Plotter.cc.

References a, delta, and dbtoconf::out.

Referenced by analyze().

439 {
440  bool matched=false;
441  LV out;
442 
443  if(&McInfo)
444  if(McInfo.size()>0)
445  for(std::vector<LV>::const_iterator it = McInfo.begin();it!=McInfo.end();++it)
446  {
447  double delta = ROOT::Math::VectorUtil::DeltaR(jet,*it);
448  if(delta<dr)
449  {
450  matched=true;
451  out=*it;
452  }
453  }
454  std::pair<bool,LV> a =std::make_pair(matched,out);
455  return a;
456 }
dbl * delta
Definition: mlp_gen.cc:36
math::XYZTLorentzVectorD LV
tuple out
Definition: dbtoconf.py:99
double a
Definition: hdecay.h:121

Member Data Documentation

int HLTTauDQML1Plotter::binsEt_
private

Definition at line 53 of file HLTTauDQML1Plotter.h.

Referenced by HLTTauDQML1Plotter().

int HLTTauDQML1Plotter::binsEta_
private

Definition at line 54 of file HLTTauDQML1Plotter.h.

Referenced by HLTTauDQML1Plotter().

int HLTTauDQML1Plotter::binsPhi_
private

Definition at line 55 of file HLTTauDQML1Plotter.h.

Referenced by HLTTauDQML1Plotter().

bool HLTTauDQML1Plotter::doRefAnalysis_
private

Definition at line 49 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::firstTauEt_
private

Definition at line 122 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::inputEvents_
private

Definition at line 78 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1doubleTauPath_
private

Definition at line 118 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1electronEt_
private

Definition at line 69 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1electronEta_
private

Definition at line 70 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1electronPhi_
private

Definition at line 71 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1electronTauPath_
private

Definition at line 119 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

edm::InputTag HLTTauDQML1Plotter::l1ExtraElectrons_
private

Definition at line 46 of file HLTTauDQML1Plotter.h.

Referenced by analyze().

edm::InputTag HLTTauDQML1Plotter::l1ExtraJets_
private

Definition at line 45 of file HLTTauDQML1Plotter.h.

Referenced by analyze().

edm::InputTag HLTTauDQML1Plotter::l1ExtraMuons_
private

Definition at line 47 of file HLTTauDQML1Plotter.h.

Referenced by analyze().

edm::InputTag HLTTauDQML1Plotter::l1ExtraTaus_
private

Definition at line 44 of file HLTTauDQML1Plotter.h.

Referenced by analyze().

MonitorElement* HLTTauDQML1Plotter::l1jetEt_
private

Definition at line 65 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetEta_
private

Definition at line 66 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetEtaEffDenom_
private

Definition at line 95 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetEtaEffNum_
private

Definition at line 94 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetEtEffDenom_
private

Definition at line 92 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetEtEffNum_
private

Definition at line 91 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetPhi_
private

Definition at line 67 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetPhiEffDenom_
private

Definition at line 98 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1jetPhiEffNum_
private

Definition at line 97 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1muonEt_
private

Definition at line 73 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1muonEta_
private

Definition at line 74 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1muonPhi_
private

Definition at line 75 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1muonTauPath_
private

Definition at line 120 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauEt_
private

Definition at line 60 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauEta_
private

Definition at line 61 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauEtaEffDenom_
private

Definition at line 86 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauEtaEffNum_
private

Definition at line 85 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauEtEffDenom_
private

Definition at line 83 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauEtEffNum_
private

Definition at line 82 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauEtRes_
private

Definition at line 80 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauPhi_
private

Definition at line 62 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauPhiEffDenom_
private

Definition at line 89 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

MonitorElement* HLTTauDQML1Plotter::l1tauPhiEffNum_
private

Definition at line 88 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

double HLTTauDQML1Plotter::matchDeltaR_
private

Definition at line 50 of file HLTTauDQML1Plotter.h.

Referenced by analyze().

double HLTTauDQML1Plotter::maxEt_
private

Definition at line 52 of file HLTTauDQML1Plotter.h.

Referenced by HLTTauDQML1Plotter().

ComparePt HLTTauDQML1Plotter::ptSort
private

Definition at line 135 of file HLTTauDQML1Plotter.h.

Referenced by analyze().

MonitorElement* HLTTauDQML1Plotter::secondTauEt_
private

Definition at line 123 of file HLTTauDQML1Plotter.h.

Referenced by analyze(), and HLTTauDQML1Plotter().

std::string HLTTauDQML1Plotter::triggerTag_
private

Definition at line 41 of file HLTTauDQML1Plotter.h.

Referenced by HLTTauDQML1Plotter().