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.28 by bendavid, Tue Mar 3 18:03:55 2009 UTC vs.
Revision 1.37 by bendavid, Fri Oct 30 14:16:00 2009 UTC

# Line 3 | Line 3
3   //
4   // Electron
5   //
6 < // Details to be worked out... TODO: Needs description ala Muon class
6 > // This class holds information about reconstructed electrons from CMSSW.
7   //
8   // Authors: C.Loizides, J.Bendavid, S.Xie
9   //--------------------------------------------------------------------------------------------------
# Line 20 | Line 20 | namespace mithep
20    class Electron : public ChargedParticle
21    {
22      public:
23 <      Electron() : fESuperClusterOverP(0), fESeedClusterOverPout(0), fDeltaEtaSuperClTrkAtVtx(0),
24 <                   fDeltaEtaSeedClTrkAtCalo(0), fDeltaPhiSuperClTrkAtVtx(0),
25 <                   fDeltaPhiSeedClTrkAtCalo(0), fHadronicOverEm(0), fIsEnergyScaleCorrected(0),
26 <                   fIsMomentumCorrected(0), fNumberOfClusters(0), fClassification(0), fE33(0),
27 <                   fE55(0), fCovEtaEta(0), fCoviEtaiEta(0), fCovEtaPhi(0), fCovPhiPhi(0),
28 <                   fCaloIsolation(0), fCaloTowerIsolation(0), fTrackIsolation(0),
29 <                   fEcalJurassicIsolation(0), fHcalJurassicIsolation(0), fPassLooseID(0),
30 <                   fPassTightID(0), fIDLikelihood(0), fPIn(0), fPOut(0) {}
31 <      
32 <      const Track         *BestTrk()               const;
33 <      const Track         *GsfTrk()                const { return fGsfTrackRef.Obj();          }
34 <      const Track         *TrackerTrk()            const { return fTrackerTrackRef.Obj();      }
35 <      const SuperCluster  *SCluster()              const { return fSuperClusterRef.Obj();      }
36 <      const Track         *Trk()                   const { return BestTrk();                   }
37 <      Double_t             CaloIsolation()         const { return fCaloIsolation;              }
38 <      Double_t             CaloTowerIsolation()    const { return fCaloTowerIsolation;         }
39 <      Int_t                Classification()        const { return fClassification;             }
40 <      Double_t             CovEtaEta()             const { return fCovEtaEta;                  }
41 <      Double_t             CovEtaPhi()             const { return fCovEtaPhi;                  }
42 <      Double_t             CovPhiPhi()             const { return fCovPhiPhi;                  }
43 <      Double_t             CoviEtaiEta()           const { return fCoviEtaiEta;                }
23 >      Electron() :
24 >        fCharge(0),
25 >        fESuperClusterOverP(0), fESeedClusterOverPout(0), fDeltaEtaSuperClTrkAtVtx(0),
26 >        fDeltaEtaSeedClTrkAtCalo(0), fDeltaPhiSuperClTrkAtVtx(0),
27 >        fDeltaPhiSeedClTrkAtCalo(0), fFBrem(0), fHadronicOverEm(0), fHcalDepth1OverEcal(0),
28 >        fHcalDepth2OverEcal(0), fNumberOfClusters(0), fE15(0), fE25Max(0),
29 >        fE55(0), fCovEtaEta(0), fCoviEtaiEta(0),
30 >        fCaloIsolation(0), fHcalJurassicIsolation(0),
31 >        fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0),
32 >        fEcalJurassicIsolation(0), fTrackIsolationDr04(0), fCaloTowerIsolation(0),
33 >        fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
34 >        fEcalRecHitSumEtDr03(0), fTrackIsolation(0), fPassLooseID(0),
35 >        fPassTightID(0), fIDLikelihood(0), fPIn(0), fPOut(0), fFracSharedHits(0),
36 >        fMva(0), fIsEnergyScaleCorrected(0), fIsMomentumCorrected(0),
37 >        fClassification(0), fIsEB(), fIsEE(0), fIsEBEEGap(0), fIsEBEtaGap(0),
38 >        fIsEBPhiGap(0), fIsEEDeeGap(0), fIsEERingGap(0),
39 >        fIsEcalDriven(0), fIsTrackerDriven(0) {}
40 >
41 >      const Track         *BestTrk()                const;
42 >      Double_t             CaloIsolation()          const { return fCaloIsolation;       } // *DEPRECATED*
43 >      Int_t                Classification()         const { return fClassification;      }
44 >      Double_t             CovEtaEta()              const { return fCovEtaEta;           }
45 >      Double_t             CoviEtaiEta()            const { return fCoviEtaiEta;         }
46        Double_t             DeltaEtaSuperClusterTrackAtVtx() const
47                               { return fDeltaEtaSuperClTrkAtVtx; }
48        Double_t             DeltaEtaSeedClusterTrackAtCalo() const
# Line 49 | Line 51 | namespace mithep
51                               { return fDeltaPhiSuperClTrkAtVtx; }
52        Double_t             DeltaPhiSeedClusterTrackAtCalo() const
53                               { return fDeltaPhiSeedClTrkAtCalo; }
54 <      Double_t             E33()                   const { return fE33;                        }
55 <      Double_t             E55()                   const { return fE55;                        }
56 <      Double_t             EcalJurassicIsolation() const { return fEcalJurassicIsolation;      }
57 <      Double_t             ESuperClusterOverP()    const { return fESuperClusterOverP;         }
58 <      Double_t             ESeedClusterOverPout()  const { return fESeedClusterOverPout;       }
59 <      Double_t             ESeedClusterOverPIn()   const;
60 <      Double_t             IDLikelihood()          const { return fIDLikelihood;               }
61 <      Double_t             IsEnergyScaleCorrected()const { return fIsEnergyScaleCorrected;     }
62 <      Double_t             IsMomentumCorrected()   const { return fIsMomentumCorrected;        }
63 <      Double_t             HadronicOverEm()        const { return fHadronicOverEm;             }  
64 <      Bool_t               HasGsfTrk()             const { return fGsfTrackRef.IsValid();      }
65 <      Bool_t               HasTrackerTrk()         const { return fTrackerTrackRef.IsValid();  }
66 <      Bool_t               HasSuperCluster()       const { return fSuperClusterRef.IsValid();  }
67 <      Double_t             HcalIsolation()         const { return fHcalJurassicIsolation;      }
68 <      Double_t             NumberOfClusters()      const { return fNumberOfClusters;           }
69 <      EObjType             ObjType()               const { return kElectron;                   }
70 <      Double_t             PassLooseID()           const { return fPassLooseID;                }
71 <      Double_t             PassTightID()           const { return fPassTightID;                }
72 <      Double_t             PIn()                   const { return fPIn;                        }
73 <      Double_t             POut()                  const { return fPOut;                       }
74 <      Double_t             TrackIsolation()        const { return fTrackIsolation;             }
75 <      void                 SetGsfTrk(const Track* t)                    
76 <                             { fGsfTrackRef = t;     ClearMom(); ClearCharge(); }
77 <      void                 SetTrackerTrk(const Track* t)                
78 <                             { fTrackerTrackRef = t; ClearMom(); ClearCharge(); }
79 <      void                 SetSuperCluster(const SuperCluster* sc)      
80 <                             { fSuperClusterRef = sc; ClearMom(); }
81 <      void                 SetCaloIsolation(Double_t caloiso)    { fCaloIsolation = caloiso;   }
82 <      void                 SetCaloTowerIsolation(Double_t tiso)  { fCaloTowerIsolation = tiso; }
83 <      void                 SetClassification(Int_t x)            { fClassification = x;        }
84 <      void                 SetCovEtaEta(Double_t CovEtaEta)      { fCovEtaEta = CovEtaEta;     }
85 <      void                 SetCovEtaPhi(Double_t CovEtaPhi)      { fCovEtaPhi = CovEtaPhi;     }
86 <      void                 SetCovPhiPhi(Double_t CovPhiPhi)      { fCovPhiPhi = CovPhiPhi;     }
87 <      void                 SetCoviEtaiEta(Double_t CoviEtaiEta)  { fCoviEtaiEta = CoviEtaiEta; }
54 >      Double_t             E15()                    const { return fE15;                }
55 >      Double_t             E25Max()                 const { return fE25Max;             }
56 >      Double_t             E55()                    const { return fE55;                }
57 >      Double_t             ESuperClusterOverP()     const { return fESuperClusterOverP;            }
58 >      Double_t             ESeedClusterOverPout()   const { return fESeedClusterOverPout;          }
59 >      Double_t             ESeedClusterOverPIn()    const;
60 >      Double_t             FBrem()                  const { return fFBrem;                         }
61 >      Double_t             FBremOld()               const { return (PIn() - POut())/PIn();         }
62 >      Double_t             FracSharedHits()         const { return fFracSharedHits;                }
63 >      const Track         *GsfTrk()                 const { return fGsfTrackRef.Obj();             }
64 >      Double_t             HadronicOverEm()         const { return fHadronicOverEm;                }
65 >      Double_t             HcalDepth1OverEcal()     const { return fHcalDepth1OverEcal;            }
66 >      Double_t             HcalDepth2OverEcal()     const { return fHcalDepth2OverEcal;            }
67 >      Bool_t               HasGsfTrk()              const { return fGsfTrackRef.IsValid();         }
68 >      Bool_t               HasTrackerTrk()          const { return fTrackerTrackRef.IsValid();     }
69 >      Bool_t               HasSuperCluster()        const { return fSuperClusterRef.IsValid();     }
70 >      Double_t             HcalIsolation()          const { return fHcalJurassicIsolation;         } // *DEPRECATED*
71 >      Double_t             IDLikelihood()           const { return fIDLikelihood;                  }
72 >      Bool_t               IsEnergyScaleCorrected() const { return fIsEnergyScaleCorrected;        }
73 >      Bool_t               IsMomentumCorrected()    const { return fIsMomentumCorrected;           }
74 >      Bool_t               IsEB()                   const { return fIsEB;                          }
75 >      Bool_t               IsEE()                   const { return fIsEE;                          }
76 >      Bool_t               IsEBEEGap()              const { return fIsEBEEGap;                     }
77 >      Bool_t               IsEBEtaGap()             const { return fIsEBEtaGap;                    }
78 >      Bool_t               IsEBPhiGap()             const { return fIsEBPhiGap;                    }
79 >      Bool_t               IsEEDeeGap()             const { return fIsEEDeeGap;                    }
80 >      Bool_t               IsEERingGap()            const { return fIsEERingGap;                   }
81 >      Bool_t               IsEcalDriven()           const { return fIsEcalDriven;                  }
82 >      Bool_t               IsTrackerDriven()        const { return fIsTrackerDriven;               }
83 >      Double_t             Mva()                    const { return fMva;                           }
84 >      Double_t             NumberOfClusters()       const { return fNumberOfClusters;              }
85 >      EObjType             ObjType()                const { return kElectron;                      }
86 >      Double_t             PassLooseID()            const { return fPassLooseID;                   }
87 >      Double_t             PassTightID()            const { return fPassTightID;                   }
88 >      Double_t             PIn()                    const { return fPIn;                           }
89 >      Double_t             POut()                   const { return fPOut;                          }
90 >      const SuperCluster  *SCluster()               const { return fSuperClusterRef.Obj();         }
91 >      
92 >      Double_t             EcalRecHitIsoDr04()      const { return fEcalJurassicIsolation;         }
93 >      Double_t             HcalTowerSumEtDr04()     const { return HcalDepth1TowerSumEtDr04() +
94 >                                                                   HcalDepth2TowerSumEtDr04();     }
95 >      Double_t             HcalDepth1TowerSumEtDr04() const { return fHcalDepth1TowerSumEtDr04;    }
96 >      Double_t             HcalDepth2TowerSumEtDr04() const { return fHcalDepth2TowerSumEtDr04;    }
97 >      Double_t             TrackIsolationDr04()     const { return fTrackIsolationDr04;            }
98 >      Double_t             EcalRecHitIsoDr03()      const { return fEcalRecHitSumEtDr03;           }
99 >      Double_t             HcalTowerSumEtDr03()     const { return fCaloTowerIsolation;            }
100 >      Double_t             HcalDepth1TowerSumEtDr03() const { return fHcalDepth1TowerSumEtDr03;    }
101 >      Double_t             HcalDepth2TowerSumEtDr03() const { return fHcalDepth2TowerSumEtDr03;    }
102 >      Double_t             TrackIsolationDr03()     const { return fTrackIsolation;                }
103 >      
104 >      
105 >      void                 SetCharge(Char_t x)                    { fCharge = x;                   }
106 >      void                 SetClassification(Int_t x)             { fClassification = x;           }
107 >      void                 SetCovEtaEta(Double_t CovEtaEta)       { fCovEtaEta = CovEtaEta;        }
108 >      void                 SetCoviEtaiEta(Double_t CoviEtaiEta)   { fCoviEtaiEta = CoviEtaiEta;    }
109        void                 SetDeltaEtaSuperClusterTrackAtVtx(Double_t x)  
110                               { fDeltaEtaSuperClTrkAtVtx = x;   }
111        void                 SetDeltaEtaSeedClusterTrackAtCalo(Double_t x)  
# Line 91 | Line 114 | namespace mithep
114                               { fDeltaPhiSuperClTrkAtVtx = x;   }
115        void                 SetDeltaPhiSeedClusterTrackAtCalo(Double_t x)  
116                               { fDeltaPhiSeedClTrkAtCalo = x;   }
117 <      void                 SetE33(Double_t E33)                  { fE33 = E33;                     }
118 <      void                 SetE55(Double_t E55)                  { fE55 = E55;                     }
119 <      void                 SetEcalJurassicIso(Double_t iso )     { fEcalJurassicIsolation = iso;   }
120 <      void                 SetESuperClusterOverP(Double_t x)     { fESuperClusterOverP = x;        }
121 <      void                 SetESeedClusterOverPout(Double_t x)   { fESeedClusterOverPout = x;      }
122 <      void                 SetHadronicOverEm(Double_t x)         { fHadronicOverEm = x;            }
123 <      void                 SetIDLikelihood(Double_t likelihood)  { fIDLikelihood = likelihood;     }
124 <      void                 SetIsEnergyScaleCorrected(Double_t x) { fIsEnergyScaleCorrected = x;    }
125 <      void                 SetIsMomentumCorrected(Double_t x)    { fIsMomentumCorrected = x;       }
126 <      void                 SetHcalIsolation(Double_t iso )       { fHcalJurassicIsolation = iso;   }
127 <      void                 SetNumberOfClusters(Double_t x)       { fNumberOfClusters = x;          }
128 <      void                 SetPassLooseID(Double_t passLooseID)  { fPassLooseID = passLooseID;     }
129 <      void                 SetPassTightID(Double_t passTightID)  { fPassTightID = passTightID;     }
130 <      void                 SetPIn(Double_t PIn)                  { fPIn = PIn;                     }
131 <      void                 SetPOut(Double_t POut)                { fPOut = POut;                   }
132 <      void                 SetTrackIsolation(Double_t trkiso)    { fTrackIsolation = trkiso;       }
117 >      void                 SetE15(Double_t x)                     { fE15 = x;                      }
118 >      void                 SetE25Max(Double_t x)                  { fE25Max = x;                   }
119 >      void                 SetE55(Double_t x)                     { fE55 = x;                      }
120 >      void                 SetESeedClusterOverPout(Double_t x)    { fESeedClusterOverPout = x;     }
121 >      void                 SetESuperClusterOverP(Double_t x)      { fESuperClusterOverP = x;       }
122 >      void                 SetFBrem(Double_t x)                   { fFBrem = x;                    }
123 >      void                 SetFracSharedHits(Double_t x)          { fFracSharedHits = x;           }
124 >      void                 SetGsfTrk(const Track* t)                    
125 >                             { fGsfTrackRef = t; ClearCharge(); }
126 >      void                 SetHadronicOverEm(Double_t x)          { fHadronicOverEm = x;           }
127 >      void                 SetHcalDepth1OverEcal(Double_t x)      { fHcalDepth1OverEcal = x;       }
128 >      void                 SetHcalDepth2OverEcal(Double_t x)      { fHcalDepth2OverEcal = x;       }
129 >      void                 SetIDLikelihood(Double_t likelihood)   { fIDLikelihood = likelihood;    }
130 >      void                 SetIsEnergyScaleCorrected(Bool_t x)    { fIsEnergyScaleCorrected = x;   }
131 >      void                 SetIsMomentumCorrected(Bool_t x)       { fIsMomentumCorrected = x;      }
132 >      void                 SetNumberOfClusters(Double_t x)        { fNumberOfClusters = x;         }
133 >      void                 SetPIn(Double_t PIn)                   { fPIn = PIn;                    }
134 >      void                 SetPOut(Double_t POut)                 { fPOut = POut;                  }
135 >      void                 SetPassLooseID(Double_t passLooseID)   { fPassLooseID = passLooseID;    }
136 >      void                 SetPassTightID(Double_t passTightID)   { fPassTightID = passTightID;    }
137 >      void                 SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi);
138 >      void                 SetSuperCluster(const SuperCluster* sc)
139 >                             { fSuperClusterRef = sc; }
140 >      void                 SetTrackerTrk(const Track* t)                
141 >                             { fTrackerTrackRef = t; ClearCharge(); }
142 >      void                 SetEcalRecHitIsoDr04(Double_t x)        { fEcalJurassicIsolation = x;    }
143 >      void                 SetHcalDepth1TowerSumEtDr04(Double_t x) { fHcalDepth1TowerSumEtDr04 = x; }
144 >      void                 SetHcalDepth2TowerSumEtDr04(Double_t x) { fHcalDepth2TowerSumEtDr04 = x; }
145 >      void                 SetTrackIsolationDr04(Double_t x)       { fTrackIsolationDr04 = x;       }
146 >      void                 SetEcalRecHitIsoDr03(Double_t x)        { fEcalRecHitSumEtDr03 = x;      }
147 >      void                 SetHcalTowerSumEtDr03(Double_t x)       { fCaloTowerIsolation = x;       }
148 >      void                 SetHcalDepth1TowerSumEtDr03(Double_t x) { fHcalDepth1TowerSumEtDr03 = x; }
149 >      void                 SetHcalDepth2TowerSumEtDr03(Double_t x) { fHcalDepth2TowerSumEtDr03 = x; }
150 >      void                 SetTrackIsolationDr03(Double_t x)       { fTrackIsolation = x;   }
151 >      void                 SetMva(Double_t x)                      { fMva = x;              }
152 >      void                 SetIsEB(Bool_t b)                       { fIsEB = b;             }
153 >      void                 SetIsEE(Bool_t b)                       { fIsEE = b;             }
154 >      void                 SetIsEBEEGap(Bool_t b)                  { fIsEBEEGap = b;        }
155 >      void                 SetIsEBEtaGap(Bool_t b)                 { fIsEBEtaGap = b;       }
156 >      void                 SetIsEBPhiGap(Bool_t b)                 { fIsEBPhiGap = b;       }
157 >      void                 SetIsEEDeeGap(Bool_t b)                 { fIsEEDeeGap = b;       }
158 >      void                 SetIsEERingGap(Bool_t b)                { fIsEERingGap = b;      }
159 >      void                 SetIsEcalDriven(Bool_t b)               { fIsEcalDriven = b;     }
160 >      void                 SetIsTrackerDriven(Bool_t b)            { fIsTrackerDriven = b;  }
161 >      
162 >    
163 >      const Track         *TrackerTrk()            const { return fTrackerTrackRef.Obj();   }
164 >      const Track         *Trk()                   const { return BestTrk();                }
165  
166      protected:
167 <      Double_t             GetMass()               const         { return 0.51099892e-3;           }
167 >      Double_t             GetCharge()             const;
168 >      Double_t             GetMass()               const { return 0.51099892e-3;            }
169        void                 GetMom()                const;
170  
171 +      Vect3C               fMom;                       //stored three-momentum
172 +      Char_t               fCharge;                    //stored charge - filled with -99 when reading old files
173        Ref<Track>           fGsfTrackRef;               //gsf track reference
174        Ref<Track>           fTrackerTrackRef;           //tracker track reference
175        Ref<SuperCluster>    fSuperClusterRef;           //reference to SuperCluster
176 <      Double32_t           fESuperClusterOverP;        //
177 <      Double32_t           fESeedClusterOverPout;      //
178 <      Double32_t           fDeltaEtaSuperClTrkAtVtx;   //
179 <      Double32_t           fDeltaEtaSeedClTrkAtCalo;   //
180 <      Double32_t           fDeltaPhiSuperClTrkAtVtx;   //
181 <      Double32_t           fDeltaPhiSeedClTrkAtCalo;   //
182 <      Double32_t           fHadronicOverEm;            //
183 <      Double32_t           fIsEnergyScaleCorrected;    //
184 <      Double32_t           fIsMomentumCorrected;       //
185 <      Double32_t           fNumberOfClusters;          //
186 <      Int_t                fClassification;            //
187 <      Double32_t           fE33;                       //
188 <      Double32_t           fE55;                       //
189 <      Double32_t           fCovEtaEta;                 //
190 <      Double32_t           fCoviEtaiEta;               //
191 <      Double32_t           fCovEtaPhi;                 //
192 <      Double32_t           fCovPhiPhi;                 //
193 <      Double32_t           fCaloIsolation;             //
194 <      Double32_t           fCaloTowerIsolation;        //
195 <      Double32_t           fTrackIsolation;            //
196 <      Double32_t           fEcalJurassicIsolation;     //
197 <      Double32_t           fHcalJurassicIsolation;     //
198 <      Double32_t           fPassLooseID;               //
199 <      Double32_t           fPassTightID;               //
200 <      Double32_t           fIDLikelihood;              //
201 <      Double32_t           fPIn;                       //
202 <      Double32_t           fPOut;                      //
176 >      Double32_t           fESuperClusterOverP;        //[0,0,14]super cluster e over p ratio
177 >      Double32_t           fESeedClusterOverPout;      //[0,0,14]seed cluster e over p mom
178 >      Double32_t           fDeltaEtaSuperClTrkAtVtx;   //[0,0,14]delta eta of super cluster with trk
179 >      Double32_t           fDeltaEtaSeedClTrkAtCalo;   //[0,0,14]delta eta of seeed cluster with trk
180 >      Double32_t           fDeltaPhiSuperClTrkAtVtx;   //[0,0,14]delta phi of super cluster with trk
181 >      Double32_t           fDeltaPhiSeedClTrkAtCalo;   //[0,0,14]delta phi of seeed cluster with trk
182 >      Double32_t           fFBrem;                     //[0,0,14]brem fraction
183 >      Double32_t           fHadronicOverEm;            //[0,0,14]hadronic over em fraction *DEPRECATED*
184 >      Double32_t           fHcalDepth1OverEcal;        //[0,0,14]hadronic over em fraction depth1
185 >      Double32_t           fHcalDepth2OverEcal;        //[0,0,14]hadronic over em fraction depth2
186 >      Double32_t           fNumberOfClusters;          //[0,0,14]number of associated clusters
187 >      Double32_t           fE15;                       //[0,0,14]1x5 crystal energy
188 >      Double32_t           fE25Max;                    //[0,0,14]2x5 crystal energy (max of two possible sums)
189 >      Double32_t           fE55;                       //[0,0,14]5x5 crystal energy
190 >      Double32_t           fCovEtaEta;                 //[0,0,14]variance eta-eta
191 >      Double32_t           fCoviEtaiEta;               //[0,0,14]covariance eta-eta (in crystals)
192 >      Double32_t           fCaloIsolation;             //[0,0,14](non-jura) ecal isolation based on rechits dR 0.3 *DEPRECATED*
193 >      Double32_t           fHcalJurassicIsolation;     //[0,0,14]hcal jura iso dR 0.4 *DEPRECATED*
194 >      Double32_t           fHcalDepth1TowerSumEtDr04;  //[0,0,14]hcal depth1 tower based isolation dR 0.4
195 >      Double32_t           fHcalDepth2TowerSumEtDr04;  //[0,0,14]hcal depth2 tower based isolation dR 0.4
196 >      Double32_t           fEcalJurassicIsolation;     //[0,0,14]ecal jura iso dR 0.4 *RENAMING*
197 >      Double32_t           fTrackIsolationDr04;        //[0,0,14]isolation based on tracks dR 0.4
198 >      Double32_t           fCaloTowerIsolation;        //[0,0,14]hcal tower based isolation dR 0.3 *DEPRECATED*
199 >      Double32_t           fHcalDepth1TowerSumEtDr03;  //[0,0,14]hcal depth1 tower based isolation dR 0.3
200 >      Double32_t           fHcalDepth2TowerSumEtDr03;  //[0,0,14]hcal depth2 tower based isolation dR 0.3
201 >      Double32_t           fEcalRecHitSumEtDr03;       //[0,0,14]ecal jura iso dR 0.3
202 >      Double32_t           fTrackIsolation;            //[0,0,14]isolation based on tracks dR 0.3 *RENAMING*
203 >      Double32_t           fPassLooseID;               //[0,0,14]pass loose id
204 >      Double32_t           fPassTightID;               //[0,0,14]pass tight id
205 >      Double32_t           fIDLikelihood;              //[0,0,14]likelihood value
206 >      Double32_t           fPIn;                       //[0,0,14]momentum at vtx
207 >      Double32_t           fPOut;                      //[0,0,14]momentum at ecal surface
208 >      Double32_t           fFracSharedHits;            //[0,0,14]fraction of shared hits btw gsf and std. track
209 >      Double32_t           fMva;                       //[0,0,14] pflow mva output
210 >      Bool_t               fIsEnergyScaleCorrected;    //class dependent escale correction
211 >      Bool_t               fIsMomentumCorrected;       //class dependent E-p combination
212 >      Int_t                fClassification;            //classification (see GsfElectron.h)
213 >      Bool_t               fIsEB;                      //is ECAL barrel
214 >      Bool_t               fIsEE;                      //is ECAL Endcap
215 >      Bool_t               fIsEBEEGap;                 //is in barrel-endcap gap
216 >      Bool_t               fIsEBEtaGap;                //is in EB eta module gap
217 >      Bool_t               fIsEBPhiGap;                //is in EB phi module gap
218 >      Bool_t               fIsEEDeeGap;                //is in EE dee gap
219 >      Bool_t               fIsEERingGap;               //is in EE ring gap
220 >      Bool_t               fIsEcalDriven;              //is std. egamma electron
221 >      Bool_t               fIsTrackerDriven;           //is pflow track-seeded electron
222  
223 <    ClassDef(Electron, 1) // Electron class
223 >    ClassDef(Electron, 3) // Electron class
224    };
225   }
226  
# Line 161 | Line 238 | inline const mithep::Track *mithep::Elec
238   }
239  
240   //--------------------------------------------------------------------------------------------------
241 < inline void mithep::Electron::GetMom() const
241 > inline Double_t mithep::Electron::GetCharge() const
242   {
243 <  // Get momentum of the electron. We use the direction of the
244 <  // track and the energy of the SuperCluster.
168 <
169 <  const mithep::Track *trk = Trk();
243 >  // Return stored charge, unless it is set to invalid (-99),
244 >  // in that case get charge from track as before
245  
246 <  if (!trk) {
247 <    fCachedMom.SetCoordinates(0,0,0,0);
173 <    return;
174 <  }
175 <
176 <  Double_t p = 0;
177 <  Double_t mass = GetMass();
178 <
179 <  const mithep::SuperCluster *sc = SCluster();
180 <  if (sc)
181 <    p = TMath::Sqrt(sc->Energy()*sc->Energy() - mass*mass);
246 >  if (fCharge==-99)
247 >    return mithep::ChargedParticle::GetCharge();
248    else
249 <    p = trk->P();
249 >    return fCharge;
250  
251 <  Double_t pt = TMath::Abs(p*TMath::Cos(trk->Lambda()));
252 <  fCachedMom.SetCoordinates(pt,trk->Eta(),trk->Phi(),mass);
251 > }
252 >
253 > //--------------------------------------------------------------------------------------------------
254 > inline void mithep::Electron::GetMom() const
255 > {
256 >  // Get momentum of the electron. We use an explicitly stored three vector, with the pdg mass,
257 >  // since the momentum vector may be computed non-trivially in cmssw
258 >
259 >  fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass());
260   }
261  
262   //-------------------------------------------------------------------------------------------------
# Line 194 | Line 267 | inline Double_t mithep::Electron::ESeedC
267    
268    return SCluster()->Seed()->Energy() / PIn();
269   }
270 +
271 + //-------------------------------------------------------------------------------------------------
272 + inline void mithep::Electron::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
273 + {
274 +  // Set three-vector
275 +  
276 +  fMom.Set(pt,eta,phi);
277 +  ClearMom();
278 + }
279   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines