CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ZdcSimHitStudy.cc
Go to the documentation of this file.
1 // Package: ZdcSimHitStudy
3 // Class: ZdcSimHitStudy
4 //
5 /*
6  Description:
7  This code has been developed to be a check for the ZDC sim. In 2009, it was
8  found that the ZDC Simulation was unrealistic and needed repair. The aim of
9  this code is to show the user the input and output of a ZDC MinBias
10  simulation.
11 
12  Implementation:
13  First a MinBias simulation should be run, it could be pythia,hijin,or hydjet.
14  This will output a .root file which should have information about
15  recoGenParticles, and g4SimHits_ZDCHits. Use this .root file as the input into
16  the cfg.py which is found in the main directory of this package. This output
17  will be another .root file which is meant to be viewed in a TBrowser.
18 
19 */
20 //
21 // Original Author: Jaime Gomez (U. of Maryland) with SIGNIFICANT assistance of
22 // Dr. Jefferey Temple (U. of Maryland) Adapted from: E. Garcia-Solis' (CSU)
23 // original code
24 //
25 // Created: Summer 2012
27 
35 
38 
41 
45 
46 #include <fstream>
47 #include <iostream>
48 #include <map>
49 #include <memory>
50 #include <string>
51 #include <vector>
52 
53 class ZdcSimHitStudy : public DQMEDAnalyzer {
54 public:
56  ~ZdcSimHitStudy() override;
57 
58 protected:
59  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
60 
61  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
62  void analyzeHits(std::vector<PCaloHit> &);
63  int FillHitValHist(int side, int section, int channel, double energy, double time);
64 
65 private:
68  double enetot;
69 
71  //# Below all the monitoring elements #
72  //# are simply the plots "code names" #
73  //# they will be filled in the .cc file #
75 
80 
99 
101 
116 
117  // N counts plots
124 };
125 
127  g4Label = ps.getUntrackedParameter<std::string>("moduleLabel", "g4SimHits");
128  zdcHits = ps.getUntrackedParameter<std::string>("HitCollection", "ZdcHits");
129  outFile_ = ps.getUntrackedParameter<std::string>("outputFile", "zdcHitStudy.root");
130  verbose_ = ps.getUntrackedParameter<bool>("Verbose", false);
131  checkHit_ = true;
132 
133  tok_gen_ = consumes<reco::GenParticleCollection>(edm::InputTag("genParticles"));
134  tok_hits_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label, zdcHits));
135 
136  edm::LogInfo("ZdcSimHitStudy")
137  // std::cout
138  << "Module Label: " << g4Label << " Hits: " << zdcHits << " / " << checkHit_ << " Output: " << outFile_;
139 }
140 
142 
144  ib.setCurrentFolder("ZDCValidation");
145  // Histograms for Hits
147  //# Below we are filling the histograms made in the .h file. The syntax is as
148  // follows: # # plot_code_name =
149  // ib.TypeofPlot[(1,2,3)-D,(F,I,D)]("Name as it will appear","Title",axis
150  // options); # # They will be stored in the TFile
151  // subdirectory set by : ib.setCurrentFolder("FolderIwant") # # axis
152  // options are like (#ofbins,min,max) #
154 
155  if (checkHit_) {
157  ib.setCurrentFolder("ZDCValidation/ZdcSimHits");
158  meAllZdcNHit_ = ib.book1D("ZDC Hits", "Number of All Hits in ZDC", 100, 0., 100.);
159  meAllZdcNHit_->setAxisTitle("Total Hits", 1);
160  meAllZdcNHit_->setAxisTitle("Counts", 2);
162  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/Excess_Info/Debug_Helper");
163  meBadZdcDetHit_ = ib.book1D("Hiits with the wrong Det", "Hits with wrong Det in ZDC", 100, 0., 100.);
164  meBadZdcDetHit_->setAxisTitle("Wrong Hits", 1);
165  meBadZdcDetHit_->setAxisTitle("Counts", 2);
167  meBadZdcSecHit_ = ib.book1D("Wrong Section Hits", "Hits with wrong Section in ZDC", 100, 0., 100.);
168  meBadZdcSecHit_->setAxisTitle("Hits in wrong section", 1);
169  meBadZdcSecHit_->setAxisTitle("Counts", 2);
171  meBadZdcIdHit_ = ib.book1D("Wrong_ID_Hits", "Hits with wrong ID in ZDC", 100, 0., 100.);
172  meBadZdcIdHit_->setAxisTitle("Hits with wrong ID", 1);
173  meBadZdcIdHit_->setAxisTitle("Counts", 2);
175  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/Excess_Info/BasicHitInfo");
176  meZdcNHitEM_ = ib.book1D("Hits in EM", "Number of Hits in ZDC EM", 100, 0., 100.);
177  meZdcNHitEM_->setAxisTitle("EM Hits", 1);
178  meZdcNHitEM_->setAxisTitle("Counts", 2);
180  meZdcNHitHad_ = ib.book1D("Hits in HAD", "Number of Hits in ZDC Had", 100, 0., 100.);
181  meZdcNHitHad_->setAxisTitle("HAD Hits", 1);
182  meZdcNHitHad_->setAxisTitle("Counts", 2);
184  meZdcNHitLum_ = ib.book1D("Hits in LUM", "Number of Hits in ZDC Lum", 100, 0., 100.);
185  meZdcNHitLum_->setAxisTitle("LUM Hits", 1);
186  meZdcNHitLum_->setAxisTitle("Counts", 2);
188  meZdcDetectHit_ = ib.book1D("Calo Detector ID", "Calo Detector ID", 50, 0., 50.);
189  meZdcDetectHit_->setAxisTitle("Detector Hits", 1);
190  meZdcDetectHit_->setAxisTitle("Counts", 2);
192  meZdcSideHit_ = ib.book1D("ZDC Side", "Side in ZDC", 4, -2, 2.);
193  meZdcSideHit_->setAxisTitle("ZDC Side", 1);
194  meZdcSideHit_->setAxisTitle("Counts", 2);
196  meZdcSectionHit_ = ib.book1D("ZDC Section", "Section in ZDC", 4, 0., 4.);
197  meZdcSectionHit_->setAxisTitle("ZDC Section", 1);
198  meZdcSectionHit_->setAxisTitle("Counts", 2);
200  meZdcChannelHit_ = ib.book1D("ZDC Channel", "Channel in ZDC", 10, 0., 10.);
201  meZdcChannelHit_->setAxisTitle("ZDC Channel", 1);
202  meZdcChannelHit_->setAxisTitle("Counts", 2);
204  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/");
205  meZdcEnergyHit_ = ib.book1D("Hit Energy", "Hits Energy", 4000, 0., 8000.);
206  meZdcEnergyHit_->setAxisTitle("Counts", 2);
207  meZdcEnergyHit_->setAxisTitle("Energy (GeV)", 1);
209  meZdcHadEnergyHit_ = ib.book1D("Hit Energy HAD", "Hits Energy in Had Section", 4000, 0., 8000.);
210  meZdcHadEnergyHit_->setAxisTitle("Counts", 2);
211  meZdcHadEnergyHit_->setAxisTitle("Energy (GeV)", 1);
213  meZdcEMEnergyHit_ = ib.book1D("Hit Energy EM", "Hits Energy in EM Section", 4000, 0., 8000.);
214  meZdcEMEnergyHit_->setAxisTitle("Counts", 2);
215  meZdcEMEnergyHit_->setAxisTitle("Energy (GeV)", 1);
217  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/Excess_Info/BasicHitInfo");
218  meZdcTimeHit_ = ib.book1D("Time in ZDC", "Time in ZDC", 300, 0., 600.);
219  meZdcTimeHit_->setAxisTitle("Time (ns)", 1);
220  meZdcTimeHit_->setAxisTitle("Counts", 2);
222  meZdcTimeWHit_ = ib.book1D("Energy Weighted Time in ZDC", "Time in ZDC (E wtd)", 300, 0., 600.);
223  meZdcTimeWHit_->setAxisTitle("Time (ns)", 1);
224  meZdcTimeWHit_->setAxisTitle("Counts", 2);
226  meZdc10Ene_ = ib.book1D("ZDC Log(E)", "Log10Energy in ZDC", 140, -20., 20.);
227  meZdc10Ene_->setAxisTitle("Log(E) (GeV)", 1);
228  meZdc10Ene_->setAxisTitle("Counts", 2);
231  "Log(EHAD) vs Contribution", "Log10Energy in Had ZDC vs Hit contribution", 140, -1., 20., 100, 0., 1.);
232  meZdcHadL10EneP_->setAxisTitle("Log(EHAD) (GeV)", 1);
233  meZdcHadL10EneP_->setAxisTitle("Counts", 2);
236  "Log(EEM) vs Contribution", "Log10Energy in EM ZDC vs Hit contribution", 140, -1., 20., 100, 0., 1.);
237  meZdcEML10EneP_->setAxisTitle("Log(EEM) (GeV)", 1);
238  meZdcEML10EneP_->setAxisTitle("Counts", 2);
240  ib.setCurrentFolder("ZDCValidation/ZdcSimHits");
241  meZdcEHadCh_ = ib.book2D("ZDC EHAD vs Channel", "ZDC Had Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6.);
242  meZdcEHadCh_->setAxisTitle("Hadronic Channel Number", 2);
243  meZdcEHadCh_->setAxisTitle("Energy (GeV)", 1);
245  meZdcEEMCh_ = ib.book2D("ZDC EEM vs Channel", "ZDC EM Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6.);
246  meZdcEEMCh_->setAxisTitle("EM Channel Number", 2);
247  meZdcEEMCh_->setAxisTitle("Energy (GeV)", 1);
249  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/Excess_Info/BasicHitInfo");
250  meZdcETime_ = ib.book2D("E vs T", "Hits ZDC Energy vs Time", 4000, 0., 8000., 300, 0., 600.);
251  meZdcETime_->setAxisTitle("Energy (GeV)", 1);
252  meZdcETime_->setAxisTitle("Time (ns)", 2);
254  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/ENERGY_SUMS/Individual_Channels/NZDC");
255  meZdcEneEmN1_ = ib.book1D("NZDC EM1 Energy", "Energy EM module N1", 4000, 0., 8000.);
256  meZdcEneEmN1_->setAxisTitle("Energy (GeV)", 1);
257  meZdcEneEmN1_->setAxisTitle("Counts", 2);
259  meZdcEneEmN2_ = ib.book1D("NZDC EM2 Energy", "Energy EM module N2", 4000, 0., 8000.);
260  meZdcEneEmN2_->setAxisTitle("Energy (GeV)", 1);
261  meZdcEneEmN2_->setAxisTitle("Counts", 2);
263  meZdcEneEmN3_ = ib.book1D("NZDC EM3 Energy", "Energy EM module N3", 4000, 0., 8000.);
264  meZdcEneEmN3_->setAxisTitle("Energy (GeV)", 1);
265  meZdcEneEmN3_->setAxisTitle("Counts", 2);
267  meZdcEneEmN4_ = ib.book1D("NZDC EM4 Energy", "Energy EM module N4", 4000, 0., 8000.);
268  meZdcEneEmN4_->setAxisTitle("Energy (GeV)", 1);
269  meZdcEneEmN4_->setAxisTitle("Counts", 2);
271  meZdcEneEmN5_ = ib.book1D("NZDC EM5 Energy", "Energy EM module N5", 4000, 0., 8000.);
272  meZdcEneEmN5_->setAxisTitle("Energy (GeV)", 1);
273  meZdcEneEmN5_->setAxisTitle("Counts", 2);
275  meZdcEneHadN1_ = ib.book1D("NZDC HAD1 Energy", "Energy HAD module N1", 4000, 0., 8000.);
276  meZdcEneHadN1_->setAxisTitle("Energy (GeV)", 1);
277  meZdcEneHadN1_->setAxisTitle("Counts", 2);
279  meZdcEneHadN2_ = ib.book1D("NZDC HAD2 Energy", "Energy HAD module N2", 4000, 0., 8000.);
280  meZdcEneHadN2_->setAxisTitle("Energy (GeV)", 1);
281  meZdcEneHadN2_->setAxisTitle("Counts", 2);
283  meZdcEneHadN3_ = ib.book1D("NZDC HAD3 Energy", "Energy HAD module N3", 4000, 0., 8000.);
284  meZdcEneHadN3_->setAxisTitle("Energy (GeV)", 1);
285  meZdcEneHadN3_->setAxisTitle("Counts", 2);
287  meZdcEneHadN4_ = ib.book1D("NZDC HAD4 Energy", "Energy HAD module N4", 4000, 0., 8000.);
288  meZdcEneHadN4_->setAxisTitle("Energy (GeV)", 1);
289  meZdcEneHadN4_->setAxisTitle("Counts", 2);
291  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/Excess_Info/Individual_ChannelvsTime/NZDC");
292  meZdcEneTEmN1_ = ib.book2D("NZDC EM1 Energy vs Time", "Energy EM mod N1 vs Time", 4000, 0., 8000., 300, 0., 600.);
293  meZdcEneTEmN1_->setAxisTitle("Energy (GeV)", 1);
294  meZdcEneTEmN1_->setAxisTitle("Time (ns)", 2);
296  meZdcEneTEmN2_ = ib.book2D("NZDC EM2 Energy vs Time", "Energy EM mod N2 vs Time", 4000, 0., 8000., 300, 0., 600.);
297  meZdcEneTEmN2_->setAxisTitle("Energy (GeV)", 1);
298  meZdcEneTEmN2_->setAxisTitle("Time (ns)", 2);
300  meZdcEneTEmN3_ = ib.book2D("NZDC EM3 Energy vs Time", "Energy EM mod N3 vs Time", 4000, 0., 8000., 300, 0., 600.);
301  meZdcEneTEmN3_->setAxisTitle("Energy (GeV)", 1);
302  meZdcEneTEmN3_->setAxisTitle("Time (ns)", 2);
304  meZdcEneTEmN4_ = ib.book2D("NZDC EM4 Energy vs Time", "Energy EM mod N4 vs Time", 4000, 0., 8000., 300, 0., 600.);
305  meZdcEneTEmN4_->setAxisTitle("Energy (GeV)", 1);
306  meZdcEneTEmN4_->setAxisTitle("Time (ns)", 2);
308  meZdcEneTEmN5_ = ib.book2D("NZDC EM5 Energy vs Time", "Energy EM mod N5 vs Time", 4000, 0., 8000., 300, 0., 600.);
309  meZdcEneTEmN5_->setAxisTitle("Energy (GeV)", 1);
310  meZdcEneTEmN5_->setAxisTitle("Time (ns)", 2);
313  ib.book2D("NZDC HAD1 Energy vs Time", "Energy HAD mod N1 vs Time", 4000, 0., 8000., 300, 0., 600.);
314  meZdcEneTHadN1_->setAxisTitle("Energy (GeV)", 1);
315  meZdcEneTHadN1_->setAxisTitle("Time (ns)", 2);
318  ib.book2D("NZDC HAD2 Energy vs Time", "Energy HAD mod N2 vs Time", 4000, 0., 8000., 300, 0., 600.);
319  meZdcEneTHadN2_->setAxisTitle("Energy (GeV)", 1);
320  meZdcEneTHadN2_->setAxisTitle("Time (ns)", 2);
323  ib.book2D("NZDC HAD3 Energy vs Time", "Energy HAD mod N3 vs Time", 4000, 0., 8000., 300, 0., 600.);
324  meZdcEneTHadN3_->setAxisTitle("Energy (GeV)", 1);
325  meZdcEneTHadN3_->setAxisTitle("Time (ns)", 2);
328  ib.book2D("NZDC HAD4 Energy vs Time", "Energy HAD mod N4 vs Time", 4000, 0., 8000., 300, 0., 600.);
329  meZdcEneTHadN4_->setAxisTitle("Energy (GeV)", 1);
330  meZdcEneTHadN4_->setAxisTitle("Time (ns)", 2);
332  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/ENERGY_SUMS/NZDC");
333  meZdcEneHadNTot_ = ib.book1D("NZDC EHAD", "Total N-ZDC HAD Energy", 4000, 0., 4000.);
334  meZdcEneHadNTot_->setAxisTitle("Counts", 2);
335  meZdcEneHadNTot_->setAxisTitle("Energy (GeV)", 1);
337  meZdcEneEmNTot_ = ib.book1D("NZDC EEM", "Total N-ZDC EM Energy", 3000, 0., 3000.);
338  meZdcEneEmNTot_->setAxisTitle("Counts", 2);
339  meZdcEneEmNTot_->setAxisTitle("Energy (GeV)", 1);
341  meZdcEneNTot_ = ib.book1D("NZDC ETOT", "Total N-ZDC Energy ", 7000, 0., 7000.);
342  meZdcEneNTot_->setAxisTitle("Counts", 2);
343  meZdcEneNTot_->setAxisTitle("Energy (GeV)", 1);
345  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/ENERGY_SUMS/Individual_Channels/PZDC");
346  meZdcEneEmP1_ = ib.book1D("PZDC EM1 Energy", "Energy EM module P1", 3000, 0., 3000.);
347  meZdcEneEmP1_->setAxisTitle("Energy (GeV)", 1);
348  meZdcEneEmP1_->setAxisTitle("Counts", 2);
350  meZdcEneEmP2_ = ib.book1D("PZDC EM2 Energy", "Energy EM module P2", 3000, 0., 3000.);
351  meZdcEneEmP2_->setAxisTitle("Energy (GeV)", 1);
352  meZdcEneEmP2_->setAxisTitle("Counts", 2);
354  meZdcEneEmP3_ = ib.book1D("PZDC EM3 Energy", "Energy EM module P3", 3000, 0., 3000.);
355  meZdcEneEmP3_->setAxisTitle("Energy (GeV)", 1);
356  meZdcEneEmP3_->setAxisTitle("Counts", 2);
358  meZdcEneEmP4_ = ib.book1D("PZDC EM4 Energy", "Energy EM module P4", 3000, 0., 3000.);
359  meZdcEneEmP4_->setAxisTitle("Energy (GeV)", 1);
360  meZdcEneEmP4_->setAxisTitle("Counts", 2);
362  meZdcEneEmP5_ = ib.book1D("PZDC EM5 Energy", "Energy EM module P5", 3000, 0., 3000.);
363  meZdcEneEmP5_->setAxisTitle("Energy (GeV)", 1);
364  meZdcEneEmP5_->setAxisTitle("Counts", 2);
366  meZdcEneHadP1_ = ib.book1D("PZDC HAD1 Energy", "Energy HAD module P1", 3000, 0., 3000.);
367  meZdcEneHadP1_->setAxisTitle("Energy (GeV)", 1);
368  meZdcEneHadP1_->setAxisTitle("Counts", 2);
370  meZdcEneHadP2_ = ib.book1D("PZDC HAD2 Energy", "Energy HAD module P2", 3000, 0., 3000.);
371  meZdcEneHadP2_->setAxisTitle("Energy (GeV)", 1);
372  meZdcEneHadP2_->setAxisTitle("Counts", 2);
374  meZdcEneHadP3_ = ib.book1D("PZDC HAD3 Energy", "Energy HAD module P3", 3000, 0., 3000.);
375  meZdcEneHadP3_->setAxisTitle("Energy (GeV)", 1);
376  meZdcEneHadP3_->setAxisTitle("Counts", 2);
378  meZdcEneHadP4_ = ib.book1D("PZDC HAD4 Energy", "Energy HAD module P4", 3000, 0., 3000.);
379  meZdcEneHadP4_->setAxisTitle("Energy (GeV)", 1);
380  meZdcEneHadP4_->setAxisTitle("Counts", 2);
382  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/Excess_Info/Individual_ChannelvsTime/PZDC");
383  meZdcEneTEmP1_ = ib.book2D("PZDC EM1 Energy vs Time", "Energy EM mod P1 vs Time", 4000, 0., 8000., 300, 0., 600.);
384  meZdcEneTEmP1_->setAxisTitle("Energy (GeV)", 1);
385  meZdcEneTEmP1_->setAxisTitle("Time (ns)", 2);
387  meZdcEneTEmP2_ = ib.book2D("PZDC EM2 Energy vs Time", "Energy EM mod P2 vs Time", 4000, 0., 8000., 300, 0., 600.);
388  meZdcEneTEmP2_->setAxisTitle("Energy (GeV)", 1);
389  meZdcEneTEmP2_->setAxisTitle("Time (ns)", 2);
391  meZdcEneTEmP3_ = ib.book2D("PZDC EM3 Energy vs Time", "Energy EM mod P3 vs Time", 4000, 0., 8000., 300, 0., 600.);
392  meZdcEneTEmP3_->setAxisTitle("Energy (GeV)", 1);
393  meZdcEneTEmP3_->setAxisTitle("Time (ns)", 2);
395  meZdcEneTEmP4_ = ib.book2D("PZDC EM4 Energy vs Time", "Energy EM mod P4 vs Time", 4000, 0., 8000., 300, 0., 600.);
396  meZdcEneTEmP4_->setAxisTitle("Energy (GeV)", 1);
397  meZdcEneTEmP4_->setAxisTitle("Time (ns)", 2);
399  meZdcEneTEmP5_ = ib.book2D("PZDC EM5 Energy vs Time", "Energy EM mod P5 vs Time", 4000, 0., 8000., 300, 0., 600.);
400  meZdcEneTEmP5_->setAxisTitle("Energy (GeV)", 1);
401  meZdcEneTEmP5_->setAxisTitle("Time (ns)", 2);
404  ib.book2D("PZDC HAD1 Energy vs Time", "Energy HAD mod P1 vs Time", 4000, 0., 8000., 300, 0., 600.);
405  meZdcEneTHadP1_->setAxisTitle("Energy (GeV)", 1);
406  meZdcEneTHadP1_->setAxisTitle("Time (ns)", 2);
409  ib.book2D("PZDC HAD2 Energy vs Time", "Energy HAD mod P2 vs Time", 4000, 0., 8000., 300, 0., 600.);
410  meZdcEneTHadP2_->setAxisTitle("Energy (GeV)", 1);
411  meZdcEneTHadP2_->setAxisTitle("Time (ns)", 2);
414  ib.book2D("PZDC HAD3 Energy vs Time", "Energy HAD mod P3 vs Time", 4000, 0., 8000., 300, 0., 600.);
415  meZdcEneTHadP3_->setAxisTitle("Energy (GeV)", 1);
416  meZdcEneTHadP3_->setAxisTitle("Time (ns)", 2);
419  ib.book2D("PZDC HAD4 Energy vs Time", "Energy HAD mod P4 vs Time", 4000, 0., 8000., 300, 0., 600.);
420  meZdcEneTHadP4_->setAxisTitle("Energy (GeV)", 1);
421  meZdcEneTHadP4_->setAxisTitle("Time (ns)", 2);
423  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/ENERGY_SUMS/PZDC");
424  meZdcEneHadPTot_ = ib.book1D("PZDC EHAD", "Total P-ZDC HAD Energy", 10000, 0., 10000.);
425  meZdcEneHadPTot_->setAxisTitle("Energy (GeV)", 1);
426  meZdcEneHadPTot_->setAxisTitle("Counts", 2);
428  meZdcEneEmPTot_ = ib.book1D("PZDC EEM", "Total P-ZDC EM Energy", 10000, 0., 10000.);
429  meZdcEneEmPTot_->setAxisTitle("Energy (GeV)", 1);
430  meZdcEneEmPTot_->setAxisTitle("Counts", 2);
432  meZdcEnePTot_ = ib.book1D("PZDC ETOT", "Total P-ZDC Energy", 10000, 0., 10000.);
433  meZdcEnePTot_->setAxisTitle("Energy (GeV)", 1);
434  meZdcEnePTot_->setAxisTitle("Counts", 2);
436  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/ENERGY_SUMS/NZDC");
437  meZdcCorEEmNEHadN_ = ib.book2D("NZDC EMvHAD", "N-ZDC Energy EM vs HAD", 3000, 0., 3000., 3000, 0., 3000.);
438  meZdcCorEEmNEHadN_->setAxisTitle("EM Energy (GeV)", 1);
439  meZdcCorEEmNEHadN_->setAxisTitle("HAD Energy (GeV)", 2);
441  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/ENERGY_SUMS/PZDC");
442  meZdcCorEEmPEHadP_ = ib.book2D("PZDC EMvHAD", "P-ZDC Energy EM vs HAD", 3000, 0., 3000., 3000, 0., 3000.);
443  meZdcCorEEmPEHadP_->setAxisTitle("EM Energy (GeV)", 1);
444  meZdcCorEEmPEHadP_->setAxisTitle("HAD Energy (GeV)", 2);
446  ib.setCurrentFolder("ZDCValidation/ZdcSimHits/ENERGY_SUMS");
447  meZdcCorEtotNEtotP_ = ib.book2D("PZDC vs NZDC", "Energy N-ZDC vs P-ZDC", 3000, 0., 3000., 3000, 0., 3000.);
448  meZdcCorEtotNEtotP_->setAxisTitle("N-ZDC Total Energy (GeV)", 1);
449  meZdcCorEtotNEtotP_->setAxisTitle("P-ZDC Total Energy (GeV)", 2);
451  meZdcEneTot_ = ib.book1D("ETOT ZDCs", "Total Energy ZDCs", 3000, 0., 3000.);
452  meZdcEneTot_->setAxisTitle("Counts", 2);
453  meZdcEneTot_->setAxisTitle("Energy (GeV)", 1);
455 
457 
460  ib.setCurrentFolder("ZDCValidation/GenParticles/Forward");
463  genpart_Pi0F = ib.book2D("Pi0_Forward", "Forward Generated Pi0s", 200, 7.5, 13, 100, -3.15, 3.15);
464  genpart_Pi0F->setAxisTitle("Eta", 1);
465  genpart_Pi0F->setAxisTitle("Phi (radians)", 2);
466  genpart_Pi0F->setAxisTitle("Energy (GeV)", 3);
467  genpart_Pi0F->setOption("lego2z,prof");
468  genpart_Pi0F->getTH2F()->SetTitleOffset(1.4, "x");
469  genpart_Pi0F->getTH2F()->SetTitleOffset(1.4, "y");
470 
472  ib.book2D("Pi0_Forward_Counts", "Number of Forward Generated Pi0s", 200, 7.5, 13, 100, -3.15, 3.15);
473  genpart_Pi0F_counts->setAxisTitle("#eta", 1);
474  genpart_Pi0F_counts->setAxisTitle("#phi (radians)", 2);
475  genpart_Pi0F_counts->setAxisTitle("Energy (GeV)", 3);
476  genpart_Pi0F_counts->setOption("lego2z,prof");
477  genpart_Pi0F_counts->getTH2F()->SetTitleOffset(1.4, "x");
478  genpart_Pi0F_counts->getTH2F()->SetTitleOffset(1.4, "y");
479 
482  genpart_NeutF = ib.book2D("Neutron_Forward", "Forward Generated Neutrons", 200, 7.5, 13, 100, -3.15, 3.15);
483  genpart_NeutF->setAxisTitle("Eta", 1);
484  genpart_NeutF->setAxisTitle("Phi (radians)", 2);
485  genpart_NeutF->setAxisTitle("Energy (GeV)", 3);
486  genpart_NeutF->setOption("lego2z,prof");
487  genpart_NeutF->getTH2F()->SetTitleOffset(1.4, "x");
488  genpart_NeutF->getTH2F()->SetTitleOffset(1.4, "y");
489 
491  ib.book2D("Neutron_Forward_Counts", "Number of Forward Generated Neutrons", 200, 7.5, 13, 100, -3.15, 3.15);
493  genpart_NeutF_counts->setAxisTitle("#phi (radians)", 2);
494  genpart_NeutF_counts->setAxisTitle("Energy (GeV)", 3);
495  genpart_NeutF_counts->setOption("lego2z,prof");
496  genpart_NeutF_counts->getTH2F()->SetTitleOffset(1.4, "x");
497  genpart_NeutF_counts->getTH2F()->SetTitleOffset(1.4, "y");
498 
501  genpart_GammaF = ib.book2D("Gamma_Forward", "Forward Generated Gammas", 200, 7.5, 13, 100, -3.15, 3.15);
502  genpart_GammaF->setAxisTitle("Eta", 1);
503  genpart_GammaF->setAxisTitle("Phi (radians)", 2);
504  genpart_GammaF->setAxisTitle("Energy (GeV)", 3);
505  genpart_GammaF->setOption("lego2z,prof");
506  genpart_GammaF->getTH2F()->SetTitleOffset(1.4, "x");
507  genpart_GammaF->getTH2F()->SetTitleOffset(1.4, "y");
508 
510  ib.book2D("Gamma_Forward_Counts", "Number of Forward Generated Gammas", 200, 7.5, 13, 100, -3.15, 3.15);
512  genpart_GammaF_counts->setAxisTitle("#phi (radians)", 2);
513  genpart_GammaF_counts->setAxisTitle("Energy (GeV)", 3);
514  genpart_GammaF_counts->setOption("lego2z,prof");
515  genpart_GammaF_counts->getTH2F()->SetTitleOffset(1.4, "x");
516  genpart_GammaF_counts->getTH2F()->SetTitleOffset(1.4, "y");
517 
520  genpart_Pi0F_energydist = ib.book1D("Pi0_Forward_EDistribution", "Gen-Level Forward Pi0 Energy", 1500, 0, 1500);
521  genpart_Pi0F_energydist->setAxisTitle("Energy (GeV)", 1);
525  genpart_NeutF_energydist = ib.book1D("N_Forward_EDistribution", "Gen-Level Forward Neutron Energy", 1500, 0, 1500);
526  genpart_NeutF_energydist->setAxisTitle("Energy (GeV)", 1);
531  ib.book1D("Gamma_Forward_EDistribution", "Gen-Level Fowarad Gamma Energy", 1500, 0, 1500);
532  genpart_GammaF_energydist->setAxisTitle("Energy (GeV)", 1);
535  ib.setCurrentFolder("ZDCValidation/GenParticles/Backward");
538  genpart_Pi0B = ib.book2D("Pi0_Backward", "Backward Generated Pi0s", 1000, -13, -7.5, 100, -3.15, 3.15);
539  genpart_Pi0B->setAxisTitle("Eta", 1);
540  genpart_Pi0B->setAxisTitle("Phi (radians)", 2);
541  genpart_Pi0B->setAxisTitle("Energy (GeV)", 3);
542  genpart_Pi0B->setOption("lego2z,prof");
543  genpart_Pi0B->getTH2F()->SetTitleOffset(1.4, "x");
544  genpart_Pi0B->getTH2F()->SetTitleOffset(1.4, "y");
545 
547  ib.book2D("Pi0_Backwards_Counts", "Number of Backward Generated Pi0s", 200, -13, -7.5, 100, -3.15, 3.15);
548  genpart_Pi0B_counts->setAxisTitle("#eta", 1);
549  genpart_Pi0B_counts->setAxisTitle("#phi (radians)", 2);
550  genpart_Pi0B_counts->setAxisTitle("Energy (GeV)", 3);
551  genpart_Pi0B_counts->setOption("lego2z,prof");
552  genpart_Pi0B_counts->getTH2F()->SetTitleOffset(1.4, "x");
553  genpart_Pi0B_counts->getTH2F()->SetTitleOffset(1.4, "y");
554 
557  genpart_NeutB = ib.book2D("Neutron_Backward", "Backward Generated Neutrons", 1000, -13, -7.5, 100, -3.15, 3.15);
558  genpart_NeutB->setAxisTitle("Eta", 1);
559  genpart_NeutB->setAxisTitle("Phi (radians)", 2);
560  genpart_NeutB->setAxisTitle("Energy (GeV)", 3);
561  genpart_NeutB->setOption("lego2z,prof");
562  genpart_NeutB->getTH2F()->SetTitleOffset(1.4, "x");
563  genpart_NeutB->getTH2F()->SetTitleOffset(1.4, "y");
564 
566  "Neutron_Backwards_Counts", "Number of Backward Generated Neutrons", 200, -13, -7.5, 100, -3.15, 3.15);
568  genpart_NeutB_counts->setAxisTitle("#phi (radians)", 2);
569  genpart_NeutB_counts->setAxisTitle("Energy (GeV)", 3);
570  genpart_NeutB_counts->setOption("lego2z,prof");
571  genpart_NeutB_counts->getTH2F()->SetTitleOffset(1.4, "x");
572  genpart_NeutB_counts->getTH2F()->SetTitleOffset(1.4, "y");
573 
575  genpart_GammaB = ib.book2D("Gamma_Backward", "Backward Generated Gammas", 1000, -13, -7.5, 100, -3.15, 3.15);
576  genpart_GammaB->setAxisTitle("Eta", 1);
577  genpart_GammaB->setAxisTitle("Phi (radians)", 2);
578  genpart_GammaB->setAxisTitle("Energy (GeV)", 3);
579  genpart_GammaB->setOption("lego2z,prof");
580  genpart_GammaB->getTH2F()->SetTitleOffset(1.4, "x");
581  genpart_GammaB->getTH2F()->SetTitleOffset(1.4, "y");
582 
584  ib.book2D("Gamma_Backwards_Counts", "Number of Backward Generated Gammas", 200, -13, -7.5, 100, -3.15, 3.15);
586  genpart_GammaB_counts->setAxisTitle("#phi (radians)", 2);
587  genpart_GammaB_counts->setAxisTitle("Energy (GeV)", 3);
588  genpart_GammaB_counts->setOption("lego2z,prof");
589  genpart_GammaB_counts->getTH2F()->SetTitleOffset(1.4, "x");
590  genpart_GammaB_counts->getTH2F()->SetTitleOffset(1.4, "y");
591 
596  genpart_Pi0B_energydist = ib.book1D("Pi0_Backward_EDistribution", "Gen-Level Backward Pi0 Energy", 1500, 0, 1500);
597  genpart_Pi0B_energydist->setAxisTitle("Energy (GeV)", 1);
601  genpart_NeutB_energydist = ib.book1D("N_Backward_EDistribution", "Gen-Level Foward Neutron Energy", 1500, 0, 1500);
602  genpart_NeutB_energydist->setAxisTitle("Energy (GeV)", 1);
607  ib.book1D("Gamma_Backward_EDistribution", "Gen-Level Backward Gamma Energy", 1500, 0, 1500);
608  genpart_GammaB_energydist->setAxisTitle("Energy (GeV)", 1);
611  }
612 }
613 
614 // let's see if this breaks anything
615 /*void ZdcSimHitStudy::endJob() {
616  if (dbe_ && outFile_.size() > 0) dbe_->save(outFile_);
617  }*/
618 
619 // void ZdcSimHitStudy::analyze(const edm::Event& e, const edm::EventSetup& ) {
622 
623  using namespace edm;
624  bool gotGenParticles = true;
625 
627 
628  if (!(iEvent.getByToken(tok_gen_, genhandle))) {
629  gotGenParticles = false; // this is the same kind of boolean except for the
630  // genparticles collection
631  }
632  if (!(genhandle.isValid())) {
633  gotGenParticles = false;
634  }
635 
636  // Handle<edm::PCaloHitContainer> zdcsimhandle;
637 
640 
641  if (gotGenParticles == true) { // if the boolean was able to find the leaf
642  // "genparticles" then do this
643  for (reco::GenParticleCollection::const_iterator gen = genhandle->begin(); gen != genhandle->end();
644  ++gen) // here we iterate over all generated particles
645  {
646  // double energy=gen->energy();
647  reco::GenParticle thisParticle = (reco::GenParticle)(*gen); // get the particle "gen" points to
648  double energy_2 = thisParticle.energy(); // here I grab some of the attributes of the generated
649  // particle....like its energy, its phi and its eta and
650  // what kind of particle it is
651  double gen_phi = thisParticle.phi();
652  double gen_eta = thisParticle.eta();
653  int gen_id = thisParticle.pdgId();
654 
655  if (gen_id == 111) { // here i require a pi0
656  if (gen_eta > 8.3) { // eta requirement
657 
659  //# IMPORTANT IMPORTANT IMPORTANT IMPORTANT #
660  //# The real eta of the ZDC is |eta| > 8.3, I have only changed it
661  // here to 3 because# # in the PG simulation the ZDC is at an eta of
662  // about 4.5-7, in the real GEANT the # # ZDC is in its appropriate
663  // place at the very foward region...please edit this if # # looking
664  // at MinBias data or the like # # # # IMPORTANT IMPORTANT
665  // IMPORTANT IMPORTANT #
667 
668  genpart_Pi0F->Fill(gen_eta, gen_phi, energy_2); // fill the lego plot
669  genpart_Pi0F_counts->Fill(gen_eta, gen_phi, 1);
670  // genpart_Pi0F_profile->Fill(gen_eta,gen_phi,energy_2);
671  genpart_Pi0F_energydist->Fill(energy_2); // fill the 1D distribution
672  }
673  if (gen_eta < -8.3) { // neg eta requirement
674  genpart_Pi0B->Fill(gen_eta, gen_phi, energy_2);
675  // genpart_Pi0B_profile->Fill(gen_eta,gen_phi,energy_2);
676  genpart_Pi0B_counts->Fill(gen_eta, gen_phi, 1);
677  genpart_Pi0B_energydist->Fill(energy_2);
678  }
679  }
680  if (gen_id == 2112) { // require neutron
681  if (gen_eta > 8.3) {
682  genpart_NeutF->Fill(gen_eta, gen_phi, energy_2);
683  // genpart_NeutF_profile->Fill(gen_eta,gen_phi,energy_2);
684  genpart_NeutF_counts->Fill(gen_eta, gen_phi, 1);
685  genpart_NeutF_energydist->Fill(energy_2);
686  }
687  if (gen_eta < -8.3) {
688  genpart_NeutB->Fill(gen_eta, gen_phi, energy_2);
689  // genpart_NeutB_profile->Fill(gen_eta,gen_phi,energy_2);
690  genpart_NeutB_counts->Fill(gen_eta, gen_phi, 1);
691  genpart_NeutB_energydist->Fill(energy_2);
692  }
693  }
694 
695  if (gen_id == 22) { // require gamma
696  if (gen_eta > 8.3) {
697  genpart_GammaF->Fill(gen_eta, gen_phi, energy_2);
698  // genpart_GammaF_profile->Fill(gen_eta,gen_phi,energy_2);
699  genpart_GammaF_counts->Fill(gen_eta, gen_phi, 1);
700  genpart_GammaF_energydist->Fill(energy_2);
701  }
702  if (gen_eta < -8.3) {
703  genpart_GammaB->Fill(gen_eta, gen_phi, energy_2);
704  // genpart_GammaB_profile->Fill(gen_eta,gen_phi,energy_2);
705  genpart_GammaB_counts->Fill(gen_eta, gen_phi, 1);
706  genpart_GammaB_energydist->Fill(energy_2);
707  }
708  }
709 
710  } // end of GEN loop
711  }
712 
714 
715  // Below is the old script which I will comment later
716 
717  edm::LogVerbatim("ZdcSimHitStudy") << "Run = " << iEvent.id().run() << " Event = " << iEvent.id().event();
718 
719  std::vector<PCaloHit> caloHits;
721 
722  bool getHits = false;
723  if (checkHit_) {
724  iEvent.getByToken(tok_hits_, hitsZdc);
725  if (hitsZdc.isValid())
726  getHits = true;
727  }
728 
729  edm::LogVerbatim("ZdcSim") << "ZdcValidation: Input flags Hits " << getHits;
730 
731  if (getHits) {
732  caloHits.insert(caloHits.end(), hitsZdc->begin(), hitsZdc->end());
733  edm::LogVerbatim("ZdcSimHitStudy") << "ZdcValidation: Hit buffer " << caloHits.size();
734  analyzeHits(caloHits);
735  }
736 }
737 
738 void ZdcSimHitStudy::analyzeHits(std::vector<PCaloHit> &hits) {
739  int nHit = hits.size();
740  int nZdcEM = 0, nZdcHad = 0, nZdcLum = 0;
741  int nBad1 = 0, nBad2 = 0, nBad = 0;
742  std::vector<double> encontZdcEM(140, 0.);
743  std::vector<double> encontZdcHad(140, 0.);
744  double entotZdcEM = 0;
745  double entotZdcHad = 0;
746 
747  enetotEmN = 0;
748  enetotHadN = 0.;
749  enetotN = 0;
750  enetotEmP = 0;
751  enetotHadP = 0;
752  enetotP = 0;
753  enetot = 0;
754 
755  for (int i = 0; i < nHit; i++) {
756  double energy = hits[i].energy();
757  double log10en = log10(energy);
758  int log10i = int((log10en + 10.) * 10.);
759  double time = hits[i].time();
760  unsigned int id_ = hits[i].id();
761  HcalZDCDetId id = HcalZDCDetId(id_);
762  int det = id.det();
763  int side = id.zside();
764  int section = id.section();
765  int channel = id.channel();
766 
767  FillHitValHist(side, section, channel, energy, time);
768 
769  edm::LogVerbatim("ZdcSimHitStudy") << "Hit[" << i << "] ID " << std::hex << id_ << std::dec << " DetID " << id
770  << " Det " << det << " side " << side << " Section " << section << " channel "
771  << channel << " E " << energy << " time \n"
772  << time;
773 
774  if (det == 5) { // Check DetId.h
775  if (section == HcalZDCDetId::EM)
776  nZdcEM++;
777  else if (section == HcalZDCDetId::HAD)
778  nZdcHad++;
779  else if (section == HcalZDCDetId::LUM)
780  nZdcLum++;
781  else {
782  nBad++;
783  nBad2++;
784  }
785  } else {
786  nBad++;
787  nBad1++;
788  }
789 
790  meZdcDetectHit_->Fill(double(det));
791  if (det == 5) {
792  meZdcSideHit_->Fill(double(side));
793  meZdcSectionHit_->Fill(double(section));
794  meZdcChannelHit_->Fill(double(channel));
795  meZdcEnergyHit_->Fill(energy);
796  if (section == HcalZDCDetId::EM) {
797  meZdcEMEnergyHit_->Fill(energy);
798  meZdcEEMCh_->Fill(energy, channel);
799  if (log10i >= 0 && log10i < 140)
800  encontZdcEM[log10i] += energy;
801  entotZdcEM += energy;
802  }
803  if (section == HcalZDCDetId::HAD) {
804  meZdcHadEnergyHit_->Fill(energy);
805  meZdcEHadCh_->Fill(energy, channel);
806  if (log10i >= 0 && log10i < 140)
807  encontZdcHad[log10i] += energy;
808  entotZdcHad += energy;
809  }
810  meZdcTimeHit_->Fill(time);
811  meZdcTimeWHit_->Fill(double(time), energy);
812  meZdc10Ene_->Fill(log10en);
813  meZdcETime_->Fill(energy, double(time));
814  }
815  }
816 
817  if (entotZdcEM != 0)
818  for (int i = 0; i < 140; i++)
819  meZdcEML10EneP_->Fill(-10. + (float(i) + 0.5) / 10., encontZdcEM[i] / entotZdcEM);
820  if (entotZdcHad != 0)
821  for (int i = 0; i < 140; i++)
822  meZdcHadL10EneP_->Fill(-10. + (float(i) + 0.5) / 10., encontZdcHad[i] / entotZdcHad);
823 
824  if (nHit > 0) {
825  meAllZdcNHit_->Fill(double(nHit));
826  meBadZdcDetHit_->Fill(double(nBad1));
827  meBadZdcSecHit_->Fill(double(nBad2));
828  meBadZdcIdHit_->Fill(double(nBad));
829  meZdcNHitEM_->Fill(double(nZdcEM));
830  meZdcNHitHad_->Fill(double(nZdcHad));
831  meZdcNHitLum_->Fill(double(nZdcLum));
842  }
843  edm::LogVerbatim("HcalSimHitStudy") << "HcalSimHitStudy::analyzeHits: Had " << nZdcHad << " EM " << nZdcEM << " Bad "
844  << nBad << " All " << nHit;
845 }
846 
847 int ZdcSimHitStudy::FillHitValHist(int side, int section, int channel, double energy, double time) {
848  enetot += enetot;
849  if (side == -1) {
850  enetotN += energy;
851  if (section == HcalZDCDetId::EM) {
852  enetotEmN += energy;
853  switch (channel) {
854  case 1:
855  meZdcEneEmN1_->Fill(energy);
856  meZdcEneTEmN1_->Fill(energy, time);
857  break;
858  case 2:
859  meZdcEneEmN2_->Fill(energy);
860  meZdcEneTEmN2_->Fill(energy, time);
861  break;
862  case 3:
863  meZdcEneEmN3_->Fill(energy);
864  meZdcEneTEmN3_->Fill(energy, time);
865  break;
866  case 4:
867  meZdcEneEmN4_->Fill(energy);
868  meZdcEneTEmN4_->Fill(energy, time);
869  break;
870  case 5:
871  meZdcEneEmN4_->Fill(energy);
872  meZdcEneTEmN4_->Fill(energy, time);
873  break;
874  }
875  }
876  if (section == HcalZDCDetId::HAD) {
877  enetotHadN += energy;
878  switch (channel) {
879  case 1:
880  meZdcEneHadN1_->Fill(energy);
881  meZdcEneTHadN1_->Fill(energy, time);
882  break;
883  case 2:
884  meZdcEneHadN2_->Fill(energy);
885  meZdcEneTHadN2_->Fill(energy, time);
886  break;
887  case 3:
888  meZdcEneHadN3_->Fill(energy);
889  meZdcEneTHadN3_->Fill(energy, time);
890  break;
891  case 4:
892  meZdcEneHadN4_->Fill(energy);
893  meZdcEneTHadN4_->Fill(energy, time);
894  break;
895  }
896  }
897  }
898  if (side == 1) {
899  enetotP += energy;
900  if (section == HcalZDCDetId::EM) {
901  enetotEmP += energy;
902  switch (channel) {
903  case 1:
904  meZdcEneEmP1_->Fill(energy);
905  meZdcEneTEmP1_->Fill(energy, time);
906  break;
907  case 2:
908  meZdcEneEmP2_->Fill(energy);
909  meZdcEneTEmP2_->Fill(energy, time);
910  break;
911  case 3:
912  meZdcEneEmP3_->Fill(energy);
913  meZdcEneTEmP3_->Fill(energy, time);
914  break;
915  case 4:
916  meZdcEneEmP4_->Fill(energy);
917  meZdcEneTEmP4_->Fill(energy, time);
918  break;
919  case 5:
920  meZdcEneEmP4_->Fill(energy);
921  meZdcEneTEmP4_->Fill(energy, time);
922  break;
923  }
924  }
925  if (section == HcalZDCDetId::HAD) {
926  enetotHadP += energy;
927  switch (channel) {
928  case 1:
929  meZdcEneHadP1_->Fill(energy);
930  meZdcEneTHadP1_->Fill(energy, time);
931  break;
932  case 2:
933  meZdcEneHadP2_->Fill(energy);
934  meZdcEneTHadP2_->Fill(energy, time);
935  break;
936  case 3:
937  meZdcEneHadP3_->Fill(energy);
938  meZdcEneTHadP3_->Fill(energy, time);
939  break;
940  case 4:
941  meZdcEneHadP4_->Fill(energy);
942  meZdcEneTHadP4_->Fill(energy, time);
943  break;
944  }
945  }
946  }
947  return 0;
948 }
949 
952 
RunNumber_t run() const
Definition: EventID.h:38
MonitorElement * meZdcEneTHadP3_
Log< level::Info, true > LogVerbatim
MonitorElement * meZdcEnergyHit_
EventNumber_t event() const
Definition: EventID.h:40
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meZdcEneTEmN1_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const edm::EventSetup & c
MonitorElement * genpart_NeutB
void analyzeHits(std::vector< PCaloHit > &)
int ib
Definition: cuy.py:661
MonitorElement * genpart_Pi0F
MonitorElement * meZdcEneTEmP1_
MonitorElement * meZdcHadL10EneP_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * meZdcEneEmP3_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
MonitorElement * meZdcEneEmPTot_
MonitorElement * meZdcEneEmN1_
virtual void setOption(const char *option)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MonitorElement * meZdcEneTEmP4_
MonitorElement * meZdcEneHadN1_
MonitorElement * meZdcCorEEmNEHadN_
MonitorElement * meZdcEneEmN4_
MonitorElement * meZdcEneTHadN4_
MonitorElement * meZdcEneEmN5_
std::string outFile_
MonitorElement * meAllZdcNHit_
MonitorElement * genpart_Pi0F_energydist
MonitorElement * meZdcEneTEmN2_
MonitorElement * meZdcEneHadN4_
MonitorElement * genpart_GammaF_counts
MonitorElement * genpart_NeutF
MonitorElement * meZdcEneTHadN2_
MonitorElement * genpart_Pi0B
int pdgId() const final
PDG identifier.
MonitorElement * meZdcEneEmNTot_
void Fill(long long x)
MonitorElement * meZdcChannelHit_
MonitorElement * meZdcEneEmP2_
MonitorElement * meZdcEneHadP1_
MonitorElement * meZdcEML10EneP_
MonitorElement * meZdcEneTEmN5_
MonitorElement * meZdcEneEmN3_
MonitorElement * meZdcNHitHad_
MonitorElement * genpart_Pi0B_counts
MonitorElement * meBadZdcDetHit_
ZdcSimHitStudy(const edm::ParameterSet &ps)
int iEvent
Definition: GenABIO.cc:224
MonitorElement * genpart_GammaB_energydist
MonitorElement * meZdcEneTEmP5_
MonitorElement * genpart_Pi0F_counts
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
MonitorElement * meZdcEnePTot_
MonitorElement * meZdcEneTEmN4_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
MonitorElement * meZdcCorEEmPEHadP_
MonitorElement * meZdcEneTHadP2_
MonitorElement * genpart_GammaF_energydist
MonitorElement * meZdcSideHit_
MonitorElement * meZdcEneHadN3_
MonitorElement * meZdcEneEmN2_
MonitorElement * meZdcEneTHadN1_
MonitorElement * meZdcEneTEmP3_
MonitorElement * genpart_NeutF_energydist
MonitorElement * meZdcDetectHit_
MonitorElement * meZdc10Ene_
edm::EDGetTokenT< reco::GenParticleCollection > tok_gen_
MonitorElement * meZdcEneHadP4_
std::string zdcHits
int FillHitValHist(int side, int section, int channel, double energy, double time)
MonitorElement * meZdcEneTot_
MonitorElement * meZdcEneHadP3_
MonitorElement * genpart_GammaF
Log< level::Info, false > LogInfo
MonitorElement * meZdcEneTEmN3_
MonitorElement * meBadZdcSecHit_
MonitorElement * meZdcEneTHadP1_
MonitorElement * genpart_GammaB
MonitorElement * meZdcNHit_
MonitorElement * meZdcTimeHit_
MonitorElement * meBadZdcIdHit_
MonitorElement * meZdcEneTHadP4_
std::string g4Label
MonitorElement * meZdcEneHadNTot_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
MonitorElement * genpart_NeutB_energydist
MonitorElement * meZdcCorEtotNEtotP_
MonitorElement * genpart_NeutF_counts
MonitorElement * meZdcEneHadP2_
string section
Definition: vertexPlots.py:496
MonitorElement * meZdcEneEmP4_
MonitorElement * meZdcHadEnergyHit_
MonitorElement * genpart_Pi0B_energydist
MonitorElement * meZdcEneEmP5_
edm::EventID id() const
Definition: EventBase.h:59
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * meZdcEneTEmP2_
MonitorElement * genpart_GammaB_counts
MonitorElement * meZdcSectionHit_
MonitorElement * meZdcEneNTot_
MonitorElement * meZdcEneHadN2_
MonitorElement * meZdcEneHadPTot_
MonitorElement * meZdcEEMCh_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * genpart_NeutB_counts
MonitorElement * meZdcEneEmP1_
MonitorElement * meZdc10EneP_
MonitorElement * meZdcNHitEM_
double phi() const final
momentum azimuthal angle
MonitorElement * meZdcEneTHadN3_
MonitorElement * meZdcTimeWHit_
MonitorElement * meZdcEHadCh_
MonitorElement * meZdcETime_
Definition: Run.h:45
MonitorElement * meZdcEMEnergyHit_
MonitorElement * meZdcNHitLum_
~ZdcSimHitStudy() override
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
double energy() const final
energy
double eta() const final
momentum pseudorapidity