CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
L1ValidatorHists Class Reference

#include <L1ValidatorHists.h>

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
enum  Type {
  Egamma, Jet, Tau, Muon,
  Number
}
 

Public Member Functions

void Book (DQMStore::IBooker &, std::string dirname)
 
void Fill (int, const reco::LeafCandidate *, const reco::LeafCandidate *)
 
void FillNumber (int, int)
 
 L1ValidatorHists ()
 
void Write ()
 
 ~L1ValidatorHists ()
 

Public Attributes

MonitorElementdPt [Type::Number]
 
MonitorElementdPt_vs_Pt [Type::Number]
 
MonitorElementdR [Type::Number]
 
MonitorElementdR_vs_Pt [Type::Number]
 
MonitorElementEff_Eta [Type::Number]
 
MonitorElementEff_Eta_Denom [Type::Number]
 
MonitorElementEff_Eta_Nomin [Type::Number]
 
MonitorElementEff_Pt [Type::Number]
 
MonitorElementEff_Pt_Denom [Type::Number]
 
MonitorElementEff_Pt_Nomin [Type::Number]
 
MonitorElementN [Type::Number]
 
std::string Name [4]
 
int NEvents
 
MonitorElementTurnOn_15 [Type::Number]
 
MonitorElementTurnOn_15_Denom [Type::Number]
 
MonitorElementTurnOn_15_Nomin [Type::Number]
 
MonitorElementTurnOn_30 [Type::Number]
 
MonitorElementTurnOn_30_Denom [Type::Number]
 
MonitorElementTurnOn_30_Nomin [Type::Number]
 

Detailed Description

Definition at line 23 of file L1ValidatorHists.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 25 of file L1ValidatorHists.h.

◆ MonitorElement

Definition at line 26 of file L1ValidatorHists.h.

Member Enumeration Documentation

◆ Type

Enumerator
Egamma 
Jet 
Tau 
Muon 
Number 

Definition at line 37 of file L1ValidatorHists.h.

37 { Egamma, Jet, Tau, Muon, Number };

Constructor & Destructor Documentation

◆ L1ValidatorHists()

L1ValidatorHists::L1ValidatorHists ( )

Definition at line 15 of file L1ValidatorHists.cc.

15  {
16  // Name[0]="IsoEG"; // Run I legacy
17  // Name[1]="NonIsoEG";
18  // Name[2]="CenJet";
19  // Name[3]="ForJet";
20  // Name[4]="TauJet";
21  // Name[5]="Muon";
22  Name[0] = "Egamma";
23  Name[1] = "Jet";
24  Name[2] = "Tau";
25  Name[3] = "Muon";
26 }

References Name.

◆ ~L1ValidatorHists()

L1ValidatorHists::~L1ValidatorHists ( )

Definition at line 27 of file L1ValidatorHists.cc.

27 {}

Member Function Documentation

◆ Book()

void L1ValidatorHists::Book ( DQMStore::IBooker iBooker,
std::string  dirname 
)

Definition at line 29 of file L1ValidatorHists.cc.

29  {
30  NEvents = 0;
31 
32  float ptbins[14] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 120, 160};
33  int Nptbin = 13;
34 
35  iBooker.setCurrentFolder(dirname + "/numerators_denominators");
36  for (int i = 0; i < Type::Number; i++) {
37  Eff_Pt_Denom[i] = iBooker.book1D((Name[i] + "_Eff_Pt_Denom").c_str(),
38  (Name[i] + " Efficiency vs Pt Denom; Gen p_{T} [GeV]; Entries").c_str(),
39  Nptbin,
40  ptbins);
41  Eff_Pt_Nomin[i] = iBooker.book1D((Name[i] + "_Eff_Pt_Nomin").c_str(),
42  (Name[i] + " Efficiency vs Pt Nomin; Gen p_{T} [GeV]; Entries").c_str(),
43  Nptbin,
44  ptbins);
45  Eff_Eta_Denom[i] = iBooker.book1D((Name[i] + "_Eff_Eta_Denom").c_str(),
46  (Name[i] + " Efficiency vs #eta Denom; Gen #eta; Entries").c_str(),
47  80,
48  -4,
49  4);
50  Eff_Eta_Nomin[i] = iBooker.book1D((Name[i] + "_Eff_Eta_Nomin").c_str(),
51  (Name[i] + " Efficiency vs #eta Nomin; Gen #eta; Entries").c_str(),
52  80,
53  -4,
54  4);
55  TurnOn_15_Denom[i] = iBooker.book1D((Name[i] + "_TurnOn_15_Denom").c_str(),
56  (Name[i] + " Turn On (15 GeV) Denom; Gen p_{T} [GeV]; Entries").c_str(),
57  Nptbin,
58  ptbins);
59  TurnOn_15_Nomin[i] = iBooker.book1D((Name[i] + "_TurnOn_15_Nomin").c_str(),
60  (Name[i] + " Turn On (15 GeV) Nomin; Gen p_{T} [GeV]; Entries").c_str(),
61  Nptbin,
62  ptbins);
63  TurnOn_30_Denom[i] = iBooker.book1D((Name[i] + "_TurnOn_30_Denom").c_str(),
64  (Name[i] + " Turn On (30 GeV) Denom; Gen p_{T} [GeV]; Entries").c_str(),
65  Nptbin,
66  ptbins);
67  TurnOn_30_Nomin[i] = iBooker.book1D((Name[i] + "_TurnOn_30_Nomin").c_str(),
68  (Name[i] + " Turn On (30 GeV) Nomin; Gen p_{T} [GeV]; Entries").c_str(),
69  Nptbin,
70  ptbins);
71  }
72 
73  iBooker.setCurrentFolder(dirname);
74  for (int i = 0; i < Type::Number; i++) {
75  N[i] = iBooker.book1D((Name[i] + "_N").c_str(), ("L1 " + Name[i] + " Number with BX=0").c_str(), 16, -0.5, 15.5);
76 
77  Eff_Pt[i] = iBooker.book1D((Name[i] + "_Eff_Pt").c_str(),
78  (Name[i] + " Efficiency vs Pt; Gen p_{T} [GeV]; L1T Efficiency").c_str(),
79  Nptbin,
80  ptbins);
82  Eff_Eta[i] = iBooker.book1D((Name[i] + "_Eff_Eta").c_str(),
83  (Name[i] + " Efficiency vs #eta (Gen p_{T} > 10GeV); Gen #eta; L1T Efficiency").c_str(),
84  80,
85  -4,
86  4);
88  TurnOn_15[i] = iBooker.book1D((Name[i] + "_TurnOn_15").c_str(),
89  (Name[i] + " Turn On (15 GeV); Gen p_{T} [GeV]; L1T Efficiency").c_str(),
90  Nptbin,
91  ptbins);
93  TurnOn_30[i] = iBooker.book1D((Name[i] + "_TurnOn_30").c_str(),
94  (Name[i] + " Turn On (30 GeV); Gen p_{T} [GeV]; L1T Efficiency").c_str(),
95  Nptbin,
96  ptbins);
98  dR[i] = iBooker.book1D(
99  (Name[i] + "_dR").c_str(), (Name[i] + " #DeltaR; #DeltaR(L1 object, Gen object); Entries").c_str(), 40, 0, 1);
100  dR_vs_Pt[i] = iBooker.book2D((Name[i] + "_dR_vs_Pt").c_str(),
101  (Name[i] + " #DeltaR vs p_{T}; Gen p_{T} [GeV]; "
102  "#DeltaR(L1 object, Gen object); Entries")
103  .c_str(),
104  12,
105  0,
106  120,
107  40,
108  0,
109  1);
110  dPt[i] = iBooker.book1D((Name[i] + "_dPt").c_str(),
111  (Name[i] + " #Deltap_{T}; (p_{T}^{L1}-p_{T}^{Gen})/p_{T}^{Gen}; Entries").c_str(),
112  100,
113  -2,
114  2);
115  dPt_vs_Pt[i] = iBooker.book2D((Name[i] + "_dPt_vs_Pt").c_str(),
116  (Name[i] + " #Deltap_{T} vs p_{T}; Gen p_{T} [GeV]; "
117  "(p_{T}^{L1}-p_{T}^{Gen})/p_{T}^{Gen}; Entries")
118  .c_str(),
119  12,
120  0,
121  120,
122  40,
123  -2,
124  2);
125  }
126 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), BTVHLTOfflineSource_cfi::dirname, dPt, dPt_vs_Pt, dR, dR_vs_Pt, Eff_Eta, Eff_Eta_Denom, Eff_Eta_Nomin, Eff_Pt, Eff_Pt_Denom, Eff_Pt_Nomin, mps_fire::i, N, Name, NEvents, HcalTBWriter_cfi::Number, LepHTMonitor_cff::ptbins, dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setEfficiencyFlag(), TurnOn_15, TurnOn_15_Denom, TurnOn_15_Nomin, TurnOn_30, TurnOn_30_Denom, and TurnOn_30_Nomin.

Referenced by L1Validator::bookHistograms().

◆ Fill()

void L1ValidatorHists::Fill ( int  i,
const reco::LeafCandidate GenPart,
const reco::LeafCandidate L1Part 
)

Definition at line 128 of file L1ValidatorHists.cc.

128  {
129  double GenPartPt = GenPart->pt();
130  // fill the overflow in the last bin
131  if (GenPart->pt() >= 160.0)
132  GenPartPt = 159.0;
133  if (L1Part == nullptr) {
134  Eff_Pt_Denom[i]->Fill(GenPartPt);
135  if (GenPart->pt() > 10)
136  Eff_Eta_Denom[i]->Fill(GenPart->eta());
137  TurnOn_15_Denom[i]->Fill(GenPartPt);
138  TurnOn_30_Denom[i]->Fill(GenPartPt);
139  } else {
140  double idR = reco::deltaR(GenPart->eta(), GenPart->phi(), L1Part->eta(), L1Part->phi());
141  bool matched = idR < 0.15;
142  Eff_Pt_Denom[i]->Fill(GenPartPt);
143  if (GenPart->pt() > 10)
144  Eff_Eta_Denom[i]->Fill(GenPart->eta());
145  if (matched)
146  Eff_Pt_Nomin[i]->Fill(GenPartPt);
147  if (matched && GenPart->pt() > 10)
148  Eff_Eta_Nomin[i]->Fill(GenPart->eta());
149  TurnOn_15_Denom[i]->Fill(GenPartPt);
150  TurnOn_30_Denom[i]->Fill(GenPartPt);
151  if (L1Part->pt() > 15 && matched)
152  TurnOn_15_Nomin[i]->Fill(GenPartPt);
153  if (L1Part->pt() > 30 && matched)
154  TurnOn_30_Nomin[i]->Fill(GenPartPt);
155  dR[i]->Fill(idR);
156  dPt[i]->Fill((L1Part->pt() - GenPart->pt()) / GenPart->pt());
157  dR_vs_Pt[i]->Fill(GenPart->pt(), idR);
158  dPt_vs_Pt[i]->Fill(GenPart->pt(), (L1Part->pt() - GenPart->pt()) / GenPart->pt());
159  }
160 }

References reco::deltaR(), dPt, dPt_vs_Pt, dR, dR_vs_Pt, Eff_Eta_Denom, Eff_Eta_Nomin, Eff_Pt_Denom, Eff_Pt_Nomin, reco::LeafCandidate::eta(), dqm::impl::MonitorElement::Fill(), nanoDQM_cfi::GenPart, mps_fire::i, muonTagProbeFilters_cff::matched, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), TurnOn_15_Denom, TurnOn_15_Nomin, TurnOn_30_Denom, and TurnOn_30_Nomin.

Referenced by L1Validator::analyze().

◆ FillNumber()

void L1ValidatorHists::FillNumber ( int  i,
int  Number 
)

Definition at line 162 of file L1ValidatorHists.cc.

162 { N[i]->Fill(Number); }

References dqm::impl::MonitorElement::Fill(), mps_fire::i, N, and Number.

Referenced by L1Validator::analyze().

◆ Write()

void L1ValidatorHists::Write ( )

Definition at line 164 of file L1ValidatorHists.cc.

164  {
165  for (int i = 0; i < Type::Number; i++) {
166  N[i]->getTH1()->Write();
167  Eff_Pt[i]->getTH1()->Write();
168  Eff_Pt_Denom[i]->getTH1()->Write();
169  Eff_Pt_Nomin[i]->getTH1()->Write();
170  Eff_Eta[i]->getTH1()->Write();
171  Eff_Eta_Denom[i]->getTH1()->Write();
172  Eff_Eta_Nomin[i]->getTH1()->Write();
173  TurnOn_15[i]->getTH1()->Write();
174  TurnOn_15_Denom[i]->getTH1()->Write();
175  TurnOn_15_Nomin[i]->getTH1()->Write();
176  TurnOn_30[i]->getTH1()->Write();
177  TurnOn_30_Denom[i]->getTH1()->Write();
178  TurnOn_30_Nomin[i]->getTH1()->Write();
179  dR[i]->getTH1()->Write();
180  dPt[i]->getTH1()->Write();
181  dR_vs_Pt[i]->getTH2F()->Write();
182  dPt_vs_Pt[i]->getTH2F()->Write();
183  }
184 }

References dPt, dPt_vs_Pt, dR, dR_vs_Pt, Eff_Eta, Eff_Eta_Denom, Eff_Eta_Nomin, Eff_Pt, Eff_Pt_Denom, Eff_Pt_Nomin, dqm::legacy::MonitorElement::getTH1(), dqm::legacy::MonitorElement::getTH2F(), mps_fire::i, N, HcalTBWriter_cfi::Number, TurnOn_15, TurnOn_15_Denom, TurnOn_15_Nomin, TurnOn_30, TurnOn_30_Denom, and TurnOn_30_Nomin.

Member Data Documentation

◆ dPt

MonitorElement* L1ValidatorHists::dPt[Type::Number]

Definition at line 72 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ dPt_vs_Pt

MonitorElement* L1ValidatorHists::dPt_vs_Pt[Type::Number]

Definition at line 74 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ dR

MonitorElement* L1ValidatorHists::dR[Type::Number]

Definition at line 71 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ dR_vs_Pt

MonitorElement* L1ValidatorHists::dR_vs_Pt[Type::Number]

Definition at line 73 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ Eff_Eta

MonitorElement* L1ValidatorHists::Eff_Eta[Type::Number]

Definition at line 62 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

◆ Eff_Eta_Denom

MonitorElement* L1ValidatorHists::Eff_Eta_Denom[Type::Number]

Definition at line 63 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ Eff_Eta_Nomin

MonitorElement* L1ValidatorHists::Eff_Eta_Nomin[Type::Number]

Definition at line 64 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ Eff_Pt

MonitorElement* L1ValidatorHists::Eff_Pt[Type::Number]

Definition at line 59 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

◆ Eff_Pt_Denom

MonitorElement* L1ValidatorHists::Eff_Pt_Denom[Type::Number]

Definition at line 60 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ Eff_Pt_Nomin

MonitorElement* L1ValidatorHists::Eff_Pt_Nomin[Type::Number]

Definition at line 61 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ N

MonitorElement* L1ValidatorHists::N[Type::Number]

TH2F *IsoEG_N_Pt_Eta, *IsoEG_Eff_Pt, *IsoEG_Eff_Eta, *IsoEG_dR_Pt, IsoEG_dPt_Pt; TH2F *NonIsoEG_N_Pt_Eta, *NonIsoEG_Eff_Pt, *NonIsoEG_Eff_Eta, NonIsoEG_dR_Pt, *NonIsoEG_dPt_Pt; TH2F *CenJet_N_Pt_Eta, *CenJet_Eff_Pt, CenJet_Eff_Eta, *CenJet_dR_Pt, *CenJet_dPt_Pt; TH2F *Muon_N_Pt_Eta, Muon_Eff_Pt, *Muon_Eff_Eta, *Muon_dR_Pt, *Muon_dPt_Pt;

Definition at line 57 of file L1ValidatorHists.h.

Referenced by Book(), FillNumber(), and Write().

◆ Name

std::string L1ValidatorHists::Name[4]

Definition at line 38 of file L1ValidatorHists.h.

Referenced by Book(), and L1ValidatorHists().

◆ NEvents

int L1ValidatorHists::NEvents

Definition at line 34 of file L1ValidatorHists.h.

Referenced by L1Validator::analyze(), and Book().

◆ TurnOn_15

MonitorElement* L1ValidatorHists::TurnOn_15[Type::Number]

Definition at line 65 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

◆ TurnOn_15_Denom

MonitorElement* L1ValidatorHists::TurnOn_15_Denom[Type::Number]

Definition at line 66 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ TurnOn_15_Nomin

MonitorElement* L1ValidatorHists::TurnOn_15_Nomin[Type::Number]

Definition at line 67 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ TurnOn_30

MonitorElement* L1ValidatorHists::TurnOn_30[Type::Number]

Definition at line 68 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

◆ TurnOn_30_Denom

MonitorElement* L1ValidatorHists::TurnOn_30_Denom[Type::Number]

Definition at line 69 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

◆ TurnOn_30_Nomin

MonitorElement* L1ValidatorHists::TurnOn_30_Nomin[Type::Number]

Definition at line 70 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), and Write().

muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
mps_fire.i
i
Definition: mps_fire.py:355
L1ValidatorHists::dPt
MonitorElement * dPt[Type::Number]
Definition: L1ValidatorHists.h:72
L1ValidatorHists::dR
MonitorElement * dR[Type::Number]
Definition: L1ValidatorHists.h:71
dqm::impl::MonitorElement::setEfficiencyFlag
void setEfficiencyFlag()
Definition: MonitorElement.h:267
L1ValidatorHists::NEvents
int NEvents
Definition: L1ValidatorHists.h:34
L1ValidatorHists::Eff_Pt_Nomin
MonitorElement * Eff_Pt_Nomin[Type::Number]
Definition: L1ValidatorHists.h:61
L1ValidatorHists::TurnOn_30_Nomin
MonitorElement * TurnOn_30_Nomin[Type::Number]
Definition: L1ValidatorHists.h:70
HcalTBWriter_cfi.Number
Number
Definition: HcalTBWriter_cfi.py:19
L1ValidatorHists::Number
Definition: L1ValidatorHists.h:37
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
L1ValidatorHists::dPt_vs_Pt
MonitorElement * dPt_vs_Pt[Type::Number]
Definition: L1ValidatorHists.h:74
BTVHLTOfflineSource_cfi.dirname
dirname
Definition: BTVHLTOfflineSource_cfi.py:7
L1ValidatorHists::Name
std::string Name[4]
Definition: L1ValidatorHists.h:38
L1ValidatorHists::Eff_Pt
MonitorElement * Eff_Pt[Type::Number]
Definition: L1ValidatorHists.h:59
L1ValidatorHists::dR_vs_Pt
MonitorElement * dR_vs_Pt[Type::Number]
Definition: L1ValidatorHists.h:73
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
nanoDQM_cfi.GenPart
GenPart
Definition: nanoDQM_cfi.py:257
L1ValidatorHists::Fill
void Fill(int, const reco::LeafCandidate *, const reco::LeafCandidate *)
Definition: L1ValidatorHists.cc:128
L1ValidatorHists::Eff_Eta_Denom
MonitorElement * Eff_Eta_Denom[Type::Number]
Definition: L1ValidatorHists.h:63
L1ValidatorHists::Eff_Eta
MonitorElement * Eff_Eta[Type::Number]
Definition: L1ValidatorHists.h:62
L1ValidatorHists::N
MonitorElement * N[Type::Number]
Definition: L1ValidatorHists.h:57
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:474
L1ValidatorHists::TurnOn_15
MonitorElement * TurnOn_15[Type::Number]
Definition: L1ValidatorHists.h:65
L1ValidatorHists::TurnOn_15_Denom
MonitorElement * TurnOn_15_Denom[Type::Number]
Definition: L1ValidatorHists.h:66
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
L1ValidatorHists::Muon
Definition: L1ValidatorHists.h:37
L1ValidatorHists::Egamma
Definition: L1ValidatorHists.h:37
LepHTMonitor_cff.ptbins
ptbins
Definition: LepHTMonitor_cff.py:39
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
L1ValidatorHists::Tau
Definition: L1ValidatorHists.h:37
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
L1ValidatorHists::Eff_Pt_Denom
MonitorElement * Eff_Pt_Denom[Type::Number]
Definition: L1ValidatorHists.h:60
L1ValidatorHists::Jet
Definition: L1ValidatorHists.h:37
L1ValidatorHists::TurnOn_15_Nomin
MonitorElement * TurnOn_15_Nomin[Type::Number]
Definition: L1ValidatorHists.h:67
L1ValidatorHists::TurnOn_30_Denom
MonitorElement * TurnOn_30_Denom[Type::Number]
Definition: L1ValidatorHists.h:69
L1ValidatorHists::TurnOn_30
MonitorElement * TurnOn_30[Type::Number]
Definition: L1ValidatorHists.h:68
L1ValidatorHists::Eff_Eta_Nomin
MonitorElement * Eff_Eta_Nomin[Type::Number]
Definition: L1ValidatorHists.h:64
dqm::legacy::MonitorElement::getTH2F
virtual TH2F * getTH2F() const
Definition: MonitorElement.h:490