Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:47

0001 #ifndef GlobalHitsTester_h
0002 #define GlobalHitsTester_h
0003 
0004 /** \class GlobalHitsAnalyzer
0005  *
0006  *  Class to fill dqm monitor elements from existing EDM file
0007  *
0008  *  \author M. Strang SUNY-Buffalo
0009  */
0010 
0011 // framework & common header files
0012 #include "DataFormats/Common/interface/Handle.h"
0013 #include "DataFormats/Provenance/interface/Provenance.h"
0014 #include "FWCore/Framework/interface/ESHandle.h"
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/EventSetup.h"
0017 #include "FWCore/Framework/interface/Frameworkfwd.h"
0018 #include "FWCore/Framework/interface/MakerMacros.h"
0019 #include "FWCore/Framework/interface/Run.h"
0020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0022 //#include "Geometry/CommonDetUnit/interface/GeomDet.h"
0023 //#include "DataFormats/DetId/interface/DetId.h"
0024 #include "TRandom.h"
0025 #include "TRandom3.h"
0026 
0027 // DQM services
0028 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0029 #include "DQMServices/Core/interface/DQMStore.h"
0030 #include "FWCore/ServiceRegistry/interface/Service.h"
0031 
0032 // tracker info
0033 //#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0034 //#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0035 //#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
0036 //#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
0037 
0038 // muon info
0039 //#include "Geometry/Records/interface/MuonGeometryRecord.h"
0040 //#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
0041 //#include "Geometry/DTGeometry/interface/DTGeometry.h"
0042 //#include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0043 //#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
0044 //#include "DataFormats/MuonDetId/interface/RPCDetId.h"
0045 //#include "DataFormats/MuonDetId/interface/DTWireId.h"
0046 
0047 // calorimeter info
0048 //#include "Geometry/Records/interface/IdealGeometryRecord.h"
0049 //#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0050 //#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0051 //#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0052 //#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0053 //#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0054 
0055 // data in edm::event
0056 //#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0057 //#include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
0058 //#include "SimDataFormats/Track/interface/SimTrackContainer.h"
0059 //#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0060 //#include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
0061 
0062 // helper files
0063 //#include <CLHEP/Vector/LorentzVector.h>
0064 //#include "DataFormats/Math/interface/LorentzVector.h"
0065 //#include "CLHEP/Units/GlobalSystemOfUnits.h"
0066 
0067 #include <cstdlib>
0068 #include <iostream>
0069 #include <memory>
0070 #include <string>
0071 #include <vector>
0072 
0073 #include "TString.h"
0074 
0075 class GlobalHitsTester : public DQMEDAnalyzer {
0076 public:
0077   explicit GlobalHitsTester(const edm::ParameterSet &);
0078   ~GlobalHitsTester() override;
0079   void analyze(const edm::Event &, const edm::EventSetup &) override;
0080   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0081 
0082 private:
0083   std::string fName;
0084   int verbosity;
0085   int frequency;
0086   int vtxunit;
0087   std::string label;
0088   bool getAllProvenances;
0089   bool printProvenanceInfo;
0090 
0091   std::string outputfile;
0092   bool doOutput;
0093 
0094   MonitorElement *meTestString;
0095   MonitorElement *meTestInt;
0096   MonitorElement *meTestFloat;
0097   MonitorElement *meTestTH1F;
0098   MonitorElement *meTestTH2F;
0099   MonitorElement *meTestTH3F;
0100   MonitorElement *meTestProfile1;
0101   MonitorElement *meTestProfile2;
0102 
0103   TRandom *Random;
0104   double RandomVal1;
0105   double RandomVal2;
0106   double RandomVal3;
0107 
0108   // private statistics information
0109   unsigned int count;
0110 };
0111 
0112 #endif