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.26 by bendavid, Thu Feb 26 17:06:24 2009 UTC vs.
Revision 1.46 by bendavid, Sun May 15 14:11:00 2011 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) {}
23 >      Electron() :
24 >        fCharge(-99), fScPixCharge(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), fD0PV(0), fD0PVErr(0), fIp3dPV(0), fIp3dPVErr(0),
37 >        fD0PVBS(0), fD0PVBSErr(0), fIp3dPVBS(0), fIp3dPVBSErr(0),
38 >        fD0PVCkf(0), fD0PVCkfErr(0), fIp3dPVCkf(0), fIp3dPVCkfErr(0),
39 >        fD0PVBSCkf(0), fD0PVBSCkfErr(0), fIp3dPVBSCkf(0), fIp3dPVBSCkfErr(0),
40 >        fGsfPVCompatibility(0), fGsfPVBSCompatibility(0),
41 >        fGsfPVCompatibilityMatched(0), fGsfPVBSCompatibilityMatched(0),
42 >        fConvPartnerDCotTheta(0), fConvPartnerDist(0), fConvPartnerRadius(0),
43 >        fPFChargedHadronIso(0), fPFNeutralHadronIso(0), fPFPhotonIso(0),
44 >        fConvFlag(0), fIsEnergyScaleCorrected(0), fIsMomentumCorrected(0),
45 >        fClassification(0), fIsEB(), fIsEE(0), fIsEBEEGap(0), fIsEBEtaGap(0),
46 >        fIsEBPhiGap(0), fIsEEDeeGap(0), fIsEERingGap(0),
47 >        fIsEcalDriven(0), fIsTrackerDriven(0), fMatchesVertexConversion(0) {}
48 >
49 >      const Track         *BestTrk()                const;
50 >      Double_t             D0PV()                   const { return fD0PV;                     }
51 >      Double_t             D0PVErr()                const { return fD0PVErr;                  }
52 >      Double_t             D0PVSignificance()       const { return fD0PV/fD0PVErr;            }
53 >      Double_t             Ip3dPV()                 const { return fIp3dPV;                   }
54 >      Double_t             Ip3dPVErr()              const { return fIp3dPVErr;                }
55 >      Double_t             Ip3dPVSignificance()     const { return fIp3dPV/fIp3dPVErr;        }
56 >      Double_t             D0PVBS()                 const { return fD0PVBS;                   }
57 >      Double_t             D0PVBSErr()              const { return fD0PVBSErr;                }
58 >      Double_t             D0PVBSSignificance()     const { return fD0PVBS/fD0PVBSErr;        }
59 >      Double_t             Ip3dPVBS()               const { return fIp3dPVBS;                 }
60 >      Double_t             Ip3dPVBSErr()            const { return fIp3dPVBSErr;              }
61 >      Double_t             Ip3dPVBSSignificance()   const { return fIp3dPVBS/fIp3dPVBSErr;    }
62 >      Double_t             D0PVCkf()                   const { return fD0PVCkf;                     }
63 >      Double_t             D0PVCkfErr()                const { return fD0PVCkfErr;                  }
64 >      Double_t             D0PVCkfSignificance()       const { return fD0PVCkf/fD0PVCkfErr;         }
65 >      Double_t             Ip3dPVCkf()                 const { return fIp3dPVCkf;                   }
66 >      Double_t             Ip3dPVCkfErr()              const { return fIp3dPVCkfErr;                }
67 >      Double_t             Ip3dPVCkfSignificance()     const { return fIp3dPVCkf/fIp3dPVCkfErr;     }
68 >      Double_t             D0PVBSCkf()                 const { return fD0PVBSCkf;                   }
69 >      Double_t             D0PVBSCkfErr()              const { return fD0PVBSCkfErr;                }
70 >      Double_t             D0PVBSCkfSignificance()     const { return fD0PVBSCkf/fD0PVBSCkfErr;     }
71 >      Double_t             Ip3dPVBSCkf()               const { return fIp3dPVBSCkf;                 }
72 >      Double_t             Ip3dPVBSCkfErr()            const { return fIp3dPVBSCkfErr;              }
73 >      Double_t             Ip3dPVBSCkfSignificance()   const { return fIp3dPVBSCkf/fIp3dPVBSCkfErr; }
74 >      Double_t             GsfPVCompatibility()     const { return fGsfPVCompatibility;       }
75 >      Double_t             GsfPVBSCompatibility()   const { return fGsfPVBSCompatibility;     }
76 >      Double_t             GsfPVCompatibilityMatched()     const { return fGsfPVCompatibilityMatched;       }
77 >      Double_t             GsfPVBSCompatibilityMatched()   const { return fGsfPVBSCompatibilityMatched;     }
78 >      Double_t             ConvPartnerDCotTheta()   const { return fConvPartnerDCotTheta;     }
79 >      Double_t             ConvPartnerDist()        const { return fConvPartnerDist;          }
80 >      Double_t             ConvPartnerRadius()      const { return fConvPartnerRadius;        }
81 >      Int_t                ConvFlag()               const { return fConvFlag;            }
82 >      Double_t             CaloIsolation()          const { return fCaloIsolation;       } // *DEPRECATED*
83 >      Int_t                Classification()         const { return fClassification;      }
84 >      Double_t             CovEtaEta()              const { return fCovEtaEta;           }
85 >      Double_t             CoviEtaiEta()            const { return fCoviEtaiEta;         }
86 >      Double_t             DeltaEtaSuperClusterTrackAtVtx() const
87 >                             { return fDeltaEtaSuperClTrkAtVtx; }
88 >      Double_t             DeltaEtaSeedClusterTrackAtCalo() const
89 >                             { return fDeltaEtaSeedClTrkAtCalo; }
90 >      Double_t             DeltaPhiSuperClusterTrackAtVtx() const
91 >                             { return fDeltaPhiSuperClTrkAtVtx; }
92 >      Double_t             DeltaPhiSeedClusterTrackAtCalo() const
93 >                             { return fDeltaPhiSeedClTrkAtCalo; }
94 >      Double_t             E15()                    const { return fE15;                }
95 >      Double_t             E25Max()                 const { return fE25Max;             }
96 >      Double_t             E55()                    const { return fE55;                }
97 >      Double_t             ESuperClusterOverP()     const { return fESuperClusterOverP;            }
98 >      Double_t             ESeedClusterOverPout()   const { return fESeedClusterOverPout;          }
99 >      Double_t             ESeedClusterOverPIn()    const;
100 >      Double_t             FBrem()                  const { return fFBrem;                         }
101 >      Double_t             FBremOld()               const { return (PIn() - POut())/PIn();         }
102 >      Double_t             FracSharedHits()         const { return fFracSharedHits;                }
103 >      const Track         *GsfTrk()                 const { return fGsfTrackRef.Obj();             }
104 >      Double_t             HadronicOverEm()         const { return fHadronicOverEm;                }
105 >      Double_t             HcalDepth1OverEcal()     const { return fHcalDepth1OverEcal;            }
106 >      Double_t             HcalDepth2OverEcal()     const { return fHcalDepth2OverEcal;            }
107 >      Bool_t               HasGsfTrk()              const { return fGsfTrackRef.IsValid();         }
108 >      Bool_t               HasTrackerTrk()          const { return fTrackerTrackRef.IsValid();     }
109 >      Bool_t               HasSuperCluster()        const { return fSuperClusterRef.IsValid();     }
110 >      Double_t             HcalIsolation()          const { return fHcalJurassicIsolation;         } // *DEPRECATED*
111 >      Double_t             IDLikelihood()           const { return fIDLikelihood;                  }
112 >      Bool_t               IsEnergyScaleCorrected() const { return fIsEnergyScaleCorrected;        }
113 >      Bool_t               IsMomentumCorrected()    const { return fIsMomentumCorrected;           }
114 >      Bool_t               IsEB()                   const { return fIsEB;                          }
115 >      Bool_t               IsEE()                   const { return fIsEE;                          }
116 >      Bool_t               IsEBEEGap()              const { return fIsEBEEGap;                     }
117 >      Bool_t               IsEBEtaGap()             const { return fIsEBEtaGap;                    }
118 >      Bool_t               IsEBPhiGap()             const { return fIsEBPhiGap;                    }
119 >      Bool_t               IsEEDeeGap()             const { return fIsEEDeeGap;                    }
120 >      Bool_t               IsEERingGap()            const { return fIsEERingGap;                   }
121 >      Bool_t               IsEcalDriven()           const { return fIsEcalDriven;                  }
122 >      Bool_t               IsTrackerDriven()        const { return fIsTrackerDriven;               }
123 >      Double_t             Mva()                    const { return fMva;                           }
124 >      Double_t             NumberOfClusters()       const { return fNumberOfClusters;              }
125 >      EObjType             ObjType()                const { return kElectron;                      }
126 >      Double_t             PassLooseID()            const { return fPassLooseID;                   }
127 >      Double_t             PassTightID()            const { return fPassTightID;                   }
128 >      Double_t             PIn()                    const { return fPIn;                           }
129 >      Double_t             POut()                   const { return fPOut;                          }
130 >      const SuperCluster  *SCluster()               const { return fSuperClusterRef.Obj();         }
131 >      Double_t             ScPixCharge()            const { return fScPixCharge;                   }
132        
133 <      const Track         *BestTrk()               const;
134 <      const Track         *GsfTrk()                const { return fGsfTrackRef.Obj();       }
133 >      Double_t             EcalRecHitIsoDr04()      const { return fEcalJurassicIsolation;         }
134 >      Double_t             HcalTowerSumEtDr04()     const { return HcalDepth1TowerSumEtDr04() +
135 >                                                                   HcalDepth2TowerSumEtDr04();     }
136 >      Double_t             HcalDepth1TowerSumEtDr04() const { return fHcalDepth1TowerSumEtDr04;    }
137 >      Double_t             HcalDepth2TowerSumEtDr04() const { return fHcalDepth2TowerSumEtDr04;    }
138 >      Double_t             TrackIsolationDr04()     const { return fTrackIsolationDr04;            }
139 >      Double_t             EcalRecHitIsoDr03()      const { return fEcalRecHitSumEtDr03;           }
140 >      Double_t             HcalTowerSumEtDr03()     const { return fCaloTowerIsolation;            }
141 >      Double_t             HcalDepth1TowerSumEtDr03() const { return fHcalDepth1TowerSumEtDr03;    }
142 >      Double_t             HcalDepth2TowerSumEtDr03() const { return fHcalDepth2TowerSumEtDr03;    }
143 >      Double_t             TrackIsolationDr03()     const { return fTrackIsolation;                }
144 >      Double_t             PFChargedHadronIso()      const { return fPFChargedHadronIso;           }
145 >      Double_t             PFNeutralHadronIso()      const { return fPFNeutralHadronIso;           }
146 >      Double_t             PFPhotonIso()             const { return fPFPhotonIso;                  }
147 >      Bool_t               MatchesVertexConversion() const { return fMatchesVertexConversion;      }
148 >      UInt_t               NAmbiguousGsfTracks()     const { return fAmbiguousGsfTracks.Entries();  }
149 >      Bool_t               HasAmbiguousGsfTrack(const Track *t) const { return fAmbiguousGsfTracks.HasObject(t); }
150 >      const Track         *AmbiguousGsfTrack(UInt_t i) const { return fAmbiguousGsfTracks.At(i);   }
151 >      
152 >      void                 AddAmbiguousGsfTrack(const Track *t)   { fAmbiguousGsfTracks.Add(t);    }
153 >      void                 SetCharge(Char_t x)                    { fCharge = x; ClearCharge();    }
154 >      void                 SetScPixCharge(Char_t x)               { fScPixCharge = x;              }
155 >      void                 SetD0PV(Double_t x)                    { fD0PV = x;                     }
156 >      void                 SetD0PVErr(Double_t x)                 { fD0PVErr = x;                  }
157 >      void                 SetIp3dPV(Double_t x)                  { fIp3dPV = x;                   }
158 >      void                 SetIp3dPVErr(Double_t x)               { fIp3dPVErr = x;                }
159 >      void                 SetD0PVBS(Double_t x)                  { fD0PVBS = x;                   }
160 >      void                 SetD0PVBSErr(Double_t x)               { fD0PVBSErr = x;                }
161 >      void                 SetIp3dPVBS(Double_t x)                { fIp3dPVBS = x;                 }
162 >      void                 SetIp3dPVBSErr(Double_t x)             { fIp3dPVBSErr = x;              }
163 >      void                 SetD0PVCkf(Double_t x)                 { fD0PVCkf = x;                     }
164 >      void                 SetD0PVCkfErr(Double_t x)              { fD0PVCkfErr = x;                  }
165 >      void                 SetIp3dPVCkf(Double_t x)               { fIp3dPVCkf = x;                   }
166 >      void                 SetIp3dPVCkfErr(Double_t x)            { fIp3dPVCkfErr = x;                }
167 >      void                 SetD0PVBSCkf(Double_t x)               { fD0PVBSCkf = x;                   }
168 >      void                 SetD0PVBSCkfErr(Double_t x)            { fD0PVBSCkfErr = x;                }
169 >      void                 SetIp3dPVBSCkf(Double_t x)             { fIp3dPVBSCkf = x;                 }
170 >      void                 SetIp3dPVBSCkfErr(Double_t x)          { fIp3dPVBSCkfErr = x;              }
171 >      void                 SetGsfPVCompatibility(Double_t x)      { fGsfPVCompatibility = x;       }
172 >      void                 SetGsfPVBSCompatibility(Double_t x)    { fGsfPVBSCompatibility = x;     }
173 >      void                 SetGsfPVCompatibilityMatched(Double_t x)      { fGsfPVCompatibilityMatched = x;   }
174 >      void                 SetGsfPVBSCompatibilityMatched(Double_t x)    { fGsfPVBSCompatibilityMatched = x; }
175 >      void                 SetConvPartnerDCotTheta(Double_t x)    { fConvPartnerDCotTheta = x;     }
176 >      void                 SetConvPartnerDist(Double_t x)         { fConvPartnerDist = x;          }
177 >      void                 SetConvPartnerRadius(Double_t x)       { fConvPartnerRadius = x;        }
178 >      void                 SetConvFlag(Int_t n)                   { fConvFlag = n;                 }
179 >      void                 SetClassification(Int_t x)             { fClassification = x;           }
180 >      void                 SetCovEtaEta(Double_t CovEtaEta)       { fCovEtaEta = CovEtaEta;        }
181 >      void                 SetCoviEtaiEta(Double_t CoviEtaiEta)   { fCoviEtaiEta = CoviEtaiEta;    }
182 >      void                 SetDeltaEtaSuperClusterTrackAtVtx(Double_t x)  
183 >                             { fDeltaEtaSuperClTrkAtVtx = x;   }
184 >      void                 SetDeltaEtaSeedClusterTrackAtCalo(Double_t x)  
185 >                             { fDeltaEtaSeedClTrkAtCalo = x;   }
186 >      void                 SetDeltaPhiSuperClusterTrackAtVtx(Double_t x)  
187 >                             { fDeltaPhiSuperClTrkAtVtx = x;   }
188 >      void                 SetDeltaPhiSeedClusterTrackAtCalo(Double_t x)  
189 >                             { fDeltaPhiSeedClTrkAtCalo = x;   }
190 >      void                 SetE15(Double_t x)                     { fE15 = x;                      }
191 >      void                 SetE25Max(Double_t x)                  { fE25Max = x;                   }
192 >      void                 SetE55(Double_t x)                     { fE55 = x;                      }
193 >      void                 SetESeedClusterOverPout(Double_t x)    { fESeedClusterOverPout = x;     }
194 >      void                 SetESuperClusterOverP(Double_t x)      { fESuperClusterOverP = x;       }
195 >      void                 SetFBrem(Double_t x)                   { fFBrem = x;                    }
196 >      void                 SetFracSharedHits(Double_t x)          { fFracSharedHits = x;           }
197 >      void                 SetGsfTrk(const Track* t)                    
198 >                             { fGsfTrackRef = t; ClearCharge(); }
199 >      void                 SetHadronicOverEm(Double_t x)          { fHadronicOverEm = x;           }
200 >      void                 SetHcalDepth1OverEcal(Double_t x)      { fHcalDepth1OverEcal = x;       }
201 >      void                 SetHcalDepth2OverEcal(Double_t x)      { fHcalDepth2OverEcal = x;       }
202 >      void                 SetIDLikelihood(Double_t likelihood)   { fIDLikelihood = likelihood;    }
203 >      void                 SetIsEnergyScaleCorrected(Bool_t x)    { fIsEnergyScaleCorrected = x;   }
204 >      void                 SetIsMomentumCorrected(Bool_t x)       { fIsMomentumCorrected = x;      }
205 >      void                 SetNumberOfClusters(Double_t x)        { fNumberOfClusters = x;         }
206 >      void                 SetPIn(Double_t PIn)                   { fPIn = PIn;                    }
207 >      void                 SetPOut(Double_t POut)                 { fPOut = POut;                  }
208 >      void                 SetPassLooseID(Double_t passLooseID)   { fPassLooseID = passLooseID;    }
209 >      void                 SetPassTightID(Double_t passTightID)   { fPassTightID = passTightID;    }
210 >      void                 SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi);
211 >      void                 SetSuperCluster(const SuperCluster* sc)
212 >                             { fSuperClusterRef = sc; }
213 >      void                 SetTrackerTrk(const Track* t)                
214 >                             { fTrackerTrackRef = t; ClearCharge(); }
215 >      void                 SetConvPartnerTrk(const Track *t)
216 >                             { fConvPartnerTrackRef = t; }
217 >      void                 SetEcalRecHitIsoDr04(Double_t x)        { fEcalJurassicIsolation = x;    }
218 >      void                 SetHcalDepth1TowerSumEtDr04(Double_t x) { fHcalDepth1TowerSumEtDr04 = x; }
219 >      void                 SetHcalDepth2TowerSumEtDr04(Double_t x) { fHcalDepth2TowerSumEtDr04 = x; }
220 >      void                 SetTrackIsolationDr04(Double_t x)       { fTrackIsolationDr04 = x;       }
221 >      void                 SetEcalRecHitIsoDr03(Double_t x)        { fEcalRecHitSumEtDr03 = x;      }
222 >      void                 SetHcalTowerSumEtDr03(Double_t x)       { fCaloTowerIsolation = x;       }
223 >      void                 SetHcalDepth1TowerSumEtDr03(Double_t x) { fHcalDepth1TowerSumEtDr03 = x; }
224 >      void                 SetHcalDepth2TowerSumEtDr03(Double_t x) { fHcalDepth2TowerSumEtDr03 = x; }
225 >      void                 SetTrackIsolationDr03(Double_t x)       { fTrackIsolation = x;   }
226 >      void                 SetPFChargedHadronIso(Double_t x)       { fPFChargedHadronIso = x;       }
227 >      void                 SetPFNeutralHadronIso(Double_t x)       { fPFNeutralHadronIso = x;       }
228 >      void                 SetPFPhotonIso(Double_t x)              { fPFPhotonIso = x;              }
229 >      void                 SetMva(Double_t x)                      { fMva = x;              }
230 >      void                 SetIsEB(Bool_t b)                       { fIsEB = b;             }
231 >      void                 SetIsEE(Bool_t b)                       { fIsEE = b;             }
232 >      void                 SetIsEBEEGap(Bool_t b)                  { fIsEBEEGap = b;        }
233 >      void                 SetIsEBEtaGap(Bool_t b)                 { fIsEBEtaGap = b;       }
234 >      void                 SetIsEBPhiGap(Bool_t b)                 { fIsEBPhiGap = b;       }
235 >      void                 SetIsEEDeeGap(Bool_t b)                 { fIsEEDeeGap = b;       }
236 >      void                 SetIsEERingGap(Bool_t b)                { fIsEERingGap = b;      }
237 >      void                 SetIsEcalDriven(Bool_t b)               { fIsEcalDriven = b;     }
238 >      void                 SetIsTrackerDriven(Bool_t b)            { fIsTrackerDriven = b;  }
239 >      void                 SetMatchesVertexConversion(Bool_t b)    { fMatchesVertexConversion = b; }
240 >      void                 SetConversionXYZ(Double_t x, Double_t y, Double_t z)
241 >                                  { fConvPosition.SetXYZ(x,y,z); }
242 >      
243 >    
244        const Track         *TrackerTrk()            const { return fTrackerTrackRef.Obj();   }
35      const SuperCluster  *SCluster()              const { return fSuperClusterRef.Obj();   }
245        const Track         *Trk()                   const { return BestTrk();                }
246 <      Double_t    CaloIsolation()                  const { return fCaloIsolation;           }
38 <      Double_t    CaloTowerIsolation()             const { return fCaloTowerIsolation;      }
39 <      Double_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;             }
44 <      Double_t    DeltaEtaSuperClusterTrackAtVtx() const { return fDeltaEtaSuperClTrkAtVtx; }
45 <      Double_t    DeltaEtaSeedClusterTrackAtCalo() const { return fDeltaEtaSeedClTrkAtCalo; }
46 <      Double_t    DeltaPhiSuperClusterTrackAtVtx() const { return fDeltaPhiSuperClTrkAtVtx; }
47 <      Double_t    DeltaPhiSeedClusterTrackAtCalo() const { return fDeltaPhiSeedClTrkAtCalo; }
48 <      Double_t    E33()                            const { return fE33;                     }
49 <      Double_t    E55()                            const { return fE55;                     }
50 <      Double_t    EcalJurassicIsolation()          const { return fEcalJurassicIsolation;   }
51 <      Double_t    ESuperClusterOverP()             const { return fESuperClusterOverP;      }
52 <      Double_t    ESeedClusterOverPout()           const { return fESeedClusterOverPout;    }
53 <      Double_t    ESeedClusterOverPIn()            const;
54 <      Double_t    IDLikelihood()                   const { return fIDLikelihood;            }
55 <      Double_t    IsEnergyScaleCorrected()         const { return fIsEnergyScaleCorrected;  }
56 <      Double_t    IsMomentumCorrected()            const { return fIsMomentumCorrected;     }
57 <      Double_t    HadronicOverEm()                 const { return fHadronicOverEm;          }
58 <      Bool_t      HasGsfTrk()                      const { return fGsfTrackRef.IsValid();   }
59 <      Bool_t      HasTrackerTrk()                  const { return fTrackerTrackRef.IsValid(); }
60 <      Bool_t      HasSuperCluster()                const { return fSuperClusterRef.IsValid(); }
61 <      Double_t    HcalIsolation()                  const { return fHcalJurassicIsolation;   }
62 <      Double_t    NumberOfClusters()               const { return fNumberOfClusters;        }
63 <      EObjType    ObjType()                        const { return kElectron;                }      
64 <      Double_t    PassLooseID()                    const { return fPassLooseID;             }
65 <      Double_t    PassTightID()                    const { return fPassTightID;             }
66 <      Double_t    PIn()                            const { return fPIn;                     }
67 <      Double_t    POut()                           const { return fPOut;                    }
68 <      Double_t    TrackIsolation()                 const { return fTrackIsolation;          }
69 <      void        SetGsfTrk(const Track* t)                     { fGsfTrackRef = t; ClearMom(); ClearCharge(); }
70 <      void        SetTrackerTrk(const Track* t)                 { fTrackerTrackRef = t; ClearMom(); ClearCharge(); }
71 <      void        SetSuperCluster(const SuperCluster* sc)       { fSuperClusterRef = sc; ClearMom(); }
72 <      void        SetCaloIsolation(Double_t CaloIsolation)      { fCaloIsolation = CaloIsolation;  }
73 <      void        SetCaloTowerIsolation(Double_t TowerIso)      { fCaloTowerIsolation = TowerIso;  }
74 <      void        SetClassification(Double_t x)                 { fClassification = x;             }
75 <      void        SetCovEtaEta(Double_t CovEtaEta)              { fCovEtaEta = CovEtaEta;          }
76 <      void        SetCovEtaPhi(Double_t CovEtaPhi)              { fCovEtaPhi = CovEtaPhi;          }
77 <      void        SetCovPhiPhi(Double_t CovPhiPhi)              { fCovPhiPhi = CovPhiPhi;          }
78 <      void        SetCoviEtaiEta(Double_t CoviEtaiEta)          { fCoviEtaiEta = CoviEtaiEta;      }
79 <      void        SetDeltaEtaSuperClusterTrackAtVtx(Double_t x) { fDeltaEtaSuperClTrkAtVtx = x;    }
80 <      void        SetDeltaEtaSeedClusterTrackAtCalo(Double_t x) { fDeltaEtaSeedClTrkAtCalo = x;    }
81 <      void        SetDeltaPhiSuperClusterTrackAtVtx(Double_t x) { fDeltaPhiSuperClTrkAtVtx = x;    }
82 <      void        SetDeltaPhiSeedClusterTrackAtCalo(Double_t x) { fDeltaPhiSeedClTrkAtCalo = x;    }
83 <      void        SetE33(Double_t E33)                          { fE33 = E33;                      }
84 <      void        SetE55(Double_t E55)                          { fE55 = E55;                      }
85 <      void        SetEcalJurassicIsolation(Double_t iso )       { fEcalJurassicIsolation = iso;    }
86 <      void        SetESuperClusterOverP(Double_t x)             { fESuperClusterOverP = x;         }
87 <      void        SetESeedClusterOverPout(Double_t x)           { fESeedClusterOverPout = x;       }
88 <      void        SetHadronicOverEm(Double_t x)                 { fHadronicOverEm = x;             }
89 <      void        SetIDLikelihood(Double_t likelihood)          { fIDLikelihood = likelihood;      }
90 <      void        SetIsEnergyScaleCorrected(Double_t x)         { fIsEnergyScaleCorrected = x;     }
91 <      void        SetIsMomentumCorrected(Double_t x)            { fIsMomentumCorrected = x;        }
92 <      void        SetHcalIsolation(Double_t iso )               { fHcalJurassicIsolation = iso;    }
93 <      void        SetNumberOfClusters(Double_t x)               { fNumberOfClusters = x;           }
94 <      void        SetPassLooseID(Double_t passLooseID)          { fPassLooseID = passLooseID;      }
95 <      void        SetPassTightID(Double_t passTightID)          { fPassTightID = passTightID;      }
96 <      void        SetPIn(Double_t PIn)                          { fPIn = PIn;                      }
97 <      void        SetPOut(Double_t POut)                        { fPOut = POut;                    }
98 <      void        SetTrackIsolation(Double_t trkiso)            { fTrackIsolation = trkiso;        }
246 >      const Track         *ConvPartnerTrk()        const { return fConvPartnerTrackRef.Obj(); }
247  
248      protected:
249 <      Double_t    GetMass()                  const              { return 0.51099892e-3;            }
250 <      void        GetMom()                   const;
249 >      Double_t             GetCharge()             const;
250 >      Double_t             GetMass()               const { return 0.51099892e-3;            }
251 >      void                 GetMom()                const;
252 >
253 >      Vect3C               fMom;                       //stored three-momentum
254 >      Char_t               fCharge;                    //stored charge - filled with -99 when reading old files
255 >      Char_t               fScPixCharge;               //charge from supercluster-pixel matching
256 >      Ref<Track>           fGsfTrackRef;               //gsf track reference
257 >      Ref<Track>           fTrackerTrackRef;           //tracker track reference
258 >      Ref<Track>           fConvPartnerTrackRef;       //conversion partner track reference
259 >      Ref<SuperCluster>    fSuperClusterRef;           //reference to SuperCluster
260 >      Double32_t           fESuperClusterOverP;        //[0,0,14]super cluster e over p ratio
261 >      Double32_t           fESeedClusterOverPout;      //[0,0,14]seed cluster e over p mom
262 >      Double32_t           fDeltaEtaSuperClTrkAtVtx;   //[0,0,14]delta eta of super cluster with trk
263 >      Double32_t           fDeltaEtaSeedClTrkAtCalo;   //[0,0,14]delta eta of seeed cluster with trk
264 >      Double32_t           fDeltaPhiSuperClTrkAtVtx;   //[0,0,14]delta phi of super cluster with trk
265 >      Double32_t           fDeltaPhiSeedClTrkAtCalo;   //[0,0,14]delta phi of seeed cluster with trk
266 >      Double32_t           fFBrem;                     //[0,0,14]brem fraction
267 >      Double32_t           fHadronicOverEm;            //[0,0,14]hadronic over em fraction *DEPRECATED*
268 >      Double32_t           fHcalDepth1OverEcal;        //[0,0,14]hadronic over em fraction depth1
269 >      Double32_t           fHcalDepth2OverEcal;        //[0,0,14]hadronic over em fraction depth2
270 >      Double32_t           fNumberOfClusters;          //[0,0,14]number of associated clusters
271 >      Double32_t           fE15;                       //[0,0,14]1x5 crystal energy
272 >      Double32_t           fE25Max;                    //[0,0,14]2x5 crystal energy (max of two possible sums)
273 >      Double32_t           fE55;                       //[0,0,14]5x5 crystal energy
274 >      Double32_t           fCovEtaEta;                 //[0,0,14]variance eta-eta
275 >      Double32_t           fCoviEtaiEta;               //[0,0,14]covariance eta-eta (in crystals)
276 >      Double32_t           fCaloIsolation;             //[0,0,14](non-jura) ecal isolation based on rechits dR 0.3 *DEPRECATED*
277 >      Double32_t           fHcalJurassicIsolation;     //[0,0,14]hcal jura iso dR 0.4 *DEPRECATED*
278 >      Double32_t           fHcalDepth1TowerSumEtDr04;  //[0,0,14]hcal depth1 tower based isolation dR 0.4
279 >      Double32_t           fHcalDepth2TowerSumEtDr04;  //[0,0,14]hcal depth2 tower based isolation dR 0.4
280 >      Double32_t           fEcalJurassicIsolation;     //[0,0,14]ecal jura iso dR 0.4 *RENAMING*
281 >      Double32_t           fTrackIsolationDr04;        //[0,0,14]isolation based on tracks dR 0.4
282 >      Double32_t           fCaloTowerIsolation;        //[0,0,14]hcal tower based isolation dR 0.3 *DEPRECATED*
283 >      Double32_t           fHcalDepth1TowerSumEtDr03;  //[0,0,14]hcal depth1 tower based isolation dR 0.3
284 >      Double32_t           fHcalDepth2TowerSumEtDr03;  //[0,0,14]hcal depth2 tower based isolation dR 0.3
285 >      Double32_t           fEcalRecHitSumEtDr03;       //[0,0,14]ecal jura iso dR 0.3
286 >      Double32_t           fTrackIsolation;            //[0,0,14]isolation based on tracks dR 0.3 *RENAMING*
287 >      Double32_t           fPassLooseID;               //[0,0,14]pass loose id
288 >      Double32_t           fPassTightID;               //[0,0,14]pass tight id
289 >      Double32_t           fIDLikelihood;              //[0,0,14]likelihood value
290 >      Double32_t           fPIn;                       //[0,0,14]momentum at vtx
291 >      Double32_t           fPOut;                      //[0,0,14]momentum at ecal surface
292 >      Double32_t           fFracSharedHits;            //[0,0,14]fraction of shared hits btw gsf and std. track
293 >      Double32_t           fMva;                       //[0,0,14] pflow mva output
294 >      Double32_t           fD0PV;                      //[0,0,14]transverse impact parameter to signal PV (gsf track)
295 >      Double32_t           fD0PVErr;                   //[0,0,14]transverse impact parameter uncertainty to signal PV (gsf track)
296 >      Double32_t           fIp3dPV;                    //[0,0,14]3d impact parameter to signal PV (gsf track)
297 >      Double32_t           fIp3dPVErr;                 //[0,0,14]3d impact parameter uncertainty to signal PV (gsf track)
298 >      Double32_t           fD0PVBS;                    //[0,0,14]transverse impact parameter to signal PV w/ bs constraint (gsf track)
299 >      Double32_t           fD0PVBSErr;                 //[0,0,14]transverse impact parameter uncertainty to signal PV w/ bs constraint (gsf track)
300 >      Double32_t           fIp3dPVBS;                  //[0,0,14]3d impact parameter to signal PV w/ bs constraint (gsf track)
301 >      Double32_t           fIp3dPVBSErr;               //[0,0,14]3d impact parameter uncertainty to signal PV w/ bs constraint (gsf track)
302 >      Double32_t           fD0PVCkf;                      //[0,0,14]transverse impact parameter to signal PV (ckf track)
303 >      Double32_t           fD0PVCkfErr;                   //[0,0,14]transverse impact parameter uncertainty to signal PV (ckf track)
304 >      Double32_t           fIp3dPVCkf;                    //[0,0,14]3d impact parameter to signal PV (ckf track)
305 >      Double32_t           fIp3dPVCkfErr;                 //[0,0,14]3d impact parameter uncertainty to signal PV (ckf track)
306 >      Double32_t           fD0PVBSCkf;                    //[0,0,14]transverse impact parameter to signal PV w/ bs constraint (ckf track)
307 >      Double32_t           fD0PVBSCkfErr;                 //[0,0,14]transverse impact parameter uncertainty to signal PV w/ bs constraint (ckf track)
308 >      Double32_t           fIp3dPVBSCkf;                  //[0,0,14]3d impact parameter to signal PV w/ bs constraint (ckf track)
309 >      Double32_t           fIp3dPVBSCkfErr;               //[0,0,14]3d impact parameter uncertainty to signal PV w/ bs constraint (ckf track)
310 >      Double32_t           fGsfPVCompatibility;        //[0,0,14]gsf compatibility with signal PV
311 >      Double32_t           fGsfPVBSCompatibility;      //[0,0,14]gsf compatibility with signal PV w/ bs constraint
312 >      Double32_t           fGsfPVCompatibilityMatched; //[0,0,14]gsf compatibility with signal PV (matching ckf track excluded from vertex)
313 >      Double32_t           fGsfPVBSCompatibilityMatched; //[0,0,14]gsf compatibility with signal PV w/ bs constraint (matching ckf track excluded from vertex)
314 >      Double32_t           fConvPartnerDCotTheta;      //[0,0,14]delta cot theta to nearest conversion partner track
315 >      Double32_t           fConvPartnerDist;           //[0,0,14]distance in x-y plane to nearest conversion partner track
316 >      Double32_t           fConvPartnerRadius;         //[0,0,14]radius of helix intersection with conversion partner track
317 >      Double32_t           fPFChargedHadronIso;        //[0,0,14]pf isolation, charged hadrons
318 >      Double32_t           fPFNeutralHadronIso;        //[0,0,14]pf isolation, neutral hadrons
319 >      Double32_t           fPFPhotonIso;               //[0,0,14]pf isolation, photons
320 >      Int_t                fConvFlag;                  //conversion flag indicating which track combination was used
321 >      Vect3C               fConvPosition;
322 >      Bool_t               fIsEnergyScaleCorrected;    //class dependent escale correction
323 >      Bool_t               fIsMomentumCorrected;       //class dependent E-p combination
324 >      Int_t                fClassification;            //classification (see GsfElectron.h)
325 >      Bool_t               fIsEB;                      //is ECAL barrel
326 >      Bool_t               fIsEE;                      //is ECAL Endcap
327 >      Bool_t               fIsEBEEGap;                 //is in barrel-endcap gap
328 >      Bool_t               fIsEBEtaGap;                //is in EB eta module gap
329 >      Bool_t               fIsEBPhiGap;                //is in EB phi module gap
330 >      Bool_t               fIsEEDeeGap;                //is in EE dee gap
331 >      Bool_t               fIsEERingGap;               //is in EE ring gap
332 >      Bool_t               fIsEcalDriven;              //is std. egamma electron
333 >      Bool_t               fIsTrackerDriven;           //is pflow track-seeded electron
334 >      Bool_t               fMatchesVertexConversion;
335 >      RefArray<Track>      fAmbiguousGsfTracks;        //ambiguous gsf tracks for this electron
336  
337 <      Ref<Track>  fGsfTrackRef;               //gsf track reference
105 <      Ref<Track>  fTrackerTrackRef;           //tracker track reference
106 <      Ref<SuperCluster> fSuperClusterRef;     //reference to SuperCluster
107 <      Double_t    fESuperClusterOverP;        //
108 <      Double_t    fESeedClusterOverPout;      //
109 <      Double_t    fDeltaEtaSuperClTrkAtVtx;   //
110 <      Double_t    fDeltaEtaSeedClTrkAtCalo;   //
111 <      Double_t    fDeltaPhiSuperClTrkAtVtx;   //
112 <      Double_t    fDeltaPhiSeedClTrkAtCalo;   //
113 <      Double_t    fHadronicOverEm;            //
114 <      Double_t    fIsEnergyScaleCorrected;    //
115 <      Double_t    fIsMomentumCorrected;       //
116 <      Double_t    fNumberOfClusters;          //
117 <      Double_t    fClassification;            //
118 <      Double_t    fE33;                       //
119 <      Double_t    fE55;                       //
120 <      Double_t    fCovEtaEta;                 //
121 <      Double_t    fCoviEtaiEta;               //
122 <      Double_t    fCovEtaPhi;                 //
123 <      Double_t    fCovPhiPhi;                 //
124 <      Double_t    fCaloIsolation;             //
125 <      Double_t    fCaloTowerIsolation;        //
126 <      Double_t    fTrackIsolation;            //
127 <      Double_t    fEcalJurassicIsolation;     //
128 <      Double_t    fHcalJurassicIsolation;     //
129 <      Double_t    fPassLooseID;               //
130 <      Double_t    fPassTightID;               //
131 <      Double_t    fIDLikelihood;              //
132 <      Double_t    fPIn;                       //
133 <      Double_t    fPOut;                      //
134 <
135 <    ClassDef(Electron, 1) // Electron class
337 >    ClassDef(Electron, 11) // Electron class
338    };
339   }
340  
# Line 150 | Line 352 | inline const mithep::Track *mithep::Elec
352   }
353  
354   //--------------------------------------------------------------------------------------------------
355 < inline void mithep::Electron::GetMom() const
355 > inline Double_t mithep::Electron::GetCharge() const
356   {
357 <  // Get momentum of the electron. We use the direction of the
358 <  // track and the energy of the SuperCluster.
357 >  // Return stored charge, unless it is set to invalid (-99),
358 >  // in that case get charge from track as before
359  
360 <  const mithep::Track *trk = Trk();
361 <
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);
360 >  if (fCharge==-99)
361 >    return mithep::ChargedParticle::GetCharge();
362    else
363 <    p = trk->P();
363 >    return fCharge;
364 >
365 > }
366 >
367 > //--------------------------------------------------------------------------------------------------
368 > inline void mithep::Electron::GetMom() const
369 > {
370 >  // Get momentum of the electron. We use an explicitly stored three vector, with the pdg mass,
371 >  // since the momentum vector may be computed non-trivially in cmssw
372  
373 <  Double_t pt = TMath::Abs(p*TMath::Cos(trk->Lambda()));
175 <  fCachedMom.SetCoordinates(pt,trk->Eta(),trk->Phi(),mass);
373 >  fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass());
374   }
375  
376   //-------------------------------------------------------------------------------------------------
# Line 183 | Line 381 | inline Double_t mithep::Electron::ESeedC
381    
382    return SCluster()->Seed()->Energy() / PIn();
383   }
384 +
385 + //-------------------------------------------------------------------------------------------------
386 + inline void mithep::Electron::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
387 + {
388 +  // Set three-vector
389 +  
390 +  fMom.Set(pt,eta,phi);
391 +  ClearMom();
392 + }
393   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines