ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Track.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/Track.h (file contents):
Revision 1.27 by bendavid, Mon Nov 3 11:21:11 2008 UTC vs.
Revision 1.28 by bendavid, Mon Nov 17 18:56:07 2008 UTC

# Line 81 | Line 81
81   #include "MitAna/DataTree/interface/SuperCluster.h"
82   #include "MitAna/DataTree/interface/MCParticle.h"
83   #include "MitAna/DataTree/interface/BitMask.h"
84 + #include "MitAna/DataTree/interface/BaseVertex.h"
85   #include "MitAna/DataTree/interface/Types.h"
86  
87   namespace mithep
# Line 148 | Line 149 | namespace mithep
149        Double_t           RChi2()          const { return fChi2/(Double_t)fNdof; }
150        void               ClearHit(EHitLayer l)  { fHits.ClearBit(l); }
151        Double_t           D0()             const { return -fDxy; }
152 +      Double_t           D0Corrected(const BaseVertex *iVertex) const;
153        Double_t           D0Err()          const { return fDxyErr; }
154        Double_t           Dsz()            const { return fDsz; }
155        Double_t           DszErr()         const { return fDszErr; }
# Line 222 | Line 224 | namespace mithep
224   }
225  
226   //--------------------------------------------------------------------------------------------------
227 + inline Double_t mithep::Track::D0Corrected(const BaseVertex *iVertex) const
228 + {
229 +  // Return corrected d0 with respect to primary vertex or beamspot
230 +
231 +  Double_t lXM =  -TMath::Sin(Phi()) * D0();
232 +  Double_t lYM =   TMath::Cos(Phi()) * D0();
233 +  Double_t lDX = (lXM + iVertex->X());
234 +  Double_t lDY = (lYM + iVertex->Y());
235 +  Double_t d0Corr = (Px()*lDY - Py()*lDX)/Pt();
236 +  
237 +  return d0Corr;
238 +  
239 + }
240 +
241 + //--------------------------------------------------------------------------------------------------
242   inline
243   void mithep::Track::SetHelix(Double_t qOverP, Double_t lambda, Double_t phi0,
244                                     Double_t dxy, Double_t dsz)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines