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.32 by ceballos, Tue Mar 15 12:02:20 2011 UTC vs.
Revision 1.51 by fabstoec, Mon May 14 16:38:01 2012 UTC

# Line 21 | Line 21
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/MuonIDMVA.h"
25   #include "MitPhysics/Utils/interface/IsolationTools.h"
26   #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
27  
28 + #include "MitPhysics/Utils/interface/RhoUtilities.h"
29 +
30   namespace mithep
31   {
32    class MuonIDMod : public BaseMod
# Line 42 | Line 45 | namespace mithep
45        const char        *GetIsoType()                   const { return fMuonIsoType;        }
46        const char        *GetOutputName()                const { return GetCleanMuonsName(); }  
47        Double_t           GetPtMin()                     const { return fMuonPtMin;          }
45      Bool_t             GetReverseIsoCut()             const { return fReverseIsoCut;      }
46      Bool_t             GetReverseD0Cut()              const { return fReverseD0Cut;       }
48        Double_t           GetTrackIsoCut()               const { return fTrackIsolationCut;  }
49 +      Bool_t             PassMuonMVA_BDTG_IdIso(const Muon *mu, const Vertex *vertex,
50 +                                                const PileupEnergyDensityCol *PileupEnergyDensity) const;
51 +      Bool_t             PassMuonIsoRingsV0_BDTG_Iso(const Muon *mu, const Vertex *vertex,
52 +                                                     const PileupEnergyDensityCol *PileupEnergyDensity) const;
53 +      Bool_t             PassMuonIsoDeltaR(const Muon *mu, const Vertex *vertex,
54 +                                           const PileupEnergyDensityCol *PileupEnergyDensity) const;
55 +      void               SetPrintMVADebugInfo(Bool_t b)       { fPrintMVADebugInfo = b;     }
56        void               SetApplyD0Cut(Bool_t b)              { fApplyD0Cut        = b;     }
57        void               SetApplyDZCut(Bool_t b)              { fApplyDZCut        = b;     }
58        void               SetCaloIsoCut(Double_t cut)          { fCaloIsolationCut  = cut;   }
59        void               SetClassType(const char *type)       { fMuonClassType     = type;  }
60        void               SetCleanMuonsName(const char *name)  { fCleanMuonsName    = name;  }  
61 <      void               SetOldMuonsName(const char *n)       { fNonIsolatedMuonsName  = n;         }  
62 <      void               SetOldElectronsName(const char *n)   { fNonIsolatedElectronsName  = n;     }  
61 >      void               SetOldMuonsName(const char *n)       { fNonIsolatedMuonsName  = n; }  
62 >      void               SetOldElectronsName(const char *n)   { fNonIsolatedElectronsName  = n; }  
63        void               SetCleanName(const char *name)       { SetCleanMuonsName(name);    }  
64        void               SetCombIsoCut(Double_t cut)          { fCombIsolationCut  = cut;   }
65 +      void               SetCombRelativeIsoCut(Double_t cut)  { fCombRelativeIsolationCut  = cut; }
66 +      void               SetPFIsoCut(Double_t cut)            { fPFIsolationCut  = cut;     }
67        void               SetD0Cut(Double_t cut)               { fD0Cut             = cut;   }
68        void               SetDZCut(Double_t cut)               { fDZCut             = cut;   }
69        void               SetWhichVertex(Int_t d)              { fWhichVertex = d;           }
# Line 63 | Line 73 | namespace mithep
73        void               SetIsoType(const char *type)         { fMuonIsoType       = type;  }
74        void               SetOutputName(const char *name)      { SetCleanMuonsName(name);    }  
75        void               SetPtMin(Double_t pt)                { fMuonPtMin         = pt;    }
66      void               SetReverseIsoCut(Bool_t b)           { fReverseIsoCut     = b;     }
67      void               SetReverseD0Cut(Bool_t b)            { fReverseD0Cut      = b;     }
76        void               SetTrackIsoCut(Double_t cut)         { fTrackIsolationCut = cut;   }
77 +      void               SetIntRadius(Double_t dr)            { fIntRadius = dr;            }
78 +
79 +      void               SetRhoType(RhoUtilities::RhoType type)
80 +        { fTheRhoType = type; };
81 +
82 +      void               SetVertexName(const char* name) { fVertexName = name; }
83  
84        enum EMuIdType {
85          kIdUndef = 0,       //not defined
# Line 73 | Line 87 | namespace mithep
87          kZMuId,             //"ZMuId"
88          kTight,             //"Tight"
89          kLoose,             //"Loose"
90 <        kWWMuId,            //"WWMuId"
91 <        kNoId,              //"NoId"
92 <        kCustomId           //"Custom"
90 >        kWWMuIdV1,          //"WWMuIdV1"
91 >        kWWMuIdV2,          //"WWMuIdV2"
92 >        kWWMuIdV3,          //"WWMuIdV3"
93 >        kWWMuIdV4,          //"WWMuIdV4"
94 >        kNoId,              //"NoId"        
95 >        kCustomId,          //"Custom"
96 >        kMVAID_BDTG_IDIso   //"BDTG ID + Iso03, Iso04 Combined"
97        };
98        enum EMuIsoType {
99 <        kIsoUndef = 0,                 //"not defined"
100 <        kTrackCalo,                    //"TrackCalo"
101 <        kTrackCaloCombined,            //"TrackCaloCombined"
102 <        kTrackCaloSliding,             //"TrackCaloSliding"
103 <        kTrackCaloSlidingNoCorrection, //"TrackCaloSlidingNoCorrection"
104 <        kCustomIso,                    //"Custom"
105 <        kPFIso,                        //"PFIso"
106 <        kPFIsoNoL,                     //"PFIsoNoL"
107 <        kNoIso                         //"NoIso"
99 >        kIsoUndef = 0,                      //"not defined"
100 >        kTrackCalo,                         //"TrackCalo"
101 >        kTrackCaloCombined,                 //"TrackCaloCombined"
102 >        kTrackCaloSliding,                  //"TrackCaloSliding"
103 >        kTrackCaloSlidingNoCorrection,      //"TrackCaloSlidingNoCorrection"
104 >        kCombinedRelativeConeAreaCorrected, //"CombinedRelativeConeAreaCorrected"        
105 >        kCombinedRelativeEffectiveAreaCorrected,
106 >        kCustomIso,                         //"Custom"
107 >        kPFIso,                             //"PFIso"
108 >        kPFRadialIso,                       //"PFRadialIso"
109 >        kPFIsoEffectiveAreaCorrected,       //"PFIso with EffectiveArea Pileup Correction"
110 >        kPFIsoNoL,                          //"PFIsoNoL"
111 >        kNoIso,                             //"NoIso"
112 >        kMVAIso_BDTG_IDIso,                 //"BDTG ID + Iso03, Iso04 Combined"
113 >        kIsoRingsV0_BDTG_Iso,               //"BDTG Iso Rings"
114 >        kIsoDeltaR                          //"BGDT Iso dR"              
115        };
116        enum EMuClassType {
117          kClassUndef = 0,    //not defined
118          kAll,               //"All"
119          kGlobal,            //"Global"
120 +        kGlobalTracker,     //"GlobalTracker"
121          kSta,               //"Standalone"
122          kTrackerMuon,       //"TrackerMuon"
123          kCaloMuon,          //"CaloMuon"
124          kTrackerBased       //"TrackerMuon or CaloMuon"
125 +
126        };
127  
128      protected:
129        void               Process();
130        void               SlaveBegin();
131 +      void               Terminate();
132  
133 +      Bool_t             fPrintMVADebugInfo;   //print MVA debug information
134        TString            fMuonBranchName;      //name of muon collection (input)
135        TString            fCleanMuonsName;      //name of exported "good muon" collection
136        TString            fNonIsolatedMuonsName;    //name of imported "old muon" collection
# Line 116 | Line 145 | namespace mithep
145        Double_t           fTrackIsolationCut;   //cut value for track isolation
146        Double_t           fCaloIsolationCut;    //cut value for calo isolation
147        Double_t           fCombIsolationCut;    //cut value for combined isolation
148 +      Double_t           fCombRelativeIsolationCut; //cut value for combined relative isolation
149 +      Double_t           fPFIsolationCut;      //cut value for combined isolation
150        Double_t           fMuonPtMin;           //min muon pt
151        Bool_t             fApplyD0Cut;          //=true then apply d0 cut (def=1)
152        Bool_t             fApplyDZCut;          //=true then apply dz cut (def=1)
# Line 123 | Line 154 | namespace mithep
154        Double_t           fDZCut;               //max dz
155        Int_t              fWhichVertex;         //vertex to use (-2: beamspot, -1: closest in Z)
156        Double_t           fEtaCut;              //max eta, absolute value
126      Bool_t             fReverseIsoCut;       //apply reversion iso cut (default=0)
127      Bool_t             fReverseD0Cut;        //apply reversion d0 cut (default=0)
157        EMuIdType          fMuIDType;            //!muon id type (imposed)
158        EMuIsoType         fMuIsoType;           //!muon iso type (imposed)
159        EMuClassType       fMuClassType;         //!muon class type (imposed)
# Line 133 | Line 162 | namespace mithep
162        const BeamSpotCol *fBeamSpot;            //!beamspot branch
163        const TrackCol    *fTracks;              //!track branch    
164        const PFCandidateCol *fPFCandidates;     //!pfcandidate branch
165 +      const PFCandidateCol *fPFNoPileUpCands;  //!pfnpu collection
166 +      Double_t           fIntRadius;           //!min IntRadius cut in pf isolation
167        MuonCol            *fNonIsolatedMuons;    //!pointer to old muon collection
168        ElectronCol        *fNonIsolatedElectrons;//!pointer to old electron collection
169        TString             fPileupEnergyDensityName;
170        const PileupEnergyDensityCol *fPileupEnergyDensity;
171 +      MuonTools          *fMuonTools;           // interface to tools for muon ID
172 +      MuonIDMVA          *fMuonIDMVA;           // helper class for MuonMVA
173  
174 +      RhoUtilities::RhoType fTheRhoType;
175 +      
176      ClassDef(MuonIDMod, 1) // Muon identification module
177    };
178   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines