ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MuonIDMod.h
Revision: 1.23
Committed: Fri Jul 17 12:11:36 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010
Changes since 1.22: +4 -2 lines
Log Message:
Added kTrackerMuon kCaloMuon kTrackerBased.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: MuonIDMod.h,v 1.22 2009/06/15 15:00:21 loizides 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(Double_t pt) 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 SetIDType(const char *type) { fMuonIDType = type; }
52 void SetInputName(const char *name) { fMuonBranchName = name; }
53 void SetIsoType(const char *type) { fMuonIsoType = type; }
54 void SetOutputName(const char *name) { SetCleanMuonsName(name); }
55 void SetPtMin(Double_t pt) { fMuonPtMin = pt; }
56 void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
57 void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
58 void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
59
60 enum EMuIdType {
61 kIdUndef = 0, //not defined
62 kTight, //"Tight"
63 kLoose, //"Loose"
64 kNoId, //"NoId"
65 kCustomId //"Custom"
66 };
67 enum EMuIsoType {
68 kIsoUndef = 0, //not defined
69 kTrackCalo, //"TrackCalo"
70 kTrackCaloCombined, //"TrackCaloCombined"
71 kTrackCaloSliding, //"TrackCaloSliding"
72 kCustomIso, //"Custom"
73 kNoIso //"NoIso"
74 };
75 enum EMuClassType {
76 kClassUndef = 0, //not defined
77 kAll, //"All"
78 kGlobal, //"Global"
79 kSta, //"Standalone"
80 kTrackerMuon, //"TrackerMuon"
81 kCaloMuon, //"CaloMuon"
82 kTrackerBased //"TrackerMuon or CaloMuon"
83 };
84
85 protected:
86 void Process();
87 void SlaveBegin();
88
89 TString fMuonBranchName; //name of muon collection (input)
90 TString fCleanMuonsName; //name of exported "good muon" collection
91 TString fVertexName; //name of vertex collection
92 TString fMuonIDType; //type of muon id scheme we impose
93 TString fMuonIsoType; //type of muon isolations scheme we impose
94 TString fMuonClassType; //type of muon class we impose
95 Double_t fTrackIsolationCut; //cut value for track isolation
96 Double_t fCaloIsolationCut; //cut value for calo isolation
97 Double_t fCombIsolationCut; //cut value for combined isolation
98 Double_t fMuonPtMin; //min muon pt
99 Bool_t fApplyD0Cut; //=true then apply d0 cut (def=1)
100 Double_t fD0Cut; //max d0
101 Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
102 Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
103 EMuIdType fMuIDType; //!muon id type (imposed)
104 EMuIsoType fMuIsoType; //!muon iso type (imposed)
105 EMuClassType fMuClassType; //!muon class type (imposed)
106 const MuonCol *fMuons; //!muon collection
107 const VertexCol *fVertices; //!vertices branch
108 MuonTools *fMuonTools; //!muon tool
109
110 ClassDef(MuonIDMod, 1) // Muon identification module
111 };
112 }
113 #endif