ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/MuonTools.h
(Generate patch)

Comparing UserCode/MitPhysics/Utils/interface/MuonTools.h (file contents):
Revision 1.5 by loizides, Mon Mar 23 22:17:04 2009 UTC vs.
Revision 1.9 by loizides, Mon Jun 15 15:00:23 2009 UTC

# Line 15 | Line 15
15   // Authors: P.Harris, C.Loizides
16   //--------------------------------------------------------------------------------------------------
17  
18 < #ifndef MITPHYSICS_UTIL_MUONTOOLS_H
19 < #define MITPHYSICS_UTIL_MUONTOOLS_H
18 > #ifndef MITPHYSICS_UTILS_MUONTOOLS_H
19 > #define MITPHYSICS_UTILS_MUONTOOLS_H
20  
21   #include "MitAna/DataTree/interface/Muon.h"
22   #include "MitCommon/MathTools/interface/MathUtils.h"
# Line 30 | Line 30 | namespace mithep {
30        ~MuonTools();
31  
32        enum ESelType {
33 <        kAllArbitrated,          //
34 <        kPromptTight,            //
35 <        kTMLastStationLoose,     //
36 <        kTMLastStationTight,     //
37 <        kTMOneStationLoose,      //
38 <        kTMOneStationTight,      //
39 <        kTM2DCompatibilityLoose, //
40 <        kTM2DCompatibilityTight  //
33 >        kAllArbitrated,          //All arbitration (DT/CSC/RPC Hits) put on at least one
34 >                                 //  segments given a global Muon
35 >        kPromptTight,            //Standard global muon identification
36 >        kTMLastStationLoose,     //Loose matching requirements on lastmost muon station of reco
37 >        kTMLastStationTight,     //Tight matching requirements on lastmost muon station of reco
38 >        kTMOneStationLoose,      //Loose matching requirements on at least one muon station of reco
39 >        kTMOneStationTight,      //Tight matching requirements on at least one muon station of reco
40 >        kTM2DCompatibilityLoose, //Loose requirement on sum of compatabiliity variables
41 >                                 //  ===> 1.2 Segment compatability + 0.8 calo compatability > 0.8
42 >        kTM2DCompatibilityTight  //Tight requirement on sum of compatabiliity variables
43 >                                 //  ===> 1.2 Segment compatability + 0.8 calo compatability > 1.2
44        };
45  
46        Bool_t      Init(const char *mutemp, const char *pitemp);
47        Bool_t      IsGood(const mithep::Muon *iMuon, ESelType iSel) const;
48 +      Double_t    GetCaloCompatability(const mithep::Muon *iMuon,
49 +                                       Bool_t iEMSpecial, Bool_t iCorrectedHCAL) const;
50 +      Double_t    GetSegmentCompatability(const mithep::Muon *iMuon)             const;
51  
52      protected:
53        void        DeleteHistos();
54 <      Double_t    GetCaloCompatability(const mithep::Muon *iMuon,
55 <                                       Bool_t iEMSpecial, Bool_t iCorrectedHCAL) const;
56 <      Double_t    GetSegmentCompatability(const mithep::Muon *iMuon)             const;
51 <      Bool_t      Overflow(const TH2D *iHist, Double_t lVal0, Double_t lVal1)    const;
52 <      Double_t    SigWeight(Double_t iVal0, Double_t iVal1)                      const;
53 <
54 >      Bool_t      Overflow(const TH2D *iHist, Double_t lVal0, Double_t lVal1)    const;
55 >      Double_t    SigWeight(Double_t iVal0, Double_t iVal1)                      const;
56 >  
57      private:
58        Bool_t      fIsInit;              //!=true if histograms are loaded
59 <      TH2D       *fmuon_em_etaEmi;      //!todo by phil
60 <      TH2D       *fmuon_had_etaEmi;     //!
61 <      TH2D       *fmuon_had_etaTmi;     //!
62 <      TH2D       *fmuon_em_etaB;        //!
63 <      TH2D       *fmuon_had_etaB;       //!
64 <      TH2D       *fmuon_ho_etaB;        //!
65 <      TH2D       *fmuon_had_etaTpl;     //!
66 <      TH2D       *fmuon_em_etaEpl;      //!
67 <      TH2D       *fmuon_had_etaEpl;     //!
68 <      TH2D       *fpion_em_etaEmi;      //!
69 <      TH2D       *fpion_had_etaEmi;     //!
70 <      TH2D       *fpion_had_etaTmi;     //!
71 <      TH2D       *fpion_em_etaB;        //!
72 <      TH2D       *fpion_had_etaB;       //!
73 <      TH2D       *fpion_ho_etaB;        //!
74 <      TH2D       *fpion_had_etaTpl;     //!
75 <      TH2D       *fpion_em_etaEpl;      //!
76 <      TH2D       *fpion_had_etaEpl;     //!
59 >      TH2D       *fmuon_em_etaEmi;      //!Neg Endcap EM       Calo Deposit Template for Muons
60 >      TH2D       *fmuon_had_etaEmi;     //!Neg Endcap Hadronic Calo Deposit Template for Muons
61 >      TH2D       *fmuon_had_etaTmi;     //!Neg Transition Hadronic Calo Deposit Template for Muons
62 >      TH2D       *fmuon_em_etaB;        //!Barrel EM       Calo Deposit Template for Muons
63 >      TH2D       *fmuon_had_etaB;       //!Barrel Hadronic Calo Deposit Template for Muons
64 >      TH2D       *fmuon_ho_etaB;        //!Barrel HO       Calo Deposit Template for Muons
65 >      TH2D       *fmuon_had_etaTpl;     //!Plus Transition Hadronic Calo Deposit Template for Muons
66 >      TH2D       *fmuon_em_etaEpl;      //!Plus Endcap EM       Calo Deposit Template for Muons
67 >      TH2D       *fmuon_had_etaEpl;     //!Plus Endcap Hadronic Calo Deposit Template for Muons
68 >      TH2D       *fpion_em_etaEmi;      //!Neg  Endcap EM       Calo Deposit Template for Pions
69 >      TH2D       *fpion_had_etaEmi;     //!Neg  Endcap Hadronic Calo Deposit Template for Pions
70 >      TH2D       *fpion_had_etaTmi;     //!Neg Transition Hadronic Calo Deposit Template for Pions
71 >      TH2D       *fpion_em_etaB;        //!Barrel EM       Calo Deposit Template for Pions
72 >      TH2D       *fpion_had_etaB;       //!Barrel Hadronic Calo Deposit Template for Pions
73 >      TH2D       *fpion_ho_etaB;        //!Barrel HO       Calo Deposit Template for Pions
74 >      TH2D       *fpion_had_etaTpl;     //!Plus Transition Hadronic Calo Deposit Template for Pions
75 >      TH2D       *fpion_em_etaEpl;      //!Plus Endcap EM       Calo Deposit Template for Pions
76 >      TH2D       *fpion_had_etaEpl;     //!Plus Endcap Hadronic Calo Deposit Template for Pions
77  
78        TH2D       *LoadHisto(const char *fname, TFile *file)                      const;
79    };
# Line 79 | Line 82 | namespace mithep {
82   //--------------------------------------------------------------------------------------------------
83   inline Double_t mithep::MuonTools::SigWeight(Double_t iVal0, Double_t iVal1) const
84   {
85 <  // todo
85 >  // Returns weighted uncertainty given segment matching uncertainty (iVal0) and
86 >  // segment matching pull (iVal1).
87  
88 <  if (iVal1 < 1.)
88 >  if (iVal1 < 1.)  //if pull defined and within range
89      return 1.;
90 <  if (iVal0 < 3. && iVal1 > 3.) {
90 >  if (iVal0 < 3. && iVal1 > 3.) {       //if pull not well defined and uncertainty defined
91      Double_t lVal = TMath::Max(iVal0,1.);
92      return 1./TMath::Power(lVal,0.25);
93    }
94  
95 <  Double_t lVal = TMath::Max(iVal1,1.);
95 >  Double_t lVal = TMath::Max(iVal1,1.); //if pull > 1 and pull < 3 return 1/pull^4
96    return 1./TMath::Power(lVal,0.25);
97   }
94
98   //--------------------------------------------------------------------------------------------------
99   inline Bool_t mithep::MuonTools::Overflow(const TH2D *iHist, Double_t lVal0, Double_t lVal1) const
100   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines