CMS 3D CMS Logo

L1TGCTClient.cc
Go to the documentation of this file.
2 
9 
10 using namespace edm;
11 using namespace std;
12 
13 // Define statics for bins etc.
14 const unsigned int ETABINS = 22;
15 const float ETAMIN = -0.5;
16 const float ETAMAX = 21.5;
17 
18 const unsigned int PHIBINS = 18;
19 const float PHIMIN = -0.5;
20 const float PHIMAX = 17.5;
21 
23  : monitorDir_(ps.getUntrackedParameter<string>("monitorDir", "")),
24  counterLS_(0),
25  counterEvt_(0),
26  prescaleLS_(ps.getUntrackedParameter<int>("prescaleLS", -1)),
27  prescaleEvt_(ps.getUntrackedParameter<int>("prescaleEvt", -1)),
28  m_runInEventLoop(ps.getUntrackedParameter<bool>("runInEventLoop", false)),
29  m_runInEndLumi(ps.getUntrackedParameter<bool>("runInEndLumi", false)),
30  m_runInEndRun(ps.getUntrackedParameter<bool>("runInEndRun", false)),
31  m_runInEndJob(ps.getUntrackedParameter<bool>("runInEndJob", false)),
32  m_stage1_layer2_(ps.getUntrackedParameter<bool>("stage1_layer2_"))
33 
34 {}
35 
37 
39  // Set to directory with ME in
41 
42  l1GctIsoEmOccEta_ = ibooker.book1D("IsoEmOccEta", "ISO EM #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
43  l1GctIsoEmOccPhi_ = ibooker.book1D("IsoEmOccPhi", "ISO EM #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
44  l1GctNonIsoEmOccEta_ = ibooker.book1D("NonIsoEmOccEta", "NON-ISO EM #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
45  l1GctNonIsoEmOccPhi_ = ibooker.book1D("NonIsoEmOccPhi", "NON-ISO EM #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
47  ibooker.book1D("AllJetsOccEta", "CENTRAL AND FORWARD JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
49  ibooker.book1D("AllJetsOccPhi", "CENTRAL AND FORWARD JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
50  l1GctCenJetsOccEta_ = ibooker.book1D("CenJetsOccEta", "CENTRAL JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
51  l1GctCenJetsOccPhi_ = ibooker.book1D("CenJetsOccPhi", "CENTRAL JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
52  l1GctForJetsOccEta_ = ibooker.book1D("ForJetsOccEta", "FORWARD JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
53  l1GctForJetsOccPhi_ = ibooker.book1D("ForJetsOccPhi", "FORWARD JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
54  l1GctTauJetsOccEta_ = ibooker.book1D("TauJetsOccEta", "TAU JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
55  l1GctTauJetsOccPhi_ = ibooker.book1D("TauJetsOccPhi", "TAU JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
56  if (m_stage1_layer2_ == true) {
57  l1GctIsoTauJetsOccEta_ = ibooker.book1D("IsoTauJetsOccEta", "TAU JET #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
58  l1GctIsoTauJetsOccPhi_ = ibooker.book1D("IsoTauJetsOccPhi", "TAU JET #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
59  }
60 }
61 
63  DQMStore::IGetter& igetter,
64  const edm::LuminosityBlock& lumiSeg,
65  const edm::EventSetup& c) {
66  if (m_runInEndLumi) {
67  book(ibooker);
68  processHistograms(igetter);
69  }
70 }
71 
73  if (m_runInEndRun) {
74  book(ibooker);
75  processHistograms(igetter);
76  }
77 }
78 
81 
82  if (m_stage1_layer2_ == false) {
83  InputDir = "L1T/L1TGCT/";
84  } else {
85  InputDir = "L1T/L1TStage1Layer2/";
86  }
87 
88  Input = igetter.get(InputDir + "IsoEmOccEtaPhi");
89  if (Input != nullptr) {
92  }
93 
94  Input = igetter.get(InputDir + "NonIsoEmOccEtaPhi");
95  if (Input != nullptr) {
98  }
99 
100  Input = igetter.get(InputDir + "AllJetsOccEtaPhi");
101  if (Input != nullptr) {
104  }
105 
106  Input = igetter.get(InputDir + "CenJetsOccEtaPhi");
107  if (Input != nullptr) {
110  }
111 
112  Input = igetter.get(InputDir + "ForJetsOccEtaPhi");
113  if (Input != nullptr) {
116  }
117 
118  Input = igetter.get(InputDir + "TauJetsOccEtaPhi");
119  if (Input != nullptr) {
122  }
123 
124  if (m_stage1_layer2_ == true) {
125  Input = igetter.get(InputDir + "IsoTauJetsOccEtaPhi");
126  if (Input != nullptr) {
129  }
130  }
131 }
132 
134  // Are the provided input and output consistent
135  if (input->GetNbinsX() != output->getNbinsX())
136  return;
137 
138  // Make the projection
139  TH1D* projX = input->ProjectionX();
140 
141  for (Int_t i = 0; i < projX->GetNbinsX(); i++) {
142  output->setBinContent(i + 1, projX->GetBinContent(i + 1));
143  }
144  delete projX;
145 }
146 
148  // Are the provided input and output consistent
149  if (input->GetNbinsY() != output->getNbinsX())
150  return;
151 
152  // Make the projection
153  TH1D* projY = input->ProjectionY();
154 
155  for (Int_t i = 0; i < projY->GetNbinsX(); i++) {
156  output->setBinContent(i + 1, projY->GetBinContent(i + 1));
157  }
158  delete projY;
159 }
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
input
static const std::string input
Definition: EdmProvDump.cc:48
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
ESHandle.h
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
L1TGCTClient::m_runInEndLumi
bool m_runInEndLumi
Definition: L1TGCTClient.h:47
L1TGCTClient::l1GctIsoTauJetsOccEta_
MonitorElement * l1GctIsoTauJetsOccEta_
Definition: L1TGCTClient.h:66
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TGCTClient::makeYProjection
void makeYProjection(TH2F *input, MonitorElement *output)
Definition: L1TGCTClient.cc:147
L1TGCTClient::L1TGCTClient
L1TGCTClient(const edm::ParameterSet &ps)
Constructor.
Definition: L1TGCTClient.cc:22
L1TGCTClient::InputDir
std::string InputDir
Definition: L1TGCTClient.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
L1TGCTClient::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
Definition: L1TGCTClient.cc:72
L1TGCTClient::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
Definition: L1TGCTClient.cc:62
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
PHIMAX
const float PHIMAX
Definition: L1TGCTClient.cc:20
L1TGCTClient::monitorDir_
std::string monitorDir_
Definition: L1TGCTClient.h:40
L1TGCTClient::m_stage1_layer2_
bool m_stage1_layer2_
Definition: L1TGCTClient.h:50
L1TGCTClient::makeXProjection
void makeXProjection(TH2F *input, MonitorElement *output)
Definition: L1TGCTClient.cc:133
L1TGCTClient.h
ETAMIN
const float ETAMIN
Definition: L1TGCTClient.cc:15
L1TGCTClient::~L1TGCTClient
~L1TGCTClient() override
Destructor.
Definition: L1TGCTClient.cc:36
ETAMAX
const float ETAMAX
Definition: L1TGCTClient.cc:16
Service.h
ETABINS
const unsigned int ETABINS
Definition: L1TGCTClient.cc:14
L1TGCTClient::l1GctCenJetsOccPhi_
MonitorElement * l1GctCenJetsOccPhi_
Definition: L1TGCTClient.h:61
L1TGCTClient::l1GctCenJetsOccEta_
MonitorElement * l1GctCenJetsOccEta_
Definition: L1TGCTClient.h:60
PHIMIN
const float PHIMIN
Definition: L1TGCTClient.cc:19
L1TGCTClient::m_runInEndRun
bool m_runInEndRun
Definition: L1TGCTClient.h:48
edm::ParameterSet
Definition: ParameterSet.h:47
L1TGCTClient::l1GctForJetsOccPhi_
MonitorElement * l1GctForJetsOccPhi_
Definition: L1TGCTClient.h:63
L1TGCTClient::l1GctIsoEmOccPhi_
MonitorElement * l1GctIsoEmOccPhi_
Definition: L1TGCTClient.h:55
L1TGCTClient::l1GctNonIsoEmOccEta_
MonitorElement * l1GctNonIsoEmOccEta_
Definition: L1TGCTClient.h:56
createfilelist.int
int
Definition: createfilelist.py:10
edm::EventSetup
Definition: EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TGCTClient::l1GctTauJetsOccPhi_
MonitorElement * l1GctTauJetsOccPhi_
Definition: L1TGCTClient.h:65
std
Definition: JetResolutionObject.h:76
L1TGCTClient::l1GctAllJetsOccPhi_
MonitorElement * l1GctAllJetsOccPhi_
Definition: L1TGCTClient.h:59
TrackCandidateTopBottomHitFilter_cfi.Input
Input
Definition: TrackCandidateTopBottomHitFilter_cfi.py:4
L1TGCTClient::l1GctIsoTauJetsOccPhi_
MonitorElement * l1GctIsoTauJetsOccPhi_
Definition: L1TGCTClient.h:67
L1TGCTClient::l1GctIsoEmOccEta_
MonitorElement * l1GctIsoEmOccEta_
Definition: L1TGCTClient.h:54
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
PHIBINS
const unsigned int PHIBINS
Definition: L1TGCTClient.cc:18
EventSetup.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
L1TGCTClient::book
void book(DQMStore::IBooker &ibooker)
Definition: L1TGCTClient.cc:38
L1TGCTClient::l1GctForJetsOccEta_
MonitorElement * l1GctForJetsOccEta_
Definition: L1TGCTClient.h:62
ParameterSet.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
L1TGCTClient::processHistograms
void processHistograms(DQMStore::IGetter &igetter)
Definition: L1TGCTClient.cc:79
L1TGCTClient::l1GctTauJetsOccEta_
MonitorElement * l1GctTauJetsOccEta_
Definition: L1TGCTClient.h:64
L1TGCTClient::l1GctAllJetsOccEta_
MonitorElement * l1GctAllJetsOccEta_
Definition: L1TGCTClient.h:58
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
L1TGCTClient::l1GctNonIsoEmOccPhi_
MonitorElement * l1GctNonIsoEmOccPhi_
Definition: L1TGCTClient.h:57