3 |
|
// |
4 |
|
// MuonIDMod |
5 |
|
// |
6 |
< |
// This Module applies electron ID criteria and exports a pointer to a collection |
7 |
< |
// of Good Electrons according to some specified ID scheme |
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 |
|
// Authors: S.Xie |
10 |
|
//-------------------------------------------------------------------------------------------------- |
11 |
|
|
12 |
< |
#ifndef MITANA_TREEMOD_MUONIDMOD_H |
13 |
< |
#define MITANA_TREEMOD_MUONIDMOD_H |
12 |
> |
#ifndef MITPHYSICS_MODS_MUONIDMOD_H |
13 |
> |
#define MITPHYSICS_MODS_MUONIDMOD_H |
14 |
|
|
15 |
|
#include "MitAna/TreeMod/interface/BaseMod.h" |
16 |
|
#include "MitAna/DataTree/interface/Collections.h" |
17 |
< |
|
18 |
< |
class TH1D; |
19 |
< |
class TH2D; |
17 |
> |
#include "MitPhysics/Utils/interface/MuonTools.h" |
18 |
|
|
19 |
|
namespace mithep |
20 |
|
{ |
22 |
|
{ |
23 |
|
public: |
24 |
|
MuonIDMod(const char *name="MuonIDMod", |
25 |
< |
const char *title="Example analysis module with all branches"); |
25 |
> |
const char *title="Muon identification module"); |
26 |
|
~MuonIDMod() {} |
27 |
< |
void SetPrintDebug(bool b) { fPrintDebug = b; } |
28 |
< |
void SetMuonIDType(TString type) { fMuonIDType = type; } |
29 |
< |
void SetTrackIsolationCut(Double_t cut) { fTrackIsolationCut = cut; } |
30 |
< |
void SetCaloIsolationCut(Double_t cut) { fCaloIsolationCut = cut; } |
31 |
< |
void SetCleanMuonsName(TString s) { fCleanMuonsName = s; } |
27 |
> |
|
28 |
> |
const char *GetMuonBranchName(const char *name) const { return fMuonBranchName; } |
29 |
> |
const char *GetCleanMuonsName(const char *name) const { return fCleanMuonsName; } |
30 |
> |
const char *GetMuonIDType(const char *type) const { return fMuonIDType; } |
31 |
> |
const char *GetMuonIsoType(const char *type) const { return fMuonIsoType; } |
32 |
> |
const char *GetMuonClassType(const char *type) const { return fMuonClassType; } |
33 |
> |
Double_t GetTrackIsolationCut(Double_t cut) const { return fTrackIsolationCut; } |
34 |
> |
Double_t GetCaloIsolationCut(Double_t cut) const { return fCaloIsolationCut; } |
35 |
> |
Double_t GetCombIsolationCut(Double_t cut) const { return fCombIsolationCut; } |
36 |
> |
Double_t GetMuonPtMin(Double_t pt) const { return fMuonPtMin; } |
37 |
> |
void SetMuonBranchName(const char *name) { fMuonBranchName = name; } |
38 |
> |
void SetCleanMuonsName(const char *name) { fCleanMuonsName = name; } |
39 |
> |
void SetMuonIDType(const char *type) { fMuonIDType = type; } |
40 |
> |
void SetMuonIsoType(const char *type) { fMuonIsoType = type; } |
41 |
> |
void SetMuonClassType(const char *type) { fMuonClassType = type; } |
42 |
> |
void SetTrackIsolationCut(Double_t cut) { fTrackIsolationCut = cut; } |
43 |
> |
void SetCaloIsolationCut(Double_t cut) { fCaloIsolationCut = cut; } |
44 |
> |
void SetCombIsolationCut(Double_t cut) { fCombIsolationCut = cut; } |
45 |
> |
void SetMuonPtMin(Double_t pt) { fMuonPtMin = pt; } |
46 |
> |
|
47 |
> |
enum EMuIdType { |
48 |
> |
kIdUndef = 0, //not defined |
49 |
> |
kTight, //"Tight" |
50 |
> |
kLoose, //"Loose" |
51 |
> |
kCustomId //"Custom" |
52 |
> |
}; |
53 |
> |
enum EMuIsoType { |
54 |
> |
kIsoUndef = 0, //not defined |
55 |
> |
kTrackCalo, //"TrackCalo" |
56 |
> |
kTrackCaloCombined, //"TrackCaloCombined" |
57 |
> |
kTrackCaloSliding, //"TrackCaloSliding" |
58 |
> |
kCustomIso, //"Custom" |
59 |
> |
kNoIso //"NoIso" |
60 |
> |
}; |
61 |
> |
enum EMuClassType { |
62 |
> |
kClassUndef = 0, //not defined |
63 |
> |
kAll, //"All" |
64 |
> |
kGlobal, //"Global" |
65 |
> |
kSta, //"Standalone" |
66 |
> |
kTrackerOnly //"TrackerOnly" |
67 |
> |
}; |
68 |
> |
|
69 |
|
protected: |
70 |
< |
bool fPrintDebug; //flag for printing debug output |
71 |
< |
TString fMuonName; //name of muon collection |
72 |
< |
TString fCleanMuonsName ; //name of good muons collection |
73 |
< |
TString fMuonIDType; //Type of electron ID we impose |
74 |
< |
TString fMuonIsoType; //Type of electron Isolation we impose |
75 |
< |
MuonCol *fMuons; //!Muon branch |
76 |
< |
|
77 |
< |
double fTrackIsolationCut; //Cut value for track isolation |
78 |
< |
double fCaloIsolationCut; //Cut value for calo isolation |
79 |
< |
|
80 |
< |
int fNEventsProcessed; // Number of events processed |
81 |
< |
|
82 |
< |
void Begin(); |
83 |
< |
void Process(); |
84 |
< |
void SlaveBegin(); |
85 |
< |
void SlaveTerminate(); |
86 |
< |
void Terminate(); |
52 |
< |
|
70 |
> |
TString fMuonBranchName; //name of muon collection (in branch) |
71 |
> |
TString fCleanMuonsName; //name of exported "good muon" collection |
72 |
> |
TString fMuonIDType; //type of muon id scheme we impose |
73 |
> |
TString fMuonIsoType; //type of muon isolations scheme we impose |
74 |
> |
TString fMuonClassType; //type of muon class we impose |
75 |
> |
Double_t fTrackIsolationCut; //cut value for track isolation |
76 |
> |
Double_t fCaloIsolationCut; //cut value for calo isolation |
77 |
> |
Double_t fCombIsolationCut; //cut value for combined isolation |
78 |
> |
Double_t fMuonPtMin; //min muon pt |
79 |
> |
const MuonCol *fMuons; //!muon branch |
80 |
> |
MuonTools *fMuonTools; //!muon tool |
81 |
> |
EMuIdType fMuIDType; //!muon id type (imposed) |
82 |
> |
EMuIsoType fMuIsoType; //!muon iso type (imposed) |
83 |
> |
EMuClassType fMuClassType; //!muon class type (imposed) |
84 |
> |
|
85 |
> |
void Process(); |
86 |
> |
void SlaveBegin(); |
87 |
|
|
88 |
< |
ClassDef(MuonIDMod,1) // TAM example analysis module |
88 |
> |
ClassDef(MuonIDMod,1) // Muon identification module |
89 |
|
}; |
90 |
|
} |
91 |
|
#endif |