ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/MuonIDMod.h
(Generate patch)

Comparing UserCode/MitPhysics/Mods/interface/MuonIDMod.h (file contents):
Revision 1.2 by ceballos, Thu Oct 23 12:23:31 2008 UTC vs.
Revision 1.29 by ceballos, Wed Feb 23 10:37:12 2011 UTC

# Line 3 | Line 3
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 > // 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 MITANA_TREEMOD_MUONIDMOD_H
16 < #define MITANA_TREEMOD_MUONIDMOD_H
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/Collections.h"
20 <
21 < class TH1D;
22 < class TH2D;
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   {
# Line 24 | Line 29 | namespace mithep
29    {
30      public:
31        MuonIDMod(const char *name="MuonIDMod",
32 <                     const char *title="Example analysis module with all branches");
33 <      ~MuonIDMod() {}
34 <      void                     SetPrintDebug(bool b)              { fPrintDebug         = b;     }
35 <      void                     SetMuonIDType(TString type)        { fMuonIDType         = type;  }
36 <      void                     SetTrackIsolationCut(Double_t cut) { fTrackIsolationCut  = cut;   }
37 <      void                     SetCaloIsolationCut(Double_t cut)  { fCaloIsolationCut   = cut;   }
38 <      void                     SetCleanMuonsName(TString s)       { fCleanMuonsName     = s;     }    
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 >        kCustomIso,         //"Custom"
82 >        kPFIso,             //"PFIso"
83 >        kPFIsoNoL,          //"PFIsoNoL"
84 >        kNoIso              //"NoIso"
85 >      };
86 >      enum EMuClassType {
87 >        kClassUndef = 0,    //not defined
88 >        kAll,               //"All"
89 >        kGlobal,            //"Global"
90 >        kSta,               //"Standalone"
91 >        kTrackerMuon,       //"TrackerMuon"
92 >        kCaloMuon,          //"CaloMuon"
93 >        kTrackerBased       //"TrackerMuon or CaloMuon"
94 >      };
95 >
96      protected:
97 <      bool                     fPrintDebug;               //flag for printing debug output
98 <      TString                  fMuonName;                 //name of muon collection
99 <      TString                  fCleanMuonsName ;           //name of good muons collection  
100 <      TString                  fMuonIDType;               //Type of electron ID we impose
101 <      TString                  fMuonIsoType;              //Type of electron Isolation we impose
102 <      MuonCol                 *fMuons;                    //!Muon branch
103 <
104 <      double                   fTrackIsolationCut;        //Cut value for track isolation
105 <      double                   fCaloIsolationCut;         //Cut value for calo isolation
106 <
107 <      int                      fNEventsProcessed;         // Number of events processed
108 <
109 <      void                     Begin();
110 <      void                     Process();
111 <      void                     SlaveBegin();
112 <      void                     SlaveTerminate();
113 <      void                     Terminate();
114 <    
115 <    
116 <      ClassDef(MuonIDMod,1) // TAM example analysis module
97 >      void               Process();
98 >      void               SlaveBegin();
99 >
100 >      TString            fMuonBranchName;      //name of muon collection (input)
101 >      TString            fCleanMuonsName;      //name of exported "good muon" collection
102 >      TString            fNonIsolatedMuonsName;    //name of imported "old muon" collection
103 >      TString            fNonIsolatedElectronsName;//name of imported "old electron" collection
104 >      TString            fVertexName;          //name of vertex collection
105 >      TString            fTrackName;           //name of track collection
106 >      TString            fPFCandidatesName;    //name of pfcandidates collection
107 >      TString            fMuonIDType;          //type of muon id scheme we impose
108 >      TString            fMuonIsoType;         //type of muon isolations scheme we impose
109 >      TString            fMuonClassType;       //type of muon class we impose
110 >      Double_t           fTrackIsolationCut;   //cut value for track isolation
111 >      Double_t           fCaloIsolationCut;    //cut value for calo isolation
112 >      Double_t           fCombIsolationCut;    //cut value for combined isolation
113 >      Double_t           fMuonPtMin;           //min muon pt
114 >      Bool_t             fApplyD0Cut;          //=true then apply d0 cut (def=1)
115 >      Double_t           fD0Cut;               //max d0
116 >      Double_t           fEtaCut;              //max eta, absolute value
117 >      Bool_t             fReverseIsoCut;       //apply reversion iso cut (default=0)
118 >      Bool_t             fReverseD0Cut;        //apply reversion d0 cut (default=0)
119 >      EMuIdType          fMuIDType;            //!muon id type (imposed)
120 >      EMuIsoType         fMuIsoType;           //!muon iso type (imposed)
121 >      EMuClassType       fMuClassType;         //!muon class type (imposed)
122 >      const MuonCol     *fMuons;               //!muon collection
123 >      const VertexCol   *fVertices;            //!vertices branch
124 >      const TrackCol    *fTracks;              //!track branch    
125 >      const PFCandidateCol *fPFCandidates;     //!pfcandidate branch
126 >      MuonCol            *fNonIsolatedMuons;    //!pointer to old muon collection
127 >      ElectronCol        *fNonIsolatedElectrons;//!pointer to old electron collection
128 >
129 >    ClassDef(MuonIDMod, 1) // Muon identification module
130    };
131   }
132   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines