00001 #ifndef HLTTauDQMOfflineSource_H 00002 #define HLTTauDQMOfflineSource_H 00003 00004 /*Offline DQM For Tau HLT 00005 Author : Michail Bachtis 00006 University of Wisconsin-Madison 00007 bachtis@hep.wisc.edu 00008 */ 00009 00010 #include <memory> 00011 #include <unistd.h> 00012 #include <FWCore/Framework/interface/EDAnalyzer.h> 00013 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00014 #include "DQMServices/Core/interface/MonitorElement.h" 00015 #include "DQMServices/Core/interface/DQMStore.h" 00016 #include "DataFormats/Common/interface/Handle.h" 00017 #include "FWCore/Framework/interface/Event.h" 00018 #include "FWCore/Framework/interface/EventSetup.h" 00019 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00020 #include "FWCore/ServiceRegistry/interface/Service.h" 00021 #include "DataFormats/Math/interface/LorentzVector.h" 00022 #include "DataFormats/HLTReco/interface/TriggerEvent.h" 00023 00024 00025 00026 typedef math::XYZTLorentzVectorD LV; 00027 typedef std::vector<LV> LVColl; 00028 00029 00030 class HLTTauDQMOfflineSource : public edm::EDAnalyzer { 00031 public: 00032 HLTTauDQMOfflineSource( const edm::ParameterSet& ); 00033 ~HLTTauDQMOfflineSource(); 00034 00035 protected: 00036 00038 void beginJob(const edm::EventSetup& c); 00039 00041 void beginRun(const edm::Run& r, const edm::EventSetup& c); 00042 00044 void analyze(const edm::Event& e, const edm::EventSetup& c) ; 00045 00046 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00047 const edm::EventSetup& context) ; 00048 00050 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, 00051 const edm::EventSetup& c); 00052 00054 void endRun(const edm::Run& r, const edm::EventSetup& c); 00055 00057 void endJob(); 00058 00059 00060 00061 private: 00062 DQMStore* dbe_; 00063 00064 /* GENERAL DQM PATH */ 00065 00066 //Set the Monitor Parameters 00067 std::string mainFolder_; //main DQM Folder 00068 std::string monitorName_; 00069 std::string outputFile_; 00070 00071 int counterEvt_; 00072 int prescaleEvt_; 00073 bool disable_; 00074 bool verbose_; //verbose 00075 00076 unsigned nTriggeredTaus_; //Number of Taus required by the Trigger 00077 unsigned nTriggeredLeptons_; //Number of Taus required by the Trigger 00078 int leptonPdgID_; 00079 int tauPdgID_; 00080 00081 //Trigger Event Object 00082 edm::InputTag triggerEvent_; 00083 00084 00085 //Tau Paths 00086 edm::InputTag mainPath_; 00087 edm::InputTag l1BackupPath_; 00088 edm::InputTag l2BackupPath_; 00089 edm::InputTag l25BackupPath_; 00090 edm::InputTag l3BackupPath_; 00091 00092 //Correlations with other Objects 00093 edm::InputTag refTauObjects_; //Reference object collections for Taus 00094 edm::InputTag refLeptonObjects_; //Reference object collections for Leptons 00095 double corrDeltaR_; // Delta R to match to offline 00096 00097 00098 00099 //Et Histogram Limits 00100 double EtMin_; 00101 double EtMax_; 00102 int NEtBins_; 00103 int NEtaBins_; 00104 00105 00106 //Number of reference objects 00107 int NRefEvents; //Reference Reco events 00108 00109 00110 //Path Monitoring 00111 MonitorElement* EventsPassed_; 00112 MonitorElement* EventsPassedMatched_; 00113 MonitorElement* EventsPassedNotMatched_; 00114 MonitorElement* EventsRef_; 00115 00116 //Turn On Curves 00117 00118 00119 00120 bool match(const LV&,const LVColl& ,double); 00121 LVColl importFilterColl(edm::InputTag& filter,int pdgID,const edm::Event& iEvent); 00122 00123 00124 }; 00125 00126 #endif 00127