CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
ZDCDigiStudy Class Reference

#include <ZDCDigiStudy.h>

Inheritance diagram for ZDCDigiStudy:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ZDCDigiStudy (const edm::ParameterSet &ps)
 
 ~ZDCDigiStudy ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob ()
 
void endJob ()
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 
int FillHitValHist (int side, int section, int channel, double energy, double time)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

bool checkHit_
 
DQMStoredbe_
 
MonitorElementmeZdcfCNEMvHAD
 
MonitorElementmeZdcfCNHAD
 
MonitorElementmeZdcfCNTOT
 
MonitorElementmeZdcfCPEMvHAD
 
MonitorElementmeZdcfCPHAD
 
MonitorElementmeZdcfCPTOT
 
MonitorElementmeZdcNEM1fCvsTS
 
MonitorElementmeZdcNEM2fCvsTS
 
MonitorElementmeZdcNEM3fCvsTS
 
MonitorElementmeZdcNEM4fCvsTS
 
MonitorElementmeZdcNEM5fCvsTS
 
MonitorElementmeZdcNHAD1fCvsTS
 
MonitorElementmeZdcNHAD2fCvsTS
 
MonitorElementmeZdcNHAD3fCvsTS
 
MonitorElementmeZdcNHAD4fCvsTS
 
MonitorElementmeZdcPEM1fCvsTS
 
MonitorElementmeZdcPEM2fCvsTS
 
MonitorElementmeZdcPEM3fCvsTS
 
MonitorElementmeZdcPEM4fCvsTS
 
MonitorElementmeZdcPEM5fCvsTS
 
MonitorElementmeZdcPHAD1fCvsTS
 
MonitorElementmeZdcPHAD2fCvsTS
 
MonitorElementmeZdcPHAD3fCvsTS
 
MonitorElementmeZdcPHAD4fCvsTS
 
std::string outFile_
 
edm::EDGetTokenT
< ZDCDigiCollection
tok_zdc_
 
bool verbose_
 
std::string zdcHits
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 49 of file ZDCDigiStudy.h.

Constructor & Destructor Documentation

ZDCDigiStudy::ZDCDigiStudy ( const edm::ParameterSet ps)

Definition at line 30 of file ZDCDigiStudy.cc.

References checkHit_, dbe_, edm::ParameterSet::getUntrackedParameter(), cppFunctionSkipper::operator, outFile_, DQMStore::setVerbose(), DQMStore::showDirStructure(), AlCaHLTBitMon_QueryRunRegistry::string, tok_zdc_, verbose_, and zdcHits.

30  {
31 
32  zdcHits = ps.getUntrackedParameter<std::string>("HitCollection","ZdcHits");
33  outFile_ = ps.getUntrackedParameter<std::string>("outputFile", "zdcHitStudy.root");
34  verbose_ = ps.getUntrackedParameter<bool>("Verbose", false);
35  checkHit_= true;
36 
37  tok_zdc_ = consumes<ZDCDigiCollection>(edm::InputTag("simHcalUnsuppressedDigis"));
38 
39  edm::LogInfo("ZDCDigiStudy")
40  //std::cout
41  << " Hits: "
42  << zdcHits << " / "<< checkHit_
43  << " Output: " << outFile_;
44 
46  if (dbe_) {
47  if (verbose_) {
48  dbe_->setVerbose(1);
49  sleep (3);
51  } else {
52  dbe_->setVerbose(0);
53  }
54  }
55 }
T getUntrackedParameter(std::string const &, T const &) const
std::string zdcHits
Definition: ZDCDigiStudy.h:74
std::string outFile_
Definition: ZDCDigiStudy.h:74
void setVerbose(unsigned level)
Definition: DQMStore.cc:631
DQMStore * dbe_
Definition: ZDCDigiStudy.h:76
void showDirStructure(void) const
Definition: DQMStore.cc:3332
edm::EDGetTokenT< ZDCDigiCollection > tok_zdc_
Definition: ZDCDigiStudy.h:78
ZDCDigiStudy::~ZDCDigiStudy ( )

Definition at line 57 of file ZDCDigiStudy.cc.

57 {}

Member Function Documentation

void ZDCDigiStudy::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 215 of file ZDCDigiStudy.cc.

References HcalZDCDetId::channel(), MonitorElement::Fill(), edm::Event::getByToken(), i, ZDCDataFrame::id(), meZdcfCNEMvHAD, meZdcfCNHAD, meZdcfCNTOT, meZdcfCPEMvHAD, meZdcfCPHAD, meZdcfCPTOT, meZdcNEM1fCvsTS, meZdcNEM2fCvsTS, meZdcNEM3fCvsTS, meZdcNEM4fCvsTS, meZdcNEM5fCvsTS, meZdcNHAD1fCvsTS, meZdcNHAD2fCvsTS, meZdcNHAD3fCvsTS, meZdcNHAD4fCvsTS, meZdcPEM1fCvsTS, meZdcPEM2fCvsTS, meZdcPEM3fCvsTS, meZdcPEM4fCvsTS, meZdcPEM5fCvsTS, meZdcPHAD1fCvsTS, meZdcPHAD2fCvsTS, meZdcPHAD3fCvsTS, meZdcPHAD4fCvsTS, HcalQIESample::nominal_fC(), ZDCDataFrame::sample(), HcalZDCDetId::section(), ZDCDataFrame::size(), tok_zdc_, and HcalZDCDetId::zside().

215  {
217 
218  using namespace edm;
219  bool gotZDCDigis=true;
220 
221 
222  Handle<ZDCDigiCollection> zdchandle;
223  if (!(iEvent.getByToken(tok_zdc_,zdchandle)))
224  {
225  gotZDCDigis=false; //this is a boolean set up to check if there are ZDCDigis in the input root file
226  }
227  if (!(zdchandle.isValid()))
228  {
229  gotZDCDigis=false; //if it is not there, leave it false
230  }
231 
232  double totalPHADCharge=0;
233  double totalNHADCharge=0;
234  double totalPEMCharge=0;
235  double totalNEMCharge=0;
236  double totalPCharge=0;
237  double totalNCharge=0;
238 
239 
241  if (gotZDCDigis==true){
242  for (ZDCDigiCollection::const_iterator zdc = zdchandle->begin();
243  zdc!=zdchandle->end();
244  ++zdc)
245  {
246  const ZDCDataFrame digi = (const ZDCDataFrame)(*zdc);
247  //std::cout <<"CHANNEL = "<<zdc->id().channel()<<std::endl;
248 
249 
250 
252 
253  if (digi.id().section()==2){ // require HAD
254  if (digi.id().zside()==1)
255  { // require POS
256  for (int i=0;i<digi.size();++i) // loop over all 10 TS because each digi has 10 entries
257  {
258  if (digi.id().channel()==1){ //here i specify PHAD1
259  meZdcPHAD1fCvsTS->Fill(i,digi.sample(i).nominal_fC()); //filling the plot name with the nominal fC value for each TS
260  if (i==0) meZdcPHAD1fCvsTS->Fill(-1,1); // on first iteration of loop, increment underflow bin
261  }//NEW AVERAGE Thingy
262  if (digi.id().channel()==2){
264  if (i==0) meZdcPHAD2fCvsTS->Fill(-1,1);
265  }
266  if (digi.id().channel()==3){
268  if (i==0) meZdcPHAD3fCvsTS->Fill(-1,1);
269  }
270  if (digi.id().channel()==4){
272  if (i==0) meZdcPHAD4fCvsTS->Fill(-1,1);
273  }
274  totalPHADCharge+=digi.sample(i).nominal_fC(); //here i am looking for the total charge in PHAD so i sum over every TS and channel and add it up
275  } // loop over all (10) TS for the given digi
276  }
277  else {
278  for (int i=0; i<digi.size();++i)
279  {
280  if (digi.id().channel()==1){
282  if (i==0) meZdcNHAD1fCvsTS->Fill(-1,1);
283  }
284  if (digi.id().channel()==2){
286  if (i==0) meZdcNHAD2fCvsTS->Fill(-1,1);
287  }
288  if (digi.id().channel()==3){
290  if (i==0) meZdcNHAD3fCvsTS->Fill(-1,1);
291  }
292  if (digi.id().channel()==4){
294  if (i==0) meZdcNHAD4fCvsTS->Fill(-1,1);
295  }
296  totalNHADCharge+=digi.sample(i).nominal_fC();
297  }
298  }
299  }
301  if (digi.id().section()==1){//require EM....here i do the smae thing that i did above but now for P/N EM sections
302  if (digi.id().zside()==1)
303  {//require pos
304  for (int i=0;i<digi.size();++i)
305  {
306  if (digi.id().channel()==1){
308  if (i==0) meZdcPEM1fCvsTS->Fill(-1,1);
309  }
310  if (digi.id().channel()==2){
312  if (i==0) meZdcPEM2fCvsTS->Fill(-1,1);
313  }
314  if (digi.id().channel()==3){
316  if (i==0) meZdcPEM3fCvsTS->Fill(-1,1);
317  }
318  if (digi.id().channel()==4){
320  if (i==0) meZdcPEM4fCvsTS->Fill(-1,1);
321  }
322  if (digi.id().channel()==5){
324  if (i==0) meZdcPEM5fCvsTS->Fill(-1,1);
325  }
326  totalPEMCharge+=digi.sample(i).nominal_fC();
327  }
328  }
329  else {
330  for (int i=0;i<digi.size();++i)
331  {
332  if (digi.id().channel()==1){
334  if (i==0) meZdcNEM1fCvsTS->Fill(-1,1);
335  }
336  if (digi.id().channel()==2){
338  if (i==0) meZdcNEM2fCvsTS->Fill(-1,1);
339  }
340  if (digi.id().channel()==3){
342  if (i==0) meZdcNEM3fCvsTS->Fill(-1,1);
343  }
344  if (digi.id().channel()==4){
346  if (i==0) meZdcNEM4fCvsTS->Fill(-1,1);
347  }
348  if (digi.id().channel()==5){
350  if (i==0) meZdcNEM5fCvsTS->Fill(-1,1);
351  }
352  totalNEMCharge+=digi.sample(i).nominal_fC();
353  }
354  }
355  }
356 
357  totalPCharge=totalPHADCharge+totalPEMCharge;
358  totalNCharge=totalNHADCharge+totalNEMCharge;
359 
360  /* std::cout <<"CHANNEL = "<<digi.id().channel()<<std::endl;
361  for (int i=0;i<digi.size();++i)
362  std::cout <<"SAMPLE = "<<i<<" ADC = "<<digi.sample(i).adc()<<" fC = "<<digi.sample(i).nominal_fC()<<std::endl;
363  */
364  // digi[i] should be the sample as digi.sample(i), I think
365  } // loop on all (22) ZDC digis
366  }
368 
369 
370 
371 
372  // Now fill total charge histogram
373  meZdcfCPEMvHAD->Fill(totalPHADCharge,totalPEMCharge);
374  meZdcfCNEMvHAD->Fill(totalNHADCharge,totalNEMCharge);
375  meZdcfCPHAD->Fill(totalPHADCharge);
376  meZdcfCNHAD->Fill(totalNHADCharge);
377  meZdcfCNTOT->Fill(totalNCharge);
378  meZdcfCPTOT->Fill(totalPCharge);
379 
380 }
int i
Definition: DBlmapReader.cc:9
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:34
std::vector< ZDCDataFrame >::const_iterator const_iterator
MonitorElement * meZdcfCPTOT
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:97
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:84
void Fill(long long x)
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:105
int iEvent
Definition: GenABIO.cc:230
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:92
const HcalQIESample & sample(int i) const
access a sample
Definition: ZDCDataFrame.h:39
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:106
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:91
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:100
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:102
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:101
Section section() const
get the section
Definition: HcalZDCDetId.h:36
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:107
const HcalZDCDetId & id() const
Definition: ZDCDataFrame.h:22
double nominal_fC() const
get the nominal FC (no calibrations applied)
int channel() const
get the channel
Definition: HcalZDCDetId.h:40
int size() const
total number of samples in the digi
Definition: ZDCDataFrame.h:26
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:104
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:98
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:93
edm::EDGetTokenT< ZDCDigiCollection > tok_zdc_
Definition: ZDCDigiStudy.h:78
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:99
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:103
void ZDCDigiStudy::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 59 of file ZDCDigiStudy.cc.

References DQMStore::book1D(), DQMStore::book2D(), checkHit_, dbe_, MonitorElement::getTH2F(), meZdcfCNEMvHAD, meZdcfCNHAD, meZdcfCNTOT, meZdcfCPEMvHAD, meZdcfCPHAD, meZdcfCPTOT, meZdcNEM1fCvsTS, meZdcNEM2fCvsTS, meZdcNEM3fCvsTS, meZdcNEM4fCvsTS, meZdcNEM5fCvsTS, meZdcNHAD1fCvsTS, meZdcNHAD2fCvsTS, meZdcNHAD3fCvsTS, meZdcNHAD4fCvsTS, meZdcPEM1fCvsTS, meZdcPEM2fCvsTS, meZdcPEM3fCvsTS, meZdcPEM4fCvsTS, meZdcPEM5fCvsTS, meZdcPHAD1fCvsTS, meZdcPHAD2fCvsTS, meZdcPHAD3fCvsTS, meZdcPHAD4fCvsTS, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

59  {
60  if (dbe_) {
61  dbe_->setCurrentFolder("ZDCDigiValidation");
62  //Histograms for Hits
64 //# Below we are filling the histograms made in the .h file. The syntax is as follows: #
65 //# plot_code_name = dbe_->TypeofPlot[(1,2,3)-D,(F,I,D)]("Name as it will appear","Title",axis options); #
66 //# They will be stored in the TFile subdirectory set by : dbe_->setCurrentFolder("FolderIwant") #
67 //# axis options are like (#ofbins,min,max) #
69 
70 
71  if (checkHit_) {
72 
73 
75 
77  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/1D_fC");
78  meZdcfCPHAD = dbe_->book1D("PHAD_TotalfC","PZDC_HAD_TotalfC",1000,-50,950);
79  meZdcfCPHAD->setAxisTitle("Counts",2);
80  meZdcfCPHAD->setAxisTitle("fC",1);
82  meZdcfCPTOT = dbe_->book1D("PZDC_TotalfC","PZDC_TotalfC",1000,-50,950);
83  meZdcfCPTOT->setAxisTitle("Counts",2);
84  meZdcfCPTOT->setAxisTitle("fC",1);
86  meZdcfCNHAD = dbe_->book1D("NHAD_TotalfC","NZDC_HAD_TotalfC",1000,-50,950);
87  meZdcfCNHAD->setAxisTitle("Counts",2);
88  meZdcfCNHAD->setAxisTitle("fC",1);
90  meZdcfCNTOT = dbe_->book1D("NZDC_TotalfC","NZDC_TotalfC",1000,-50,950);
91  meZdcfCNTOT->setAxisTitle("Counts",2);
92  meZdcfCNTOT->setAxisTitle("fC",1);
94 
96  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/PZDC");
97 
99  meZdcPEM1fCvsTS = dbe_->book1D("PEM1_fCvsTS","P-EM1_AveragefC_vsTS",10,0,9);
100  meZdcPEM1fCvsTS->setAxisTitle("fC",2);
101  meZdcPEM1fCvsTS->setAxisTitle("TS",1);
104  meZdcPEM2fCvsTS = dbe_->book1D("PEM2_fCvsTS","P-EM2_AveragefC_vsTS",10,0,9);
105  meZdcPEM2fCvsTS->setAxisTitle("fC",2);
106  meZdcPEM2fCvsTS->setAxisTitle("TS",1);
109  meZdcPEM3fCvsTS = dbe_->book1D("PEM3_fCvsTS","P-EM3_AveragefC_vsTS",10,0,9);
110  meZdcPEM3fCvsTS->setAxisTitle("fC",2);
111  meZdcPEM3fCvsTS->setAxisTitle("TS",1);
114  meZdcPEM4fCvsTS = dbe_->book1D("PEM4_fCvsTS","P-EM4_AveragefC_vsTS",10,0,9);
115  meZdcPEM4fCvsTS->setAxisTitle("fC",2);
116  meZdcPEM4fCvsTS->setAxisTitle("TS",1);
119  meZdcPEM5fCvsTS = dbe_->book1D("PEM5_fCvsTS","P-EM5_AveragefC_vsTS",10,0,9);
120  meZdcPEM5fCvsTS->setAxisTitle("fC",2);
121  meZdcPEM5fCvsTS->setAxisTitle("TS",1);
124  meZdcPHAD1fCvsTS = dbe_->book1D("PHAD1_fCvsTS","P-HAD1_AveragefC_vsTS",10,0,9);
129  meZdcPHAD2fCvsTS = dbe_->book1D("PHAD2_fCvsTS","P-HAD2_AveragefC_vsTS",10,0,9);
134  meZdcPHAD3fCvsTS = dbe_->book1D("PHAD3_fCvsTS","P-HAD3_AveragefC_vsTS",10,0,9);
139  meZdcPHAD4fCvsTS = dbe_->book1D("PHAD4_fCvsTS","P-HAD4_AveragefC_vsTS",10,0,9);
143  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/NZDC");
144 
146  meZdcNEM1fCvsTS = dbe_->book1D("NEM1_fCvsTS","N-EM1_AveragefC_vsTS",10,0,9);
147  meZdcNEM1fCvsTS->setAxisTitle("fC",2);
148  meZdcNEM1fCvsTS->setAxisTitle("TS",1);
151  meZdcNEM2fCvsTS = dbe_->book1D("NEM2_fCvsTS","N-EM2_AveragefC_vsTS",10,0,9);
152  meZdcNEM2fCvsTS->setAxisTitle("fC",2);
153  meZdcNEM2fCvsTS->setAxisTitle("TS",1);
156  meZdcNEM3fCvsTS = dbe_->book1D("NEM3_fCvsTS","N-EM3_AveragefC_vsTS",10,0,9);
157  meZdcNEM3fCvsTS->setAxisTitle("fC",2);
158  meZdcNEM3fCvsTS->setAxisTitle("TS",1);
161  meZdcNEM4fCvsTS = dbe_->book1D("NEM4_fCvsTS","N-EM4_AveragefC_vsTS",10,0,9);
162  meZdcNEM4fCvsTS->setAxisTitle("fC",2);
163  meZdcNEM4fCvsTS->setAxisTitle("TS",1);
166  meZdcNEM5fCvsTS = dbe_->book1D("NEM5_fCvsTS","N-EM5_AveragefC_vsTS",10,0,9);
167  meZdcNEM5fCvsTS->setAxisTitle("fC",2);
168  meZdcNEM5fCvsTS->setAxisTitle("TS",1);
171  meZdcNHAD1fCvsTS = dbe_->book1D("NHAD1_fCvsTS","N-HAD1_AveragefC_vsTS",10,0,9);
176  meZdcNHAD2fCvsTS = dbe_->book1D("NHAD2_fCvsTS","N-HAD2_AveragefC_vsTS",10,0,9);
181  meZdcNHAD3fCvsTS = dbe_->book1D("NHAD3_fCvsTS","N-HAD3_AveragefC_vsTS",10,0,9);
186  meZdcNHAD4fCvsTS = dbe_->book1D("NHAD4_fCvsTS","N-HAD4_AveragefC_vsTS",10,0,9);
190 
192  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/2D_EMvHAD");
195  meZdcfCPEMvHAD = dbe_->book2D("PEMvPHAD","PZDC_EMvHAD",1000,-25,1000,1000,-25,1000);
196  meZdcfCPEMvHAD->setAxisTitle("SumEM_fC",2);
197  meZdcfCPEMvHAD->setAxisTitle("SumHAD_fC",1);
198  meZdcfCPEMvHAD->getTH2F()->SetOption("colz");
200  meZdcfCNEMvHAD = dbe_->book2D("NEMvNHAD","NZDC_EMvHAD",1000,-25,1000,1000,-25,1000);
201  meZdcfCNEMvHAD->setAxisTitle("SumEM_fC",2);
202  meZdcfCNEMvHAD->setAxisTitle("SumHAD_fC",1);
203  meZdcfCNEMvHAD->getTH2F()->SetOption("colz");
205 
206  }
207  }
208 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
MonitorElement * meZdcfCPTOT
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:97
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:84
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:105
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:92
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:106
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:91
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:100
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:102
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:101
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:107
DQMStore * dbe_
Definition: ZDCDigiStudy.h:76
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:104
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:98
TH2F * getTH2F(void) const
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:93
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1082
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:99
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:103
void ZDCDigiStudy::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 210 of file ZDCDigiStudy.cc.

References dbe_, outFile_, and DQMStore::save().

210  {
211  if (dbe_ && outFile_.size() > 0) dbe_->save(outFile_);
212 }
std::string outFile_
Definition: ZDCDigiStudy.h:74
DQMStore * dbe_
Definition: ZDCDigiStudy.h:76
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2540
void ZDCDigiStudy::endRun ( const edm::Run run,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 384 of file ZDCDigiStudy.cc.

References MonitorElement::getTH1F(), meZdcNEM1fCvsTS, meZdcNEM2fCvsTS, meZdcNEM3fCvsTS, meZdcNEM4fCvsTS, meZdcNEM5fCvsTS, meZdcNHAD1fCvsTS, meZdcNHAD2fCvsTS, meZdcNHAD3fCvsTS, meZdcNHAD4fCvsTS, meZdcPEM1fCvsTS, meZdcPEM2fCvsTS, meZdcPEM3fCvsTS, meZdcPEM4fCvsTS, meZdcPEM5fCvsTS, meZdcPHAD1fCvsTS, meZdcPHAD2fCvsTS, meZdcPHAD3fCvsTS, meZdcPHAD4fCvsTS, and nevents.

385 {
386  int nevents=(meZdcPHAD1fCvsTS->getTH1F())->GetBinContent(0); //grab the number of digis that were read in and stored in the underflow bin, and call them Nevents
387  (meZdcPHAD1fCvsTS->getTH1F())->Scale(1./nevents); // divide histogram by nevents thereby creating an average..it was done this way so that in DQM when everything is done in parallel and added at the end then the average will add appropriately
388 
389  int nevents1=(meZdcPHAD2fCvsTS->getTH1F())->GetBinContent(0);
390  (meZdcPHAD2fCvsTS->getTH1F())->Scale(1./nevents1);
391 
392  int nevents2=(meZdcPHAD3fCvsTS->getTH1F())->GetBinContent(0);
393  (meZdcPHAD3fCvsTS->getTH1F())->Scale(1./nevents2);
394 
395  int nevents3=(meZdcPHAD4fCvsTS->getTH1F())->GetBinContent(0);
396  (meZdcPHAD4fCvsTS->getTH1F())->Scale(1./nevents3);
397 
398  int nevents4=(meZdcNHAD1fCvsTS->getTH1F())->GetBinContent(0);
399  (meZdcNHAD1fCvsTS->getTH1F())->Scale(1./nevents4);
400 
401  int nevents5=(meZdcNHAD2fCvsTS->getTH1F())->GetBinContent(0);
402  (meZdcNHAD2fCvsTS->getTH1F())->Scale(1./nevents5);
403 
404  int nevents6=(meZdcNHAD3fCvsTS->getTH1F())->GetBinContent(0);
405  (meZdcNHAD3fCvsTS->getTH1F())->Scale(1./nevents6);
406 
407  int nevents7=(meZdcNHAD4fCvsTS->getTH1F())->GetBinContent(0);
408  (meZdcNHAD4fCvsTS->getTH1F())->Scale(1./nevents7);
409 
410  int nevents8=(meZdcPEM1fCvsTS->getTH1F())->GetBinContent(0);
411  (meZdcPEM1fCvsTS->getTH1F())->Scale(1./nevents8);
412 
413  int nevents9=(meZdcPEM2fCvsTS->getTH1F())->GetBinContent(0);
414  (meZdcPEM2fCvsTS->getTH1F())->Scale(1./nevents9);
415 
416  int nevents10=(meZdcPEM3fCvsTS->getTH1F())->GetBinContent(0);
417  (meZdcPEM3fCvsTS->getTH1F())->Scale(1./nevents10);
418 
419  int nevents11=(meZdcPEM4fCvsTS->getTH1F())->GetBinContent(0);
420  (meZdcPEM4fCvsTS->getTH1F())->Scale(1./nevents11);
421 
422  int nevents12=(meZdcPEM5fCvsTS->getTH1F())->GetBinContent(0);
423  (meZdcPEM5fCvsTS->getTH1F())->Scale(1./nevents12);
424 
425  int nevents13=(meZdcNEM1fCvsTS->getTH1F())->GetBinContent(0);
426  (meZdcNEM1fCvsTS->getTH1F())->Scale(1./nevents13);
427 
428  int nevents14=(meZdcNEM2fCvsTS->getTH1F())->GetBinContent(0);
429  (meZdcNEM2fCvsTS->getTH1F())->Scale(1./nevents14);
430 
431  int nevents15=(meZdcNEM3fCvsTS->getTH1F())->GetBinContent(0);
432  (meZdcNEM3fCvsTS->getTH1F())->Scale(1./nevents15);
433 
434  int nevents16=(meZdcNEM4fCvsTS->getTH1F())->GetBinContent(0);
435  (meZdcNEM4fCvsTS->getTH1F())->Scale(1./nevents16);
436 
437  int nevents17=(meZdcNEM5fCvsTS->getTH1F())->GetBinContent(0);
438  (meZdcNEM5fCvsTS->getTH1F())->Scale(1./nevents17);
439 
440 
441 
442 }
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:97
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:105
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:92
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:106
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:91
int nevents
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:100
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:102
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:101
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:107
TH1F * getTH1F(void) const
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:104
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:98
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:93
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:99
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:103
int ZDCDigiStudy::FillHitValHist ( int  side,
int  section,
int  channel,
double  energy,
double  time 
)
protected

Member Data Documentation

bool ZDCDigiStudy::checkHit_
private

Definition at line 75 of file ZDCDigiStudy.h.

Referenced by beginJob(), and ZDCDigiStudy().

DQMStore* ZDCDigiStudy::dbe_
private

Definition at line 76 of file ZDCDigiStudy.h.

Referenced by beginJob(), endJob(), and ZDCDigiStudy().

MonitorElement* ZDCDigiStudy::meZdcfCNEMvHAD
private

Definition at line 89 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCNHAD
private

Definition at line 86 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCNTOT
private

Definition at line 87 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCPEMvHAD
private

Definition at line 88 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCPHAD
private

Definition at line 84 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCPTOT
private

Definition at line 85 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcNEM1fCvsTS
private

Definition at line 99 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNEM2fCvsTS
private

Definition at line 100 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNEM3fCvsTS
private

Definition at line 101 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNEM4fCvsTS
private

Definition at line 102 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNEM5fCvsTS
private

Definition at line 103 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNHAD1fCvsTS
private

Definition at line 104 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNHAD2fCvsTS
private

Definition at line 105 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNHAD3fCvsTS
private

Definition at line 106 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcNHAD4fCvsTS
private

Definition at line 107 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPEM1fCvsTS
private

Definition at line 90 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPEM2fCvsTS
private

Definition at line 91 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPEM3fCvsTS
private

Definition at line 92 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPEM4fCvsTS
private

Definition at line 93 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPEM5fCvsTS
private

Definition at line 94 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPHAD1fCvsTS
private

Definition at line 95 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPHAD2fCvsTS
private

Definition at line 96 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPHAD3fCvsTS
private

Definition at line 97 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

MonitorElement* ZDCDigiStudy::meZdcPHAD4fCvsTS
private

Definition at line 98 of file ZDCDigiStudy.h.

Referenced by analyze(), beginJob(), and endRun().

std::string ZDCDigiStudy::outFile_
private

Definition at line 74 of file ZDCDigiStudy.h.

Referenced by endJob(), and ZDCDigiStudy().

edm::EDGetTokenT<ZDCDigiCollection> ZDCDigiStudy::tok_zdc_
private

Definition at line 78 of file ZDCDigiStudy.h.

Referenced by analyze(), and ZDCDigiStudy().

bool ZDCDigiStudy::verbose_
private

Definition at line 75 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().

std::string ZDCDigiStudy::zdcHits
private

Definition at line 74 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().