ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MuonIDMod.h
Revision: 1.26
Committed: Sat Oct 9 18:42:16 2010 UTC (14 years, 6 months ago) by ceballos
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_015b, Mit_015a, Mit_015
Changes since 1.25: +3 -1 lines
Log Message:
added W and Z id selections

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: MuonIDMod.h,v 1.25 2010/05/27 07:58:59 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 "MitPhysics/Utils/interface/MuonTools.h"
22
23 namespace mithep
24 {
25 class MuonIDMod : public BaseMod
26 {
27 public:
28 MuonIDMod(const char *name="MuonIDMod",
29 const char *title="Muon identification module");
30
31 Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
32 const char *GetClassType() const { return fMuonClassType; }
33 const char *GetCleanName() const { return GetCleanMuonsName(); }
34 const char *GetCleanMuonsName() const { return fCleanMuonsName; }
35 Double_t GetCombIsoCut() const { return fCombIsolationCut; }
36 const char *GetIDType() const { return fMuonIDType; }
37 const char *GetInputName() const { return fMuonBranchName; }
38 const char *GetIsoType() const { return fMuonIsoType; }
39 const char *GetOutputName() const { return GetCleanMuonsName(); }
40 Double_t GetPtMin() const { return fMuonPtMin; }
41 Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
42 Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
43 Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
44 void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = b; }
45 void SetCaloIsoCut(Double_t cut) { fCaloIsolationCut = cut; }
46 void SetClassType(const char *type) { fMuonClassType = type; }
47 void SetCleanMuonsName(const char *name) { fCleanMuonsName = name; }
48 void SetCleanName(const char *name) { SetCleanMuonsName(name); }
49 void SetCombIsoCut(Double_t cut) { fCombIsolationCut = cut; }
50 void SetD0Cut(Double_t cut) { fD0Cut = cut; }
51 void SetEtaCut(Double_t cut) { fEtaCut = cut; }
52 void SetIDType(const char *type) { fMuonIDType = type; }
53 void SetInputName(const char *name) { fMuonBranchName = name; }
54 void SetIsoType(const char *type) { fMuonIsoType = type; }
55 void SetOutputName(const char *name) { SetCleanMuonsName(name); }
56 void SetPtMin(Double_t pt) { fMuonPtMin = pt; }
57 void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
58 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
59 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
60
61 enum EMuIdType {
62 kIdUndef = 0, //not defined
63 kWMuId, //"WMuId"
64 kZMuId, //"ZMuId"
65 kTight, //"Tight"
66 kLoose, //"Loose"
67 kMinimal, //"Minimal"
68 kNoId, //"NoId"
69 kCustomId //"Custom"
70 };
71 enum EMuIsoType {
72 kIsoUndef = 0, //not defined
73 kTrackCalo, //"TrackCalo"
74 kTrackCaloCombined, //"TrackCaloCombined"
75 kTrackCaloSliding, //"TrackCaloSliding"
76 kCustomIso, //"Custom"
77 kNoIso //"NoIso"
78 };
79 enum EMuClassType {
80 kClassUndef = 0, //not defined
81 kAll, //"All"
82 kGlobal, //"Global"
83 kSta, //"Standalone"
84 kTrackerMuon, //"TrackerMuon"
85 kCaloMuon, //"CaloMuon"
86 kTrackerBased //"TrackerMuon or CaloMuon"
87 };
88
89 protected:
90 void Process();
91 void SlaveBegin();
92
93 TString fMuonBranchName; //name of muon collection (input)
94 TString fCleanMuonsName; //name of exported "good muon" collection
95 TString fVertexName; //name of vertex collection
96 TString fMuonIDType; //type of muon id scheme we impose
97 TString fMuonIsoType; //type of muon isolations scheme we impose
98 TString fMuonClassType; //type of muon class we impose
99 Double_t fTrackIsolationCut; //cut value for track isolation
100 Double_t fCaloIsolationCut; //cut value for calo isolation
101 Double_t fCombIsolationCut; //cut value for combined isolation
102 Double_t fMuonPtMin; //min muon pt
103 Bool_t fApplyD0Cut; //=true then apply d0 cut (def=1)
104 Double_t fD0Cut; //max d0
105 Double_t fEtaCut; //max eta, absolute value
106 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
107 Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
108 EMuIdType fMuIDType; //!muon id type (imposed)
109 EMuIsoType fMuIsoType; //!muon iso type (imposed)
110 EMuClassType fMuClassType; //!muon class type (imposed)
111 const MuonCol *fMuons; //!muon collection
112 const VertexCol *fVertices; //!vertices branch
113 MuonTools *fMuonTools; //!muon tool
114
115 ClassDef(MuonIDMod, 1) // Muon identification module
116 };
117 }
118 #endif