CMS 3D CMS Logo

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

#include <L1ValidatorHists.h>

Public Types

enum  Type {
  IsoEG, NonIsoEG, CenJet, ForJet,
  TauJet, Muon, Number
}
 

Public Member Functions

void Book ()
 
void Fill (int, const reco::LeafCandidate *, const reco::LeafCandidate *)
 
void FillNumber (int, int)
 
 L1ValidatorHists (DQMStore *dbe)
 
void Normalize ()
 
void Write ()
 
 ~L1ValidatorHists ()
 

Public Attributes

DQMStore_dbe
 
MonitorElementdPt [Type::Number]
 
MonitorElementdR [Type::Number]
 
MonitorElementEff_Eta [Type::Number]
 
MonitorElementEff_Pt [Type::Number]
 
MonitorElementN [Type::Number]
 
TH1F * N_Eta [Type::Number]
 
TH1F * N_Pt [Type::Number]
 
std::string Name [6]
 
int NEvents
 
MonitorElementTurnOn_15 [Type::Number]
 
MonitorElementTurnOn_30 [Type::Number]
 

Detailed Description

Definition at line 24 of file L1ValidatorHists.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

L1ValidatorHists::L1ValidatorHists ( DQMStore dbe)

Definition at line 15 of file L1ValidatorHists.cc.

References _dbe, and Name.

15  {
16  _dbe=dbe;
17  //_dbe->setCurrentFolder("L1T/L1Extra");
18 
19  Name[0]="IsoEG";
20  Name[1]="NonIsoEG";
21  Name[2]="CenJet";
22  Name[3]="ForJet";
23  Name[4]="TauJet";
24  Name[5]="Muon";
25 }
std::string Name[6]
L1ValidatorHists::~L1ValidatorHists ( )

Member Function Documentation

void L1ValidatorHists::Book ( )

Definition at line 27 of file L1ValidatorHists.cc.

References _dbe, DQMStore::book1D(), dPt, dR, Eff_Eta, Eff_Pt, MonitorElement::getTH1(), i, N, N_Eta, N_Pt, Name, NEvents, TurnOn_15, and TurnOn_30.

Referenced by L1Validator::beginRun().

27  {
28  NEvents=0;
29 
30  for(int i=0; i<Type::Number; i++){
31  N[i] = _dbe->book1D( (Name[i]+"_N").c_str(), (Name[i]+" Number").c_str(), 5, -0.5, 4.5);
32  N_Pt[i] = new TH1F( (Name[i]+"_N_Pt").c_str(), (Name[i]+" Number").c_str(), 20, 0, 100);
33  N_Eta[i] = new TH1F( (Name[i]+"_N_Eta").c_str(), (Name[i]+" Number").c_str(), 20, -4, 4);
34  Eff_Pt[i] = _dbe->book1D( (Name[i]+"_Eff_Pt").c_str(), (Name[i]+" Efficiency").c_str(), 20, 0, 100);
35  Eff_Eta[i] = _dbe->book1D( (Name[i]+"_Eff_Eta").c_str(), (Name[i]+" Efficiency").c_str(), 20, -4, 4);
36  TurnOn_15[i] = _dbe->book1D( (Name[i]+"_TurnOn_15").c_str(), (Name[i]+" Turn On (15 GeV)").c_str(), 20, 0, 100);
37  TurnOn_30[i] = _dbe->book1D( (Name[i]+"_TurnOn_30").c_str(), (Name[i]+" Turn On (30 GeV)").c_str(), 20, 0, 100);
38  dR[i] = _dbe->book1D( (Name[i]+"_dR").c_str(), (Name[i]+" dR").c_str(), 20, 0, 1);
39  dPt[i] = _dbe->book1D( (Name[i]+"_dPt").c_str(), (Name[i]+" dPt").c_str(), 20, -1, 1);
40 
41  N[i]->getTH1()->Sumw2();
42  N_Pt[i]->Sumw2();
43  N_Eta[i]->Sumw2();
44  Eff_Pt[i]->getTH1()->Sumw2();
45  Eff_Eta[i]->getTH1()->Sumw2();
46  TurnOn_15[i]->getTH1()->Sumw2();
47  TurnOn_30[i]->getTH1()->Sumw2();
48  dR[i]->getTH1()->Sumw2();
49  dPt[i]->getTH1()->Sumw2();
50  }
51 
52 }
int i
Definition: DBlmapReader.cc:9
TH1F * N_Pt[Type::Number]
MonitorElement * Eff_Eta[Type::Number]
MonitorElement * N[Type::Number]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
std::string Name[6]
TH1F * N_Eta[Type::Number]
MonitorElement * TurnOn_15[Type::Number]
MonitorElement * dPt[Type::Number]
TH1 * getTH1(void) const
MonitorElement * TurnOn_30[Type::Number]
MonitorElement * dR[Type::Number]
MonitorElement * Eff_Pt[Type::Number]
void L1ValidatorHists::Fill ( int  i,
const reco::LeafCandidate GenPart,
const reco::LeafCandidate RecoPart 
)

Definition at line 54 of file L1ValidatorHists.cc.

References reco::deltaR(), dPt, dR, Eff_Eta, Eff_Pt, reco::LeafCandidate::eta(), MonitorElement::Fill(), i, N_Eta, N_Pt, NULL, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), TurnOn_15, and TurnOn_30.

Referenced by L1Validator::analyze().

54  {
55  N_Pt[i]->Fill(GenPart->pt());
56  N_Eta[i]->Fill(GenPart->eta());
57 
58  if(RecoPart==NULL) return;
59 
60  Eff_Pt[i]->Fill(GenPart->pt());
61  if(RecoPart->pt()>15) TurnOn_15[i]->Fill(GenPart->pt());
62  if(RecoPart->pt()>30) TurnOn_30[i]->Fill(GenPart->pt());
63  Eff_Eta[i]->Fill(GenPart->eta());
64  dR[i]->Fill(reco::deltaR(GenPart->eta(), GenPart->phi(), RecoPart->eta(), RecoPart->phi()));
65  dPt[i]->Fill( (RecoPart->pt()-GenPart->pt()) / GenPart->pt() );
66 }
void Fill(int, const reco::LeafCandidate *, const reco::LeafCandidate *)
int i
Definition: DBlmapReader.cc:9
TH1F * N_Pt[Type::Number]
MonitorElement * Eff_Eta[Type::Number]
TH1F * N_Eta[Type::Number]
MonitorElement * TurnOn_15[Type::Number]
#define NULL
Definition: scimark2.h:8
void Fill(long long x)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
MonitorElement * dPt[Type::Number]
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
MonitorElement * TurnOn_30[Type::Number]
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
MonitorElement * dR[Type::Number]
virtual float pt() const GCC11_FINAL
transverse momentum
MonitorElement * Eff_Pt[Type::Number]
void L1ValidatorHists::FillNumber ( int  i,
int  Number 
)

Definition at line 68 of file L1ValidatorHists.cc.

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

Referenced by L1Validator::analyze().

68  {
69  N[i]->Fill(Number);
70 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * N[Type::Number]
void Fill(long long x)
void L1ValidatorHists::Normalize ( )

Definition at line 72 of file L1ValidatorHists.cc.

References dPt, dR, Eff_Eta, Eff_Pt, MonitorElement::getTH1(), MonitorElement::getTH1F(), i, N, N_Eta, N_Pt, TurnOn_15, and TurnOn_30.

Referenced by L1Validator::endRun().

72  {
73  for(int i=0; i<Type::Number; i++){
74  Eff_Pt[i]->getTH1F()->Divide(N_Pt[i]);
75  TurnOn_15[i]->getTH1F()->Divide(N_Pt[i]);
76  TurnOn_30[i]->getTH1F()->Divide(N_Pt[i]);
77  Eff_Eta[i]->getTH1F()->Divide(N_Eta[i]);
78  N[i]->getTH1()->Scale(1./N[i]->getEntries());
79  dR[i]->getTH1()->Scale(1./dR[i]->getEntries());
80  dPt[i]->getTH1()->Scale(1./dPt[i]->getEntries());
81  }
82 }
int i
Definition: DBlmapReader.cc:9
TH1F * N_Pt[Type::Number]
MonitorElement * Eff_Eta[Type::Number]
MonitorElement * N[Type::Number]
TH1F * N_Eta[Type::Number]
MonitorElement * TurnOn_15[Type::Number]
MonitorElement * dPt[Type::Number]
TH1 * getTH1(void) const
MonitorElement * TurnOn_30[Type::Number]
MonitorElement * dR[Type::Number]
TH1F * getTH1F(void) const
MonitorElement * Eff_Pt[Type::Number]
void L1ValidatorHists::Write ( )

Definition at line 84 of file L1ValidatorHists.cc.

References dPt, dR, Eff_Eta, Eff_Pt, MonitorElement::getTH1(), i, N, TurnOn_15, and TurnOn_30.

84  {
85  for(int i=0; i<Type::Number; i++){
86  N[i]->getTH1()->Write();
87  Eff_Pt[i]->getTH1()->Write();
88  Eff_Eta[i]->getTH1()->Write();
89  TurnOn_15[i]->getTH1()->Write();
90  TurnOn_30[i]->getTH1()->Write();
91  dR[i]->getTH1()->Write();
92  dPt[i]->getTH1()->Write();
93  }
94 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * Eff_Eta[Type::Number]
MonitorElement * N[Type::Number]
MonitorElement * TurnOn_15[Type::Number]
MonitorElement * dPt[Type::Number]
TH1 * getTH1(void) const
MonitorElement * TurnOn_30[Type::Number]
MonitorElement * dR[Type::Number]
MonitorElement * Eff_Pt[Type::Number]

Member Data Documentation

DQMStore* L1ValidatorHists::_dbe

Definition at line 65 of file L1ValidatorHists.h.

Referenced by Book(), and L1ValidatorHists().

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

Definition at line 60 of file L1ValidatorHists.h.

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

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

Definition at line 59 of file L1ValidatorHists.h.

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

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

Definition at line 56 of file L1ValidatorHists.h.

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

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

Definition at line 55 of file L1ValidatorHists.h.

Referenced by Book(), Fill(), Normalize(), 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 52 of file L1ValidatorHists.h.

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

TH1F* L1ValidatorHists::N_Eta[Type::Number]

Definition at line 54 of file L1ValidatorHists.h.

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

TH1F* L1ValidatorHists::N_Pt[Type::Number]

Definition at line 53 of file L1ValidatorHists.h.

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

std::string L1ValidatorHists::Name[6]

Definition at line 35 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 57 of file L1ValidatorHists.h.

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

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

Definition at line 58 of file L1ValidatorHists.h.

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