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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines