Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:33:11

0001 // -*- C++ -*-
0002 //
0003 // Class:      GlobalTest
0004 //
0005 /**\class GlobalTest
0006 
0007    Description: test suite for Mixing Module
0008 
0009 */
0010 //
0011 // Original Author:  Ursula Berthon
0012 //         Created:  Fri Sep 23 11:38:38 CEST 2005
0013 //
0014 //
0015 
0016 // system include files
0017 #include "FWCore/Framework/interface/Frameworkfwd.h"
0018 
0019 #include "FWCore/Framework/interface/Event.h"
0020 #include "FWCore/Framework/interface/MakerMacros.h"
0021 
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023 #include "FWCore/Utilities/interface/InputTag.h"
0024 
0025 #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
0026 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0027 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0028 
0029 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
0030 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0031 
0032 // DQM services for histogram
0033 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0034 #include "DQMServices/Core/interface/DQMStore.h"
0035 #include "FWCore/ServiceRegistry/interface/Service.h"
0036 
0037 class TFile;
0038 
0039 //
0040 // class declaration
0041 //
0042 
0043 class GlobalTest : public DQMEDAnalyzer {
0044 public:
0045   explicit GlobalTest(const edm::ParameterSet &);
0046 
0047   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0048   void analyze(const edm::Event &, const edm::EventSetup &) override;
0049 
0050 private:
0051   std::string filename_;
0052   int minbunch_;
0053   int maxbunch_;
0054   TFile *histfile_;
0055 
0056   const static int nMaxH = 10;
0057   MonitorElement *nrPileupsH_[nMaxH];
0058   MonitorElement *nrVerticesH_[nMaxH];
0059   MonitorElement *nrTracksH_[nMaxH];
0060   MonitorElement *trackPartIdH_[nMaxH];
0061   MonitorElement *caloEnergyEBH_[nMaxH];
0062   MonitorElement *caloEnergyEEH_[nMaxH];
0063 
0064   edm::EDGetTokenT<CrossingFrame<SimTrack>> cfTrackToken_;
0065   edm::EDGetTokenT<CrossingFrame<SimTrack>> cfVertexToken_;
0066   edm::EDGetTokenT<CrossingFrame<PCaloHit>> g4SimHits_EB_Token_;
0067   edm::EDGetTokenT<CrossingFrame<PCaloHit>> g4SimHits_EE_Token_;
0068 };