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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
 
 ZDCDigiStudy (const edm::ParameterSet &ps)
 
 ~ZDCDigiStudy ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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 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::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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_
 
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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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_, edm::ParameterSet::getUntrackedParameter(), HLT_25ns14e33_v1_cff::InputTag, outFile_, 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 
45 }
T getUntrackedParameter(std::string const &, T const &) const
std::string zdcHits
Definition: ZDCDigiStudy.h:74
std::string outFile_
Definition: ZDCDigiStudy.h:74
edm::EDGetTokenT< ZDCDigiCollection > tok_zdc_
Definition: ZDCDigiStudy.h:77
ZDCDigiStudy::~ZDCDigiStudy ( )

Definition at line 47 of file ZDCDigiStudy.cc.

47 {}

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

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

206  {
208 
209  using namespace edm;
210  bool gotZDCDigis=true;
211 
212 
213  Handle<ZDCDigiCollection> zdchandle;
214  if (!(iEvent.getByToken(tok_zdc_,zdchandle)))
215  {
216  gotZDCDigis=false; //this is a boolean set up to check if there are ZDCDigis in the input root file
217  }
218  if (!(zdchandle.isValid()))
219  {
220  gotZDCDigis=false; //if it is not there, leave it false
221  }
222 
223  double totalPHADCharge=0;
224  double totalNHADCharge=0;
225  double totalPEMCharge=0;
226  double totalNEMCharge=0;
227  double totalPCharge=0;
228  double totalNCharge=0;
229 
230 
232  if (gotZDCDigis==true){
233  for (ZDCDigiCollection::const_iterator zdc = zdchandle->begin();
234  zdc!=zdchandle->end();
235  ++zdc)
236  {
237  const ZDCDataFrame digi = (const ZDCDataFrame)(*zdc);
238  //std::cout <<"CHANNEL = "<<zdc->id().channel()<<std::endl;
239 
240 
241 
243 
244  if (digi.id().section()==2){ // require HAD
245  if (digi.id().zside()==1)
246  { // require POS
247  for (int i=0;i<digi.size();++i) // loop over all 10 TS because each digi has 10 entries
248  {
249  if (digi.id().channel()==1){ //here i specify PHAD1
250  meZdcPHAD1fCvsTS->Fill(i,digi.sample(i).nominal_fC()); //filling the plot name with the nominal fC value for each TS
251  if (i==0) meZdcPHAD1fCvsTS->Fill(-1,1); // on first iteration of loop, increment underflow bin
252  }//NEW AVERAGE Thingy
253  if (digi.id().channel()==2){
255  if (i==0) meZdcPHAD2fCvsTS->Fill(-1,1);
256  }
257  if (digi.id().channel()==3){
259  if (i==0) meZdcPHAD3fCvsTS->Fill(-1,1);
260  }
261  if (digi.id().channel()==4){
263  if (i==0) meZdcPHAD4fCvsTS->Fill(-1,1);
264  }
265  if(i==4 || i==5 || i==6) totalPHADCharge+=digi.sample(i).nominal_fC();
266  } // loop over all (10) TS for the given digi
267  }
268  else {
269  for (int i=0; i<digi.size();++i)
270  {
271  if (digi.id().channel()==1){
273  if (i==0) meZdcNHAD1fCvsTS->Fill(-1,1);
274  }
275  if (digi.id().channel()==2){
277  if (i==0) meZdcNHAD2fCvsTS->Fill(-1,1);
278  }
279  if (digi.id().channel()==3){
281  if (i==0) meZdcNHAD3fCvsTS->Fill(-1,1);
282  }
283  if (digi.id().channel()==4){
285  if (i==0) meZdcNHAD4fCvsTS->Fill(-1,1);
286  }
287  if(i==4 || i==5 || i==6) totalNHADCharge+=digi.sample(i).nominal_fC();
288  }//loop over all 10 TS
289  }//Requires NHAd
290  }//Requires HAD sections
292  if (digi.id().section()==1){//require EM....here i do the smae thing that i did above but now for P/N EM sections
293  if (digi.id().zside()==1)
294  {//require pos
295  for (int i=0;i<digi.size();++i)
296  {
297  if (digi.id().channel()==1){
299  if (i==0) meZdcPEM1fCvsTS->Fill(-1,1);
300  }
301  if (digi.id().channel()==2){
303  if (i==0) meZdcPEM2fCvsTS->Fill(-1,1);
304  }
305  if (digi.id().channel()==3){
307  if (i==0) meZdcPEM3fCvsTS->Fill(-1,1);
308  }
309  if (digi.id().channel()==4){
311  if (i==0) meZdcPEM4fCvsTS->Fill(-1,1);
312  }
313  if (digi.id().channel()==5){
315  if (i==0) meZdcPEM5fCvsTS->Fill(-1,1);
316  }
317  if (i==4 || i==5 || i==6) totalPEMCharge+=digi.sample(i).nominal_fC();
318  }
319  }
320  else {
321  for (int i=0;i<digi.size();++i)
322  {
323  if (digi.id().channel()==1){
325  if (i==0) meZdcNEM1fCvsTS->Fill(-1,1);
326  }
327  if (digi.id().channel()==2){
329  if (i==0) meZdcNEM2fCvsTS->Fill(-1,1);
330  }
331  if (digi.id().channel()==3){
333  if (i==0) meZdcNEM3fCvsTS->Fill(-1,1);
334  }
335  if (digi.id().channel()==4){
337  if (i==0) meZdcNEM4fCvsTS->Fill(-1,1);
338  }
339  if (digi.id().channel()==5){
341  if (i==0) meZdcNEM5fCvsTS->Fill(-1,1);
342  }
343  if (i==4 || i==5 || i==6) totalNEMCharge+=digi.sample(i).nominal_fC();
344  }
345  }
346  }
347 
348  totalPCharge=totalPHADCharge+(0.1)*totalPEMCharge;
349  totalNCharge=totalNHADCharge+(0.1)*totalNEMCharge;
350 
351 
352  /* std::cout <<"CHANNEL = "<<digi.id().channel()<<std::endl;
353  for (int i=0;i<digi.size();++i)
354  std::cout <<"SAMPLE = "<<i<<" ADC = "<<digi.sample(i).adc()<<" fC = "<<digi.sample(i).nominal_fC()<<std::endl;
355  */
356  // digi[i] should be the sample as digi.sample(i), I think
357  } // loop on all (22) ZDC digis
358  }
360 
361 
362 
363 
364  // Now fill total charge histogram
365  meZdcfCPEMvHAD->Fill(totalPCharge,totalPEMCharge);
366  meZdcfCNEMvHAD->Fill(totalNCharge,totalNEMCharge);
367  meZdcfCPHAD->Fill(totalPHADCharge);
368  meZdcfCNHAD->Fill(totalNHADCharge);
369  meZdcfCNTOT->Fill(totalNCharge);
370  meZdcfCPTOT->Fill(totalPCharge);
371 }
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:84
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:83
void Fill(long long x)
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:104
int iEvent
Definition: GenABIO.cc:230
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:91
const HcalQIESample & sample(int i) const
access a sample
Definition: ZDCDataFrame.h:39
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:105
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:99
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:101
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:100
Section section() const
get the section
Definition: HcalZDCDetId.h:36
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:106
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:103
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:97
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:92
edm::EDGetTokenT< ZDCDigiCollection > tok_zdc_
Definition: ZDCDigiStudy.h:77
MonitorElement * meZdcPEM5fCvsTS
Definition: ZDCDigiStudy.h:93
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:98
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:102
void ZDCDigiStudy::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  run,
edm::EventSetup const &  es 
)
virtual

Implements DQMEDAnalyzer.

Definition at line 49 of file ZDCDigiStudy.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), checkHit_, 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::IBooker::setCurrentFolder().

50 {
51  ib.setCurrentFolder("ZDCDigiValidation");
52  //Histograms for Hits
54  //# Below we are filling the histograms made in the .h file. The syntax is as follows: #
55  //# plot_code_name = dbe_->TypeofPlot[(1,2,3)-D,(F,I,D)]("Name as it will appear","Title",axis options); #
56  //# They will be stored in the TFile subdirectory set by : dbe_->setCurrentFolder("FolderIwant") #
57  //# axis options are like (#ofbins,min,max) #
59 
60 
61  if (checkHit_) {
62 
63 
65 
67  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/1D_fC");
68  meZdcfCPHAD = ib.book1D("PHAD_TotalfC","PZDC_HAD_TotalfC",1000,-50,10000);
69  meZdcfCPHAD->setAxisTitle("Counts",2);
70  meZdcfCPHAD->setAxisTitle("fC",1);
72  meZdcfCPTOT = ib.book1D("PZDC_TotalfC","PZDC_TotalfC",1000,-50,20000);
73  meZdcfCPTOT->setAxisTitle("Counts",2);
74  meZdcfCPTOT->setAxisTitle("fC",1);
76  meZdcfCNHAD = ib.book1D("NHAD_TotalfC","NZDC_HAD_TotalfC",1000,-50,10000);
77  meZdcfCNHAD->setAxisTitle("Counts",2);
78  meZdcfCNHAD->setAxisTitle("fC",1);
80  meZdcfCNTOT = ib.book1D("NZDC_TotalfC","NZDC_TotalfC",1000,-50,20000);
81  meZdcfCNTOT->setAxisTitle("Counts",2);
82  meZdcfCNTOT->setAxisTitle("fC",1);
84 
86  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/PZDC");
87 
89  meZdcPEM1fCvsTS = ib.book1D("PEM1_fCvsTS","P-EM1_AveragefC_vsTS",10,0,9);
94  meZdcPEM2fCvsTS = ib.book1D("PEM2_fCvsTS","P-EM2_AveragefC_vsTS",10,0,9);
99  meZdcPEM3fCvsTS = ib.book1D("PEM3_fCvsTS","P-EM3_AveragefC_vsTS",10,0,9);
100  meZdcPEM3fCvsTS->setAxisTitle("fC",2);
101  meZdcPEM3fCvsTS->setAxisTitle("TS",1);
104  meZdcPEM4fCvsTS = ib.book1D("PEM4_fCvsTS","P-EM4_AveragefC_vsTS",10,0,9);
105  meZdcPEM4fCvsTS->setAxisTitle("fC",2);
106  meZdcPEM4fCvsTS->setAxisTitle("TS",1);
109  meZdcPEM5fCvsTS = ib.book1D("PEM5_fCvsTS","P-EM5_AveragefC_vsTS",10,0,9);
110  meZdcPEM5fCvsTS->setAxisTitle("fC",2);
111  meZdcPEM5fCvsTS->setAxisTitle("TS",1);
114  meZdcPHAD1fCvsTS = ib.book1D("PHAD1_fCvsTS","P-HAD1_AveragefC_vsTS",10,0,9);
119  meZdcPHAD2fCvsTS = ib.book1D("PHAD2_fCvsTS","P-HAD2_AveragefC_vsTS",10,0,9);
124  meZdcPHAD3fCvsTS = ib.book1D("PHAD3_fCvsTS","P-HAD3_AveragefC_vsTS",10,0,9);
129  meZdcPHAD4fCvsTS = ib.book1D("PHAD4_fCvsTS","P-HAD4_AveragefC_vsTS",10,0,9);
133  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/NZDC");
134 
136  meZdcNEM1fCvsTS = ib.book1D("NEM1_fCvsTS","N-EM1_AveragefC_vsTS",10,0,9);
137  meZdcNEM1fCvsTS->setAxisTitle("fC",2);
138  meZdcNEM1fCvsTS->setAxisTitle("TS",1);
141  meZdcNEM2fCvsTS = ib.book1D("NEM2_fCvsTS","N-EM2_AveragefC_vsTS",10,0,9);
142  meZdcNEM2fCvsTS->setAxisTitle("fC",2);
143  meZdcNEM2fCvsTS->setAxisTitle("TS",1);
146  meZdcNEM3fCvsTS = ib.book1D("NEM3_fCvsTS","N-EM3_AveragefC_vsTS",10,0,9);
147  meZdcNEM3fCvsTS->setAxisTitle("fC",2);
148  meZdcNEM3fCvsTS->setAxisTitle("TS",1);
151  meZdcNEM4fCvsTS = ib.book1D("NEM4_fCvsTS","N-EM4_AveragefC_vsTS",10,0,9);
152  meZdcNEM4fCvsTS->setAxisTitle("fC",2);
153  meZdcNEM4fCvsTS->setAxisTitle("TS",1);
156  meZdcNEM5fCvsTS = ib.book1D("NEM5_fCvsTS","N-EM5_AveragefC_vsTS",10,0,9);
157  meZdcNEM5fCvsTS->setAxisTitle("fC",2);
158  meZdcNEM5fCvsTS->setAxisTitle("TS",1);
161  meZdcNHAD1fCvsTS = ib.book1D("NHAD1_fCvsTS","N-HAD1_AveragefC_vsTS",10,0,9);
166  meZdcNHAD2fCvsTS = ib.book1D("NHAD2_fCvsTS","N-HAD2_AveragefC_vsTS",10,0,9);
171  meZdcNHAD3fCvsTS = ib.book1D("NHAD3_fCvsTS","N-HAD3_AveragefC_vsTS",10,0,9);
176  meZdcNHAD4fCvsTS = ib.book1D("NHAD4_fCvsTS","N-HAD4_AveragefC_vsTS",10,0,9);
180 
182  ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/2D_EMvHAD");
185  meZdcfCPEMvHAD = ib.book2D("PEMvPHAD","PZDC_EMvHAD",200,-25,12000,200,-25,15000);
186  meZdcfCPEMvHAD->setAxisTitle("SumEM_fC",2);
187  meZdcfCPEMvHAD->setAxisTitle("SumHAD_fC",1);
188  meZdcfCPEMvHAD->getTH2F()->SetOption("colz");
190  meZdcfCNEMvHAD = ib.book2D("NEMvNHAD","NZDC_EMvHAD",1000,-25,12000,1000,-25,15000);
191  meZdcfCNEMvHAD->setAxisTitle("SumEM_fC",2);
192  meZdcfCNEMvHAD->setAxisTitle("SumHAD_fC",1);
193  meZdcfCNEMvHAD->getTH2F()->SetOption("colz");
195 
196  }
197 
198 }
MonitorElement * meZdcfCPTOT
Definition: ZDCDigiStudy.h:84
MonitorElement * meZdcPEM1fCvsTS
Definition: ZDCDigiStudy.h:89
MonitorElement * meZdcfCPEMvHAD
Definition: ZDCDigiStudy.h:87
MonitorElement * meZdcPHAD2fCvsTS
Definition: ZDCDigiStudy.h:95
MonitorElement * meZdcfCNTOT
Definition: ZDCDigiStudy.h:86
MonitorElement * meZdcPHAD3fCvsTS
Definition: ZDCDigiStudy.h:96
MonitorElement * meZdcfCPHAD
Definition: ZDCDigiStudy.h:83
MonitorElement * meZdcNHAD2fCvsTS
Definition: ZDCDigiStudy.h:104
MonitorElement * meZdcPEM3fCvsTS
Definition: ZDCDigiStudy.h:91
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * meZdcNHAD3fCvsTS
Definition: ZDCDigiStudy.h:105
MonitorElement * meZdcPEM2fCvsTS
Definition: ZDCDigiStudy.h:90
MonitorElement * meZdcNEM2fCvsTS
Definition: ZDCDigiStudy.h:99
MonitorElement * meZdcNEM4fCvsTS
Definition: ZDCDigiStudy.h:101
MonitorElement * meZdcNEM3fCvsTS
Definition: ZDCDigiStudy.h:100
MonitorElement * meZdcPHAD1fCvsTS
Definition: ZDCDigiStudy.h:94
MonitorElement * meZdcNHAD4fCvsTS
Definition: ZDCDigiStudy.h:106
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * meZdcNHAD1fCvsTS
Definition: ZDCDigiStudy.h:103
MonitorElement * meZdcfCNHAD
Definition: ZDCDigiStudy.h:85
MonitorElement * meZdcfCNEMvHAD
Definition: ZDCDigiStudy.h:88
MonitorElement * meZdcPHAD4fCvsTS
Definition: ZDCDigiStudy.h:97
TH2F * getTH2F(void) const
MonitorElement * meZdcPEM4fCvsTS
Definition: ZDCDigiStudy.h:92
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:93
MonitorElement * meZdcNEM1fCvsTS
Definition: ZDCDigiStudy.h:98
MonitorElement * meZdcNEM5fCvsTS
Definition: ZDCDigiStudy.h:102
void ZDCDigiStudy::endRun ( const edm::Run run,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 375 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 cmsHarvester::nevents.

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

MonitorElement* ZDCDigiStudy::meZdcfCNEMvHAD
private

Definition at line 88 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCNHAD
private

Definition at line 85 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCNTOT
private

Definition at line 86 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCPEMvHAD
private

Definition at line 87 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCPHAD
private

Definition at line 83 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcfCPTOT
private

Definition at line 84 of file ZDCDigiStudy.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ZDCDigiStudy::meZdcNEM1fCvsTS
private

Definition at line 98 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM2fCvsTS
private

Definition at line 99 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM3fCvsTS
private

Definition at line 100 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM4fCvsTS
private

Definition at line 101 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNEM5fCvsTS
private

Definition at line 102 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD1fCvsTS
private

Definition at line 103 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD2fCvsTS
private

Definition at line 104 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD3fCvsTS
private

Definition at line 105 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcNHAD4fCvsTS
private

Definition at line 106 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM1fCvsTS
private

Definition at line 89 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM2fCvsTS
private

Definition at line 90 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM3fCvsTS
private

Definition at line 91 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM4fCvsTS
private

Definition at line 92 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPEM5fCvsTS
private

Definition at line 93 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD1fCvsTS
private

Definition at line 94 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD2fCvsTS
private

Definition at line 95 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD3fCvsTS
private

Definition at line 96 of file ZDCDigiStudy.h.

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

MonitorElement* ZDCDigiStudy::meZdcPHAD4fCvsTS
private

Definition at line 97 of file ZDCDigiStudy.h.

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

std::string ZDCDigiStudy::outFile_
private

Definition at line 74 of file ZDCDigiStudy.h.

Referenced by ZDCDigiStudy().

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

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