CMS 3D CMS Logo

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

#include <L1ValidatorHists.h>

Public Types

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 24 of file L1ValidatorHists.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1ValidatorHists::L1ValidatorHists ( )

Definition at line 15 of file L1ValidatorHists.cc.

References Name.

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 
27 }
std::string Name[4]
L1ValidatorHists::~L1ValidatorHists ( )

Definition at line 28 of file L1ValidatorHists.cc.

28 {}

Member Function Documentation

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

Definition at line 30 of file L1ValidatorHists.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), 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, DQMStore::IBooker::setCurrentFolder(), MonitorElement::setEfficiencyFlag(), TurnOn_15, TurnOn_15_Denom, TurnOn_15_Nomin, TurnOn_30, TurnOn_30_Denom, and TurnOn_30_Nomin.

Referenced by L1Validator::bookHistograms().

30  {
31  NEvents=0;
32 
33  float ptbins[14] = { 0,5,10,15,20,25,30,35, 40, 50, 60, 80, 120, 160};
34  int Nptbin = 13;
35 
36  iBooker.setCurrentFolder(dirname + "/numerators_denominators");
37  for(int i=0; i<Type::Number; i++){
38  Eff_Pt_Denom[i] = iBooker.book1D( (Name[i]+"_Eff_Pt_Denom").c_str(), (Name[i]+" Efficiency vs Pt Denom; Gen p_{T} [GeV]; Entries").c_str(), Nptbin, ptbins);
39  Eff_Pt_Nomin[i] = iBooker.book1D( (Name[i]+"_Eff_Pt_Nomin").c_str(), (Name[i]+" Efficiency vs Pt Nomin; Gen p_{T} [GeV]; Entries").c_str(), Nptbin, ptbins);
40  Eff_Eta_Denom[i] = iBooker.book1D( (Name[i]+"_Eff_Eta_Denom").c_str(), (Name[i]+" Efficiency vs #eta Denom; Gen #eta; Entries").c_str(), 80, -4, 4);
41  Eff_Eta_Nomin[i] = iBooker.book1D( (Name[i]+"_Eff_Eta_Nomin").c_str(), (Name[i]+" Efficiency vs #eta Nomin; Gen #eta; Entries").c_str(), 80, -4, 4);
42  TurnOn_15_Denom[i] = iBooker.book1D( (Name[i]+"_TurnOn_15_Denom").c_str(), (Name[i]+" Turn On (15 GeV) Denom; Gen p_{T} [GeV]; Entries").c_str(), Nptbin, ptbins);
43  TurnOn_15_Nomin[i] = iBooker.book1D( (Name[i]+"_TurnOn_15_Nomin").c_str(), (Name[i]+" Turn On (15 GeV) Nomin; Gen p_{T} [GeV]; Entries").c_str(), Nptbin, ptbins);
44  TurnOn_30_Denom[i] = iBooker.book1D( (Name[i]+"_TurnOn_30_Denom").c_str(), (Name[i]+" Turn On (30 GeV) Denom; Gen p_{T} [GeV]; Entries").c_str(), Nptbin, ptbins);
45  TurnOn_30_Nomin[i] = iBooker.book1D( (Name[i]+"_TurnOn_30_Nomin").c_str(), (Name[i]+" Turn On (30 GeV) Nomin; Gen p_{T} [GeV]; Entries").c_str(), Nptbin, ptbins);
46  }
47 
48 
49  iBooker.setCurrentFolder(dirname);
50  for(int i=0; i<Type::Number; i++){
51  N[i] = iBooker.book1D( (Name[i]+"_N").c_str(), ("L1 " + Name[i]+" Number with BX=0").c_str(), 16, -0.5, 15.5);
52 
53  Eff_Pt[i] = iBooker.book1D( (Name[i]+"_Eff_Pt").c_str(), (Name[i]+" Efficiency vs Pt; Gen p_{T} [GeV]; L1T Efficiency").c_str(), Nptbin, ptbins);
55  Eff_Eta[i] = iBooker.book1D( (Name[i]+"_Eff_Eta").c_str(), (Name[i]+" Efficiency vs #eta (Gen p_{T} > 10GeV); Gen #eta; L1T Efficiency").c_str(), 80, -4, 4);
57  TurnOn_15[i] = iBooker.book1D( (Name[i]+"_TurnOn_15").c_str(), (Name[i]+" Turn On (15 GeV); Gen p_{T} [GeV]; L1T Efficiency").c_str(), Nptbin, ptbins);
59  TurnOn_30[i] = iBooker.book1D( (Name[i]+"_TurnOn_30").c_str(), (Name[i]+" Turn On (30 GeV); Gen p_{T} [GeV]; L1T Efficiency").c_str(), Nptbin, ptbins);
61  dR[i] = iBooker.book1D( (Name[i]+"_dR").c_str(), (Name[i]+" #DeltaR; #DeltaR(L1 object, Gen object); Entries").c_str(), 40, 0, 1);
62  dR_vs_Pt[i] = iBooker.book2D( (Name[i]+"_dR_vs_Pt").c_str(), (Name[i]+" #DeltaR vs p_{T}; Gen p_{T} [GeV]; #DeltaR(L1 object, Gen object); Entries").c_str(), 12, 0, 120, 40, 0, 1);
63  dPt[i] = iBooker.book1D( (Name[i]+"_dPt").c_str(), (Name[i]+" #Deltap_{T}; (p_{T}^{L1}-p_{T}^{Gen})/p_{T}^{Gen}; Entries").c_str(), 100, -2, 2);
64  dPt_vs_Pt[i] = iBooker.book2D( (Name[i]+"_dPt_vs_Pt").c_str(), (Name[i]+" #Deltap_{T} vs p_{T}; Gen p_{T} [GeV]; (p_{T}^{L1}-p_{T}^{Gen})/p_{T}^{Gen}; Entries").c_str(), 12, 0, 120, 40, -2, 2);
65  }
66 
67 }
MonitorElement * dR_vs_Pt[Type::Number]
MonitorElement * Eff_Eta[Type::Number]
MonitorElement * N[Type::Number]
MonitorElement * TurnOn_15[Type::Number]
MonitorElement * Eff_Pt_Denom[Type::Number]
MonitorElement * TurnOn_15_Denom[Type::Number]
MonitorElement * Eff_Eta_Nomin[Type::Number]
MonitorElement * TurnOn_15_Nomin[Type::Number]
void setEfficiencyFlag()
MonitorElement * TurnOn_30_Denom[Type::Number]
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * dPt[Type::Number]
MonitorElement * TurnOn_30[Type::Number]
MonitorElement * dR[Type::Number]
MonitorElement * TurnOn_30_Nomin[Type::Number]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
MonitorElement * dPt_vs_Pt[Type::Number]
MonitorElement * Eff_Pt_Nomin[Type::Number]
MonitorElement * Eff_Eta_Denom[Type::Number]
std::string Name[4]
MonitorElement * Eff_Pt[Type::Number]
void L1ValidatorHists::Fill ( int  i,
const reco::LeafCandidate GenPart,
const reco::LeafCandidate L1Part 
)

Definition at line 69 of file L1ValidatorHists.cc.

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(), MonitorElement::Fill(), mps_fire::i, electrons_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().

69  {
70  double GenPartPt = GenPart->pt();
71  // fill the overflow in the last bin
72  if(GenPart->pt()>=160.0) GenPartPt = 159.0;
73  if(L1Part==nullptr) {
74  Eff_Pt_Denom[i]->Fill(GenPartPt);
75  if(GenPart->pt()>10)Eff_Eta_Denom[i]->Fill(GenPart->eta());
76  TurnOn_15_Denom[i]->Fill(GenPartPt);
77  TurnOn_30_Denom[i]->Fill(GenPartPt);
78  } else {
79  double idR = reco::deltaR(GenPart->eta(), GenPart->phi(), L1Part->eta(), L1Part->phi());
80  bool matched = idR < 0.15;
81  Eff_Pt_Denom[i]->Fill(GenPartPt);
82  if(GenPart->pt()>10)Eff_Eta_Denom[i]->Fill(GenPart->eta());
83  if(matched)Eff_Pt_Nomin[i]->Fill(GenPartPt);
84  if(matched && GenPart->pt()>10)Eff_Eta_Nomin[i]->Fill(GenPart->eta());
85  TurnOn_15_Denom[i]->Fill(GenPartPt);
86  TurnOn_30_Denom[i]->Fill(GenPartPt);
87  if(L1Part->pt()>15 && matched) TurnOn_15_Nomin[i]->Fill(GenPartPt);
88  if(L1Part->pt()>30 && matched) TurnOn_30_Nomin[i]->Fill(GenPartPt);
89  dR[i]->Fill(idR);
90  dPt[i]->Fill( (L1Part->pt()-GenPart->pt()) / GenPart->pt() );
91  dR_vs_Pt[i]->Fill(GenPart->pt(), idR);
92  dPt_vs_Pt[i]->Fill( GenPart->pt(), (L1Part->pt()-GenPart->pt()) / GenPart->pt() );
93  }
94 }
void Fill(int, const reco::LeafCandidate *, const reco::LeafCandidate *)
MonitorElement * dR_vs_Pt[Type::Number]
double eta() const final
momentum pseudorapidity
MonitorElement * Eff_Pt_Denom[Type::Number]
MonitorElement * TurnOn_15_Denom[Type::Number]
double pt() const final
transverse momentum
MonitorElement * Eff_Eta_Nomin[Type::Number]
void Fill(long long x)
MonitorElement * TurnOn_15_Nomin[Type::Number]
MonitorElement * TurnOn_30_Denom[Type::Number]
MonitorElement * dPt[Type::Number]
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
MonitorElement * dR[Type::Number]
MonitorElement * TurnOn_30_Nomin[Type::Number]
MonitorElement * dPt_vs_Pt[Type::Number]
MonitorElement * Eff_Pt_Nomin[Type::Number]
MonitorElement * Eff_Eta_Denom[Type::Number]
double phi() const final
momentum azimuthal angle
void L1ValidatorHists::FillNumber ( int  i,
int  Number 
)

Definition at line 96 of file L1ValidatorHists.cc.

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

Referenced by L1Validator::analyze().

96  {
97  N[i]->Fill(Number);
98 }
MonitorElement * N[Type::Number]
void Fill(long long x)
void L1ValidatorHists::Write ( )

Definition at line 100 of file L1ValidatorHists.cc.

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, MonitorElement::getTH1(), MonitorElement::getTH2F(), mps_fire::i, N, TurnOn_15, TurnOn_15_Denom, TurnOn_15_Nomin, TurnOn_30, TurnOn_30_Denom, and TurnOn_30_Nomin.

100  {
101  for(int i=0; i<Type::Number; i++){
102  N[i]->getTH1()->Write();
103  Eff_Pt[i]->getTH1()->Write();
104  Eff_Pt_Denom[i]->getTH1()->Write();
105  Eff_Pt_Nomin[i]->getTH1()->Write();
106  Eff_Eta[i]->getTH1()->Write();
107  Eff_Eta_Denom[i]->getTH1()->Write();
108  Eff_Eta_Nomin[i]->getTH1()->Write();
109  TurnOn_15[i]->getTH1()->Write();
110  TurnOn_15_Denom[i]->getTH1()->Write();
111  TurnOn_15_Nomin[i]->getTH1()->Write();
112  TurnOn_30[i]->getTH1()->Write();
113  TurnOn_30_Denom[i]->getTH1()->Write();
114  TurnOn_30_Nomin[i]->getTH1()->Write();
115  dR[i]->getTH1()->Write();
116  dPt[i]->getTH1()->Write();
117  dR_vs_Pt[i]->getTH2F()->Write();
118  dPt_vs_Pt[i]->getTH2F()->Write();
119  }
120 }
MonitorElement * dR_vs_Pt[Type::Number]
MonitorElement * Eff_Eta[Type::Number]
MonitorElement * N[Type::Number]
MonitorElement * TurnOn_15[Type::Number]
MonitorElement * Eff_Pt_Denom[Type::Number]
MonitorElement * TurnOn_15_Denom[Type::Number]
TH1 * getTH1() const
MonitorElement * Eff_Eta_Nomin[Type::Number]
MonitorElement * TurnOn_15_Nomin[Type::Number]
MonitorElement * TurnOn_30_Denom[Type::Number]
MonitorElement * dPt[Type::Number]
MonitorElement * TurnOn_30[Type::Number]
TH2F * getTH2F() const
MonitorElement * dR[Type::Number]
MonitorElement * TurnOn_30_Nomin[Type::Number]
MonitorElement * dPt_vs_Pt[Type::Number]
MonitorElement * Eff_Pt_Nomin[Type::Number]
MonitorElement * Eff_Eta_Denom[Type::Number]
MonitorElement * Eff_Pt[Type::Number]

Member Data Documentation

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

Definition at line 68 of file L1ValidatorHists.h.

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

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

Definition at line 70 of file L1ValidatorHists.h.

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

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

Definition at line 67 of file L1ValidatorHists.h.

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

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

Definition at line 69 of file L1ValidatorHists.h.

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

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

Definition at line 58 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

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

Definition at line 59 of file L1ValidatorHists.h.

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

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

Definition at line 60 of file L1ValidatorHists.h.

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

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

Definition at line 55 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

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

Definition at line 56 of file L1ValidatorHists.h.

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

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

Definition at line 57 of file L1ValidatorHists.h.

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

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 53 of file L1ValidatorHists.h.

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

std::string L1ValidatorHists::Name[4]

Definition at line 36 of file L1ValidatorHists.h.

Referenced by Book(), and L1ValidatorHists().

int L1ValidatorHists::NEvents

Definition at line 32 of file L1ValidatorHists.h.

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

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

Definition at line 61 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

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

Definition at line 62 of file L1ValidatorHists.h.

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

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

Definition at line 63 of file L1ValidatorHists.h.

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

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

Definition at line 64 of file L1ValidatorHists.h.

Referenced by Book(), and Write().

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

Definition at line 65 of file L1ValidatorHists.h.

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

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

Definition at line 66 of file L1ValidatorHists.h.

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