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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines