ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MuonIDMod.h
Revision: 1.31
Committed: Fri Mar 11 15:13:13 2011 UTC (14 years, 1 month ago) by ceballos
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_020pre1
Changes since 1.30: +13 -10 lines
Log Message:
new

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 ceballos 1.31 // $Id: MuonIDMod.h,v 1.30 2011/03/07 12:45:52 ceballos Exp $
3 loizides 1.1 //
4     // MuonIDMod
5     //
6 loizides 1.6 // This module applies muon identification criteria and exports a pointer to a collection
7 loizides 1.7 // of "good muons" according to the specified ID scheme.
8 loizides 1.1 //
9 loizides 1.16 // 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 ceballos 1.15 // Authors: S.Xie
13 loizides 1.1 //--------------------------------------------------------------------------------------------------
14    
15 loizides 1.6 #ifndef MITPHYSICS_MODS_MUONIDMOD_H
16     #define MITPHYSICS_MODS_MUONIDMOD_H
17 loizides 1.1
18     #include "MitAna/TreeMod/interface/BaseMod.h"
19 loizides 1.22 #include "MitAna/DataTree/interface/MuonFwd.h"
20     #include "MitAna/DataTree/interface/VertexFwd.h"
21 ceballos 1.28 #include "MitAna/DataTree/interface/TrackFwd.h"
22     #include "MitAna/DataTree/interface/PFCandidateFwd.h"
23 ceballos 1.5 #include "MitPhysics/Utils/interface/MuonTools.h"
24 ceballos 1.28 #include "MitPhysics/Utils/interface/IsolationTools.h"
25 ceballos 1.31 #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
26 loizides 1.1
27     namespace mithep
28     {
29     class MuonIDMod : public BaseMod
30     {
31     public:
32     MuonIDMod(const char *name="MuonIDMod",
33 loizides 1.6 const char *title="Muon identification module");
34    
35 loizides 1.11 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 ceballos 1.24 Double_t GetPtMin() const { return fMuonPtMin; }
45 loizides 1.20 Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
46 ceballos 1.21 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
47 loizides 1.11 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
48 loizides 1.20 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
49 loizides 1.11 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
50     void SetClassType(const char *type) { fMuonClassType = type; }
51 loizides 1.18 void SetCleanMuonsName(const char *name) { fCleanMuonsName = name; }
52 ceballos 1.29 void SetOldMuonsName(const char *n) { fNonIsolatedMuonsName = n; }
53     void SetOldElectronsName(const char *n) { fNonIsolatedElectronsName = n; }
54 loizides 1.11 void SetCleanName(const char *name) { SetCleanMuonsName(name); }
55 loizides 1.18 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
56 loizides 1.20 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
57 ceballos 1.25 void SetEtaCut(Double_t cut) { fEtaCut = cut; }
58 loizides 1.11 void SetIDType(const char *type) { fMuonIDType = type; }
59     void SetInputName(const char *name) { fMuonBranchName = name; }
60     void SetIsoType(const char *type) { fMuonIsoType = type; }
61     void SetOutputName(const char *name) { SetCleanMuonsName(name); }
62     void SetPtMin(Double_t pt) { fMuonPtMin = pt; }
63 loizides 1.20 void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
64 ceballos 1.21 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
65 loizides 1.11 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
66 loizides 1.6
67     enum EMuIdType {
68     kIdUndef = 0, //not defined
69 ceballos 1.26 kWMuId, //"WMuId"
70     kZMuId, //"ZMuId"
71 loizides 1.6 kTight, //"Tight"
72     kLoose, //"Loose"
73 ceballos 1.27 kWWMuId, //"WWMuId"
74 loizides 1.12 kNoId, //"NoId"
75 loizides 1.6 kCustomId //"Custom"
76     };
77     enum EMuIsoType {
78 ceballos 1.31 kIsoUndef = 0, //"not defined"
79     kTrackCalo, //"TrackCalo"
80     kTrackCaloCombined, //"TrackCaloCombined"
81     kTrackCaloSliding, //"TrackCaloSliding"
82     kTrackCaloSlidingNoCorrection, //"TrackCaloSlidingNoCorrection"
83     kCustomIso, //"Custom"
84     kPFIso, //"PFIso"
85     kPFIsoNoL, //"PFIsoNoL"
86     kNoIso //"NoIso"
87 loizides 1.6 };
88     enum EMuClassType {
89     kClassUndef = 0, //not defined
90     kAll, //"All"
91     kGlobal, //"Global"
92     kSta, //"Standalone"
93 loizides 1.23 kTrackerMuon, //"TrackerMuon"
94     kCaloMuon, //"CaloMuon"
95     kTrackerBased //"TrackerMuon or CaloMuon"
96 loizides 1.6 };
97    
98 loizides 1.1 protected:
99 loizides 1.11 void Process();
100     void SlaveBegin();
101 loizides 1.10
102 loizides 1.11 TString fMuonBranchName; //name of muon collection (input)
103     TString fCleanMuonsName; //name of exported "good muon" collection
104 ceballos 1.29 TString fNonIsolatedMuonsName; //name of imported "old muon" collection
105     TString fNonIsolatedElectronsName;//name of imported "old electron" collection
106 ceballos 1.15 TString fVertexName; //name of vertex collection
107 ceballos 1.28 TString fTrackName; //name of track collection
108     TString fPFCandidatesName; //name of pfcandidates collection
109 loizides 1.11 TString fMuonIDType; //type of muon id scheme we impose
110     TString fMuonIsoType; //type of muon isolations scheme we impose
111     TString fMuonClassType; //type of muon class we impose
112     Double_t fTrackIsolationCut; //cut value for track isolation
113     Double_t fCaloIsolationCut; //cut value for calo isolation
114     Double_t fCombIsolationCut; //cut value for combined isolation
115     Double_t fMuonPtMin; //min muon pt
116 loizides 1.20 Bool_t fApplyD0Cut; //=true then apply d0 cut (def=1)
117 loizides 1.16 Double_t fD0Cut; //max d0
118 ceballos 1.25 Double_t fEtaCut; //max eta, absolute value
119 loizides 1.19 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
120 ceballos 1.21 Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
121 loizides 1.11 EMuIdType fMuIDType; //!muon id type (imposed)
122     EMuIsoType fMuIsoType; //!muon iso type (imposed)
123     EMuClassType fMuClassType; //!muon class type (imposed)
124 loizides 1.16 const MuonCol *fMuons; //!muon collection
125     const VertexCol *fVertices; //!vertices branch
126 ceballos 1.28 const TrackCol *fTracks; //!track branch
127     const PFCandidateCol *fPFCandidates; //!pfcandidate branch
128 ceballos 1.29 MuonCol *fNonIsolatedMuons; //!pointer to old muon collection
129     ElectronCol *fNonIsolatedElectrons;//!pointer to old electron collection
130 ceballos 1.31 TString fPileupEnergyDensityName;
131     const PileupEnergyDensityCol *fPileupEnergyDensity;
132 ceballos 1.28
133 loizides 1.11 ClassDef(MuonIDMod, 1) // Muon identification module
134 loizides 1.1 };
135     }
136     #endif