Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:26

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 #ifndef SimG4CMS_ZDCDigiStudy_H
0021 #define SimG4CMS_ZDCDigiStudy_H
0022 
0023 #include "FWCore/Framework/interface/Frameworkfwd.h"
0024 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0025 #include "FWCore/Framework/interface/Event.h"
0026 #include "FWCore/Framework/interface/EventSetup.h"
0027 #include "FWCore/Framework/interface/MakerMacros.h"
0028 
0029 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0030 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0031 
0032 #include "DQMServices/Core/interface/DQMStore.h"
0033 #include "FWCore/ServiceRegistry/interface/Service.h"
0034 
0035 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0036 
0037 #include <iostream>
0038 #include <fstream>
0039 #include <vector>
0040 #include <map>
0041 #include <string>
0042 #include <memory>
0043 
0044 class ZDCDigiStudy : public DQMOneEDAnalyzer<> {
0045 public:
0046   ZDCDigiStudy(const edm::ParameterSet& ps);
0047   ~ZDCDigiStudy() override = default;
0048 
0049   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0050 
0051 protected:
0052   void dqmEndRun(const edm::Run& run, const edm::EventSetup& c) override;
0053 
0054   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0055   int FillHitValHist(int side, int section, int channel, double energy, double time);
0056 
0057 private:
0058   /////////////////////////////////////////
0059   //#   Below all the monitoring elements #
0060   //# are simply the plots "code names"  #
0061   //# they will be filled in the .cc file #
0062   /////////////////////////////////////////
0063 
0064   const std::string zdcHits, outFile_;
0065   const bool verbose_, checkHit_;
0066 
0067   const edm::EDGetTokenT<ZDCDigiCollection> tok_zdc_;
0068 
0069   /////////////////
0070 
0071   /////////ZDC Digi Plots////////
0072   MonitorElement* meZdcfCPHAD;
0073   MonitorElement* meZdcfCPTOT;
0074   MonitorElement* meZdcfCNHAD;
0075   MonitorElement* meZdcfCNTOT;
0076   MonitorElement* meZdcfCPEMvHAD;
0077   MonitorElement* meZdcfCNEMvHAD;
0078   MonitorElement* meZdcPEM1fCvsTS;
0079   MonitorElement* meZdcPEM2fCvsTS;
0080   MonitorElement* meZdcPEM3fCvsTS;
0081   MonitorElement* meZdcPEM4fCvsTS;
0082   MonitorElement* meZdcPEM5fCvsTS;
0083   MonitorElement* meZdcPHAD1fCvsTS;
0084   MonitorElement* meZdcPHAD2fCvsTS;
0085   MonitorElement* meZdcPHAD3fCvsTS;
0086   MonitorElement* meZdcPHAD4fCvsTS;
0087   MonitorElement* meZdcNEM1fCvsTS;
0088   MonitorElement* meZdcNEM2fCvsTS;
0089   MonitorElement* meZdcNEM3fCvsTS;
0090   MonitorElement* meZdcNEM4fCvsTS;
0091   MonitorElement* meZdcNEM5fCvsTS;
0092   MonitorElement* meZdcNHAD1fCvsTS;
0093   MonitorElement* meZdcNHAD2fCvsTS;
0094   MonitorElement* meZdcNHAD3fCvsTS;
0095   MonitorElement* meZdcNHAD4fCvsTS;
0096   ////////////////////////////////////////
0097 };
0098 
0099 #endif