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.36 by ceballos, Fri Aug 7 20:12:50 2009 UTC vs.
Revision 1.37 by bendavid, Fri Oct 30 14:16:00 2009 UTC

# Line 21 | Line 21 | namespace mithep
21    {
22      public:
23        Electron() :
24 +        fCharge(0),
25          fESuperClusterOverP(0), fESeedClusterOverPout(0), fDeltaEtaSuperClTrkAtVtx(0),
26          fDeltaEtaSeedClTrkAtCalo(0), fDeltaPhiSuperClTrkAtVtx(0),
27          fDeltaPhiSeedClTrkAtCalo(0), fFBrem(0), fHadronicOverEm(0), fHcalDepth1OverEcal(0),
# Line 101 | Line 102 | namespace mithep
102        Double_t             TrackIsolationDr03()     const { return fTrackIsolation;                }
103        
104        
105 +      void                 SetCharge(Char_t x)                    { fCharge = x;                   }
106        void                 SetClassification(Int_t x)             { fClassification = x;           }
107        void                 SetCovEtaEta(Double_t CovEtaEta)       { fCovEtaEta = CovEtaEta;        }
108        void                 SetCoviEtaiEta(Double_t CoviEtaiEta)   { fCoviEtaiEta = CoviEtaiEta;    }
# Line 162 | Line 164 | namespace mithep
164        const Track         *Trk()                   const { return BestTrk();                }
165  
166      protected:
167 +      Double_t             GetCharge()             const;
168        Double_t             GetMass()               const { return 0.51099892e-3;            }
169        void                 GetMom()                const;
170  
171        Vect3C               fMom;                       //stored three-momentum
172 +      Char_t               fCharge;                    //stored charge - filled with -99 when reading old files
173        Ref<Track>           fGsfTrackRef;               //gsf track reference
174        Ref<Track>           fTrackerTrackRef;           //tracker track reference
175        Ref<SuperCluster>    fSuperClusterRef;           //reference to SuperCluster
# Line 216 | Line 220 | namespace mithep
220        Bool_t               fIsEcalDriven;              //is std. egamma electron
221        Bool_t               fIsTrackerDriven;           //is pflow track-seeded electron
222  
223 <    ClassDef(Electron, 2) // Electron class
223 >    ClassDef(Electron, 3) // Electron class
224    };
225   }
226  
# Line 234 | Line 238 | inline const mithep::Track *mithep::Elec
238   }
239  
240   //--------------------------------------------------------------------------------------------------
241 + inline Double_t mithep::Electron::GetCharge() const
242 + {
243 +  // Return stored charge, unless it is set to invalid (-99),
244 +  // in that case get charge from track as before
245 +
246 +  if (fCharge==-99)
247 +    return mithep::ChargedParticle::GetCharge();
248 +  else
249 +    return fCharge;
250 +
251 + }
252 +
253 + //--------------------------------------------------------------------------------------------------
254   inline void mithep::Electron::GetMom() const
255   {
256    // Get momentum of the electron. We use an explicitly stored three vector, with the pdg mass,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines