CMS 3D CMS Logo

ElectronOfflineClient.cc
Go to the documentation of this file.
1 
6 
8 
9 #include <string>
10 
12  effHistoTitle_ = conf.getParameter<std::string>("EffHistoTitle");
13 }
14 
16 
18  // MonitorElement * h1_matchedEle_eta = get("matchedEle_eta");
19  // MonitorElement * h1_matchedEle_eta_golden = get("matchedEle_eta_golden");
20  // MonitorElement * h1_matchedEle_eta_shower = get("matchedEle_eta_shower");
21  // //MonitorElement * h1_matchedEle_eta_bbrem = get("matchedEle_eta_bbrem");
22  // //MonitorElement * h1_matchedEle_eta_narrow = get("matchedEle_eta_narrow");
23  // MonitorElement * h1_matchedEle_eta_goldenFrac = cloneH1("matchedEle_eta_goldenFrac","matchedEle_eta","fraction of golden electrons") ;
24  // MonitorElement * h1_matchedEle_eta_showerFrac = cloneH1("matchedEle_eta_showerFrac","matchedEle_eta","fraction of showering electrons") ;
25  // //MonitorElement * h1_matchedEle_eta_bbremFrac = cloneH1("matchedEle_eta_bbremFrac","matchedEle_eta","fraction of bbrem electrons") ;
26  // //MonitorElement * h1_matchedEle_eta_narrowFrac = cloneH1("matchedEle_eta_narrowFrac","matchedEle_eta","fraction of narrow electrons") ;
27  // int nb, nbins=h_matchedEle_eta->getNbinsX() ;
28  // for ( nb=0 ; nb<nbins ; ++nb )
29  // {
30  // float content = h1_matchedEle_eta->getBinContent(nb) ;
31  // if (content==0.) continue ;
32  // float contgold =( h1_matchedEle_eta_golden->getBinContent(nb))/content ;
33  // float contshower =( h1_matchedEle_eta_shower->getBinContent(nb))/content ;
34  // //float contbbrem =( h1_matchedEle_eta_bbrem->getBinContent(nb))/content ;
35  // //float contnarrow =( h1_matchedEle_eta_narrow->getBinContent(nb))/content ;
36  // h1_matchedEle_eta_goldenFrac ->setBinContent(nb,contgold) ;
37  // h1_matchedEle_eta_showerFrac ->setBinContent(nb,contshower) ;
38  // //h1_matchedEle_eta_bbremFrac ->setBinContent(nb,contbbrem) ;
39  // //h1_matchedEle_eta_narrowFrac ->setBinContent(nb,contnarrow) ;
40  // }
41  // remove(iBooker,iGetter, "matchedEle_eta") ;
42  // remove(iBooker,iGetter, "matchedEle_eta_golden") ;
43  // remove(iBooker,iGetter, "matchedEle_eta_shower") ;
44  // //remove(iBooker,iGetter, "matchedEle_eta_bbrem") ;
45  // //remove(iBooker,iGetter, "matchedEle_eta_narrow") ;
46 
47  setBookIndex(100);
48  if (effHistoTitle_.empty()) {
49  bookH1andDivide(iBooker,
50  iGetter,
51  "ptEff",
52  "matchedObject_Pt",
53  "matchingObject_Pt",
54  "p_{T} (GeV/c)",
55  "Efficiency",
56  "efficiency vs p_{T}");
57  bookH1andDivide(iBooker,
58  iGetter,
59  "etaEff",
60  "matchedObject_Eta",
61  "matchingObject_Eta",
62  "#eta",
63  "Efficiency",
64  "efficiency vs #eta");
65  // bookH1andDivide(iBooker,iGetter, "absEtaEff","matchedObject_AbsEta","matchingObject_AbsEta","|#eta|","Efficiency","efficiency vs |#eta|") ;
66  bookH1andDivide(iBooker,
67  iGetter,
68  "phiEff",
69  "matchedObject_Phi",
70  "matchingObject_Phi",
71  "#phi (rad)",
72  "Efficiency",
73  "efficiency vs #phi");
74  // bookH1andDivide(iBooker,iGetter, "zEff","matchedObject_Z","matchingObject_Z","z (cm)","Efficiency","efficiency vs z") ;
75  } else {
76  bookH1andDivide(iBooker,
77  iGetter,
78  "ptEff",
79  "matchedObject_Pt",
80  "matchingObject_Pt",
81  "p_{T} (GeV/c)",
82  "Efficiency",
85  iBooker, iGetter, "etaEff", "matchedObject_Eta", "matchingObject_Eta", "#eta", "Efficiency", effHistoTitle_);
86  // bookH1andDivide(iBooker,iGetter, "absEtaEff","matchedObject_AbsEta","matchingObject_AbsEta","|#eta|","Efficiency",effHistoTitle_) ;
87  bookH1andDivide(iBooker,
88  iGetter,
89  "phiEff",
90  "matchedObject_Phi",
91  "matchingObject_Phi",
92  "#phi (rad)",
93  "Efficiency",
95  // bookH1andDivide(iBooker,iGetter, "zEff","matchedObject_Z","matchingObject_Z","z (cm)","Efficiency",effHistoTitle_) ;
96  }
97 
98  remove(iBooker, iGetter, "matchedObject_Pt"); // A.C.
99  remove(iBooker, iGetter, "matchedObject_Eta");
100  // remove(iBooker,iGetter, "matchedObject_AbsEta") ;
101  remove(iBooker, iGetter, "matchedObject_Phi");
102  // remove(iBooker,iGetter, "matchedObject_Z") ;
103 
104  remove(iBooker, iGetter, "matchingObject_Pt");
105  remove(iBooker, iGetter, "matchingObject_Eta");
106  // remove(iBooker,iGetter, "matchingObject_AbsEta") ;/**/ //A.C.
107  remove(iBooker, iGetter, "matchingObject_Phi");
108  // remove(iBooker,iGetter, "matchingObject_Z") ;
109 }
ElectronDqmHarvesterBase::remove
void remove(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &name)
Definition: ElectronDqmHarvesterBase.cc:130
MessageLogger.h
ElectronDqmHarvesterBase::bookH1andDivide
MonitorElement * bookH1andDivide(DQMStore::IBooker &iBooker, DQMStore::IGetter &, const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
Definition: ElectronDqmHarvesterBase.cc:326
ElectronOfflineClient::~ElectronOfflineClient
~ElectronOfflineClient() override
Definition: ElectronOfflineClient.cc:15
DQMStore.h
ElectronOfflineClient::effHistoTitle_
std::string effHistoTitle_
Definition: ElectronOfflineClient.h:14
ElectronDqmHarvesterBase
Definition: ElectronDqmHarvesterBase.h:16
ElectronOfflineClient::ElectronOfflineClient
ElectronOfflineClient(const edm::ParameterSet &)
Definition: ElectronOfflineClient.cc:11
ElectronOfflineClient::finalize
void finalize(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
Definition: ElectronOfflineClient.cc:17
edm::ParameterSet
Definition: ParameterSet.h:47
Serialization.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqm::implementation::IGetter
Definition: DQMStore.h:484
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ElectronDqmHarvesterBase::setBookIndex
void setBookIndex(short)
Definition: ElectronDqmHarvesterBase.cc:32
ElectronOfflineClient.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
ParameterSet.h