ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Electron.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/Electron.h (file contents):
Revision 1.10 by loizides, Mon Jul 14 20:55:19 2008 UTC vs.
Revision 1.16 by sixie, Sat Sep 6 18:03:23 2008 UTC

# Line 5 | Line 5
5   //
6   // Details to be worked out...
7   //
8 < // Authors: C.Loizides, J.Bendavid
8 > // Authors: C.Loizides, J.Bendavid, S.Xie
9   //--------------------------------------------------------------------------------------------------
10  
11   #ifndef DATATREE_ELECTRON_H
12   #define DATATREE_ELECTRON_H
13  
14 < #include "MitAna/DataTree/interface/Lepton.h"
14 > #include "MitAna/DataTree/interface/SuperCluster.h"
15 > #include "MitAna/DataTree/interface/ChargedParticle.h"
16  
17   namespace mithep
18   {
19 <  class Electron : public Lepton
19 >  class Electron : public ChargedParticle
20    {
21      public:
22        Electron() {}
23        ~Electron() {}
24        
25 <      const Track         *BestTrk()         const;
26 <      const Track         *GsfTrk()          const;
27 <      const Track         *TrackerTrk()      const;
28 <      Double_t             Mass()            const { return 0.51099892e-3; }
29 <      
30 <      void                 SetGsfTrk(Track* t)     { fGsfTrackRef = t; }
31 <      void                 SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
32 <      
25 >      const Track         *BestTrk()               const;
26 >      const Track         *GsfTrk()                const;
27 >      const Track         *TrackerTrk()            const;
28 >      const SuperCluster  *SCluster()              const;
29 >      FourVector           Mom()                   const;
30 >      const Track         *Trk()                   const { return BestTrk();                }
31 >      Double_t             E()                     const {return SCluster()->Energy();      }
32 >
33 >      Double_t    Mass()                           const { return 0.51099892e-3;            }
34 >      Double_t    ESuperClusterOverP()             const { return fESuperClusterOverP;      }
35 >      Double_t    ESeedClusterOverPout()           const { return fESeedClusterOverPout;    }
36 >      Double_t    ESeedClusterOverPIn()            const;
37 >      Double_t    PIn()                            const { return fPIn;                     }
38 >      Double_t    POut()                           const { return fPOut;                    }
39 >      Double_t    DeltaEtaSuperClusterTrackAtVtx() const { return fDeltaEtaSuperClTrkAtVtx; }
40 >      Double_t    DeltaEtaSeedClusterTrackAtCalo() const { return fDeltaEtaSeedClTrkAtCalo; }
41 >      Double_t    DeltaPhiSuperClusterTrackAtVtx() const { return fDeltaPhiSuperClTrkAtVtx; }
42 >      Double_t    DeltaPhiSeedClusterTrackAtCalo() const { return fDeltaPhiSeedClTrkAtCalo; }
43 >      Double_t    HadronicOverEm()                 const { return fHadronicOverEm;          }
44 >      Double_t    IsEnergyScaleCorrected()         const { return fIsEnergyScaleCorrected;  }
45 >      Double_t    IsMomentumCorrected()            const { return fIsMomentumCorrected;     }
46 >      Double_t    NumberOfClusters()               const { return fNumberOfClusters;        }
47 >      Double_t    Classification()                 const { return fClassification;          }
48 >      Double_t    E33()                            const { return fE33;                     }
49 >      Double_t    E55()                            const { return fE55;                     }
50 >      Double_t    CovEtaEta()                      const { return fCovEtaEta;               }
51 >      Double_t    CovEtaPhi()                      const { return fCovEtaPhi;               }
52 >      Double_t    CovPhiPhi()                      const { return fCovPhiPhi;               }
53 >      Double_t    CaloIsolation()                  const { return fCaloIsolation;           }
54 >      Double_t    CaloTowerIsolation()             const { return fCaloTowerIsolation;      }
55 >      Double_t    TrackIsolation()                 const { return fTrackIsolation;          }
56 >      Double_t    PassLooseID()                    const { return fPassLooseID;             }
57 >      Double_t    PassTightID()                    const { return fPassTightID;             }
58 >      Double_t    IDLikelihood()                   const { return fIDLikelihood;            }
59 >
60 >      void        SetGsfTrk(Track* t)                           { fGsfTrackRef = t;                }
61 >      void        SetTrackerTrk(Track* t)                       { fTrackerTrackRef = t;            }
62 >      void        SetSuperCluster(SuperCluster* sc)             { fSuperClusterRef = sc;           }
63 >      void        SetESuperClusterOverP(Double_t x)             { fESuperClusterOverP = x;         }
64 >      void        SetESeedClusterOverPout(Double_t x)           { fESeedClusterOverPout = x;       }
65 >      void        SetPIn(Double_t PIn)                          { fPIn = PIn;                      }
66 >      void        SetPOut(Double_t POut)                        { fPOut = POut;                    }
67 >      void        SetDeltaEtaSuperClusterTrackAtVtx(Double_t x) { fDeltaEtaSuperClTrkAtVtx = x;    }
68 >      void        SetDeltaEtaSeedClusterTrackAtCalo(Double_t x) { fDeltaEtaSeedClTrkAtCalo = x;    }
69 >      void        SetDeltaPhiSuperClusterTrackAtVtx(Double_t x) { fDeltaPhiSuperClTrkAtVtx = x;    }
70 >      void        SetDeltaPhiSeedClusterTrackAtCalo(Double_t x) { fDeltaPhiSeedClTrkAtCalo = x;    }
71 >      void        SetHadronicOverEm(Double_t x)                 { fHadronicOverEm = x;             }
72 >      void        SetIsEnergyScaleCorrected(Double_t x)         { fIsEnergyScaleCorrected = x;     }
73 >      void        SetIsMomentumCorrected(Double_t x)            { fIsMomentumCorrected = x;        }
74 >      void        SetNumberOfClusters(Double_t x)               { fNumberOfClusters = x;           }
75 >      void        SetClassification(Double_t x)                 { fClassification = x;             }
76 >      void        SetE33(Double_t E33)                          { fE33 = E33;                      }
77 >      void        SetE55(Double_t E55)                          { fE55 = E55;                      }
78 >      void        SetCovEtaEta(Double_t CovEtaEta)              { fCovEtaEta = CovEtaEta;          }
79 >      void        SetCovEtaPhi(Double_t CovEtaPhi)              { fCovEtaPhi = CovEtaPhi;          }
80 >      void        SetCovPhiPhi(Double_t CovPhiPhi)              { fCovPhiPhi = CovPhiPhi;          }
81 >      void        SetCaloIsolation(Double_t CaloIsolation)      { fCaloIsolation = CaloIsolation;  }
82 >      void        SetCaloTowerIsolation(Double_t TowerIso)      { fCaloTowerIsolation = TowerIso;  }
83 >      void        SetTrackIsolation(Double_t TrackIsolation)    { fTrackIsolation = TrackIsolation;}
84 >      void        SetPassLooseID(Double_t passLooseID)          { fPassLooseID = passLooseID;      }
85 >      void        SetPassTightID(Double_t passTightID)          { fPassTightID = passTightID;      }
86 >      void        SetIDLikelihood(Double_t likelihood)          { fIDLikelihood = likelihood;      }
87 >
88      protected:
89        TRef                 fGsfTrackRef;     //global combined track reference
90        TRef                 fTrackerTrackRef; //tracker track reference
91 <      
91 >      TRef                 fSuperClusterRef; //superCluster
92 >
93 >      Double_t             fESuperClusterOverP;
94 >      Double_t             fESeedClusterOverPout;
95 >      Double_t             fDeltaEtaSuperClTrkAtVtx;
96 >      Double_t             fDeltaEtaSeedClTrkAtCalo;
97 >      Double_t             fDeltaPhiSuperClTrkAtVtx;
98 >      Double_t             fDeltaPhiSeedClTrkAtCalo;
99 >      Double_t             fHadronicOverEm;
100 >      Double_t             fIsEnergyScaleCorrected;
101 >      Double_t             fIsMomentumCorrected;      
102 >      Double_t             fNumberOfClusters;
103 >      Double_t             fClassification;          
104 >      Double_t             fSuperClusterPx;
105 >      Double_t             fSuperClusterPy;
106 >      Double_t             fSuperClusterPz;
107 >      Double_t             fSuperClusterE;
108 >      Double_t             fE33;
109 >      Double_t             fE55;
110 >      Double_t             fCovEtaEta;
111 >      Double_t             fCovEtaPhi;
112 >      Double_t             fCovPhiPhi;
113 >      Double_t             fCaloIsolation;
114 >      Double_t             fCaloTowerIsolation;
115 >      Double_t             fTrackIsolation;
116 >      Double_t             fPassLooseID;
117 >      Double_t             fPassTightID;
118 >      Double_t             fIDLikelihood;
119 >      Double_t             fPIn;
120 >      Double_t             fPOut;
121 >
122      ClassDef(Electron, 1) // Electron class
123    };
124   }
# Line 65 | Line 151 | inline const mithep::Track *mithep::Elec
151  
152    return static_cast<const Track*>(fTrackerTrackRef.GetObject());
153   }
154 + //--------------------------------------------------------------------------------------------------
155 + inline const mithep::SuperCluster *mithep::Electron::SCluster() const
156 + {
157 +  // Return Super cluster
158 +
159 +  return static_cast<const SuperCluster*>(fSuperClusterRef.GetObject());
160 + }
161 +
162 + //-------------------------------------------------------------------------------------------------
163 + inline mithep::FourVector mithep::Electron::Mom() const
164 + {
165 +  // Return Momentum of the electron. We use the direction of the
166 +  // Track and the Energy of the Super Cluster
167 +
168 +  double P = TMath::Sqrt( E()*E() - Mass()*Mass());
169 +  return FourVector(P*sin(Trk()->Theta())*cos(Trk()->Phi()),
170 +                    P*sin(Trk()->Theta())*sin(Trk()->Phi()), P*cos(Trk()->Theta()), E());
171 + }
172 +
173 + inline Double_t mithep::Electron::ESeedClusterOverPIn() const
174 + {
175 +  // Return Energy of the SuperCluster Seed Divided by the magnitude
176 +  // of the track momentum at the vertex
177 +  
178 +  return SCluster()->Seed()->Energy() / PIn();
179 + }
180 +
181 +
182   #endif
183 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines