CMS 3D CMS Logo

L1TGCT.cc
Go to the documentation of this file.
4 
5 // Trigger Headers
6 
7 // GCT and RCT data formats
11 
12 using namespace edm;
13 
14 // Define statics for bins etc.
15 const unsigned int JETETABINS = 22;
16 const float JETETAMIN = -0.5;
17 const float JETETAMAX = 21.5;
18 
19 const unsigned int EMETABINS = 22;
20 const float EMETAMIN = -0.5;
21 const float EMETAMAX = 21.5;
22 
23 const unsigned int METPHIBINS = 72;
24 const float METPHIMIN = -0.5;
25 const float METPHIMAX = 71.5;
26 
27 const unsigned int MHTPHIBINS = 18;
28 const float MHTPHIMIN = -0.5;
29 const float MHTPHIMAX = 17.5;
30 
31 const unsigned int PHIBINS = 18;
32 const float PHIMIN = -0.5;
33 const float PHIMAX = 17.5;
34 
35 const unsigned int OFBINS = 2;
36 const float OFMIN = -0.5;
37 const float OFMAX = 1.5;
38 
39 const unsigned int BXBINS = 5;
40 const float BXMIN = -2.5;
41 const float BXMAX = 2.5;
42 
43 // Bins for 3, 5, 6, 7, 10 and 12 bits
44 const unsigned int R3BINS = 8;
45 const float R3MIN = -0.5;
46 const float R3MAX = 7.5;
47 const unsigned int R5BINS = 32;
48 const float R5MIN = -0.5;
49 const float R5MAX = 31.5;
50 const unsigned int R6BINS = 64;
51 const float R6MIN = -0.5;
52 const float R6MAX = 63.5;
53 const unsigned int R7BINS = 128;
54 const float R7MIN = -0.5;
55 const float R7MAX = 127.5;
56 const unsigned int R12BINS = 4096;
57 const float R12MIN = -0.5;
58 const float R12MAX = 4095.5;
59 
61  : monitorDir_(ps.getUntrackedParameter<std::string>("monitorDir", "")),
62  gctCenJetsSource_(ps.getParameter<edm::InputTag>("gctCentralJetsSource")),
63  gctForJetsSource_(ps.getParameter<edm::InputTag>("gctForwardJetsSource")),
64  gctTauJetsSource_(ps.getParameter<edm::InputTag>("gctTauJetsSource")),
65  gctIsoTauJetsSource_(ps.getParameter<edm::InputTag>("gctIsoTauJetsSource")),
66  gctEnergySumsSource_(ps.getParameter<edm::InputTag>("gctEnergySumsSource")),
67  gctIsoEmSource_(ps.getParameter<edm::InputTag>("gctIsoEmSource")),
68  gctNonIsoEmSource_(ps.getParameter<edm::InputTag>("gctNonIsoEmSource")),
69  m_stage1_layer2_(ps.getParameter<bool>("stage1_layer2_")),
70  filterTriggerType_(ps.getParameter<int>("filterTriggerType")) {
71  // verbosity switch
72  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
73 
74  if (verbose_)
75  edm::LogInfo("L1TGCT") << "L1TGCT: constructor...." << std::endl;
76 
77  outputFile_ = ps.getUntrackedParameter<std::string>("outputFile", "");
78  if (!outputFile_.empty()) {
79  edm::LogInfo("L1TGCT") << "L1T Monitoring histograms will be saved to " << outputFile_ << std::endl;
80  }
81 
82  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
83  if (disable) {
84  outputFile_ = "";
85  }
86 
87  //set Token(-s)
88  gctIsoEmSourceToken_ = consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctIsoEmSource"));
89  gctNonIsoEmSourceToken_ = consumes<L1GctEmCandCollection>(ps.getParameter<edm::InputTag>("gctNonIsoEmSource"));
90  gctCenJetsSourceToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctCentralJetsSource"));
91  gctForJetsSourceToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctForwardJetsSource"));
92  gctTauJetsSourceToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctTauJetsSource"));
93  if (m_stage1_layer2_ == true) {
94  gctIsoTauJetsSourceToken_ = consumes<L1GctJetCandCollection>(ps.getParameter<edm::InputTag>("gctIsoTauJetsSource"));
95  }
97  consumes<L1GctHFRingEtSumsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
98  l1HFCountsToken_ = consumes<L1GctHFBitCountsCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
99  l1EtMissToken_ = consumes<L1GctEtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
100  l1HtMissToken_ = consumes<L1GctHtMissCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
101  l1EtHadToken_ = consumes<L1GctEtHadCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
102  l1EtTotalToken_ = consumes<L1GctEtTotalCollection>(ps.getParameter<edm::InputTag>("gctEnergySumsSource"));
103 }
104 
106 
108  nev_ = 0;
109 
110  ibooker.setCurrentFolder(monitorDir_);
111 
112  triggerType_ = ibooker.book1D("TriggerType", "TriggerType", 17, -0.5, 16.5);
113 
114  l1GctAllJetsEtEtaPhi_ = ibooker.book2D(
115  "AllJetsEtEtaPhi", "CENTRAL AND FORWARD JET E_{T}", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
117  ibooker.book2D("CenJetsEtEtaPhi", "CENTRAL JET E_{T}", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
119  ibooker.book2D("ForJetsEtEtaPhi", "FORWARD JET E_{T}", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
121  ibooker.book2D("TauJetsEtEtaPhi", "TAU JET E_{T}", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
122  if (m_stage1_layer2_ == true) {
124  "IsoTauJetsEtEtaPhi", "ISOTAU JET E_{T}", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
125  }
127  ibooker.book2D("IsoEmRankEtaPhi", "ISO EM E_{T}", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
129  ibooker.book2D("NonIsoEmRankEtaPhi", "NON-ISO EM E_{T}", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
130  l1GctAllJetsOccEtaPhi_ = ibooker.book2D("AllJetsOccEtaPhi",
131  "CENTRAL AND FORWARD JET OCCUPANCY",
132  JETETABINS,
133  JETETAMIN,
134  JETETAMAX,
135  PHIBINS,
136  PHIMIN,
137  PHIMAX);
138  l1GctCenJetsOccEtaPhi_ = ibooker.book2D(
139  "CenJetsOccEtaPhi", "CENTRAL JET OCCUPANCY", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
140  l1GctForJetsOccEtaPhi_ = ibooker.book2D(
141  "ForJetsOccEtaPhi", "FORWARD JET OCCUPANCY", JETETABINS, JETETAMIN, JETETAMAX, PHIBINS, PHIMIN, PHIMAX);
143  ibooker.book2D("TauJetsOccEtaPhi", "TAU JET OCCUPANCY", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
144  if (m_stage1_layer2_ == true) {
146  "IsoTauJetsOccEtaPhi", "ISOTAU JET OCCUPANCY", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
147  }
149  ibooker.book2D("IsoEmOccEtaPhi", "ISO EM OCCUPANCY", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
151  "NonIsoEmOccEtaPhi", "NON-ISO EM OCCUPANCY", EMETABINS, EMETAMIN, EMETAMAX, PHIBINS, PHIMIN, PHIMAX);
152 
153  //HF Ring stuff
154 
156  "HFRing1TowerCountCorr", "HF RING1 TOWER COUNT CORRELATION +/- #eta", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
158  "HFRing2TowerCountCorr", "HF RING2 TOWER COUNT CORRELATION +/- #eta", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
159 
161  ibooker.book1D("HFRing1TowerCountPosEta", "HF RING1 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
163  ibooker.book1D("HFRing1TowerCountNegEta", "HF RING1 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
165  ibooker.book1D("HFRing2TowerCountPosEta", "HF RING2 TOWER COUNT #eta +", R3BINS, R3MIN, R3MAX);
167  ibooker.book1D("HFRing2TowerCountNegEta", "HF RING2 TOWER COUNT #eta -", R3BINS, R3MIN, R3MAX);
168 
170  ibooker.book2D("HFRingTowerCountOccBx", "HF RING TOWER COUNT PER BX", BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
171 
172  if (m_stage1_layer2_ == false) {
174  "HFRing1Corr", "HF RING1 E_{T} CORRELATION +/- #eta", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
176  "HFRing2Corr", "HF RING2 E_{T} CORRELATION +/- #eta", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
177  l1GctHFRing1ETSumPosEta_ = ibooker.book1D("HFRing1ETSumPosEta", "HF RING1 E_{T} #eta +", R3BINS, R3MIN, R3MAX);
178  l1GctHFRing1ETSumNegEta_ = ibooker.book1D("HFRing1ETSumNegEta", "HF RING1 E_{T} #eta -", R3BINS, R3MIN, R3MAX);
179  l1GctHFRing2ETSumPosEta_ = ibooker.book1D("HFRing2ETSumPosEta", "HF RING2 E_{T} #eta +", R3BINS, R3MIN, R3MAX);
180  l1GctHFRing2ETSumNegEta_ = ibooker.book1D("HFRing2ETSumNegEta", "HF RING2 E_{T} #eta -", R3BINS, R3MIN, R3MAX);
182  ibooker.book2D("HFRingETSumOccBx", "HF RING E_{T} PER BX", BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
183  l1GctHFRingRatioPosEta_ = ibooker.book1D("HFRingRatioPosEta", "HF RING E_{T} RATIO #eta +", R5BINS, R5MIN, R5MAX);
184  l1GctHFRingRatioNegEta_ = ibooker.book1D("HFRingRatioNegEta", "HF RING E_{T} RATIO #eta -", R5BINS, R5MIN, R5MAX);
185  }
186 
187  if (m_stage1_layer2_ == true) {
189  "IsoTau 1 2 Corr", "IsoTau 1 IsoTau 2 E_{T} CORRELATION", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
191  ibooker.book2D("IsoTau 3 4 Corr", "IsoTau 3 IsoTau 4 CORRELATION", R3BINS, R3MIN, R3MAX, R3BINS, R3MIN, R3MAX);
192  l1GctHFRing1ETSumPosEta_ = ibooker.book1D("Iso Tau 1 Et", "Isolated Tau1 E_{T}", 9, -0.5, 8.5);
193  l1GctHFRing1ETSumNegEta_ = ibooker.book1D("Iso Tau 2 Et", "Isolated Tau2 E_{T}", 9, -0.5, 8.5);
194  l1GctHFRing2ETSumPosEta_ = ibooker.book1D("Iso Tau 3 Et", "Isolated Tau3 E_{T}", 9, -0.5, 8.5);
195  l1GctHFRing2ETSumNegEta_ = ibooker.book1D("Iso Tau 4 Et", "Isolated Tau4 E_{T}", 9, -0.5, 8.5);
197  ibooker.book2D("IsoTau HFRingSum OccBx", "Iso Tau PER BX", BXBINS, BXMIN, BXMAX, R3BINS, R3MIN, R3MAX);
198  l1GctHFRingRatioPosEta_ = ibooker.book1D("IsoTau Ratio 1 2", "IsoTau E_{T} RATIO", 9, -0.5, 8.5);
199  l1GctHFRingRatioNegEta_ = ibooker.book1D("IsoTau Ratio 1 2", "IsoTau E_{T} RATIO", 9, -0.5, 8.5);
200  }
201 
202  // Rank histograms
203  l1GctCenJetsRank_ = ibooker.book1D("CenJetsRank", "CENTRAL JET E_{T}", R6BINS, R6MIN, R6MAX);
204  l1GctForJetsRank_ = ibooker.book1D("ForJetsRank", "FORWARD JET E_{T}", R6BINS, R6MIN, R6MAX);
205  l1GctTauJetsRank_ = ibooker.book1D("TauJetsRank", "TAU JET E_{T}", R6BINS, R6MIN, R6MAX);
206  if (m_stage1_layer2_ == true) {
207  l1GctIsoTauJetsRank_ = ibooker.book1D("IsoTauJetsRank", "ISOTAU JET E_{T}", R6BINS, R6MIN, R6MAX);
208  }
209  l1GctIsoEmRank_ = ibooker.book1D("IsoEmRank", "ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
210  l1GctNonIsoEmRank_ = ibooker.book1D("NonIsoEmRank", "NON-ISO EM E_{T}", R6BINS, R6MIN, R6MAX);
211 
213  ibooker.book2D("AllJetsOccRankBx", "ALL JETS E_{T} PER BX", BXBINS, BXMIN, BXMAX, R6BINS, R6MIN, R6MAX);
215  ibooker.book2D("AllEmOccRankBx", "ALL EM E_{T} PER BX", BXBINS, BXMIN, BXMAX, R6BINS, R6MIN, R6MAX);
216 
217  // Energy sums
218  l1GctEtMiss_ = ibooker.book1D("EtMiss", "MET", R12BINS, R12MIN, R12MAX);
219  l1GctEtMissPhi_ = ibooker.book1D("EtMissPhi", "MET #phi", METPHIBINS, METPHIMIN, METPHIMAX);
220  l1GctEtMissOf_ = ibooker.book1D("EtMissOf", "MET OVERFLOW", OFBINS, OFMIN, OFMAX);
221  l1GctEtMissOccBx_ = ibooker.book2D("EtMissOccBx", "MET PER BX", BXBINS, BXMIN, BXMAX, R12BINS, R12MIN, R12MAX);
222  if (m_stage1_layer2_ == false) {
223  l1GctHtMiss_ = ibooker.book1D("HtMiss", "MHT", R7BINS, R7MIN, R7MAX);
224  l1GctHtMissPhi_ = ibooker.book1D("HtMissPhi", "MHT #phi", MHTPHIBINS, MHTPHIMIN, MHTPHIMAX);
225  l1GctHtMissOf_ = ibooker.book1D("HtMissOf", "MHT OVERFLOW", OFBINS, OFMIN, OFMAX);
226  l1GctHtMissOccBx_ = ibooker.book2D("HtMissOccBx", "MHT PER BX", BXBINS, BXMIN, BXMAX, R7BINS, R7MIN, R7MAX);
227  }
228  if (m_stage1_layer2_ == true) {
229  l1GctHtMiss_ = ibooker.book1D("HtMissHtTotal", "MHTHT", R7BINS, R7MIN, R7MAX);
230  l1GctHtMissPhi_ = ibooker.book1D("HtMissHtTotal Phi", "MHTHT #phi", MHTPHIBINS, MHTPHIMIN, MHTPHIMAX);
231  l1GctHtMissOf_ = ibooker.book1D("HtMissHtTotal Of", "MHTHT OVERFLOW", OFBINS, OFMIN, OFMAX);
233  ibooker.book2D("HtMissHtTotal OccBx", "MHTHT PER BX", BXBINS, BXMIN, BXMAX, R7BINS, R7MIN, R7MAX);
234  }
236  ibooker.book2D("EtMissHtMissCorr", "MET MHT CORRELATION", R6BINS, R12MIN, R12MAX, R6BINS, R7MIN, R7MAX);
237  l1GctEtMissHtMissCorrPhi_ = ibooker.book2D("EtMissHtMissPhiCorr",
238  "MET MHT #phi CORRELATION",
239  METPHIBINS,
240  METPHIMIN,
241  METPHIMAX,
242  MHTPHIBINS,
243  MHTPHIMIN,
244  MHTPHIMAX);
245  l1GctEtTotal_ = ibooker.book1D("EtTotal", "SUM E_{T}", R12BINS, R12MIN, R12MAX);
246  l1GctEtTotalOf_ = ibooker.book1D("EtTotalOf", "SUM E_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
248  ibooker.book2D("EtTotalOccBx", "SUM E_{T} PER BX", BXBINS, BXMIN, BXMAX, R12BINS, R12MIN, R12MAX);
249  l1GctEtHad_ = ibooker.book1D("EtHad", "H_{T}", R12BINS, R12MIN, R12MAX);
250  l1GctEtHadOf_ = ibooker.book1D("EtHadOf", "H_{T} OVERFLOW", OFBINS, OFMIN, OFMAX);
251  l1GctEtHadOccBx_ = ibooker.book2D("EtHadOccBx", "H_{T} PER BX", BXBINS, BXMIN, BXMAX, R12BINS, R12MIN, R12MAX);
253  ibooker.book2D("EtTotalEtHadCorr", "Sum E_{T} H_{T} CORRELATION", R6BINS, R12MIN, R12MAX, R6BINS, R12MIN, R12MAX);
254  //}
255 }
256 
257 void L1TGCT::dqmBeginRun(edm::Run const& iRrun, edm::EventSetup const& evSetup) {}
258 
260  nev_++;
261  if (verbose_) {
262  edm::LogInfo("L1TGCT") << "L1TGCT: analyze...." << std::endl;
263  }
264 
265  // filter according trigger type
266  // enum ExperimentType {
267  // Undefined = 0,
268  // PhysicsTrigger = 1,
269  // CalibrationTrigger = 2,
270  // RandomTrigger = 3,
271  // Reserved = 4,
272  // TracedEvent = 5,
273  // TestTrigger = 6,
274  // ErrorTrigger = 15
275 
276  // fill a histogram with the trigger type, for normalization fill also last bin
277  // ErrorTrigger + 1
278  double triggerType = static_cast<double>(e.experimentType()) + 0.001;
279  double triggerTypeLast = static_cast<double>(edm::EventAuxiliary::ExperimentType::ErrorTrigger) + 0.001;
280  triggerType_->Fill(triggerType);
281  triggerType_->Fill(triggerTypeLast + 1);
282 
283  // filter only if trigger type is greater than 0, negative values disable filtering
284  if (filterTriggerType_ >= 0) {
285  // now filter, for real data only
286  if (e.isRealData()) {
287  if (!(e.experimentType() == filterTriggerType_)) {
288  edm::LogInfo("L1TGCT") << "\n Event of TriggerType " << e.experimentType() << " rejected" << std::endl;
289  return;
290  }
291  }
292  }
293 
294  // Get all the collections
300  if (m_stage1_layer2_ == true) {
302  e.getByToken(gctIsoTauJetsSourceToken_, l1IsoTauJets);
303  }
310 
311  e.getByToken(gctIsoEmSourceToken_, l1IsoEm);
312  e.getByToken(gctNonIsoEmSourceToken_, l1NonIsoEm);
313  e.getByToken(gctCenJetsSourceToken_, l1CenJets);
314  e.getByToken(gctForJetsSourceToken_, l1ForJets);
315  e.getByToken(gctTauJetsSourceToken_, l1TauJets);
317  e.getByToken(l1HFCountsToken_, l1HFCounts);
318  e.getByToken(l1EtMissToken_, l1EtMiss);
319  e.getByToken(l1HtMissToken_, l1HtMiss);
320  e.getByToken(l1EtHadToken_, l1EtHad);
321  e.getByToken(l1EtTotalToken_, l1EtTotal);
322 
323  // Fill histograms
324 
325  // Central jets
326  if (l1CenJets.isValid()) {
327  for (L1GctJetCandCollection::const_iterator cj = l1CenJets->begin(); cj != l1CenJets->end(); cj++) {
328  // only plot central BX
329  if (cj->bx() == 0) {
330  l1GctCenJetsRank_->Fill(cj->rank());
331  // only plot eta and phi maps for non-zero candidates
332  if (cj->rank()) {
333  l1GctAllJetsEtEtaPhi_->Fill(cj->regionId().ieta(), cj->regionId().iphi(), cj->rank());
334  l1GctAllJetsOccEtaPhi_->Fill(cj->regionId().ieta(), cj->regionId().iphi());
335  l1GctCenJetsEtEtaPhi_->Fill(cj->regionId().ieta(), cj->regionId().iphi(), cj->rank());
336  l1GctCenJetsOccEtaPhi_->Fill(cj->regionId().ieta(), cj->regionId().iphi());
337  }
338  }
339  if (cj->rank())
340  l1GctAllJetsOccRankBx_->Fill(cj->bx(), cj->rank()); // for all BX
341  }
342  } else {
343  edm::LogWarning("DataNotFound") << " Could not find l1CenJets label was " << gctCenJetsSource_;
344  }
345 
346  // Forward jets
347  if (l1ForJets.isValid()) {
348  for (L1GctJetCandCollection::const_iterator fj = l1ForJets->begin(); fj != l1ForJets->end(); fj++) {
349  // only plot central BX
350  if (fj->bx() == 0) {
351  l1GctForJetsRank_->Fill(fj->rank());
352  // only plot eta and phi maps for non-zero candidates
353  if (fj->rank()) {
354  l1GctAllJetsEtEtaPhi_->Fill(fj->regionId().ieta(), fj->regionId().iphi(), fj->rank());
355  l1GctAllJetsOccEtaPhi_->Fill(fj->regionId().ieta(), fj->regionId().iphi());
356  l1GctForJetsEtEtaPhi_->Fill(fj->regionId().ieta(), fj->regionId().iphi(), fj->rank());
357  l1GctForJetsOccEtaPhi_->Fill(fj->regionId().ieta(), fj->regionId().iphi());
358  }
359  }
360  if (fj->rank())
361  l1GctAllJetsOccRankBx_->Fill(fj->bx(), fj->rank()); // for all BX
362  }
363  } else {
364  edm::LogWarning("DataNotFound") << " Could not find l1ForJets label was " << gctForJetsSource_;
365  }
366 
367  // Tau jets
368  if (l1TauJets.isValid()) {
369  for (L1GctJetCandCollection::const_iterator tj = l1TauJets->begin(); tj != l1TauJets->end(); tj++) {
370  // only plot central BX
371  if (tj->bx() == 0) {
372  l1GctTauJetsRank_->Fill(tj->rank());
373  // only plot eta and phi maps for non-zero candidates
374  if (tj->rank()) {
375  l1GctTauJetsEtEtaPhi_->Fill(tj->regionId().ieta(), tj->regionId().iphi(), tj->rank());
376  l1GctTauJetsOccEtaPhi_->Fill(tj->regionId().ieta(), tj->regionId().iphi());
377  }
378  }
379  if (tj->rank())
380  l1GctAllJetsOccRankBx_->Fill(tj->bx(), tj->rank()); // for all BX
381  }
382  } else {
383  edm::LogWarning("DataNotFound") << " Could not find l1TauJets label was " << gctTauJetsSource_;
384  }
385 
386  // IsoTau jets
387  if (m_stage1_layer2_ == true) {
389  e.getByToken(gctIsoTauJetsSourceToken_, l1IsoTauJets);
390  if (l1IsoTauJets.isValid()) {
391  for (L1GctJetCandCollection::const_iterator itj = l1IsoTauJets->begin(); itj != l1IsoTauJets->end(); itj++) {
392  // only plot central BX
393  if (itj->bx() == 0) {
394  l1GctIsoTauJetsRank_->Fill(itj->rank());
395  // only plot eta and phi maps for non-zero candidates
396  if (itj->rank()) {
397  l1GctIsoTauJetsEtEtaPhi_->Fill(itj->regionId().ieta(), itj->regionId().iphi(), itj->rank());
398  l1GctIsoTauJetsOccEtaPhi_->Fill(itj->regionId().ieta(), itj->regionId().iphi());
399  }
400  }
401  if (itj->rank())
402  l1GctAllJetsOccRankBx_->Fill(itj->bx(), itj->rank()); // for all BX
403  }
404  } else {
405  edm::LogWarning("DataNotFound") << " Could not find l1IsoTauJets label was " << gctIsoTauJetsSource_;
406  }
407  }
408 
409  // Missing ET
410  if (l1EtMiss.isValid()) {
411  for (L1GctEtMissCollection::const_iterator met = l1EtMiss->begin(); met != l1EtMiss->end(); met++) {
412  // only plot central BX
413  if (met->bx() == 0) {
414  if (met->overFlow() == 0 && met->et() > 0) {
415  //Avoid problems with met=0 candidates affecting MET_PHI plots
416  l1GctEtMiss_->Fill(met->et());
417  l1GctEtMissPhi_->Fill(met->phi());
418  }
419  l1GctEtMissOf_->Fill(met->overFlow());
420  }
421  if (met->overFlow() == 0 && met->et() > 0)
422  l1GctEtMissOccBx_->Fill(met->bx(), met->et()); // for all BX
423  }
424  } else {
425  edm::LogWarning("DataNotFound") << " Could not find l1EtMiss label was " << gctEnergySumsSource_;
426  }
427 
428  // Missing HT
429  if (l1HtMiss.isValid()) {
430  for (L1GctHtMissCollection::const_iterator mht = l1HtMiss->begin(); mht != l1HtMiss->end(); mht++) {
431  // only plot central BX
432  if (mht->bx() == 0) {
433  if (mht->overFlow() == 0 && mht->et() > 0) {
434  //Avoid problems with mht=0 candidates affecting MHT_PHI plots
435  l1GctHtMiss_->Fill(mht->et());
436  l1GctHtMissPhi_->Fill(mht->phi());
437  }
438  l1GctHtMissOf_->Fill(mht->overFlow());
439  }
440  if (mht->overFlow() == 0 && mht->et() > 0)
441  l1GctHtMissOccBx_->Fill(mht->bx(), mht->et()); // for all BX
442  }
443  } else {
444  edm::LogWarning("DataNotFound") << " Could not find l1HtMiss label was " << gctEnergySumsSource_;
445  }
446 
447  // Missing ET HT correlations
448  if (l1HtMiss.isValid() && l1EtMiss.isValid()) {
449  if (l1HtMiss->size() == l1EtMiss->size()) {
450  for (unsigned i = 0; i < l1HtMiss->size(); i++) {
451  if (l1HtMiss->at(i).overFlow() == 0 && l1EtMiss->at(i).overFlow() == 0 && l1HtMiss->at(i).bx() == 0 &&
452  l1EtMiss->at(i).bx() == 0) {
453  // Avoid problems overflows and only plot central BX
454  l1GctEtMissHtMissCorr_->Fill(l1EtMiss->at(i).et(), l1HtMiss->at(i).et());
455  if (l1HtMiss->at(i).et() && l1EtMiss->at(i).et()) { // Don't plot phi if one or other is zero
456  l1GctEtMissHtMissCorrPhi_->Fill(l1EtMiss->at(i).phi(), l1HtMiss->at(i).phi());
457  }
458  }
459  }
460  }
461  } else {
462  edm::LogWarning("DataNotFound") << " Could not find l1EtMiss or l1HtMiss label was " << gctEnergySumsSource_;
463  }
464 
465  // HT
466  if (l1EtHad.isValid()) {
467  for (L1GctEtHadCollection::const_iterator ht = l1EtHad->begin(); ht != l1EtHad->end(); ht++) {
468  // only plot central BX
469  if (ht->bx() == 0) {
470  l1GctEtHad_->Fill(ht->et());
471  l1GctEtHadOf_->Fill(ht->overFlow());
472  }
473  l1GctEtHadOccBx_->Fill(ht->bx(), ht->et()); // for all BX
474  }
475  } else {
476  edm::LogWarning("DataNotFound") << " Could not find l1EtHad label was " << gctEnergySumsSource_;
477  }
478 
479  // Total ET
480  if (l1EtTotal.isValid()) {
481  for (L1GctEtTotalCollection::const_iterator et = l1EtTotal->begin(); et != l1EtTotal->end(); et++) {
482  // only plot central BX
483  if (et->bx() == 0) {
484  l1GctEtTotal_->Fill(et->et());
485  l1GctEtTotalOf_->Fill(et->overFlow());
486  }
487  l1GctEtTotalOccBx_->Fill(et->bx(), et->et()); // for all BX
488  }
489  } else {
490  edm::LogWarning("DataNotFound") << " Could not find l1EtTotal label was " << gctEnergySumsSource_;
491  }
492 
493  // Total ET HT correlations
494  if (l1EtTotal.isValid() && l1EtHad.isValid()) {
495  if (l1EtTotal->size() == l1EtHad->size()) {
496  for (unsigned i = 0; i < l1EtHad->size(); i++) {
497  if (l1EtHad->at(i).overFlow() == 0 && l1EtTotal->at(i).overFlow() == 0 && l1EtHad->at(i).bx() == 0 &&
498  l1EtTotal->at(i).bx() == 0) {
499  // Avoid problems overflows and only plot central BX
500  l1GctEtTotalEtHadCorr_->Fill(l1EtTotal->at(i).et(), l1EtHad->at(i).et());
501  }
502  }
503  }
504  } else {
505  edm::LogWarning("DataNotFound") << " Could not find l1EtTotal or l1EtHad label was " << gctEnergySumsSource_;
506  }
507 
508  //HF Ring Et Sums
509  if (l1HFSums.isValid()) {
510  for (L1GctHFRingEtSumsCollection::const_iterator hfs = l1HFSums->begin(); hfs != l1HFSums->end(); hfs++) {
511  // only plot central BX
512  if (hfs->bx() == 0) {
513  // Individual ring Et sums
514  l1GctHFRing1ETSumPosEta_->Fill(hfs->etSum(0));
515  l1GctHFRing1ETSumNegEta_->Fill(hfs->etSum(1));
516  l1GctHFRing2ETSumPosEta_->Fill(hfs->etSum(2));
517  l1GctHFRing2ETSumNegEta_->Fill(hfs->etSum(3));
518  // Ratio of ring Et sums
519  if (hfs->etSum(2) != 0)
520  l1GctHFRingRatioPosEta_->Fill((hfs->etSum(0)) / (hfs->etSum(2)));
521  if (hfs->etSum(3) != 0)
522  l1GctHFRingRatioNegEta_->Fill((hfs->etSum(1)) / (hfs->etSum(3)));
523  // Correlate positive and neagative eta
524  l1GctHFRing1PosEtaNegEta_->Fill(hfs->etSum(0), hfs->etSum(1));
525  l1GctHFRing2PosEtaNegEta_->Fill(hfs->etSum(2), hfs->etSum(3));
526  }
527  // Occupancy vs BX
528  for (unsigned i = 0; i < 4; i++) {
529  l1GctHFRingETSumOccBx_->Fill(hfs->bx(), hfs->etSum(i));
530  }
531  }
532  } else {
533  edm::LogWarning("DataNotFound") << " Could not find l1HFSums label was " << gctEnergySumsSource_;
534  }
535 
536  // HF Ring Counts
537  if (l1HFCounts.isValid()) {
538  for (L1GctHFBitCountsCollection::const_iterator hfc = l1HFCounts->begin(); hfc != l1HFCounts->end(); hfc++) {
539  // only plot central BX
540  if (hfc->bx() == 0) {
541  // Individual ring counts
542  l1GctHFRing1TowerCountPosEta_->Fill(hfc->bitCount(0));
543  l1GctHFRing1TowerCountNegEta_->Fill(hfc->bitCount(1));
544  l1GctHFRing2TowerCountPosEta_->Fill(hfc->bitCount(2));
545  l1GctHFRing2TowerCountNegEta_->Fill(hfc->bitCount(3));
546  // Correlate positive and negative eta
547  l1GctHFRing1TowerCountPosEtaNegEta_->Fill(hfc->bitCount(0), hfc->bitCount(1));
548  l1GctHFRing2TowerCountPosEtaNegEta_->Fill(hfc->bitCount(2), hfc->bitCount(3));
549  }
550  // Occupancy vs BX
551  for (unsigned i = 0; i < 4; i++) {
552  l1GctHFRingTowerCountOccBx_->Fill(hfc->bx(), hfc->bitCount(i));
553  }
554  }
555  } else {
556  edm::LogWarning("DataNotFound") << " Could not find l1HFCounts label was " << gctEnergySumsSource_;
557  }
558 
559  // Isolated EM
560  if (l1IsoEm.isValid()) {
561  for (L1GctEmCandCollection::const_iterator ie = l1IsoEm->begin(); ie != l1IsoEm->end(); ie++) {
562  // only plot central BX
563  if (ie->bx() == 0) {
564  l1GctIsoEmRank_->Fill(ie->rank());
565  // only plot eta and phi maps for non-zero candidates
566  if (ie->rank()) {
567  l1GctIsoEmRankEtaPhi_->Fill(ie->regionId().ieta(), ie->regionId().iphi(), ie->rank());
568  l1GctIsoEmOccEtaPhi_->Fill(ie->regionId().ieta(), ie->regionId().iphi());
569  }
570  }
571  if (ie->rank())
572  l1GctAllEmOccRankBx_->Fill(ie->bx(), ie->rank()); // for all BX
573  }
574  } else {
575  edm::LogWarning("DataNotFound") << " Could not find l1IsoEm label was " << gctIsoEmSource_;
576  }
577 
578  // Non-isolated EM
579  if (l1NonIsoEm.isValid()) {
580  for (L1GctEmCandCollection::const_iterator ne = l1NonIsoEm->begin(); ne != l1NonIsoEm->end(); ne++) {
581  // only plot central BX
582  if (ne->bx() == 0) {
583  l1GctNonIsoEmRank_->Fill(ne->rank());
584  // only plot eta and phi maps for non-zero candidates
585  if (ne->rank()) {
586  l1GctNonIsoEmRankEtaPhi_->Fill(ne->regionId().ieta(), ne->regionId().iphi(), ne->rank());
587  l1GctNonIsoEmOccEtaPhi_->Fill(ne->regionId().ieta(), ne->regionId().iphi());
588  }
589  }
590  if (ne->rank())
591  l1GctAllEmOccRankBx_->Fill(ne->bx(), ne->rank()); // for all BX
592  }
593  } else {
594  edm::LogWarning("DataNotFound") << " Could not find l1NonIsoEm label was " << gctNonIsoEmSource_;
595  }
596  edm::LogInfo("L1TGCT") << "L1TGCT: end job...." << std::endl;
597  edm::LogInfo("EndJob") << "analyzed " << nev_ << " events";
598 }
const float METPHIMAX
Definition: L1TGCT.cc:25
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
Definition: DQMStore.cc:239
T getParameter(std::string const &) const
const unsigned int BXBINS
Definition: L1TGCT.cc:39
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * l1GctHtMiss_
Definition: L1TGCT.h:174
MonitorElement * l1GctEtHad_
Definition: L1TGCT.h:183
MonitorElement * l1GctHtMissPhi_
Definition: L1TGCT.h:175
const unsigned int OFBINS
Definition: L1TGCT.cc:35
edm::InputTag gctEnergySumsSource_
Definition: L1TGCT.h:216
MonitorElement * l1GctHFRing2TowerCountNegEta_
Definition: L1TGCT.h:196
MonitorElement * l1GctEtMissOccBx_
Definition: L1TGCT.h:173
MonitorElement * l1GctCenJetsRank_
Definition: L1TGCT.h:159
MonitorElement * l1GctHFRing1ETSumNegEta_
Definition: L1TGCT.h:198
MonitorElement * l1GctEtTotalEtHadCorr_
Definition: L1TGCT.h:186
MonitorElement * l1GctHFRing1TowerCountPosEta_
Definition: L1TGCT.h:193
const unsigned int EMETABINS
Definition: L1TGCT.cc:19
MonitorElement * l1GctTauJetsEtEtaPhi_
Definition: L1TGCT.h:146
const float BXMIN
Definition: L1TGCT.cc:40
MonitorElement * l1GctHFRingETSumOccBx_
Definition: L1TGCT.h:203
~L1TGCT() override
Definition: L1TGCT.cc:105
MonitorElement * l1GctNonIsoEmRank_
Definition: L1TGCT.h:164
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const unsigned int MHTPHIBINS
Definition: L1TGCT.cc:27
const float OFMAX
Definition: L1TGCT.cc:37
MonitorElement * l1GctEtMiss_
Definition: L1TGCT.h:170
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
std::string monitorDir_
Definition: L1TGCT.h:137
MonitorElement * l1GctHFRing2ETSumNegEta_
Definition: L1TGCT.h:200
MonitorElement * l1GctAllEmOccRankBx_
Definition: L1TGCT.h:167
edm::EDGetTokenT< L1GctJetCandCollection > gctCenJetsSourceToken_
Definition: L1TGCT.h:227
const float BXMAX
Definition: L1TGCT.cc:41
MonitorElement * l1GctEtTotal_
Definition: L1TGCT.h:180
MonitorElement * l1GctHtMissOf_
Definition: L1TGCT.h:176
edm::EDGetTokenT< L1GctHtMissCollection > l1HtMissToken_
Definition: L1TGCT.h:234
MonitorElement * l1GctIsoTauJetsEtEtaPhi_
Definition: L1TGCT.h:147
MonitorElement * l1GctEtHadOccBx_
Definition: L1TGCT.h:185
MonitorElement * l1GctEtTotalOccBx_
Definition: L1TGCT.h:182
edm::InputTag gctIsoTauJetsSource_
Definition: L1TGCT.h:215
bool isRealData() const
Definition: EventBase.h:62
edm::EDGetTokenT< L1GctEtTotalCollection > l1EtTotalToken_
Definition: L1TGCT.h:236
MonitorElement * l1GctHFRingTowerCountOccBx_
Definition: L1TGCT.h:204
MonitorElement * l1GctForJetsRank_
Definition: L1TGCT.h:160
MonitorElement * l1GctTauJetsRank_
Definition: L1TGCT.h:161
MonitorElement * l1GctHFRing2ETSumPosEta_
Definition: L1TGCT.h:199
edm::InputTag gctCenJetsSource_
Definition: L1TGCT.h:212
const unsigned int R6BINS
Definition: L1TGCT.cc:50
L1TGCT(const edm::ParameterSet &ps)
Definition: L1TGCT.cc:60
void Fill(long long x)
MonitorElement * l1GctEtMissPhi_
Definition: L1TGCT.h:171
MonitorElement * l1GctCenJetsEtEtaPhi_
Definition: L1TGCT.h:144
edm::InputTag gctTauJetsSource_
Definition: L1TGCT.h:214
edm::EDGetTokenT< L1GctEmCandCollection > gctIsoEmSourceToken_
Definition: L1TGCT.h:225
MonitorElement * l1GctAllJetsEtEtaPhi_
Definition: L1TGCT.h:143
const float JETETAMAX
Definition: L1TGCT.cc:17
MonitorElement * l1GctHFRing1ETSumPosEta_
Definition: L1TGCT.h:197
edm::EDGetTokenT< L1GctJetCandCollection > gctTauJetsSourceToken_
Definition: L1TGCT.h:229
const unsigned int R3BINS
Definition: L1TGCT.cc:44
edm::EDGetTokenT< L1GctHFBitCountsCollection > l1HFCountsToken_
Definition: L1TGCT.h:232
MonitorElement * l1GctHFRingRatioNegEta_
Definition: L1TGCT.h:202
const float EMETAMIN
Definition: L1TGCT.cc:20
MonitorElement * l1GctCenJetsOccEtaPhi_
Definition: L1TGCT.h:152
MonitorElement * l1GctIsoTauJetsRank_
Definition: L1TGCT.h:162
MonitorElement * l1GctEtMissOf_
Definition: L1TGCT.h:172
const unsigned int PHIBINS
Definition: L1TGCT.cc:31
MonitorElement * l1GctForJetsEtEtaPhi_
Definition: L1TGCT.h:145
const unsigned int JETETABINS
Definition: L1TGCT.cc:15
MonitorElement * l1GctIsoEmRank_
Definition: L1TGCT.h:163
const float R12MAX
Definition: L1TGCT.cc:58
MonitorElement * l1GctHtMissOccBx_
Definition: L1TGCT.h:177
const float R7MAX
Definition: L1TGCT.cc:55
edm::EDGetTokenT< L1GctEmCandCollection > gctNonIsoEmSourceToken_
Definition: L1TGCT.h:226
const float R5MAX
Definition: L1TGCT.cc:49
MonitorElement * l1GctHFRing2TowerCountPosEta_
Definition: L1TGCT.h:195
edm::EDGetTokenT< L1GctEtHadCollection > l1EtHadToken_
Definition: L1TGCT.h:235
const float R12MIN
Definition: L1TGCT.cc:57
MonitorElement * l1GctHFRing2TowerCountPosEtaNegEta_
Definition: L1TGCT.h:192
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag gctIsoEmSource_
Definition: L1TGCT.h:217
MonitorElement * triggerType_
Definition: L1TGCT.h:140
const float OFMIN
Definition: L1TGCT.cc:36
const float R6MIN
Definition: L1TGCT.cc:51
MonitorElement * l1GctEtMissHtMissCorrPhi_
Definition: L1TGCT.h:179
const float MHTPHIMAX
Definition: L1TGCT.cc:29
const float R5MIN
Definition: L1TGCT.cc:48
MonitorElement * l1GctNonIsoEmOccEtaPhi_
Definition: L1TGCT.h:157
const float MHTPHIMIN
Definition: L1TGCT.cc:28
int filterTriggerType_
Definition: L1TGCT.h:222
const unsigned int R7BINS
Definition: L1TGCT.cc:53
edm::InputTag gctForJetsSource_
Definition: L1TGCT.h:213
MonitorElement * l1GctNonIsoEmRankEtaPhi_
Definition: L1TGCT.h:149
int nev_
Definition: L1TGCT.h:206
MonitorElement * l1GctIsoTauJetsOccEtaPhi_
Definition: L1TGCT.h:155
bool m_stage1_layer2_
filter TriggerType
Definition: L1TGCT.h:221
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: L1TGCT.cc:257
MonitorElement * l1GctHFRing1PosEtaNegEta_
Definition: L1TGCT.h:189
const unsigned int R12BINS
Definition: L1TGCT.cc:56
const unsigned int R5BINS
Definition: L1TGCT.cc:47
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > gctEnergySumsSourceToken_
Definition: L1TGCT.h:231
const float PHIMIN
Definition: L1TGCT.cc:32
MonitorElement * l1GctAllJetsOccEtaPhi_
Definition: L1TGCT.h:151
edm::EDGetTokenT< L1GctJetCandCollection > gctIsoTauJetsSourceToken_
Definition: L1TGCT.h:230
HLT enums.
MonitorElement * l1GctHFRingRatioPosEta_
Definition: L1TGCT.h:201
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Definition: DQMStore.cc:266
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
Definition: L1TGCT.cc:107
MonitorElement * l1GctIsoEmRankEtaPhi_
Definition: L1TGCT.h:148
MonitorElement * l1GctHFRing1TowerCountPosEtaNegEta_
Definition: L1TGCT.h:191
const float METPHIMIN
Definition: L1TGCT.cc:24
edm::EventAuxiliary::ExperimentType experimentType() const
Definition: EventBase.h:63
edm::EDGetTokenT< L1GctJetCandCollection > gctForJetsSourceToken_
Definition: L1TGCT.h:228
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TGCT.cc:259
MonitorElement * l1GctEtHadOf_
Definition: L1TGCT.h:184
std::string outputFile_
Definition: L1TGCT.h:207
MonitorElement * l1GctForJetsOccEtaPhi_
Definition: L1TGCT.h:153
const float EMETAMAX
Definition: L1TGCT.cc:21
MonitorElement * l1GctHFRing1TowerCountNegEta_
Definition: L1TGCT.h:194
edm::EDGetTokenT< L1GctEtMissCollection > l1EtMissToken_
Definition: L1TGCT.h:233
const float PHIMAX
Definition: L1TGCT.cc:33
bool verbose_
Definition: L1TGCT.h:208
MonitorElement * l1GctEtTotalOf_
Definition: L1TGCT.h:181
const float R3MAX
Definition: L1TGCT.cc:46
MonitorElement * l1GctAllJetsOccRankBx_
Definition: L1TGCT.h:166
MonitorElement * l1GctEtMissHtMissCorr_
Definition: L1TGCT.h:178
MonitorElement * l1GctHFRing2PosEtaNegEta_
Definition: L1TGCT.h:190
const unsigned int METPHIBINS
Definition: L1TGCT.cc:23
edm::InputTag gctNonIsoEmSource_
Definition: L1TGCT.h:218
MonitorElement * l1GctTauJetsOccEtaPhi_
Definition: L1TGCT.h:154
Definition: Run.h:45
MonitorElement * l1GctIsoEmOccEtaPhi_
Definition: L1TGCT.h:156
const float R3MIN
Definition: L1TGCT.cc:45
const float R7MIN
Definition: L1TGCT.cc:54
const float JETETAMIN
Definition: L1TGCT.cc:16
const float R6MAX
Definition: L1TGCT.cc:52