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.25 by ceballos, Thu May 27 07:58:59 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 >        kTight,             //"Tight"
64 >        kLoose,             //"Loose"
65 >        kMinimal,           //"Minimal"
66 >        kNoId,              //"NoId"
67 >        kCustomId           //"Custom"
68 >      };
69 >      enum EMuIsoType {
70 >        kIsoUndef = 0,      //not defined
71 >        kTrackCalo,         //"TrackCalo"
72 >        kTrackCaloCombined, //"TrackCaloCombined"
73 >        kTrackCaloSliding,  //"TrackCaloSliding"
74 >        kCustomIso,         //"Custom"
75 >        kNoIso              //"NoIso"
76 >      };
77 >      enum EMuClassType {
78 >        kClassUndef = 0,    //not defined
79 >        kAll,               //"All"
80 >        kGlobal,            //"Global"
81 >        kSta,               //"Standalone"
82 >        kTrackerMuon,       //"TrackerMuon"
83 >        kCaloMuon,          //"CaloMuon"
84 >        kTrackerBased       //"TrackerMuon or CaloMuon"
85 >      };
86 >
87      protected:
88 <      bool                     fPrintDebug;               //flag for printing debug output
89 <      TString                  fMuonName;                 //name of muon collection
90 <      TString                  fCleanMuonsName ;           //name of good muons collection  
91 <      TString                  fMuonIDType;               //Type of electron ID we impose
92 <      TString                  fMuonIsoType;              //Type of electron Isolation we impose
93 <      MuonCol                 *fMuons;                    //!Muon branch
94 <
95 <      double                   fTrackIsolationCut;        //Cut value for track isolation
96 <      double                   fCaloIsolationCut;         //Cut value for calo isolation
97 <
98 <      int                      fNEventsProcessed;         // Number of events processed
99 <
100 <      void                     Begin();
101 <      void                     Process();
102 <      void                     SlaveBegin();
103 <      void                     SlaveTerminate();
104 <      void                     Terminate();
105 <    
88 >      void               Process();
89 >      void               SlaveBegin();
90 >
91 >      TString            fMuonBranchName;      //name of muon collection (input)
92 >      TString            fCleanMuonsName;      //name of exported "good muon" collection
93 >      TString            fVertexName;          //name of vertex collection
94 >      TString            fMuonIDType;          //type of muon id scheme we impose
95 >      TString            fMuonIsoType;         //type of muon isolations scheme we impose
96 >      TString            fMuonClassType;       //type of muon class we impose
97 >      Double_t           fTrackIsolationCut;   //cut value for track isolation
98 >      Double_t           fCaloIsolationCut;    //cut value for calo isolation
99 >      Double_t           fCombIsolationCut;    //cut value for combined isolation
100 >      Double_t           fMuonPtMin;           //min muon pt
101 >      Bool_t             fApplyD0Cut;          //=true then apply d0 cut (def=1)
102 >      Double_t           fD0Cut;               //max d0
103 >      Double_t           fEtaCut;              //max eta, absolute value
104 >      Bool_t             fReverseIsoCut;       //apply reversion iso cut (default=0)
105 >      Bool_t             fReverseD0Cut;        //apply reversion d0 cut (default=0)
106 >      EMuIdType          fMuIDType;            //!muon id type (imposed)
107 >      EMuIsoType         fMuIsoType;           //!muon iso type (imposed)
108 >      EMuClassType       fMuClassType;         //!muon class type (imposed)
109 >      const MuonCol     *fMuons;               //!muon collection
110 >      const VertexCol   *fVertices;            //!vertices branch
111 >      MuonTools         *fMuonTools;           //!muon tool
112      
113 <      ClassDef(MuonIDMod,1) // TAM example analysis module
113 >    ClassDef(MuonIDMod, 1) // Muon identification module
114    };
115   }
116   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines