![]() |
![]() |
00001 // -*- C++ -*- 00002 // 00003 // Package: PATMHTProducer 00004 // Class: PATMHTProducer 00005 // 00013 // 00014 // Original Author: Xin Shi & Freya Blekman, Cornell University 00015 // Created: Fri Sep 12 17:58:29 CEST 2008 00016 // $Id: PATMHTProducer.h,v 1.7 2013/02/27 23:26:56 wmtan Exp $ 00017 // 00018 // 00019 00020 #ifndef PhysicsTools_PatAlgos_PATMHTProducer_h 00021 #define PhysicsTools_PatAlgos_PATMHTProducer_h 00022 00023 00024 00025 // system include files 00026 #include <memory> 00027 00028 // user include files 00029 00030 #include "FWCore/Framework/interface/Event.h" 00031 #include "FWCore/Framework/interface/EDProducer.h" 00032 #include "FWCore/Framework/interface/Frameworkfwd.h" 00033 #include "FWCore/Framework/interface/MakerMacros.h" 00034 00035 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00036 00037 #include "FWCore/ParameterSet/interface/FileInPath.h" 00038 #include "FWCore/Utilities/interface/InputTag.h" 00039 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00040 00041 00042 #include "DataFormats/Candidate/interface/Candidate.h" 00043 #include "DataFormats/Common/interface/View.h" 00044 #include "DataFormats/Math/interface/LorentzVector.h" 00045 #include "DataFormats/PatCandidates/interface/MHT.h" 00046 #include "DataFormats/PatCandidates/interface/Jet.h" 00047 #include "DataFormats/PatCandidates/interface/Photon.h" 00048 #include "DataFormats/PatCandidates/interface/Tau.h" 00049 #include "DataFormats/PatCandidates/interface/Electron.h" 00050 #include "DataFormats/PatCandidates/interface/Muon.h" 00051 00052 00053 #include "RecoMET/METAlgorithms/interface/SignAlgoResolutions.h" 00054 #include "RecoMET/METAlgorithms/interface/significanceAlgo.h" 00055 #include "DataFormats/METReco/interface/SigInputObj.h" 00056 00057 #include "TF1.h" 00058 #include "TMath.h" 00059 00060 // 00061 // class declaration 00062 // 00063 00064 namespace pat { 00065 class PATMHTProducer : public edm::EDProducer { 00066 public: 00067 explicit PATMHTProducer(const edm::ParameterSet&); 00068 ~PATMHTProducer(); 00069 00070 private: 00071 virtual void beginJob() ; 00072 virtual void produce(edm::Event&, const edm::EventSetup&) override; 00073 virtual void endJob() ; 00074 00075 double getJets(edm::Event&, const edm::EventSetup&); 00076 double getElectrons(edm::Event&, const edm::EventSetup&); 00077 double getMuons(edm::Event&, const edm::EventSetup&); 00078 void getTowers(edm::Event&, const edm::EventSetup&); 00079 00080 00081 // ----------member data --------------------------- 00082 00083 double verbose_; 00084 00085 // input tags. 00086 edm::InputTag mhtLabel_; 00087 edm::InputTag jetLabel_; 00088 edm::InputTag eleLabel_; 00089 edm::InputTag muoLabel_; 00090 edm::InputTag tauLabel_; 00091 edm::InputTag phoLabel_; 00092 00093 std::vector<metsig::SigInputObj> physobjvector_ ; 00094 00095 double uncertaintyScaleFactor_; // scale factor for the uncertainty parameters. 00096 bool controlledUncertainty_; // use controlled uncertainty parameters. 00097 00098 00099 //--- test the uncertainty parameters ---// 00100 00101 class uncertaintyFunctions{ 00102 public: 00103 TF1 *etUncertainty; 00104 TF1 *phiUncertainty; 00105 }; 00106 00107 void setUncertaintyParameters();// fills the following uncertaintyFunctions objects: 00108 uncertaintyFunctions ecalEBUncertainty; 00109 uncertaintyFunctions ecalEEUncertainty; 00110 uncertaintyFunctions hcalHBUncertainty; 00111 uncertaintyFunctions hcalHEUncertainty; 00112 uncertaintyFunctions hcalHOUncertainty; 00113 uncertaintyFunctions hcalHFUncertainty; 00114 00115 uncertaintyFunctions jetUncertainty; 00116 uncertaintyFunctions jetCorrUncertainty; 00117 uncertaintyFunctions eleUncertainty; 00118 uncertaintyFunctions muonUncertainty; 00119 uncertaintyFunctions muonCorrUncertainty; 00120 00121 //--- tags and parameters ---// 00122 00123 bool useCaloTowers_; 00124 bool useJets_; 00125 bool useElectrons_; 00126 bool useMuons_; 00127 std::set<CaloTowerDetId> s_clusteredTowers; 00128 00129 bool noHF_; 00130 00131 double jetPtMin_; 00132 double jetEtaMax_; 00133 double jetEMfracMax_; 00134 00135 double elePtMin_; 00136 double eleEtaMax_; 00137 00138 double muonPtMin_; 00139 double muonEtaMax_; 00140 double muonTrackD0Max_; 00141 double muonTrackDzMax_; 00142 int muonNHitsMin_; 00143 double muonDPtMax_; 00144 double muonChiSqMax_; 00145 00146 // double uncertaintyScaleFactor_; // scale factor for the uncertainty parameters. 00147 00148 double jetEtUncertaintyParameter0_ ; 00149 double jetEtUncertaintyParameter1_ ; 00150 double jetEtUncertaintyParameter2_ ; 00151 00152 double jetPhiUncertaintyParameter0_ ; 00153 double jetPhiUncertaintyParameter1_ ; 00154 double jetPhiUncertaintyParameter2_ ; 00155 00156 double eleEtUncertaintyParameter0_ ; 00157 double elePhiUncertaintyParameter0_ ; 00158 00159 double muonEtUncertaintyParameter0_ ; 00160 double muonPhiUncertaintyParameter0_ ; 00161 00162 edm::InputTag CaloJetAlgorithmTag_; 00163 edm::InputTag CorJetAlgorithmTag_; 00164 std::string JetCorrectionService_; 00165 edm::InputTag MuonTag_; 00166 edm::InputTag ElectronTag_; 00167 edm::InputTag CaloTowerTag_; 00168 std::string metCollectionLabel_; 00169 std::string significanceLabel_; 00170 00171 //--- For Muon Calo Deposits ---// 00172 //TrackDetectorAssociator trackAssociator_; 00173 //TrackAssociatorParameters trackAssociatorParameters_; 00174 00175 double towerEtThreshold_ ; 00176 bool useHO_ ; 00177 00178 00179 }; 00180 //define this as a plug-in 00181 00182 } //end of namespace 00183 00184 #endif