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.26 by ceballos, Sat Oct 9 18:42:16 2010 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;
19 < class TH2D;
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   {
# Line 24 | Line 26 | namespace mithep
26    {
27      public:
28        MuonIDMod(const char *name="MuonIDMod",
29 <                     const char *title="Example analysis module with all branches");
30 <      ~MuonIDMod() {}
31 <      void                     SetPrintDebug(bool b)              { fPrintDebug         = b;     }
32 <      void                     SetMuonIDType(TString type)        { fMuonIDType         = type;  }
33 <      void                     SetTrackIsolationCut(Double_t cut) { fTrackIsolationCut  = cut;   }
34 <      void                     SetCaloIsolationCut(Double_t cut)  { fCaloIsolationCut   = cut;   }
35 <      void                     SetCleanMuonsName(TString s)       { fCleanMuonsName     = s;     }    
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 <      bool                     fPrintDebug;               //flag for printing debug output
91 <      TString                  fMuonName;                 //name of muon collection
92 <      TString                  fCleanMuonsName ;           //name of good muons collection  
93 <      TString                  fMuonIDType;               //Type of electron ID we impose
94 <      TString                  fMuonIsoType;              //Type of electron Isolation we impose
95 <      MuonCol                 *fMuons;                    //!Muon branch
96 <
97 <      double                   fTrackIsolationCut;        //Cut value for track isolation
98 <      double                   fCaloIsolationCut;         //Cut value for calo isolation
99 <
100 <      int                      fNEventsProcessed;         // Number of events processed
101 <
102 <      void                     Begin();
103 <      void                     Process();
104 <      void                     SlaveBegin();
105 <      void                     SlaveTerminate();
106 <      void                     Terminate();
107 <    
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) // TAM example analysis module
115 >    ClassDef(MuonIDMod, 1) // Muon identification module
116    };
117   }
118   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines