00001 // -*- C++ -*- 00002 // 00003 // Package: HSCP 00004 // Class: HSCPValidator 00005 // 00013 // 00014 // Original Author: Seth Cooper,27 1-024,+41227672342, 00015 // Created: Wed Apr 14 14:27:52 CEST 2010 00016 // $Id: HSCPValidator.h,v 1.4 2011/03/15 16:01:46 querten Exp $ 00017 // 00018 // 00019 #include "FWCore/Framework/interface/Frameworkfwd.h" 00020 #include "FWCore/Framework/interface/EDAnalyzer.h" 00021 #include "FWCore/Framework/interface/Event.h" 00022 #include "FWCore/Framework/interface/MakerMacros.h" 00023 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00024 #include "FWCore/Framework/interface/ESHandle.h" 00025 00026 #include "Geometry/RPCGeometry/interface/RPCGeometry.h" 00027 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 00028 #include "FWCore/Common/interface/TriggerResultsByName.h" 00029 #include "DataFormats/HLTReco/interface/TriggerEvent.h" 00030 #include "DataFormats/Common/interface/TriggerResults.h" 00031 #include "DataFormats/HLTReco/interface/TriggerObject.h" 00032 00033 00034 // 00035 00036 #include "TH2F.h" 00037 // 00038 // class declaration 00039 // 00040 00041 class HSCPValidator : public edm::EDAnalyzer { 00042 public: 00043 explicit HSCPValidator(const edm::ParameterSet&); 00044 ~HSCPValidator(); 00045 00046 00047 private: 00048 virtual void beginJob() ; 00049 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00050 virtual void endJob() ; 00051 std::string intToString(int num); 00052 void makeGenPlots(const edm::Event& iEvent); 00053 void makeSimTrackPlots(const edm::Event& iEvent); 00054 void makeSimDigiPlotsECAL(const edm::Event& iEvent); 00055 void makeSimDigiPlotsRPC(const edm::Event& iEvent); 00056 void makeHLTPlots(const edm::Event& iEvent); 00057 bool IncreasedTreshold(const trigger::TriggerEvent& trEv, const edm::InputTag& InputPath, double NewThreshold, int NObjectAboveThreshold, bool averageThreshold); 00058 // ----------member data --------------------------- 00059 bool doGenPlots_; 00060 bool doHLTPlots_; 00061 bool doSimTrackPlots_; 00062 bool doSimDigiPlots_; 00063 bool doRecoPlots_; 00064 00065 // GEN section 00066 edm::InputTag label_; 00067 std::vector<int> particleIds_; 00068 int particleStatus_; 00069 std::map<int,int> particleIdsFoundMap_; 00070 TH1F* particleEtaHist_; 00071 TH1F* particlePhiHist_; 00072 TH1F* particlePHist_; 00073 TH1F* particlePtHist_; 00074 TH1F* particleMassHist_; 00075 TH1F* particleStatusHist_; 00076 TH1F* particleBetaHist_; 00077 TH1F* particleBetaInverseHist_; 00078 TH1F * h_genhscp_met; 00079 TH1F * h_genhscp_met_nohscp; 00080 TH1F * h_genhscp_scaloret; 00081 TH1F * h_genhscp_scaloret_nohscp; 00082 00083 00084 //SIM-Track section 00085 TH1F*simTrackParticleEtaHist_ ; 00086 TH1F* simTrackParticlePhiHist_; 00087 TH1F* simTrackParticlePHist_; 00088 TH1F*simTrackParticlePtHist_; 00089 TH1F* simTrackParticleBetaHist_; 00090 00091 // SIM-DIGI section 00092 edm::InputTag ebSimHitTag_; 00093 edm::InputTag eeSimHitTag_; 00094 edm::InputTag simTrackTag_; 00095 edm::InputTag EBDigiCollection_; 00096 edm::InputTag EEDigiCollection_; 00097 edm::InputTag RPCRecHitTag_; 00098 edm::ESHandle <RPCGeometry> rpcGeo; 00099 // ECAL 00100 TH1F* simHitsEcalEnergyHistEB_; 00101 TH1F* simHitsEcalTimeHistEB_; 00102 TH1F* simHitsEcalNumHistEB_; 00103 TH2F* simHitsEcalEnergyVsTimeHistEB_; 00104 TH1F* simHitsEcalEnergyHistEE_; 00105 TH1F* simHitsEcalTimeHistEE_; 00106 TH1F* simHitsEcalNumHistEE_; 00107 TH2F* simHitsEcalEnergyVsTimeHistEE_; 00108 TH1F* simHitsEcalDigiMatchEnergyHistEB_; 00109 TH1F* simHitsEcalDigiMatchTimeHistEB_; 00110 TH2F* simHitsEcalDigiMatchEnergyVsTimeHistEB_; 00111 TH1F* simHitsEcalDigiMatchEnergyHistEE_; 00112 TH1F* simHitsEcalDigiMatchTimeHistEE_; 00113 TH2F* simHitsEcalDigiMatchEnergyVsTimeHistEE_; 00114 TH1F* simHitsEcalDigiMatchIEtaHist_; 00115 TH1F* simHitsEcalDigiMatchIPhiHist_; 00116 TH1F* digisEcalNumHistEB_; 00117 TH1F* digisEcalNumHistEE_; 00118 TH2F* digiOccupancyMapEB_; 00119 TH2F* digiOccupancyMapEEP_; 00120 TH2F* digiOccupancyMapEEM_; 00121 // RPC 00122 TH1F* residualsRPCRecHitSimDigis_; 00123 TH1F* efficiencyRPCRecHitSimDigis_; 00124 TH1F* cluSizeDistribution_; 00125 TH1F* rpcTimeOfFlightBarrel_[6]; 00126 TH1F* rpcBXBarrel_[6]; 00127 TH1F* rpcTimeOfFlightEndCap_[3]; 00128 TH1F* rpcBXEndCap_[3]; 00129 //HLT 00130 TH1F* hltmet100_; 00131 TH1F* hltjet140_; 00132 TH1F* hltmu15_; 00133 00134 };