1 |
dgele |
1.1 |
//
|
2 |
|
|
// $Id: PATMuonProducer.h,v 1.14.2.6 2009/04/30 09:11:46 gpetrucc Exp $
|
3 |
|
|
//
|
4 |
|
|
|
5 |
|
|
#ifndef PhysicsTools_PatAlgos_PATMuonProducer_h
|
6 |
|
|
#define PhysicsTools_PatAlgos_PATMuonProducer_h
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
\class pat::PATMuonProducer PATMuonProducer.h "PhysicsTools/PatAlgos/interface/PATMuonProducer.h"
|
10 |
|
|
\brief Produces pat::Muon's
|
11 |
|
|
|
12 |
|
|
The PATMuonProducer produces analysis-level pat::Muon's starting from
|
13 |
|
|
a collection of objects of MuonType.
|
14 |
|
|
|
15 |
|
|
\author Steven Lowette, Roger Wolf
|
16 |
|
|
\version $Id: PATMuonProducer.h,v 1.14.2.6 2009/04/30 09:11:46 gpetrucc Exp $
|
17 |
|
|
*/
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
#include "FWCore/Framework/interface/EDProducer.h"
|
21 |
|
|
#include "FWCore/Framework/interface/Event.h"
|
22 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
23 |
|
|
#include "FWCore/ParameterSet/interface/InputTag.h"
|
24 |
|
|
#include "DataFormats/Common/interface/View.h"
|
25 |
|
|
|
26 |
|
|
#include "PhysicsTools/Utilities/interface/PtComparator.h"
|
27 |
|
|
|
28 |
|
|
#include "DataFormats/PatCandidates/interface/Muon.h"
|
29 |
|
|
|
30 |
|
|
#include "PhysicsTools/PatAlgos/interface/MultiIsolator.h"
|
31 |
|
|
#include "PhysicsTools/PatAlgos/interface/EfficiencyLoader.h"
|
32 |
|
|
#include "PhysicsTools/PatAlgos/interface/KinResolutionsLoader.h"
|
33 |
|
|
|
34 |
|
|
#include "DataFormats/PatCandidates/interface/UserData.h"
|
35 |
|
|
#include "PhysicsTools/PatAlgos/interface/PATUserDataHelper.h"
|
36 |
|
|
|
37 |
|
|
#include <string>
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
namespace pat {
|
41 |
|
|
|
42 |
|
|
class LeptonLRCalc;
|
43 |
|
|
class TrackerIsolationPt;
|
44 |
|
|
class CaloIsolationEnergy;
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
class PATMuonProducer : public edm::EDProducer {
|
48 |
|
|
|
49 |
|
|
public:
|
50 |
|
|
|
51 |
|
|
explicit PATMuonProducer(const edm::ParameterSet & iConfig);
|
52 |
|
|
~PATMuonProducer();
|
53 |
|
|
|
54 |
|
|
virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup);
|
55 |
|
|
typedef edm::RefToBase<MuonType> MuonBaseRef;
|
56 |
|
|
|
57 |
|
|
private:
|
58 |
|
|
|
59 |
|
|
// configurables
|
60 |
|
|
edm::InputTag muonSrc_;
|
61 |
|
|
|
62 |
|
|
bool embedTrack_;
|
63 |
|
|
bool embedStandAloneMuon_;
|
64 |
|
|
bool embedCombinedMuon_;
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
bool embedPickyMuon_;
|
68 |
|
|
bool embedTpfmsMuon_;
|
69 |
|
|
|
70 |
|
|
bool addTeVRefits_;
|
71 |
|
|
edm::InputTag pickySrc_;
|
72 |
|
|
edm::InputTag tpfmsSrc_;
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
bool addGenMatch_;
|
76 |
|
|
bool embedGenMatch_;
|
77 |
|
|
std::vector<edm::InputTag> genMatchSrc_;
|
78 |
|
|
bool addTrigMatch_;
|
79 |
|
|
std::vector<edm::InputTag> trigMatchSrc_;
|
80 |
|
|
bool addLRValues_;
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
// pflow specific
|
84 |
|
|
bool useParticleFlow_;
|
85 |
|
|
edm::InputTag pfMuonSrc_;
|
86 |
|
|
bool embedPFCandidate_;
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
typedef std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > GenAssociations;
|
90 |
|
|
|
91 |
|
|
typedef std::vector<edm::Handle<edm::Association<TriggerPrimitiveCollection> > > TrigAssociations;
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
void fillMuon( Muon& aMuon,
|
95 |
|
|
const MuonBaseRef& muonRef,
|
96 |
|
|
const reco::CandidateBaseRef& baseRef,
|
97 |
|
|
const GenAssociations& genMatches,
|
98 |
|
|
const TrigAssociations& trigMatches) const;
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
// tools
|
103 |
|
|
GreaterByPt<Muon> pTComparator_;
|
104 |
|
|
|
105 |
|
|
pat::helper::MultiIsolator isolator_;
|
106 |
|
|
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_; // better here than recreate at each event
|
107 |
|
|
std::vector<std::pair<pat::IsolationKeys,edm::InputTag> > isoDepositLabels_;
|
108 |
|
|
|
109 |
|
|
bool addEfficiencies_;
|
110 |
|
|
pat::helper::EfficiencyLoader efficiencyLoader_;
|
111 |
|
|
|
112 |
|
|
bool addResolutions_;
|
113 |
|
|
pat::helper::KinResolutionsLoader resolutionLoader_;
|
114 |
|
|
|
115 |
|
|
bool useUserData_;
|
116 |
|
|
pat::PATUserDataHelper<pat::Muon> userDataHelper_;
|
117 |
|
|
|
118 |
|
|
};
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
}
|
122 |
|
|
|
123 |
|
|
#endif
|