Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-24 05:59:48

0001 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0002 // Package:    ZDCDigiStudy
0003 // Class:      ZDCDigiStudy
0004 //
0005 /*
0006   Description:
0007   This code has been developed to be a check for the ZDC sim. In 2009, it was found that the ZDC Simulation was unrealistic and needed repair. The aim of this code is to show the user the input and output of a ZDC MinBias simulation.
0008 
0009   Implementation:
0010   First a MinBias simulation should be run, it could be pythia,hijin,or hydjet. This will output a .root file which should have information about recoGenParticles, hcalunsuppresseddigis. Use this .root file as the input into the cfg.py which is found in the main directory of this package. This output will be another .root file which is meant to be viewed in a TBrowser
0011 
0012 */
0013 //
0014 // Original Author: Jaime Gomez (U. of Maryland) with SIGNIFICANT assistance of Dr. Jefferey Temple (U. of Maryland)
0015 //
0016 //
0017 //         Created:  Summer 2012
0018 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0019 
0020 #include "Validation/HcalDigis/interface/ZDCDigiStudy.h"
0021 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
0022 
0023 #include "FWCore/Utilities/interface/Exception.h"
0024 #include "CLHEP/Units/GlobalSystemOfUnits.h"
0025 
0026 //#define EDM_ML_DEBUG
0027 
0028 ZDCDigiStudy::ZDCDigiStudy(const edm::ParameterSet& ps)
0029     : zdcHits(ps.getUntrackedParameter<std::string>("HitCollection", "ZdcHits")),
0030       outFile_(ps.getUntrackedParameter<std::string>("outputFile", "zdcHitStudy.root")),
0031       verbose_(ps.getUntrackedParameter<bool>("Verbose", false)),
0032       checkHit_(true),
0033       tok_zdc_(consumes<ZDCDigiCollection>(edm::InputTag("simHcalUnsuppressedDigis"))) {
0034   edm::LogVerbatim("ZDCDigiStudy") << "   Hits: " << zdcHits << " / " << checkHit_ << "   Output: " << outFile_;
0035 }
0036 
0037 void ZDCDigiStudy::bookHistograms(DQMStore::IBooker& ib, edm::Run const& run, edm::EventSetup const& es) {
0038   ib.setCurrentFolder("ZDCDigiValidation");
0039   // run histos only since there is dqmEndRun processing.
0040   ib.setScope(MonitorElementData::Scope::RUN);
0041 
0042   //Histograms for Hits
0043   /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0044   //# Below we are filling the histograms made in the .h file. The syntax is as follows:                                      #
0045   //# plot_code_name = dbe_->TypeofPlot[(1,2,3)-D,(F,I,D)]("Name as it will appear","Title",axis options);                    #
0046   //# They will be stored in the TFile subdirectory set by :    dbe_->setCurrentFolder("FolderIwant")                         #
0047   //# axis options are like (#ofbins,min,max)                                                                                 #
0048   /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0049 
0050   if (checkHit_) {
0051     ////////////////////////// 1-D TotalfC per Side ///////////////////////
0052 
0053     ///////////////////////////////// 1 ////////////////////////////////////////////
0054     ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/1D_fC");
0055     meZdcfCPHAD = ib.book1D("PHAD_TotalfC", "PZDC_HAD_TotalfC", 1000, -50, 10000);
0056     meZdcfCPHAD->setAxisTitle("Counts", 2);
0057     meZdcfCPHAD->setAxisTitle("fC", 1);
0058     /////////////////////////////////2////////////////////////////
0059     meZdcfCPTOT = ib.book1D("PZDC_TotalfC", "PZDC_TotalfC", 1000, -50, 20000);
0060     meZdcfCPTOT->setAxisTitle("Counts", 2);
0061     meZdcfCPTOT->setAxisTitle("fC", 1);
0062     /////////////////////////////////3/////////////////////////////////
0063     meZdcfCNHAD = ib.book1D("NHAD_TotalfC", "NZDC_HAD_TotalfC", 1000, -50, 10000);
0064     meZdcfCNHAD->setAxisTitle("Counts", 2);
0065     meZdcfCNHAD->setAxisTitle("fC", 1);
0066     ////////////////////////////////4/////////////////////////////////////////
0067     meZdcfCNTOT = ib.book1D("NZDC_TotalfC", "NZDC_TotalfC", 1000, -50, 20000);
0068     meZdcfCNTOT->setAxisTitle("Counts", 2);
0069     meZdcfCNTOT->setAxisTitle("fC", 1);
0070     /////////////////////////////////////////////////////////////////////////
0071 
0072     //////////////////////// 1-D fC vs TS ///////////////////////////////////////
0073     ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/PZDC");
0074 
0075     /////////////////////////////////5/////////////////////////////////////////
0076     meZdcPEM1fCvsTS = ib.book1D("PEM1_fCvsTS", "P-EM1_AveragefC_vsTS", 10, 0, 9);
0077     meZdcPEM1fCvsTS->setAxisTitle("fC", 2);
0078     meZdcPEM1fCvsTS->setAxisTitle("TS", 1);
0079     ////////////////////////////////////////////////////////////////////////////
0080     /////////////////////////////////6/////////////////////////////////////////
0081     meZdcPEM2fCvsTS = ib.book1D("PEM2_fCvsTS", "P-EM2_AveragefC_vsTS", 10, 0, 9);
0082     meZdcPEM2fCvsTS->setAxisTitle("fC", 2);
0083     meZdcPEM2fCvsTS->setAxisTitle("TS", 1);
0084     ////////////////////////////////////////////////////////////////////////////
0085     /////////////////////////////////7/////////////////////////////////////////
0086     meZdcPEM3fCvsTS = ib.book1D("PEM3_fCvsTS", "P-EM3_AveragefC_vsTS", 10, 0, 9);
0087     meZdcPEM3fCvsTS->setAxisTitle("fC", 2);
0088     meZdcPEM3fCvsTS->setAxisTitle("TS", 1);
0089     ////////////////////////////////////////////////////////////////////////////
0090     /////////////////////////////////8/////////////////////////////////////////
0091     meZdcPEM4fCvsTS = ib.book1D("PEM4_fCvsTS", "P-EM4_AveragefC_vsTS", 10, 0, 9);
0092     meZdcPEM4fCvsTS->setAxisTitle("fC", 2);
0093     meZdcPEM4fCvsTS->setAxisTitle("TS", 1);
0094     ////////////////////////////////////////////////////////////////////////////
0095     /////////////////////////////////9/////////////////////////////////////////
0096     meZdcPEM5fCvsTS = ib.book1D("PEM5_fCvsTS", "P-EM5_AveragefC_vsTS", 10, 0, 9);
0097     meZdcPEM5fCvsTS->setAxisTitle("fC", 2);
0098     meZdcPEM5fCvsTS->setAxisTitle("TS", 1);
0099     ////////////////////////////////////////////////////////////////////////////
0100     /////////////////////////////////10/////////////////////////////////////////
0101     meZdcPHAD1fCvsTS = ib.book1D("PHAD1_fCvsTS", "P-HAD1_AveragefC_vsTS", 10, 0, 9);
0102     meZdcPHAD1fCvsTS->setAxisTitle("fC", 2);
0103     meZdcPHAD1fCvsTS->setAxisTitle("TS", 1);
0104     ////////////////////////////////////////////////////////////////////////////
0105     /////////////////////////////////11/////////////////////////////////////////
0106     meZdcPHAD2fCvsTS = ib.book1D("PHAD2_fCvsTS", "P-HAD2_AveragefC_vsTS", 10, 0, 9);
0107     meZdcPHAD2fCvsTS->setAxisTitle("fC", 2);
0108     meZdcPHAD2fCvsTS->setAxisTitle("TS", 1);
0109     ////////////////////////////////////////////////////////////////////////////
0110     /////////////////////////////////12/////////////////////////////////////////
0111     meZdcPHAD3fCvsTS = ib.book1D("PHAD3_fCvsTS", "P-HAD3_AveragefC_vsTS", 10, 0, 9);
0112     meZdcPHAD3fCvsTS->setAxisTitle("fC", 2);
0113     meZdcPHAD3fCvsTS->setAxisTitle("TS", 1);
0114     ////////////////////////////////////////////////////////////////////////////
0115     /////////////////////////////////13/////////////////////////////////////////
0116     meZdcPHAD4fCvsTS = ib.book1D("PHAD4_fCvsTS", "P-HAD4_AveragefC_vsTS", 10, 0, 9);
0117     meZdcPHAD4fCvsTS->setAxisTitle("fC", 2);
0118     meZdcPHAD4fCvsTS->setAxisTitle("TS", 1);
0119     ////////////////////////////////////////////////////////////////////////////
0120     ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/fCvsTS/NZDC");
0121 
0122     /////////////////////////////////14/////////////////////////////////////////
0123     meZdcNEM1fCvsTS = ib.book1D("NEM1_fCvsTS", "N-EM1_AveragefC_vsTS", 10, 0, 9);
0124     meZdcNEM1fCvsTS->setAxisTitle("fC", 2);
0125     meZdcNEM1fCvsTS->setAxisTitle("TS", 1);
0126     ////////////////////////////////////////////////////////////////////////////
0127     /////////////////////////////////15/////////////////////////////////////////
0128     meZdcNEM2fCvsTS = ib.book1D("NEM2_fCvsTS", "N-EM2_AveragefC_vsTS", 10, 0, 9);
0129     meZdcNEM2fCvsTS->setAxisTitle("fC", 2);
0130     meZdcNEM2fCvsTS->setAxisTitle("TS", 1);
0131     ////////////////////////////////////////////////////////////////////////////
0132     /////////////////////////////////16/////////////////////////////////////////
0133     meZdcNEM3fCvsTS = ib.book1D("NEM3_fCvsTS", "N-EM3_AveragefC_vsTS", 10, 0, 9);
0134     meZdcNEM3fCvsTS->setAxisTitle("fC", 2);
0135     meZdcNEM3fCvsTS->setAxisTitle("TS", 1);
0136     ////////////////////////////////////////////////////////////////////////////
0137     /////////////////////////////////17/////////////////////////////////////////
0138     meZdcNEM4fCvsTS = ib.book1D("NEM4_fCvsTS", "N-EM4_AveragefC_vsTS", 10, 0, 9);
0139     meZdcNEM4fCvsTS->setAxisTitle("fC", 2);
0140     meZdcNEM4fCvsTS->setAxisTitle("TS", 1);
0141     ////////////////////////////////////////////////////////////////////////////
0142     /////////////////////////////////18/////////////////////////////////////////
0143     meZdcNEM5fCvsTS = ib.book1D("NEM5_fCvsTS", "N-EM5_AveragefC_vsTS", 10, 0, 9);
0144     meZdcNEM5fCvsTS->setAxisTitle("fC", 2);
0145     meZdcNEM5fCvsTS->setAxisTitle("TS", 1);
0146     ////////////////////////////////////////////////////////////////////////////
0147     /////////////////////////////////19/////////////////////////////////////////
0148     meZdcNHAD1fCvsTS = ib.book1D("NHAD1_fCvsTS", "N-HAD1_AveragefC_vsTS", 10, 0, 9);
0149     meZdcNHAD1fCvsTS->setAxisTitle("fC", 2);
0150     meZdcNHAD1fCvsTS->setAxisTitle("TS", 1);
0151     ////////////////////////////////////////////////////////////////////////////
0152     /////////////////////////////////20/////////////////////////////////////////
0153     meZdcNHAD2fCvsTS = ib.book1D("NHAD2_fCvsTS", "N-HAD2_AveragefC_vsTS", 10, 0, 9);
0154     meZdcNHAD2fCvsTS->setAxisTitle("fC", 2);
0155     meZdcNHAD2fCvsTS->setAxisTitle("TS", 1);
0156     ////////////////////////////////////////////////////////////////////////////
0157     /////////////////////////////////21/////////////////////////////////////////
0158     meZdcNHAD3fCvsTS = ib.book1D("NHAD3_fCvsTS", "N-HAD3_AveragefC_vsTS", 10, 0, 9);
0159     meZdcNHAD3fCvsTS->setAxisTitle("fC", 2);
0160     meZdcNHAD3fCvsTS->setAxisTitle("TS", 1);
0161     ////////////////////////////////////////////////////////////////////////////
0162     /////////////////////////////////22/////////////////////////////////////////
0163     meZdcNHAD4fCvsTS = ib.book1D("NHAD4_fCvsTS", "N-HAD4_AveragefC_vsTS", 10, 0, 9);
0164     meZdcNHAD4fCvsTS->setAxisTitle("fC", 2);
0165     meZdcNHAD4fCvsTS->setAxisTitle("TS", 1);
0166     ////////////////////////////////////////////////////////////////////////////
0167 
0168     //////////////////// 2-D EMvHAD plots/////////////////////////////////////////
0169     ib.setCurrentFolder("ZDCDigiValidation/ZDC_Digis/2D_EMvHAD");
0170     /////////////////////////////////////////////////////////////////////////////
0171     /////////////////////////////////23//////////////////////////////////////////
0172     meZdcfCPEMvHAD = ib.book2D("PEMvPHAD", "PZDC_EMvHAD", 200, -25, 12000, 200, -25, 15000);
0173     meZdcfCPEMvHAD->setAxisTitle("SumEM_fC", 2);
0174     meZdcfCPEMvHAD->setAxisTitle("SumHAD_fC", 1);
0175     meZdcfCPEMvHAD->setOption("colz");
0176     ////////////////////////////////24///////////////////////////////////////////
0177     meZdcfCNEMvHAD = ib.book2D("NEMvNHAD", "NZDC_EMvHAD", 1000, -25, 12000, 1000, -25, 15000);
0178     meZdcfCNEMvHAD->setAxisTitle("SumEM_fC", 2);
0179     meZdcfCNEMvHAD->setAxisTitle("SumHAD_fC", 1);
0180     meZdcfCNEMvHAD->setOption("colz");
0181     ///////////////////////////////////////////////////////////////////////////////
0182   }
0183 }
0184 
0185 /*void ZDCDigiStudy::endJob() {
0186   if (dbe_ && outFile_.size() > 0) dbe_->save(outFile_);
0187   }*/
0188 
0189 //void ZDCDigiStudy::analyze(const edm::Event& e, const edm::EventSetup& ) {
0190 void ZDCDigiStudy::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0191   //////////NEW STUFF//////////////////////
0192 
0193   using namespace edm;
0194   bool gotZDCDigis = true;
0195 
0196   Handle<ZDCDigiCollection> zdchandle;
0197   if (!(iEvent.getByToken(tok_zdc_, zdchandle))) {
0198     gotZDCDigis = false;  //this is a boolean set up to check if there are ZDCDigis in the input root file
0199   }
0200   if (!(zdchandle.isValid())) {
0201     gotZDCDigis = false;  //if it is not there, leave it false
0202   }
0203 
0204   double totalPHADCharge = 0;
0205   double totalNHADCharge = 0;
0206   double totalPEMCharge = 0;
0207   double totalNEMCharge = 0;
0208   double totalPCharge = 0;
0209   double totalNCharge = 0;
0210 
0211   //////////////////////////////////////////////////DIGIS///////////////////////////////////
0212   if (gotZDCDigis == true) {
0213     for (ZDCDigiCollection::const_iterator zdc = zdchandle->begin(); zdc != zdchandle->end(); ++zdc) {
0214       const ZDCDataFrame digi = (const ZDCDataFrame)(*zdc);
0215 #ifdef EDM_ML_DEBUG
0216       edm::LogVerbatim("ZDCDigiStudy") << "CHANNEL = " << zdc->id().channel();
0217 #endif
0218       /////////////////////////////HAD SECTIONS///////////////
0219 
0220       if (digi.id().section() == 2) {            // require HAD
0221         if (digi.id().zside() == 1) {            // require POS
0222           for (int i = 0; i < digi.size(); ++i)  // loop over all 10 TS because each digi has 10 entries
0223           {
0224             if (digi.id().channel() == 1) {  //here i specify PHAD1
0225               meZdcPHAD1fCvsTS->Fill(
0226                   i, digi.sample(i).nominal_fC());  //filling the plot name with the nominal fC value for each TS
0227               if (i == 0)
0228                 meZdcPHAD1fCvsTS->Fill(-1, 1);  // on first iteration of loop, increment underflow bin
0229             }                                   //NEW AVERAGE Thingy
0230             if (digi.id().channel() == 2) {
0231               meZdcPHAD2fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0232               if (i == 0)
0233                 meZdcPHAD2fCvsTS->Fill(-1, 1);
0234             }
0235             if (digi.id().channel() == 3) {
0236               meZdcPHAD3fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0237               if (i == 0)
0238                 meZdcPHAD3fCvsTS->Fill(-1, 1);
0239             }
0240             if (digi.id().channel() == 4) {
0241               meZdcPHAD4fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0242               if (i == 0)
0243                 meZdcPHAD4fCvsTS->Fill(-1, 1);
0244             }
0245             if (i == 4 || i == 5 || i == 6)
0246               totalPHADCharge += digi.sample(i).nominal_fC();
0247           }  // loop over all (10) TS for the given digi
0248         } else {
0249           for (int i = 0; i < digi.size(); ++i) {
0250             if (digi.id().channel() == 1) {
0251               meZdcNHAD1fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0252               if (i == 0)
0253                 meZdcNHAD1fCvsTS->Fill(-1, 1);
0254             }
0255             if (digi.id().channel() == 2) {
0256               meZdcNHAD2fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0257               if (i == 0)
0258                 meZdcNHAD2fCvsTS->Fill(-1, 1);
0259             }
0260             if (digi.id().channel() == 3) {
0261               meZdcNHAD3fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0262               if (i == 0)
0263                 meZdcNHAD3fCvsTS->Fill(-1, 1);
0264             }
0265             if (digi.id().channel() == 4) {
0266               meZdcNHAD4fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0267               if (i == 0)
0268                 meZdcNHAD4fCvsTS->Fill(-1, 1);
0269             }
0270             if (i == 4 || i == 5 || i == 6)
0271               totalNHADCharge += digi.sample(i).nominal_fC();
0272           }  //loop over all 10 TS
0273         }    //Requires NHAd
0274       }      //Requires HAD sections
0275       ///////////////////////////////EM SECTIONS////////////////////////////
0276       if (digi.id().section() ==
0277           1) {  //require EM....here i do the smae thing that i did above but now for P/N EM sections
0278         if (digi.id().zside() == 1) {  //require pos
0279           for (int i = 0; i < digi.size(); ++i) {
0280             if (digi.id().channel() == 1) {
0281               meZdcPEM1fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0282               if (i == 0)
0283                 meZdcPEM1fCvsTS->Fill(-1, 1);
0284             }
0285             if (digi.id().channel() == 2) {
0286               meZdcPEM2fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0287               if (i == 0)
0288                 meZdcPEM2fCvsTS->Fill(-1, 1);
0289             }
0290             if (digi.id().channel() == 3) {
0291               meZdcPEM3fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0292               if (i == 0)
0293                 meZdcPEM3fCvsTS->Fill(-1, 1);
0294             }
0295             if (digi.id().channel() == 4) {
0296               meZdcPEM4fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0297               if (i == 0)
0298                 meZdcPEM4fCvsTS->Fill(-1, 1);
0299             }
0300             if (digi.id().channel() == 5) {
0301               meZdcPEM5fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0302               if (i == 0)
0303                 meZdcPEM5fCvsTS->Fill(-1, 1);
0304             }
0305             if (i == 4 || i == 5 || i == 6)
0306               totalPEMCharge += digi.sample(i).nominal_fC();
0307           }
0308         } else {
0309           for (int i = 0; i < digi.size(); ++i) {
0310             if (digi.id().channel() == 1) {
0311               meZdcNEM1fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0312               if (i == 0)
0313                 meZdcNEM1fCvsTS->Fill(-1, 1);
0314             }
0315             if (digi.id().channel() == 2) {
0316               meZdcNEM2fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0317               if (i == 0)
0318                 meZdcNEM2fCvsTS->Fill(-1, 1);
0319             }
0320             if (digi.id().channel() == 3) {
0321               meZdcNEM3fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0322               if (i == 0)
0323                 meZdcNEM3fCvsTS->Fill(-1, 1);
0324             }
0325             if (digi.id().channel() == 4) {
0326               meZdcNEM4fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0327               if (i == 0)
0328                 meZdcNEM4fCvsTS->Fill(-1, 1);
0329             }
0330             if (digi.id().channel() == 5) {
0331               meZdcNEM5fCvsTS->Fill(i, digi.sample(i).nominal_fC());
0332               if (i == 0)
0333                 meZdcNEM5fCvsTS->Fill(-1, 1);
0334             }
0335             if (i == 4 || i == 5 || i == 6)
0336               totalNEMCharge += digi.sample(i).nominal_fC();
0337           }
0338         }
0339       }
0340 
0341       totalPCharge = totalPHADCharge + (0.1) * totalPEMCharge;
0342       totalNCharge = totalNHADCharge + (0.1) * totalNEMCharge;
0343 
0344 #ifdef EDM_ML_DEBUG
0345       edm::LogVerbatim("ZDCDigiStudy") << "CHANNEL = " << digi.id().channel();
0346       for (int i = 0; i < digi.size(); ++i)
0347         edm::LogVerbatim("ZDCDigiStudy") << "SAMPLE = " << i << "  ADC = " << digi.sample(i).adc()
0348                                          << " fC =  " << digi.sample(i).nominal_fC();
0349 #endif
0350       //  digi[i] should be the sample as digi.sample(i), I think
0351     }  // loop on all (22) ZDC digis
0352   }
0353   ////////////////////////////////////////////////////////////////////////////////////////////
0354 
0355   // Now fill total charge histogram
0356   meZdcfCPEMvHAD->Fill(totalPCharge, totalPEMCharge);
0357   meZdcfCNEMvHAD->Fill(totalNCharge, totalNEMCharge);
0358   meZdcfCPHAD->Fill(totalPHADCharge);
0359   meZdcfCNHAD->Fill(totalNHADCharge);
0360   meZdcfCNTOT->Fill(totalNCharge);
0361   meZdcfCPTOT->Fill(totalPCharge);
0362 }
0363 
0364 ////////////////////////////////////////////////////////////////////
0365 
0366 void ZDCDigiStudy::dqmEndRun(const edm::Run& run, const edm::EventSetup& c) {
0367   int nevents =
0368       (meZdcPHAD1fCvsTS->getTH1F())
0369           ->GetBinContent(
0370               0);  //grab the number of digis that were read in and stored in the underflow bin, and call them Nevents
0371   (meZdcPHAD1fCvsTS->getTH1F())
0372       ->Scale(
0373           1. /
0374           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
0375 
0376   int nevents1 = (meZdcPHAD2fCvsTS->getTH1F())->GetBinContent(0);
0377   (meZdcPHAD2fCvsTS->getTH1F())->Scale(1. / nevents1);
0378 
0379   int nevents2 = (meZdcPHAD3fCvsTS->getTH1F())->GetBinContent(0);
0380   (meZdcPHAD3fCvsTS->getTH1F())->Scale(1. / nevents2);
0381 
0382   int nevents3 = (meZdcPHAD4fCvsTS->getTH1F())->GetBinContent(0);
0383   (meZdcPHAD4fCvsTS->getTH1F())->Scale(1. / nevents3);
0384 
0385   int nevents4 = (meZdcNHAD1fCvsTS->getTH1F())->GetBinContent(0);
0386   (meZdcNHAD1fCvsTS->getTH1F())->Scale(1. / nevents4);
0387 
0388   int nevents5 = (meZdcNHAD2fCvsTS->getTH1F())->GetBinContent(0);
0389   (meZdcNHAD2fCvsTS->getTH1F())->Scale(1. / nevents5);
0390 
0391   int nevents6 = (meZdcNHAD3fCvsTS->getTH1F())->GetBinContent(0);
0392   (meZdcNHAD3fCvsTS->getTH1F())->Scale(1. / nevents6);
0393 
0394   int nevents7 = (meZdcNHAD4fCvsTS->getTH1F())->GetBinContent(0);
0395   (meZdcNHAD4fCvsTS->getTH1F())->Scale(1. / nevents7);
0396 
0397   int nevents8 = (meZdcPEM1fCvsTS->getTH1F())->GetBinContent(0);
0398   (meZdcPEM1fCvsTS->getTH1F())->Scale(1. / nevents8);
0399 
0400   int nevents9 = (meZdcPEM2fCvsTS->getTH1F())->GetBinContent(0);
0401   (meZdcPEM2fCvsTS->getTH1F())->Scale(1. / nevents9);
0402 
0403   int nevents10 = (meZdcPEM3fCvsTS->getTH1F())->GetBinContent(0);
0404   (meZdcPEM3fCvsTS->getTH1F())->Scale(1. / nevents10);
0405 
0406   int nevents11 = (meZdcPEM4fCvsTS->getTH1F())->GetBinContent(0);
0407   (meZdcPEM4fCvsTS->getTH1F())->Scale(1. / nevents11);
0408 
0409   int nevents12 = (meZdcPEM5fCvsTS->getTH1F())->GetBinContent(0);
0410   (meZdcPEM5fCvsTS->getTH1F())->Scale(1. / nevents12);
0411 
0412   int nevents13 = (meZdcNEM1fCvsTS->getTH1F())->GetBinContent(0);
0413   (meZdcNEM1fCvsTS->getTH1F())->Scale(1. / nevents13);
0414 
0415   int nevents14 = (meZdcNEM2fCvsTS->getTH1F())->GetBinContent(0);
0416   (meZdcNEM2fCvsTS->getTH1F())->Scale(1. / nevents14);
0417 
0418   int nevents15 = (meZdcNEM3fCvsTS->getTH1F())->GetBinContent(0);
0419   (meZdcNEM3fCvsTS->getTH1F())->Scale(1. / nevents15);
0420 
0421   int nevents16 = (meZdcNEM4fCvsTS->getTH1F())->GetBinContent(0);
0422   (meZdcNEM4fCvsTS->getTH1F())->Scale(1. / nevents16);
0423 
0424   int nevents17 = (meZdcNEM5fCvsTS->getTH1F())->GetBinContent(0);
0425   (meZdcNEM5fCvsTS->getTH1F())->Scale(1. / nevents17);
0426 }
0427 
0428 //define this as a plug-in
0429 DEFINE_FWK_MODULE(ZDCDigiStudy);