00001 #ifndef GlobalHitsTester_h 00002 #define GlobalHitsTester_h 00003 00013 // framework & common header files 00014 #include "FWCore/Framework/interface/EDAnalyzer.h" 00015 #include "FWCore/Framework/interface/Frameworkfwd.h" 00016 #include "FWCore/Framework/interface/Event.h" 00017 #include "FWCore/Framework/interface/EventSetup.h" 00018 #include "FWCore/Framework/interface/Run.h" 00019 #include "DataFormats/Common/interface/Handle.h" 00020 #include "FWCore/Framework/interface/ESHandle.h" 00021 #include "DataFormats/Provenance/interface/Provenance.h" 00022 #include "FWCore/Framework/interface/MakerMacros.h" 00023 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00024 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00025 //#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" 00026 //#include "DataFormats/DetId/interface/DetId.h" 00027 #include "TRandom.h" 00028 #include "TRandom3.h" 00029 00030 //DQM services 00031 #include "DQMServices/Core/interface/DQMStore.h" 00032 #include "FWCore/ServiceRegistry/interface/Service.h" 00033 #include "DQMServices/Core/interface/MonitorElement.h" 00034 00035 // tracker info 00036 //#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" 00037 //#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" 00038 //#include "DataFormats/SiStripDetId/interface/StripSubdetector.h" 00039 //#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" 00040 00041 // muon info 00042 //#include "Geometry/Records/interface/MuonGeometryRecord.h" 00043 //#include "Geometry/CSCGeometry/interface/CSCGeometry.h" 00044 //#include "Geometry/DTGeometry/interface/DTGeometry.h" 00045 //#include "Geometry/RPCGeometry/interface/RPCGeometry.h" 00046 //#include "DataFormats/MuonDetId/interface/MuonSubdetId.h" 00047 //#include "DataFormats/MuonDetId/interface/RPCDetId.h" 00048 //#include "DataFormats/MuonDetId/interface/DTWireId.h" 00049 00050 // calorimeter info 00051 //#include "Geometry/Records/interface/IdealGeometryRecord.h" 00052 //#include "Geometry/CaloGeometry/interface/CaloGeometry.h" 00053 //#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" 00054 //#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" 00055 //#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" 00056 //#include "DataFormats/HcalDetId/interface/HcalSubdetector.h" 00057 00058 // data in edm::event 00059 //#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 00060 //#include "SimDataFormats/Vertex/interface/SimVertexContainer.h" 00061 //#include "SimDataFormats/Track/interface/SimTrackContainer.h" 00062 //#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h" 00063 //#include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h" 00064 00065 // helper files 00066 //#include <CLHEP/Vector/LorentzVector.h> 00067 //#include "DataFormats/Math/interface/LorentzVector.h" 00068 //#include "CLHEP/Units/GlobalSystemOfUnits.h" 00069 00070 #include <iostream> 00071 #include <stdlib.h> 00072 #include <string> 00073 #include <memory> 00074 #include <vector> 00075 00076 #include "TString.h" 00077 00078 class GlobalHitsTester : public edm::EDAnalyzer 00079 { 00080 00081 public: 00082 00083 explicit GlobalHitsTester(const edm::ParameterSet&); 00084 virtual ~GlobalHitsTester(); 00085 virtual void beginJob( void ); 00086 virtual void endJob(); 00087 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00088 virtual void beginRun(const edm::Run&, const edm::EventSetup&); 00089 virtual void endRun(const edm::Run&, const edm::EventSetup&); 00090 00091 00092 private: 00093 std::string fName; 00094 int verbosity; 00095 int frequency; 00096 int vtxunit; 00097 std::string label; 00098 bool getAllProvenances; 00099 bool printProvenanceInfo; 00100 DQMStore *dbe; 00101 std::string outputfile; 00102 bool doOutput; 00103 00104 MonitorElement *meTestString; 00105 MonitorElement *meTestInt; 00106 MonitorElement *meTestFloat; 00107 MonitorElement *meTestTH1F; 00108 MonitorElement *meTestTH2F; 00109 MonitorElement *meTestTH3F; 00110 MonitorElement *meTestProfile1; 00111 MonitorElement *meTestProfile2; 00112 00113 TRandom *Random; 00114 double RandomVal1; 00115 double RandomVal2; 00116 double RandomVal3; 00117 00118 // private statistics information 00119 unsigned int count; 00120 }; 00121 00122 #endif