CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/PhysicsTools/PatAlgos/plugins/PATMHTProducer.h

Go to the documentation of this file.
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.5 2010/02/20 21:00:24 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/SigInputObj.h"
00054 #include "RecoMET/METAlgorithms/interface/SignAlgoResolutions.h"
00055 #include "RecoMET/METAlgorithms/interface/significanceAlgo.h"
00056 
00057 
00058 #include "TF1.h"
00059 #include "TMath.h"
00060 
00061 //
00062 // class declaration
00063 //
00064 
00065 namespace pat {
00066   class PATMHTProducer : public edm::EDProducer {
00067   public:
00068     explicit PATMHTProducer(const edm::ParameterSet&);
00069     ~PATMHTProducer();
00070     
00071   private:
00072     virtual void beginJob() ;
00073     virtual void beginRun(const edm::EventSetup&) ;
00074     virtual void produce(edm::Event&, const edm::EventSetup&);
00075     virtual void endJob() ;
00076     
00077     double getJets(edm::Event&, const edm::EventSetup&);
00078     double getElectrons(edm::Event&, const edm::EventSetup&);
00079     double getMuons(edm::Event&, const edm::EventSetup&);
00080     void   getTowers(edm::Event&, const edm::EventSetup&);
00081     
00082     
00083     // ----------member data ---------------------------
00084     
00085     double verbose_;
00086     
00087     // input tags.
00088     edm::InputTag mhtLabel_;
00089     edm::InputTag jetLabel_;
00090     edm::InputTag eleLabel_;
00091     edm::InputTag muoLabel_;
00092     edm::InputTag tauLabel_;
00093     edm::InputTag phoLabel_;
00094   
00095     std::vector<metsig::SigInputObj> physobjvector_ ;
00096 
00097     double uncertaintyScaleFactor_; // scale factor for the uncertainty parameters.
00098     bool    controlledUncertainty_; // use controlled uncertainty parameters.
00099 
00100  
00101     //--- test the uncertainty parameters ---//
00102 
00103     class uncertaintyFunctions{
00104     public:
00105       TF1 *etUncertainty;
00106       TF1 *phiUncertainty;
00107     };
00108 
00109     void setUncertaintyParameters();// fills the following uncertaintyFunctions objects:
00110     uncertaintyFunctions ecalEBUncertainty;
00111     uncertaintyFunctions ecalEEUncertainty;
00112     uncertaintyFunctions hcalHBUncertainty;
00113     uncertaintyFunctions hcalHEUncertainty;
00114     uncertaintyFunctions hcalHOUncertainty;
00115     uncertaintyFunctions hcalHFUncertainty;
00116 
00117     uncertaintyFunctions jetUncertainty;
00118     uncertaintyFunctions jetCorrUncertainty;
00119     uncertaintyFunctions eleUncertainty;
00120     uncertaintyFunctions muonUncertainty;
00121     uncertaintyFunctions muonCorrUncertainty;
00122 
00123     //--- tags and parameters ---//
00124 
00125     bool useCaloTowers_;
00126     bool useJets_;
00127     bool useElectrons_;
00128     bool useMuons_;
00129     std::set<CaloTowerDetId> s_clusteredTowers; 
00130 
00131     bool noHF_;
00132 
00133     double jetPtMin_;
00134     double jetEtaMax_;
00135     double jetEMfracMax_;
00136 
00137     double elePtMin_;
00138     double eleEtaMax_;
00139 
00140     double muonPtMin_;
00141     double muonEtaMax_;
00142     double muonTrackD0Max_;
00143     double muonTrackDzMax_;
00144     int muonNHitsMin_;
00145     double muonDPtMax_;
00146     double muonChiSqMax_;
00147 
00148     //  double uncertaintyScaleFactor_; // scale factor for the uncertainty parameters.
00149 
00150     double jetEtUncertaintyParameter0_ ; 
00151     double jetEtUncertaintyParameter1_ ; 
00152     double jetEtUncertaintyParameter2_ ; 
00153 
00154     double jetPhiUncertaintyParameter0_ ; 
00155     double jetPhiUncertaintyParameter1_ ; 
00156     double jetPhiUncertaintyParameter2_ ; 
00157 
00158     double eleEtUncertaintyParameter0_ ; 
00159     double elePhiUncertaintyParameter0_ ; 
00160 
00161     double muonEtUncertaintyParameter0_ ; 
00162     double muonPhiUncertaintyParameter0_ ; 
00163 
00164     edm::InputTag CaloJetAlgorithmTag_; 
00165     edm::InputTag CorJetAlgorithmTag_;
00166     std::string   JetCorrectionService_;
00167     edm::InputTag MuonTag_;
00168     edm::InputTag ElectronTag_;
00169     edm::InputTag CaloTowerTag_;
00170     std::string metCollectionLabel_;
00171     std::string significanceLabel_;
00172 
00173     //--- For Muon Calo Deposits ---//
00174     //TrackDetectorAssociator   trackAssociator_; 
00175     //TrackAssociatorParameters trackAssociatorParameters_;
00176 
00177     double towerEtThreshold_ ; 
00178     bool useHO_ ; 
00179 
00180 
00181   };
00182   //define this as a plug-in
00183 
00184 } //end of namespace
00185 
00186 #endif