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.19 by loizides, Mon May 11 08:02:43 2009 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 <
18 < class TH1D;
19 < class TH2D;
20 > #include "MitPhysics/Utils/interface/MuonTools.h"
21  
22   namespace mithep
23   {
# Line 24 | Line 25 | namespace mithep
25    {
26      public:
27        MuonIDMod(const char *name="MuonIDMod",
28 <                     const char *title="Example analysis module with all branches");
29 <      ~MuonIDMod() {}
30 <      void                     SetPrintDebug(bool b)              { fPrintDebug         = b;     }
31 <      void                     SetMuonIDType(TString type)        { fMuonIDType         = type;  }
32 <      void                     SetTrackIsolationCut(Double_t cut) { fTrackIsolationCut  = cut;   }
33 <      void                     SetCaloIsolationCut(Double_t cut)  { fCaloIsolationCut   = cut;   }
34 <      void                     SetCleanMuonsName(TString s)       { fCleanMuonsName     = s;     }    
28 >                const char *title="Muon identification module");
29 >
30 >      Double_t           GetCaloIsoCut()                const { return fCaloIsolationCut;   }
31 >      const char        *GetClassType()                 const { return fMuonClassType;      }
32 >      const char        *GetCleanName()                 const { return GetCleanMuonsName(); }  
33 >      const char        *GetCleanMuonsName()            const { return fCleanMuonsName;     }  
34 >      Double_t           GetCombIsoCut()                const { return fCombIsolationCut;   }
35 >      const char        *GetIDType()                    const { return fMuonIDType;         }
36 >      const char        *GetInputName()                 const { return fMuonBranchName;     }  
37 >      const char        *GetIsoType()                   const { return fMuonIsoType;        }
38 >      const char        *GetOutputName()                const { return GetCleanMuonsName(); }  
39 >      Double_t           GetPtMin(Double_t pt)          const { return fMuonPtMin;          }
40 >      Double_t           GetTrackIsoCut()               const { return fTrackIsolationCut;  }
41 >      Bool_t             GetReverseIsoCut()             const { return fReverseIsoCut;      }
42 >      void               SetCaloIsoCut(Double_t cut)          { fCaloIsolationCut  = cut;   }
43 >      void               SetClassType(const char *type)       { fMuonClassType     = type;  }
44 >      void               SetCleanMuonsName(const char *name)  { fCleanMuonsName    = name;  }  
45 >      void               SetCleanName(const char *name)       { SetCleanMuonsName(name);    }  
46 >      void               SetCombIsoCut(Double_t cut)          { fCombIsolationCut  = cut;   }
47 >      void               SetD0Cut(Double_t cut)               { fD0Cut = cut;               }
48 >      void               SetIDType(const char *type)          { fMuonIDType        = type;  }
49 >      void               SetInputName(const char *name)       { fMuonBranchName    = name;  }  
50 >      void               SetIsoType(const char *type)         { fMuonIsoType       = type;  }
51 >      void               SetOutputName(const char *name)      { SetCleanMuonsName(name);    }  
52 >      void               SetPtMin(Double_t pt)                { fMuonPtMin         = pt;    }
53 >      void               SetReverseIsoCut(Bool_t b)           { fReverseIsoCut = b;         }
54 >      void               SetTrackIsoCut(Double_t cut)         { fTrackIsolationCut = cut;   }
55 >
56 >      enum EMuIdType {
57 >        kIdUndef = 0,       //not defined
58 >        kTight,             //"Tight"
59 >        kLoose,             //"Loose"
60 >        kNoId,              //"NoId"
61 >        kCustomId           //"Custom"
62 >      };
63 >      enum EMuIsoType {
64 >        kIsoUndef = 0,      //not defined
65 >        kTrackCalo,         //"TrackCalo"
66 >        kTrackCaloCombined, //"TrackCaloCombined"
67 >        kTrackCaloSliding,  //"TrackCaloSliding"
68 >        kCustomIso,         //"Custom"
69 >        kNoIso              //"NoIso"
70 >      };
71 >      enum EMuClassType {
72 >        kClassUndef = 0,    //not defined
73 >        kAll,               //"All"
74 >        kGlobal,            //"Global"
75 >        kSta,               //"Standalone"
76 >        kTrackerOnly        //"TrackerOnly"
77 >      };
78 >
79      protected:
80 <      bool                     fPrintDebug;               //flag for printing debug output
81 <      TString                  fMuonName;                 //name of muon collection
82 <      TString                  fCleanMuonsName ;           //name of good muons collection  
83 <      TString                  fMuonIDType;               //Type of electron ID we impose
84 <      TString                  fMuonIsoType;              //Type of electron Isolation we impose
85 <      MuonCol                 *fMuons;                    //!Muon branch
86 <
87 <      double                   fTrackIsolationCut;        //Cut value for track isolation
88 <      double                   fCaloIsolationCut;         //Cut value for calo isolation
89 <
90 <      int                      fNEventsProcessed;         // Number of events processed
91 <
92 <      void                     Begin();
93 <      void                     Process();
94 <      void                     SlaveBegin();
95 <      void                     SlaveTerminate();
96 <      void                     Terminate();
97 <    
80 >      void               Process();
81 >      void               SlaveBegin();
82 >
83 >      TString            fMuonBranchName;      //name of muon collection (input)
84 >      TString            fCleanMuonsName;      //name of exported "good muon" collection
85 >      TString            fVertexName;          //name of vertex collection
86 >      TString            fMuonIDType;          //type of muon id scheme we impose
87 >      TString            fMuonIsoType;         //type of muon isolations scheme we impose
88 >      TString            fMuonClassType;       //type of muon class we impose
89 >      Double_t           fTrackIsolationCut;   //cut value for track isolation
90 >      Double_t           fCaloIsolationCut;    //cut value for calo isolation
91 >      Double_t           fCombIsolationCut;    //cut value for combined isolation
92 >      Double_t           fMuonPtMin;           //min muon pt
93 >      Double_t           fD0Cut;               //max d0
94 >      Bool_t             fReverseIsoCut;       //apply reversion iso cut (default=0)
95 >      EMuIdType          fMuIDType;            //!muon id type (imposed)
96 >      EMuIsoType         fMuIsoType;           //!muon iso type (imposed)
97 >      EMuClassType       fMuClassType;         //!muon class type (imposed)
98 >      const MuonCol     *fMuons;               //!muon collection
99 >      const VertexCol   *fVertices;            //!vertices branch
100 >      MuonTools         *fMuonTools;           //!muon tool
101      
102 <      ClassDef(MuonIDMod,1) // TAM example analysis module
102 >    ClassDef(MuonIDMod, 1) // Muon identification module
103    };
104   }
105   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines