1 |
//--------------------------------------------------------------------------------------------------
|
2 |
// $Id: MuonIDMod.h,v 1.29 2011/02/23 10:37:12 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 |
|
26 |
namespace mithep
|
27 |
{
|
28 |
class MuonIDMod : public BaseMod
|
29 |
{
|
30 |
public:
|
31 |
MuonIDMod(const char *name="MuonIDMod",
|
32 |
const char *title="Muon identification module");
|
33 |
|
34 |
Double_t GetCaloIsoCut() const { return fCaloIsolationCut; }
|
35 |
const char *GetClassType() const { return fMuonClassType; }
|
36 |
const char *GetCleanName() const { return GetCleanMuonsName(); }
|
37 |
const char *GetCleanMuonsName() const { return fCleanMuonsName; }
|
38 |
Double_t GetCombIsoCut() const { return fCombIsolationCut; }
|
39 |
const char *GetIDType() const { return fMuonIDType; }
|
40 |
const char *GetInputName() const { return fMuonBranchName; }
|
41 |
const char *GetIsoType() const { return fMuonIsoType; }
|
42 |
const char *GetOutputName() const { return GetCleanMuonsName(); }
|
43 |
Double_t GetPtMin() const { return fMuonPtMin; }
|
44 |
Bool_t GetReverseIsoCut() const { return fReverseIsoCut; }
|
45 |
Bool_t GetReverseD0Cut() const { return fReverseD0Cut; }
|
46 |
Double_t GetTrackIsoCut() const { return fTrackIsolationCut; }
|
47 |
void SetApplyD0Cut(Bool_t b) { fApplyD0Cut = 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 SetD0Cut(Double_t cut) { fD0Cut = cut; }
|
56 |
void SetEtaCut(Double_t cut) { fEtaCut = cut; }
|
57 |
void SetIDType(const char *type) { fMuonIDType = type; }
|
58 |
void SetInputName(const char *name) { fMuonBranchName = name; }
|
59 |
void SetIsoType(const char *type) { fMuonIsoType = type; }
|
60 |
void SetOutputName(const char *name) { SetCleanMuonsName(name); }
|
61 |
void SetPtMin(Double_t pt) { fMuonPtMin = pt; }
|
62 |
void SetReverseIsoCut(Bool_t b) { fReverseIsoCut = b; }
|
63 |
void SetReverseD0Cut(Bool_t b) { fReverseD0Cut = b; }
|
64 |
void SetTrackIsoCut(Double_t cut) { fTrackIsolationCut = cut; }
|
65 |
|
66 |
enum EMuIdType {
|
67 |
kIdUndef = 0, //not defined
|
68 |
kWMuId, //"WMuId"
|
69 |
kZMuId, //"ZMuId"
|
70 |
kTight, //"Tight"
|
71 |
kLoose, //"Loose"
|
72 |
kWWMuId, //"WWMuId"
|
73 |
kNoId, //"NoId"
|
74 |
kCustomId //"Custom"
|
75 |
};
|
76 |
enum EMuIsoType {
|
77 |
kIsoUndef = 0, //not defined
|
78 |
kTrackCalo, //"TrackCalo"
|
79 |
kTrackCaloCombined, //"TrackCaloCombined"
|
80 |
kTrackCaloSliding, //"TrackCaloSliding"
|
81 |
kTrackCaloSlidingNoBeta, //"TrackCaloSlidingNoBeta"
|
82 |
kCustomIso, //"Custom"
|
83 |
kPFIso, //"PFIso"
|
84 |
kPFIsoNoL, //"PFIsoNoL"
|
85 |
kNoIso //"NoIso"
|
86 |
};
|
87 |
enum EMuClassType {
|
88 |
kClassUndef = 0, //not defined
|
89 |
kAll, //"All"
|
90 |
kGlobal, //"Global"
|
91 |
kSta, //"Standalone"
|
92 |
kTrackerMuon, //"TrackerMuon"
|
93 |
kCaloMuon, //"CaloMuon"
|
94 |
kTrackerBased //"TrackerMuon or CaloMuon"
|
95 |
};
|
96 |
|
97 |
protected:
|
98 |
void Process();
|
99 |
void SlaveBegin();
|
100 |
|
101 |
TString fMuonBranchName; //name of muon collection (input)
|
102 |
TString fCleanMuonsName; //name of exported "good muon" collection
|
103 |
TString fNonIsolatedMuonsName; //name of imported "old muon" collection
|
104 |
TString fNonIsolatedElectronsName;//name of imported "old electron" collection
|
105 |
TString fVertexName; //name of vertex collection
|
106 |
TString fTrackName; //name of track collection
|
107 |
TString fPFCandidatesName; //name of pfcandidates collection
|
108 |
TString fMuonIDType; //type of muon id scheme we impose
|
109 |
TString fMuonIsoType; //type of muon isolations scheme we impose
|
110 |
TString fMuonClassType; //type of muon class we impose
|
111 |
Double_t fTrackIsolationCut; //cut value for track isolation
|
112 |
Double_t fCaloIsolationCut; //cut value for calo isolation
|
113 |
Double_t fCombIsolationCut; //cut value for combined isolation
|
114 |
Double_t fMuonPtMin; //min muon pt
|
115 |
Bool_t fApplyD0Cut; //=true then apply d0 cut (def=1)
|
116 |
Double_t fD0Cut; //max d0
|
117 |
Double_t fEtaCut; //max eta, absolute value
|
118 |
Bool_t fReverseIsoCut; //apply reversion iso cut (default=0)
|
119 |
Bool_t fReverseD0Cut; //apply reversion d0 cut (default=0)
|
120 |
EMuIdType fMuIDType; //!muon id type (imposed)
|
121 |
EMuIsoType fMuIsoType; //!muon iso type (imposed)
|
122 |
EMuClassType fMuClassType; //!muon class type (imposed)
|
123 |
const MuonCol *fMuons; //!muon collection
|
124 |
const VertexCol *fVertices; //!vertices branch
|
125 |
const TrackCol *fTracks; //!track branch
|
126 |
const PFCandidateCol *fPFCandidates; //!pfcandidate branch
|
127 |
MuonCol *fNonIsolatedMuons; //!pointer to old muon collection
|
128 |
ElectronCol *fNonIsolatedElectrons;//!pointer to old electron collection
|
129 |
|
130 |
ClassDef(MuonIDMod, 1) // Muon identification module
|
131 |
};
|
132 |
}
|
133 |
#endif
|