CMS 3D CMS Logo

PATMuonProducer.h

Go to the documentation of this file.
00001 //
00002 // $Id: PATMuonProducer.h,v 1.14.2.5 2009/03/25 12:48:09 lusito Exp $
00003 //
00004 
00005 #ifndef PhysicsTools_PatAlgos_PATMuonProducer_h
00006 #define PhysicsTools_PatAlgos_PATMuonProducer_h
00007 
00020 #include "FWCore/Framework/interface/EDProducer.h"
00021 #include "FWCore/Framework/interface/Event.h"
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include "FWCore/ParameterSet/interface/InputTag.h"
00024 #include "DataFormats/Common/interface/View.h"
00025 
00026 #include "PhysicsTools/Utilities/interface/PtComparator.h"
00027 
00028 #include "DataFormats/PatCandidates/interface/Muon.h"
00029 
00030 #include "PhysicsTools/PatAlgos/interface/MultiIsolator.h"
00031 #include "PhysicsTools/PatAlgos/interface/EfficiencyLoader.h"
00032 
00033 #include "DataFormats/PatCandidates/interface/UserData.h"
00034 #include "PhysicsTools/PatAlgos/interface/PATUserDataHelper.h"
00035 
00036 #include <string>
00037 
00038 
00039 namespace pat {
00040 
00041   class LeptonLRCalc;
00042   class TrackerIsolationPt;
00043   class CaloIsolationEnergy;
00044 
00045 
00046   class PATMuonProducer : public edm::EDProducer {
00047 
00048     public:
00049 
00050       explicit PATMuonProducer(const edm::ParameterSet & iConfig);
00051       ~PATMuonProducer();
00052 
00053       virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup);
00054       typedef edm::RefToBase<MuonType> MuonBaseRef;
00055 
00056     private:
00057 
00058       // configurables
00059       edm::InputTag muonSrc_;
00060 
00061       bool          embedTrack_;
00062       bool          embedStandAloneMuon_;
00063       bool          embedCombinedMuon_;
00064 
00065 
00066       bool          embedPickyMuon_;
00067       bool          embedTpfmsMuon_;
00068       
00069       bool          addTeVRefits_;
00070       edm::InputTag pickySrc_;
00071       edm::InputTag tpfmsSrc_;
00072 
00073   
00074       bool          addGenMatch_;
00075       bool          embedGenMatch_;
00076       std::vector<edm::InputTag> genMatchSrc_;
00077       bool          addTrigMatch_;
00078       std::vector<edm::InputTag> trigMatchSrc_;
00079       bool          addResolutions_;
00080       bool          addLRValues_;
00081 
00082 
00083       // pflow specific
00084       bool          useParticleFlow_;
00085       edm::InputTag pfMuonSrc_;
00086       bool          embedPFCandidate_;
00087 
00088 
00089       typedef std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > GenAssociations;
00090 
00091       typedef std::vector<edm::Handle<edm::Association<TriggerPrimitiveCollection> > > TrigAssociations;
00092 
00093 
00094       void fillMuon( Muon& aMuon, 
00095                      const MuonBaseRef& muonRef,
00096                      const reco::CandidateBaseRef& baseRef,
00097                      const GenAssociations& genMatches,
00098                      const TrigAssociations&  trigMatches) const;
00099 
00100      
00101 
00102       // tools
00103       GreaterByPt<Muon>      pTComparator_;
00104 
00105       pat::helper::MultiIsolator isolator_; 
00106       pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_; // better here than recreate at each event
00107       std::vector<std::pair<pat::IsolationKeys,edm::InputTag> > isoDepositLabels_;
00108 
00109       bool addEfficiencies_;
00110       pat::helper::EfficiencyLoader efficiencyLoader_;
00111 
00112       bool useUserData_;
00113       pat::PATUserDataHelper<pat::Muon>      userDataHelper_;
00114 
00115   };
00116 
00117 
00118 }
00119 
00120 #endif

Generated on Tue Jun 9 17:41:40 2009 for CMSSW by  doxygen 1.5.4