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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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_
 
bool verbose_
 
std::string zdcHits
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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(), stor::utils::sleep(), AlCaHLTBitMon_QueryRunRegistry::string, 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  edm::LogInfo("ZDCDigiStudy")
38  //std::cout
39  << " Hits: "
40  << zdcHits << " / "<< checkHit_
41  << " Output: " << outFile_;
42 
44  if (dbe_) {
45  if (verbose_) {
46  dbe_->setVerbose(1);
47  sleep (3);
49  } else {
50  dbe_->setVerbose(0);
51  }
52  }
53 }
T getUntrackedParameter(std::string const &, T const &) const
std::string zdcHits
Definition: ZDCDigiStudy.h:74
void sleep(Duration_t)
Definition: Utils.h:163
std::string outFile_
Definition: ZDCDigiStudy.h:74
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
DQMStore * dbe_
Definition: ZDCDigiStudy.h:76
void showDirStructure(void) const
Definition: DQMStore.cc:2766
ZDCDigiStudy::~ZDCDigiStudy ( )

Definition at line 55 of file ZDCDigiStudy.cc.

55 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 213 of file ZDCDigiStudy.cc.

References HcalZDCDetId::channel(), MonitorElement::Fill(), edm::Event::getByLabel(), 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(), and HcalZDCDetId::zside().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 57 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().

57  {
58  if (dbe_) {
59  dbe_->setCurrentFolder("ZDCDigiValidation");
60  //Histograms for Hits
62 //# Below we are filling the histograms made in the .h file. The syntax is as follows: #
63 //# plot_code_name = dbe_->TypeofPlot[(1,2,3)-D,(F,I,D)]("Name as it will appear","Title",axis options); #
64 //# They will be stored in the TFile subdirectory set by : dbe_->setCurrentFolder("FolderIwant") #
65 //# axis options are like (#ofbins,min,max) #
67 
68 
69  if (checkHit_) {
70 
71 
73 
75  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/1D_fC");
76  meZdcfCPHAD = dbe_->book1D("PHAD_TotalfC","PZDC_HAD_TotalfC",1000,-50,950);
77  meZdcfCPHAD->setAxisTitle("Counts",2);
78  meZdcfCPHAD->setAxisTitle("fC",1);
80  meZdcfCPTOT = dbe_->book1D("PZDC_TotalfC","PZDC_TotalfC",1000,-50,950);
81  meZdcfCPTOT->setAxisTitle("Counts",2);
82  meZdcfCPTOT->setAxisTitle("fC",1);
84  meZdcfCNHAD = dbe_->book1D("NHAD_TotalfC","NZDC_HAD_TotalfC",1000,-50,950);
85  meZdcfCNHAD->setAxisTitle("Counts",2);
86  meZdcfCNHAD->setAxisTitle("fC",1);
88  meZdcfCNTOT = dbe_->book1D("NZDC_TotalfC","NZDC_TotalfC",1000,-50,950);
89  meZdcfCNTOT->setAxisTitle("Counts",2);
90  meZdcfCNTOT->setAxisTitle("fC",1);
92 
94  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/PZDC");
95 
97  meZdcPEM1fCvsTS = dbe_->book1D("PEM1_fCvsTS","P-EM1_AveragefC_vsTS",10,0,9);
102  meZdcPEM2fCvsTS = dbe_->book1D("PEM2_fCvsTS","P-EM2_AveragefC_vsTS",10,0,9);
103  meZdcPEM2fCvsTS->setAxisTitle("fC",2);
104  meZdcPEM2fCvsTS->setAxisTitle("TS",1);
107  meZdcPEM3fCvsTS = dbe_->book1D("PEM3_fCvsTS","P-EM3_AveragefC_vsTS",10,0,9);
108  meZdcPEM3fCvsTS->setAxisTitle("fC",2);
109  meZdcPEM3fCvsTS->setAxisTitle("TS",1);
112  meZdcPEM4fCvsTS = dbe_->book1D("PEM4_fCvsTS","P-EM4_AveragefC_vsTS",10,0,9);
113  meZdcPEM4fCvsTS->setAxisTitle("fC",2);
114  meZdcPEM4fCvsTS->setAxisTitle("TS",1);
117  meZdcPEM5fCvsTS = dbe_->book1D("PEM5_fCvsTS","P-EM5_AveragefC_vsTS",10,0,9);
118  meZdcPEM5fCvsTS->setAxisTitle("fC",2);
119  meZdcPEM5fCvsTS->setAxisTitle("TS",1);
122  meZdcPHAD1fCvsTS = dbe_->book1D("PHAD1_fCvsTS","P-HAD1_AveragefC_vsTS",10,0,9);
127  meZdcPHAD2fCvsTS = dbe_->book1D("PHAD2_fCvsTS","P-HAD2_AveragefC_vsTS",10,0,9);
132  meZdcPHAD3fCvsTS = dbe_->book1D("PHAD3_fCvsTS","P-HAD3_AveragefC_vsTS",10,0,9);
137  meZdcPHAD4fCvsTS = dbe_->book1D("PHAD4_fCvsTS","P-HAD4_AveragefC_vsTS",10,0,9);
141  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/NZDC");
142 
144  meZdcNEM1fCvsTS = dbe_->book1D("NEM1_fCvsTS","N-EM1_AveragefC_vsTS",10,0,9);
145  meZdcNEM1fCvsTS->setAxisTitle("fC",2);
146  meZdcNEM1fCvsTS->setAxisTitle("TS",1);
149  meZdcNEM2fCvsTS = dbe_->book1D("NEM2_fCvsTS","N-EM2_AveragefC_vsTS",10,0,9);
150  meZdcNEM2fCvsTS->setAxisTitle("fC",2);
151  meZdcNEM2fCvsTS->setAxisTitle("TS",1);
154  meZdcNEM3fCvsTS = dbe_->book1D("NEM3_fCvsTS","N-EM3_AveragefC_vsTS",10,0,9);
155  meZdcNEM3fCvsTS->setAxisTitle("fC",2);
156  meZdcNEM3fCvsTS->setAxisTitle("TS",1);
159  meZdcNEM4fCvsTS = dbe_->book1D("NEM4_fCvsTS","N-EM4_AveragefC_vsTS",10,0,9);
160  meZdcNEM4fCvsTS->setAxisTitle("fC",2);
161  meZdcNEM4fCvsTS->setAxisTitle("TS",1);
164  meZdcNEM5fCvsTS = dbe_->book1D("NEM5_fCvsTS","N-EM5_AveragefC_vsTS",10,0,9);
165  meZdcNEM5fCvsTS->setAxisTitle("fC",2);
166  meZdcNEM5fCvsTS->setAxisTitle("TS",1);
169  meZdcNHAD1fCvsTS = dbe_->book1D("NHAD1_fCvsTS","N-HAD1_AveragefC_vsTS",10,0,9);
174  meZdcNHAD2fCvsTS = dbe_->book1D("NHAD2_fCvsTS","N-HAD2_AveragefC_vsTS",10,0,9);
179  meZdcNHAD3fCvsTS = dbe_->book1D("NHAD3_fCvsTS","N-HAD3_AveragefC_vsTS",10,0,9);
184  meZdcNHAD4fCvsTS = dbe_->book1D("NHAD4_fCvsTS","N-HAD4_AveragefC_vsTS",10,0,9);
188 
190  dbe_->setCurrentFolder("ZDCDigiValidation/ZDC_Digis/2D_EMvHAD");
193  meZdcfCPEMvHAD = dbe_->book2D("PEMvPHAD","PZDC_EMvHAD",1000,-25,1000,1000,-25,1000);
194  meZdcfCPEMvHAD->setAxisTitle("SumEM_fC",2);
195  meZdcfCPEMvHAD->setAxisTitle("SumHAD_fC",1);
196  meZdcfCPEMvHAD->getTH2F()->SetOption("colz");
198  meZdcfCNEMvHAD = dbe_->book2D("NEMvNHAD","NZDC_EMvHAD",1000,-25,1000,1000,-25,1000);
199  meZdcfCNEMvHAD->setAxisTitle("SumEM_fC",2);
200  meZdcfCNEMvHAD->setAxisTitle("SumHAD_fC",1);
201  meZdcfCNEMvHAD->getTH2F()->SetOption("colz");
203 
204  }
205  }
206 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * meZdcfCPTOT
Definition: ZDCDigiStudy.h:83
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:82
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:103
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:104
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:98
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:100
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:99
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:93
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:105
DQMStore * dbe_
Definition: ZDCDigiStudy.h:76
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:102
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:84
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:96
TH2F * getTH2F(void) const
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:91
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:850
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:92
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:97
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:101
void ZDCDigiStudy::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 208 of file ZDCDigiStudy.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 382 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.

383 {
384  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
385  (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
386 
387  int nevents1=(meZdcPHAD2fCvsTS->getTH1F())->GetBinContent(0);
388  (meZdcPHAD2fCvsTS->getTH1F())->Scale(1./nevents1);
389 
390  int nevents2=(meZdcPHAD3fCvsTS->getTH1F())->GetBinContent(0);
391  (meZdcPHAD3fCvsTS->getTH1F())->Scale(1./nevents2);
392 
393  int nevents3=(meZdcPHAD4fCvsTS->getTH1F())->GetBinContent(0);
394  (meZdcPHAD4fCvsTS->getTH1F())->Scale(1./nevents3);
395 
396  int nevents4=(meZdcNHAD1fCvsTS->getTH1F())->GetBinContent(0);
397  (meZdcNHAD1fCvsTS->getTH1F())->Scale(1./nevents4);
398 
399  int nevents5=(meZdcNHAD2fCvsTS->getTH1F())->GetBinContent(0);
400  (meZdcNHAD2fCvsTS->getTH1F())->Scale(1./nevents5);
401 
402  int nevents6=(meZdcNHAD3fCvsTS->getTH1F())->GetBinContent(0);
403  (meZdcNHAD3fCvsTS->getTH1F())->Scale(1./nevents6);
404 
405  int nevents7=(meZdcNHAD4fCvsTS->getTH1F())->GetBinContent(0);
406  (meZdcNHAD4fCvsTS->getTH1F())->Scale(1./nevents7);
407 
408  int nevents8=(meZdcPEM1fCvsTS->getTH1F())->GetBinContent(0);
409  (meZdcPEM1fCvsTS->getTH1F())->Scale(1./nevents8);
410 
411  int nevents9=(meZdcPEM2fCvsTS->getTH1F())->GetBinContent(0);
412  (meZdcPEM2fCvsTS->getTH1F())->Scale(1./nevents9);
413 
414  int nevents10=(meZdcPEM3fCvsTS->getTH1F())->GetBinContent(0);
415  (meZdcPEM3fCvsTS->getTH1F())->Scale(1./nevents10);
416 
417  int nevents11=(meZdcPEM4fCvsTS->getTH1F())->GetBinContent(0);
418  (meZdcPEM4fCvsTS->getTH1F())->Scale(1./nevents11);
419 
420  int nevents12=(meZdcPEM5fCvsTS->getTH1F())->GetBinContent(0);
421  (meZdcPEM5fCvsTS->getTH1F())->Scale(1./nevents12);
422 
423  int nevents13=(meZdcNEM1fCvsTS->getTH1F())->GetBinContent(0);
424  (meZdcNEM1fCvsTS->getTH1F())->Scale(1./nevents13);
425 
426  int nevents14=(meZdcNEM2fCvsTS->getTH1F())->GetBinContent(0);
427  (meZdcNEM2fCvsTS->getTH1F())->Scale(1./nevents14);
428 
429  int nevents15=(meZdcNEM3fCvsTS->getTH1F())->GetBinContent(0);
430  (meZdcNEM3fCvsTS->getTH1F())->Scale(1./nevents15);
431 
432  int nevents16=(meZdcNEM4fCvsTS->getTH1F())->GetBinContent(0);
433  (meZdcNEM4fCvsTS->getTH1F())->Scale(1./nevents16);
434 
435  int nevents17=(meZdcNEM5fCvsTS->getTH1F())->GetBinContent(0);
436  (meZdcNEM5fCvsTS->getTH1F())->Scale(1./nevents17);
437 
438 
439 
440 }
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:103
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:104
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:89
int nevents
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:98
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:100
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:99
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:93
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:105
TH1F * getTH1F(void) const
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:102
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:91
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:92
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:97
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:101
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 87 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCNHAD
private

Definition at line 84 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCNTOT
private

Definition at line 85 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCPEMvHAD
private

Definition at line 86 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCPHAD
private

Definition at line 82 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcfCPTOT
private

Definition at line 83 of file ZDCDigiStudy.h.

Referenced by analyze(), and beginJob().

MonitorElement* ZDCDigiStudy::meZdcNEM1fCvsTS
private

Definition at line 97 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM2fCvsTS
private

Definition at line 98 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM3fCvsTS
private

Definition at line 99 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM4fCvsTS
private

Definition at line 100 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM5fCvsTS
private

Definition at line 101 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD1fCvsTS
private

Definition at line 102 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD2fCvsTS
private

Definition at line 103 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD3fCvsTS
private

Definition at line 104 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD4fCvsTS
private

Definition at line 105 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM1fCvsTS
private

Definition at line 88 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM2fCvsTS
private

Definition at line 89 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM3fCvsTS
private

Definition at line 90 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM4fCvsTS
private

Definition at line 91 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM5fCvsTS
private

Definition at line 92 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD1fCvsTS
private

Definition at line 93 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD2fCvsTS
private

Definition at line 94 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD3fCvsTS
private

Definition at line 95 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD4fCvsTS
private

Definition at line 96 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().

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().