CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TGCTClient.cc
Go to the documentation of this file.
2 
11 
12 using namespace edm;
13 using namespace std;
14 
15 // Define statics for bins etc.
16 const unsigned int ETABINS = 22;
17 const float ETAMIN = -0.5;
18 const float ETAMAX = 21.5;
19 
20 const unsigned int PHIBINS = 18;
21 const float PHIMIN = -0.5;
22 const float PHIMAX = 17.5;
23 
25  monitorDir_(ps.getUntrackedParameter<string>("monitorDir","")),
26  counterLS_(0),
27  counterEvt_(0),
28  prescaleLS_(ps.getUntrackedParameter<int>("prescaleLS", -1)),
29  prescaleEvt_(ps.getUntrackedParameter<int>("prescaleEvt", -1)),
30  m_runInEventLoop(ps.getUntrackedParameter<bool>("runInEventLoop", false)),
31  m_runInEndLumi(ps.getUntrackedParameter<bool>("runInEndLumi", false)),
32  m_runInEndRun(ps.getUntrackedParameter<bool>("runInEndRun", false)),
33  m_runInEndJob(ps.getUntrackedParameter<bool>("runInEndJob", false))
34 
35 {
36 }
37 
39 
41 {
42  // Set to directory with ME in
44 
45  l1GctIsoEmOccEta_ = ibooker.book1D("IsoEmOccEta","ISO EM #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
46  l1GctIsoEmOccPhi_ = ibooker.book1D("IsoEmOccPhi","ISO EM #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
47  l1GctNonIsoEmOccEta_ = ibooker.book1D("NonIsoEmOccEta","NON-ISO EM #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
48  l1GctNonIsoEmOccPhi_ = ibooker.book1D("NonIsoEmOccPhi","NON-ISO EM #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
49  l1GctAllJetsOccEta_ = ibooker.book1D("AllJetsOccEta","CENTRAL AND FORWARD JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
50  l1GctAllJetsOccPhi_ = ibooker.book1D("AllJetsOccPhi","CENTRAL AND FORWARD JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
51  l1GctCenJetsOccEta_ = ibooker.book1D("CenJetsOccEta","CENTRAL JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
52  l1GctCenJetsOccPhi_ = ibooker.book1D("CenJetsOccPhi","CENTRAL JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
53  l1GctForJetsOccEta_ = ibooker.book1D("ForJetsOccEta","FORWARD JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
54  l1GctForJetsOccPhi_ = ibooker.book1D("ForJetsOccPhi","FORWARD JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
55  l1GctTauJetsOccEta_ = ibooker.book1D("TauJetsOccEta","TAU JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
56  l1GctTauJetsOccPhi_ = ibooker.book1D("TauJetsOccPhi","TAU JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
57 }
58 
60 {
61 
62  if (m_runInEndLumi) {
63  book(ibooker);
64  processHistograms(igetter);
65  }
66 
67 }
68 
70 
71  if (m_runInEndRun) {
72  book(ibooker);
73  processHistograms(igetter);
74  }
75 
76 }
77 
79 
81 
82  Input = igetter.get("L1T/L1TGCT/IsoEmOccEtaPhi");
83  if (Input!=NULL){
86  }
87 
88  Input = igetter.get("L1T/L1TGCT/NonIsoEmOccEtaPhi");
89  if (Input!=NULL){
92  }
93 
94  Input = igetter.get("L1T/L1TGCT/AllJetsOccEtaPhi");
95  if (Input!=NULL){
98  }
99 
100  Input = igetter.get("L1T/L1TGCT/CenJetsOccEtaPhi");
101  if (Input!=NULL){
104  }
105 
106  Input = igetter.get("L1T/L1TGCT/ForJetsOccEtaPhi");
107  if (Input!=NULL){
110  }
111 
112  Input = igetter.get("L1T/L1TGCT/TauJetsOccEtaPhi");
113  if (Input!=NULL){
116  }
117 
118 }
119 
120 
122 {
123  // Are the provided input and output consistent
124  if (input->GetNbinsX() != output->getNbinsX()) return;
125 
126  // Make the projection
127  TH1D* projX = input->ProjectionX();
128 
129  for (Int_t i=0; i<projX->GetNbinsX(); i++) {
130  output->setBinContent(i+1,projX->GetBinContent(i+1));
131  }
132  delete projX;
133 }
134 
136 {
137  // Are the provided input and output consistent
138  if (input->GetNbinsY() != output->getNbinsX()) return;
139 
140  // Make the projection
141  TH1D* projY = input->ProjectionY();
142 
143  for (Int_t i=0; i<projY->GetNbinsX(); i++) {
144  output->setBinContent(i+1,projY->GetBinContent(i+1));
145  }
146  delete projY;
147 }
148 
149 
#define PHIMAX
int i
Definition: DBlmapReader.cc:9
L1TGCTClient(const edm::ParameterSet &ps)
Constructor.
Definition: L1TGCTClient.cc:24
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * l1GctForJetsOccPhi_
Definition: L1TGCTClient.h:63
#define Input(cl)
Definition: vmac.h:188
void book(DQMStore::IBooker &ibooker)
Definition: L1TGCTClient.cc:40
virtual void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
Definition: L1TGCTClient.cc:69
MonitorElement * l1GctTauJetsOccEta_
Definition: L1TGCTClient.h:64
std::string monitorDir_
Definition: L1TGCTClient.h:41
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
#define NULL
Definition: scimark2.h:8
MonitorElement * l1GctTauJetsOccPhi_
Definition: L1TGCTClient.h:65
MonitorElement * l1GctIsoEmOccEta_
Definition: L1TGCTClient.h:54
MonitorElement * l1GctAllJetsOccPhi_
Definition: L1TGCTClient.h:59
MonitorElement * l1GctForJetsOccEta_
Definition: L1TGCTClient.h:62
static std::string const input
Definition: EdmProvDump.cc:43
MonitorElement * l1GctCenJetsOccPhi_
Definition: L1TGCTClient.h:61
#define ETAMAX
void processHistograms(DQMStore::IGetter &igetter)
Definition: L1TGCTClient.cc:78
#define ETAMIN
void makeXProjection(TH2F *input, MonitorElement *output)
MonitorElement * l1GctAllJetsOccEta_
Definition: L1TGCTClient.h:58
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
virtual void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
Definition: L1TGCTClient.cc:59
#define PHIMIN
MonitorElement * l1GctNonIsoEmOccPhi_
Definition: L1TGCTClient.h:57
bool m_runInEndLumi
Definition: L1TGCTClient.h:48
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * l1GctIsoEmOccPhi_
Definition: L1TGCTClient.h:55
virtual ~L1TGCTClient()
Destructor.
Definition: L1TGCTClient.cc:38
#define ETABINS
void makeYProjection(TH2F *input, MonitorElement *output)
MonitorElement * l1GctNonIsoEmOccEta_
Definition: L1TGCTClient.h:56
int getNbinsX(void) const
get # of bins in X-axis
#define PHIBINS
volatile std::atomic< bool > shutdown_flag false
TH2F * getTH2F(void) const
MonitorElement * l1GctCenJetsOccEta_
Definition: L1TGCTClient.h:60
bool m_runInEndRun
Definition: L1TGCTClient.h:49