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.5 by ceballos, Wed Nov 26 10:55:32 2008 UTC vs.
Revision 1.35 by sixie, Fri Jul 22 14:36:29 2011 UTC

# Line 3 | Line 3
3   //
4   // MuonIDMod
5   //
6 < // This Module applies Muon ID criteria and exports a pointer to a collection
7 < // of Good Muons 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"
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 <
25 < class TH1D;
20 < class TH2D;
24 > #include "MitPhysics/Utils/interface/IsolationTools.h"
25 > #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
26  
27   namespace mithep
28   {
# Line 25 | Line 30 | namespace mithep
30    {
31      public:
32        MuonIDMod(const char *name="MuonIDMod",
33 <                     const char *title="Example analysis module with all branches");
34 <      ~MuonIDMod() {}
35 <      void     SetPrintDebug(bool b)                { fPrintDebug                = b;   }
36 <      void     SetTrackIsolationCut(Double_t cut)   { fTrackIsolationCut         = cut; }
37 <      void     SetCaloIsolationCut(Double_t cut)    { fCaloIsolationCut          = cut; }
38 <      void     SetCombIsolationCut(Double_t cut)    { fCombIsolationCut          = cut; }
39 <      void     SetMuonPtMin(double p)               { fMuonPtMin                 = p;   }
40 <      void     SetTMOneStationLooseCut(bool b)      { fTMOneStationLooseCut      = b;   }
41 <      void     SetTMOneStationTightCut(bool b)      { fTMOneStationTightCut      = b;   }
42 <      void     SetTM2DCompatibilityLooseCut(bool b) { fTM2DCompatibilityLooseCut = b;   }
43 <      void     SetTM2DCompatibilityTightCut(bool b) { fTM2DCompatibilityTightCut = b;   }
44 <      void     SetMuonSlidingIso(bool b)            { fMuonSlidingIso            = b;   }
45 <      void     SetCleanMuonsName(TString s)         { fCleanMuonsName            = s;   }  
33 >                const char *title="Muon identification module");
34 >
35 >      Double_t           GetCaloIsoCut()                const { return fCaloIsolationCut;   }
36 >      const char        *GetClassType()                 const { return fMuonClassType;      }
37 >      const char        *GetCleanName()                 const { return GetCleanMuonsName(); }  
38 >      const char        *GetCleanMuonsName()            const { return fCleanMuonsName;     }  
39 >      Double_t           GetCombIsoCut()                const { return fCombIsolationCut;   }
40 >      const char        *GetIDType()                    const { return fMuonIDType;         }
41 >      const char        *GetInputName()                 const { return fMuonBranchName;     }  
42 >      const char        *GetIsoType()                   const { return fMuonIsoType;        }
43 >      const char        *GetOutputName()                const { return GetCleanMuonsName(); }  
44 >      Double_t           GetPtMin()                     const { return fMuonPtMin;          }
45 >      Double_t           GetTrackIsoCut()               const { return fTrackIsolationCut;  }
46 >      void               SetApplyD0Cut(Bool_t b)              { fApplyD0Cut        = b;     }
47 >      void               SetApplyDZCut(Bool_t b)              { fApplyDZCut        = 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               SetCombRelativeIsoCut(Double_t cut)  { fCombRelativeIsolationCut  = cut; }
56 >      void               SetPFIsoCut(Double_t cut)            { fPFIsolationCut  = cut;     }
57 >      void               SetD0Cut(Double_t cut)               { fD0Cut             = cut;   }
58 >      void               SetDZCut(Double_t cut)               { fDZCut             = cut;   }
59 >      void               SetWhichVertex(Int_t d)              { fWhichVertex = d;           }
60 >      void               SetEtaCut(Double_t cut)              { fEtaCut            = cut;   }
61 >      void               SetIDType(const char *type)          { fMuonIDType        = type;  }
62 >      void               SetInputName(const char *name)       { fMuonBranchName    = name;  }  
63 >      void               SetIsoType(const char *type)         { fMuonIsoType       = type;  }
64 >      void               SetOutputName(const char *name)      { SetCleanMuonsName(name);    }  
65 >      void               SetPtMin(Double_t pt)                { fMuonPtMin         = pt;    }
66 >      void               SetTrackIsoCut(Double_t cut)         { fTrackIsolationCut = cut;   }
67 >
68 >      enum EMuIdType {
69 >        kIdUndef = 0,       //not defined
70 >        kWMuId,             //"WMuId"
71 >        kZMuId,             //"ZMuId"
72 >        kTight,             //"Tight"
73 >        kLoose,             //"Loose"
74 >        kWWMuIdV1,          //"WWMuIdV1"
75 >        kWWMuIdV2,          //"WWMuIdV2"
76 >        kNoId,              //"NoId"
77 >        kCustomId           //"Custom"
78 >      };
79 >      enum EMuIsoType {
80 >        kIsoUndef = 0,                      //"not defined"
81 >        kTrackCalo,                         //"TrackCalo"
82 >        kTrackCaloCombined,                 //"TrackCaloCombined"
83 >        kTrackCaloSliding,                  //"TrackCaloSliding"
84 >        kTrackCaloSlidingNoCorrection,      //"TrackCaloSlidingNoCorrection"
85 >        kCombinedRelativeConeAreaCorrected, //"CombinedRelativeConeAreaCorrected"
86 >        kCustomIso,                         //"Custom"
87 >        kPFIso,                             //"PFIso"
88 >        kPFIsoNoL,                          //"PFIsoNoL"
89 >        kNoIso                              //"NoIso"
90 >      };
91 >      enum EMuClassType {
92 >        kClassUndef = 0,    //not defined
93 >        kAll,               //"All"
94 >        kGlobal,            //"Global"
95 >        kGlobalTracker,     //"GlobalTracker"
96 >        kSta,               //"Standalone"
97 >        kTrackerMuon,       //"TrackerMuon"
98 >        kCaloMuon,          //"CaloMuon"
99 >        kTrackerBased       //"TrackerMuon or CaloMuon"
100 >      };
101 >
102      protected:
103 <      bool      fPrintDebug;                // flag for printing debug output
104 <      TString   fMuonName;                  // name of muon collection
105 <      TString   fCleanMuonsName ;           // name of good muons collection  
106 <      MuonCol   *fMuons;                    // !Muon branch
107 <
108 <      double    fTrackIsolationCut;         // Cut value for track isolation
109 <      double    fCaloIsolationCut;          // Cut value for calo isolation
110 <      double    fCombIsolationCut;          // Cut value for combined isolation
111 <      bool      fTMOneStationLooseCut;     // apply TMOneStationLooseCut?
112 <      bool      fTMOneStationTightCut;     // apply TMOneStationTightCut?
113 <      bool      fTM2DCompatibilityLooseCut; // apply TM2DCompatibilityLooseCut?
114 <      bool      fTM2DCompatibilityTightCut; // apply TM2DCompatibilityTightCut?
115 <      bool      fMuonSlidingIso;            // apply sliding iso?
116 <      double    fMuonPtMin;                 // min Pt requirement
117 <
118 <      int       fNEventsProcessed;          // Number of events processed
119 <
120 <      MuonTools myMuonTools;
121 <
122 <      void      Begin();
123 <      void      Process();
124 <      void      SlaveBegin();
125 <      void      SlaveTerminate();
126 <      void      Terminate();
127 <    
128 <    
129 <      ClassDef(MuonIDMod,1) // TAM example analysis module
103 >      void               Process();
104 >      void               SlaveBegin();
105 >
106 >      TString            fMuonBranchName;      //name of muon collection (input)
107 >      TString            fCleanMuonsName;      //name of exported "good muon" collection
108 >      TString            fNonIsolatedMuonsName;    //name of imported "old muon" collection
109 >      TString            fNonIsolatedElectronsName;//name of imported "old electron" collection
110 >      TString            fVertexName;          //name of vertex collection
111 >      TString            fBeamSpotName;        //name of beamspot collection
112 >      TString            fTrackName;           //name of track collection
113 >      TString            fPFCandidatesName;    //name of pfcandidates collection
114 >      TString            fMuonIDType;          //type of muon id scheme we impose
115 >      TString            fMuonIsoType;         //type of muon isolations scheme we impose
116 >      TString            fMuonClassType;       //type of muon class we impose
117 >      Double_t           fTrackIsolationCut;   //cut value for track isolation
118 >      Double_t           fCaloIsolationCut;    //cut value for calo isolation
119 >      Double_t           fCombIsolationCut;    //cut value for combined isolation
120 >      Double_t           fCombRelativeIsolationCut; //cut value for combined relative isolation
121 >      Double_t           fPFIsolationCut;      //cut value for combined isolation
122 >      Double_t           fMuonPtMin;           //min muon pt
123 >      Bool_t             fApplyD0Cut;          //=true then apply d0 cut (def=1)
124 >      Bool_t             fApplyDZCut;          //=true then apply dz cut (def=1)
125 >      Double_t           fD0Cut;               //max d0
126 >      Double_t           fDZCut;               //max dz
127 >      Int_t              fWhichVertex;         //vertex to use (-2: beamspot, -1: closest in Z)
128 >      Double_t           fEtaCut;              //max eta, absolute value
129 >      EMuIdType          fMuIDType;            //!muon id type (imposed)
130 >      EMuIsoType         fMuIsoType;           //!muon iso type (imposed)
131 >      EMuClassType       fMuClassType;         //!muon class type (imposed)
132 >      const MuonCol     *fMuons;               //!muon collection
133 >      const VertexCol   *fVertices;            //!vertices branch
134 >      const BeamSpotCol *fBeamSpot;            //!beamspot branch
135 >      const TrackCol    *fTracks;              //!track branch    
136 >      const PFCandidateCol *fPFCandidates;     //!pfcandidate branch
137 >      MuonCol            *fNonIsolatedMuons;    //!pointer to old muon collection
138 >      ElectronCol        *fNonIsolatedElectrons;//!pointer to old electron collection
139 >      TString             fPileupEnergyDensityName;
140 >      const PileupEnergyDensityCol *fPileupEnergyDensity;
141 >
142 >    ClassDef(MuonIDMod, 1) // Muon identification module
143    };
144   }
145   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines