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.30 by loizides, Fri Mar 20 18:23:27 2009 UTC vs.
Revision 1.34 by loizides, Mon Jul 20 04:57:27 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines