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.18 by bendavid, Fri Sep 12 12:44:57 2008 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...
6 > // This class holds information about reconstructed electrons from CMSSW.
7   //
8   // Authors: C.Loizides, J.Bendavid, S.Xie
9   //--------------------------------------------------------------------------------------------------
10  
11 < #ifndef DATATREE_ELECTRON_H
12 < #define DATATREE_ELECTRON_H
11 > #ifndef MITANA_DATATREE_ELECTRON_H
12 > #define MITANA_DATATREE_ELECTRON_H
13  
14   #include "MitAna/DataTree/interface/SuperCluster.h"
15   #include "MitAna/DataTree/interface/ChargedParticle.h"
16 + #include "MitAna/DataCont/interface/Ref.h"
17  
18   namespace mithep
19   {
20    class Electron : public ChargedParticle
21    {
22      public:
23 <      Electron() {}
24 <      ~Electron() {}
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;
135 <      const Track         *TrackerTrk()            const;
136 <      const SuperCluster  *SCluster()              const;
137 <      FourVector           Mom()                   const;
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();   }
245        const Track         *Trk()                   const { return BestTrk();                }
246 <      Double_t             E()                     const;
32 <      Double_t             P()                     const;
33 <      Double_t             Pt()                    const;
34 <      Double_t             Px()                    const;
35 <      Double_t             Py()                    const;
36 <      Double_t             Pz()                    const;
37 <
38 <      Double_t    Mass()                           const { return 0.51099892e-3;            }
39 <      Double_t    ESuperClusterOverP()             const { return fESuperClusterOverP;      }
40 <      Double_t    ESeedClusterOverPout()           const { return fESeedClusterOverPout;    }
41 <      Double_t    ESeedClusterOverPIn()            const;
42 <      Double_t    PIn()                            const { return fPIn;                     }
43 <      Double_t    POut()                           const { return fPOut;                    }
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    HadronicOverEm()                 const { return fHadronicOverEm;          }
49 <      Double_t    IsEnergyScaleCorrected()         const { return fIsEnergyScaleCorrected;  }
50 <      Double_t    IsMomentumCorrected()            const { return fIsMomentumCorrected;     }
51 <      Double_t    NumberOfClusters()               const { return fNumberOfClusters;        }
52 <      Double_t    Classification()                 const { return fClassification;          }
53 <      Double_t    E33()                            const { return fE33;                     }
54 <      Double_t    E55()                            const { return fE55;                     }
55 <      Double_t    CovEtaEta()                      const { return fCovEtaEta;               }
56 <      Double_t    CovEtaPhi()                      const { return fCovEtaPhi;               }
57 <      Double_t    CovPhiPhi()                      const { return fCovPhiPhi;               }
58 <      Double_t    CaloIsolation()                  const { return fCaloIsolation;           }
59 <      Double_t    CaloTowerIsolation()             const { return fCaloTowerIsolation;      }
60 <      Double_t    TrackIsolation()                 const { return fTrackIsolation;          }
61 <      Double_t    EcalJurassicIsolation()          const { return fEcalJurassicIsolation;   }
62 <      Double_t    HcalJurassicIsolation()          const { return fHcalJurassicIsolation;   }
63 <
64 <      Double_t    PassLooseID()                    const { return fPassLooseID;             }
65 <      Double_t    PassTightID()                    const { return fPassTightID;             }
66 <      Double_t    IDLikelihood()                   const { return fIDLikelihood;            }
67 <
68 <      void        SetGsfTrk(Track* t)                           { fGsfTrackRef = t;                }
69 <      void        SetTrackerTrk(Track* t)                       { fTrackerTrackRef = t;            }
70 <      void        SetSuperCluster(SuperCluster* sc)             { fSuperClusterRef = sc;           }
71 <      void        SetESuperClusterOverP(Double_t x)             { fESuperClusterOverP = x;         }
72 <      void        SetESeedClusterOverPout(Double_t x)           { fESeedClusterOverPout = x;       }
73 <      void        SetPIn(Double_t PIn)                          { fPIn = PIn;                      }
74 <      void        SetPOut(Double_t POut)                        { fPOut = POut;                    }
75 <      void        SetDeltaEtaSuperClusterTrackAtVtx(Double_t x) { fDeltaEtaSuperClTrkAtVtx = x;    }
76 <      void        SetDeltaEtaSeedClusterTrackAtCalo(Double_t x) { fDeltaEtaSeedClTrkAtCalo = x;    }
77 <      void        SetDeltaPhiSuperClusterTrackAtVtx(Double_t x) { fDeltaPhiSuperClTrkAtVtx = x;    }
78 <      void        SetDeltaPhiSeedClusterTrackAtCalo(Double_t x) { fDeltaPhiSeedClTrkAtCalo = x;    }
79 <      void        SetHadronicOverEm(Double_t x)                 { fHadronicOverEm = x;             }
80 <      void        SetIsEnergyScaleCorrected(Double_t x)         { fIsEnergyScaleCorrected = x;     }
81 <      void        SetIsMomentumCorrected(Double_t x)            { fIsMomentumCorrected = x;        }
82 <      void        SetNumberOfClusters(Double_t x)               { fNumberOfClusters = x;           }
83 <      void        SetClassification(Double_t x)                 { fClassification = x;             }
84 <      void        SetE33(Double_t E33)                          { fE33 = E33;                      }
85 <      void        SetE55(Double_t E55)                          { fE55 = E55;                      }
86 <      void        SetCovEtaEta(Double_t CovEtaEta)              { fCovEtaEta = CovEtaEta;          }
87 <      void        SetCovEtaPhi(Double_t CovEtaPhi)              { fCovEtaPhi = CovEtaPhi;          }
88 <      void        SetCovPhiPhi(Double_t CovPhiPhi)              { fCovPhiPhi = CovPhiPhi;          }
89 <      void        SetCaloIsolation(Double_t CaloIsolation)      { fCaloIsolation = CaloIsolation;  }
90 <      void        SetCaloTowerIsolation(Double_t TowerIso)      { fCaloTowerIsolation = TowerIso;  }
91 <      void        SetTrackIsolation(Double_t TrackIsolation)    { fTrackIsolation = TrackIsolation;}
92 <      void        SetEcalJurassicIsolation(Double_t iso )       { fEcalJurassicIsolation = iso;    }
93 <      void        SetHcalJurassicIsolation(Double_t iso )       { fHcalJurassicIsolation = iso;    }
94 <      void        SetPassLooseID(Double_t passLooseID)          { fPassLooseID = passLooseID;      }
95 <      void        SetPassTightID(Double_t passTightID)          { fPassTightID = passTightID;      }
96 <      void        SetIDLikelihood(Double_t likelihood)          { fIDLikelihood = likelihood;      }
246 >      const Track         *ConvPartnerTrk()        const { return fConvPartnerTrackRef.Obj(); }
247  
248      protected:
249 <      TRef                 fGsfTrackRef;     //global combined track reference
250 <      TRef                 fTrackerTrackRef; //tracker track reference
251 <      TRef                 fSuperClusterRef; //superCluster
252 <
253 <      Double_t             fESuperClusterOverP;
254 <      Double_t             fESeedClusterOverPout;
255 <      Double_t             fDeltaEtaSuperClTrkAtVtx;
256 <      Double_t             fDeltaEtaSeedClTrkAtCalo;
257 <      Double_t             fDeltaPhiSuperClTrkAtVtx;
258 <      Double_t             fDeltaPhiSeedClTrkAtCalo;
259 <      Double_t             fHadronicOverEm;
260 <      Double_t             fIsEnergyScaleCorrected;
261 <      Double_t             fIsMomentumCorrected;      
262 <      Double_t             fNumberOfClusters;
263 <      Double_t             fClassification;          
264 <      Double_t             fE33;
265 <      Double_t             fE55;
266 <      Double_t             fCovEtaEta;
267 <      Double_t             fCovEtaPhi;
268 <      Double_t             fCovPhiPhi;
269 <      Double_t             fCaloIsolation;
270 <      Double_t             fCaloTowerIsolation;
271 <      Double_t             fTrackIsolation;
272 <      Double_t             fEcalJurassicIsolation;
273 <      Double_t             fHcalJurassicIsolation;
274 <      Double_t             fPassLooseID;
275 <      Double_t             fPassTightID;
276 <      Double_t             fIDLikelihood;
277 <      Double_t             fPIn;
278 <      Double_t             fPOut;
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 <    ClassDef(Electron, 1) // Electron class
337 >    ClassDef(Electron, 11) // Electron class
338    };
339   }
340  
# Line 136 | Line 343 | inline const mithep::Track *mithep::Elec
343   {
344    // Return "best" track.
345  
346 <  if (GsfTrk())
346 >  if (HasGsfTrk())
347      return GsfTrk();
348 <  else if (TrackerTrk())
348 >  else if (HasTrackerTrk())
349      return TrackerTrk();
350  
351    return 0;
352   }
353  
354   //--------------------------------------------------------------------------------------------------
355 < inline const mithep::Track *mithep::Electron::GsfTrk() const
355 > inline Double_t mithep::Electron::GetCharge() const
356   {
357 <  // Return global combined track.
357 >  // Return stored charge, unless it is set to invalid (-99),
358 >  // in that case get charge from track as before
359  
360 <  return static_cast<const Track*>(fGsfTrackRef.GetObject());
361 < }
362 <
363 < //--------------------------------------------------------------------------------------------------
156 < inline const mithep::Track *mithep::Electron::TrackerTrk() const
157 < {
158 <  // Return tracker track.
159 <
160 <  return static_cast<const Track*>(fTrackerTrackRef.GetObject());
161 < }
162 < //--------------------------------------------------------------------------------------------------
163 < inline const mithep::SuperCluster *mithep::Electron::SCluster() const
164 < {
165 <  // Return Super cluster
360 >  if (fCharge==-99)
361 >    return mithep::ChargedParticle::GetCharge();
362 >  else
363 >    return fCharge;
364  
167  return static_cast<const SuperCluster*>(fSuperClusterRef.GetObject());
365   }
366  
367 < //-------------------------------------------------------------------------------------------------
368 < inline mithep::FourVector mithep::Electron::Mom() const
367 > //--------------------------------------------------------------------------------------------------
368 > inline void mithep::Electron::GetMom() const
369   {
370 <  // Return Momentum of the electron. We use the direction of the
371 <  // Track and the Energy of the Super Cluster
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 <  return FourVector(Px(), Py(), Pz(), E());
373 >  fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass());
374   }
375  
376   //-------------------------------------------------------------------------------------------------
377   inline Double_t mithep::Electron::ESeedClusterOverPIn() const
378   {
379 <  // Return Energy of the SuperCluster Seed Divided by the magnitude
380 <  // of the track momentum at the vertex
379 >  // Return energy of the SuperCluster seed divided by the magnitude
380 >  // of the track momentum at the vertex.
381    
382    return SCluster()->Seed()->Energy() / PIn();
383   }
384  
385   //-------------------------------------------------------------------------------------------------
386 < inline Double_t mithep::Electron::E() const
190 < {
191 <  // Return Energy of the SuperCluster if present
192 <  // or else return energy derived from the track
193 <  
194 <  const mithep::SuperCluster *sc = SCluster();
195 <  if (sc)
196 <    return sc->Energy();
197 <  else
198 <    return TMath::Sqrt(Trk()->P()*Trk()->P() + Mass()*Mass());
199 < }
200 <
201 < //-------------------------------------------------------------------------------------------------
202 < inline Double_t mithep::Electron::P() const
386 > inline void mithep::Electron::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
387   {
388 <  // Return momentum derived from the SuperCluster if present
205 <  // or else return momentum from the track
388 >  // Set three-vector
389    
390 <  const mithep::SuperCluster *sc = SCluster();
391 <  if (sc)
209 <    return TMath::Sqrt(sc->Energy()*sc->Energy() - Mass()*Mass());
210 <  else
211 <    return Trk()->P();
212 < }
213 <
214 < //-------------------------------------------------------------------------------------------------
215 < inline Double_t mithep::Electron::Px() const
216 < {
217 <  return Pt()*TMath::Cos(Trk()->Phi());
218 < }
219 <
220 < //-------------------------------------------------------------------------------------------------
221 < inline Double_t mithep::Electron::Py() const
222 < {
223 <  return Pt()*TMath::Sin(Trk()->Phi());
224 < }
225 <
226 < //-------------------------------------------------------------------------------------------------
227 < inline Double_t mithep::Electron::Pz() const
228 < {
229 <  return P()*TMath::Sin(Trk()->Lambda());
230 < }
231 <
232 < //-------------------------------------------------------------------------------------------------
233 < inline Double_t mithep::Electron::Pt() const
234 < {
235 <  return TMath::Abs(P()*TMath::Cos(Trk()->Lambda()));
390 >  fMom.Set(pt,eta,phi);
391 >  ClearMom();
392   }
393   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines