ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MuonIDMod.h
Revision: 1.37
Committed: Tue Oct 11 17:00:24 2011 UTC (13 years, 6 months ago) by ceballos
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_025c, Mit_025b, Mit_025a
Changes since 1.36: +2 -1 lines
Log Message:
adding new id

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: MuonIDMod.h,v 1.36 2011/09/16 14:09:17 ceballos Exp $
3 //
4 // MuonIDMod
5 //
6 // This module applies muon identification criteria and exports a pointer to a collection
7 // of "good muons" according to the specified ID scheme.
8 //
9 // See http://indico.cern.ch/contributionDisplay.py?contribId=1&confId=45945
10 // See http://indico.cern.ch/getFile.py/access?contribId=1&resId=0&materialId=slides&confId=42229
11 //
12 // Authors: S.Xie
13 //--------------------------------------------------------------------------------------------------
14
15 #ifndef MITPHYSICS_MODS_MUONIDMOD_H
16 #define MITPHYSICS_MODS_MUONIDMOD_H
17
18 #include "MitAna/TreeMod/interface/BaseMod.h"
19 #include "MitAna/DataTree/interface/MuonFwd.h"
20 #include "MitAna/DataTree/interface/VertexFwd.h"
21 #include "MitAna/DataTree/interface/TrackFwd.h"
22 #include "MitAna/DataTree/interface/PFCandidateFwd.h"
23 #include "MitPhysics/Utils/interface/MuonTools.h"
24 #include "MitPhysics/Utils/interface/IsolationTools.h"
25 #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
26
27 namespace mithep
28 {
29 class MuonIDMod : public BaseMod
30 {
31 public:
32 MuonIDMod(const char *name="MuonIDMod",
33 const char *title="Muon identification module");
34
35 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
36 const char *GetClassType() const { return fMuonClassType; }
37 const char *GetCleanName() const { return GetCleanMuonsName(); }
38 const char *GetCleanMuonsName() const { return fCleanMuonsName; }
39 Double_t GetCombIsoCut() const { return fCombIsolationCut; }
40 const char *GetIDType() const { return fMuonIDType; }
41 const char *GetInputName() const { return fMuonBranchName; }
42 const char *GetIsoType() const { return fMuonIsoType; }
43 const char *GetOutputName() const { return GetCleanMuonsName(); }
44 Double_t GetPtMin() const { return fMuonPtMin; }
45 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
46 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
47 void SetApplyDZCut(Bool_t b) { fApplyDZCut = b; }
48 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
49 void SetClassType(const char *type) { fMuonClassType = type; }
50 void SetCleanMuonsName(const char *name) { fCleanMuonsName = name; }
51 void SetOldMuonsName(const char *n) { fNonIsolatedMuonsName = n; }
52 void SetOldElectronsName(const char *n) { fNonIsolatedElectronsName = n; }
53 void SetCleanName(const char *name) { SetCleanMuonsName(name); }
54 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
55 void SetCombRelativeIsoCut(Double_t cut) { fCombRelativeIsolationCut = cut; }
56 void SetPFIsoCut(Double_t cut) { fPFIsolationCut = cut; }
57 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
58 void SetDZCut(Double_t cut) { fDZCut = cut; }
59 void SetWhichVertex(Int_t d) { fWhichVertex = d; }
60 void SetEtaCut(Double_t cut) { fEtaCut = cut; }
61 void SetIDType(const char *type) { fMuonIDType = type; }
62 void SetInputName(const char *name) { fMuonBranchName = name; }
63 void SetIsoType(const char *type) { fMuonIsoType = type; }
64 void SetOutputName(const char *name) { SetCleanMuonsName(name); }
65 void SetPtMin(Double_t pt) { fMuonPtMin = pt; }
66 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
67 void SetIntRadius(Double_t dr) { fIntRadius = dr; }
68
69 enum EMuIdType {
70 kIdUndef = 0, //not defined
71 kWMuId, //"WMuId"
72 kZMuId, //"ZMuId"
73 kTight, //"Tight"
74 kLoose, //"Loose"
75 kWWMuIdV1, //"WWMuIdV1"
76 kWWMuIdV2, //"WWMuIdV2"
77 kWWMuIdV3, //"WWMuIdV3"
78 kNoId, //"NoId"
79 kCustomId //"Custom"
80 };
81 enum EMuIsoType {
82 kIsoUndef = 0, //"not defined"
83 kTrackCalo, //"TrackCalo"
84 kTrackCaloCombined, //"TrackCaloCombined"
85 kTrackCaloSliding, //"TrackCaloSliding"
86 kTrackCaloSlidingNoCorrection, //"TrackCaloSlidingNoCorrection"
87 kCombinedRelativeConeAreaCorrected, //"CombinedRelativeConeAreaCorrected"
88 kCustomIso, //"Custom"
89 kPFIso, //"PFIso"
90 kPFIsoNoL, //"PFIsoNoL"
91 kNoIso //"NoIso"
92 };
93 enum EMuClassType {
94 kClassUndef = 0, //not defined
95 kAll, //"All"
96 kGlobal, //"Global"
97 kGlobalTracker, //"GlobalTracker"
98 kSta, //"Standalone"
99 kTrackerMuon, //"TrackerMuon"
100 kCaloMuon, //"CaloMuon"
101 kTrackerBased //"TrackerMuon or CaloMuon"
102 };
103
104 protected:
105 void Process();
106 void SlaveBegin();
107
108 TString fMuonBranchName; //name of muon collection (input)
109 TString fCleanMuonsName; //name of exported "good muon" collection
110 TString fNonIsolatedMuonsName; //name of imported "old muon" collection
111 TString fNonIsolatedElectronsName;//name of imported "old electron" collection
112 TString fVertexName; //name of vertex collection
113 TString fBeamSpotName; //name of beamspot collection
114 TString fTrackName; //name of track collection
115 TString fPFCandidatesName; //name of pfcandidates collection
116 TString fMuonIDType; //type of muon id scheme we impose
117 TString fMuonIsoType; //type of muon isolations scheme we impose
118 TString fMuonClassType; //type of muon class we impose
119 Double_t fTrackIsolationCut; //cut value for track isolation
120 Double_t fCaloIsolationCut; //cut value for calo isolation
121 Double_t fCombIsolationCut; //cut value for combined isolation
122 Double_t fCombRelativeIsolationCut; //cut value for combined relative isolation
123 Double_t fPFIsolationCut; //cut value for combined isolation
124 Double_t fMuonPtMin; //min muon pt
125 Bool_t fApplyD0Cut; //=true then apply d0 cut (def=1)
126 Bool_t fApplyDZCut; //=true then apply dz cut (def=1)
127 Double_t fD0Cut; //max d0
128 Double_t fDZCut; //max dz
129 Int_t fWhichVertex; //vertex to use (-2: beamspot, -1: closest in Z)
130 Double_t fEtaCut; //max eta, absolute value
131 EMuIdType fMuIDType; //!muon id type (imposed)
132 EMuIsoType fMuIsoType; //!muon iso type (imposed)
133 EMuClassType fMuClassType; //!muon class type (imposed)
134 const MuonCol *fMuons; //!muon collection
135 const VertexCol *fVertices; //!vertices branch
136 const BeamSpotCol *fBeamSpot; //!beamspot branch
137 const TrackCol *fTracks; //!track branch
138 const PFCandidateCol *fPFCandidates; //!pfcandidate branch
139 Double_t fIntRadius; //!min IntRadius cut in pf isolation
140 MuonCol *fNonIsolatedMuons; //!pointer to old muon collection
141 ElectronCol *fNonIsolatedElectrons;//!pointer to old electron collection
142 TString fPileupEnergyDensityName;
143 const PileupEnergyDensityCol *fPileupEnergyDensity;
144
145 ClassDef(MuonIDMod, 1) // Muon identification module
146 };
147 }
148 #endif