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.9 by loizides, Mon Jun 30 16:54:40 2008 UTC vs.
Revision 1.10 by loizides, Tue Jul 1 08:53:09 2008 UTC

# Line 3 | Line 3
3   //
4   // Track
5   //
6 < // This will be re-written :-)
6 > // This will/must be re-written :-)
7   //
8   // Authors: C.Loizides, J.Bendavid, C.Paus
9   //--------------------------------------------------------------------------------------------------
# Line 25 | Line 25 | namespace mithep
25          fPhi(phi), fD0(d0), fPt(pt), fDz(dz), fTheta(theta) {}
26        ~Track() {}
27  
28 <      void      SetHelix (Double_t phi, Double_t d0, Double_t pt, Double_t dz, Double_t theta);
29 <      void      SetErrors(Double_t phiErr, Double_t d0Err, Double_t ptErr, Double_t dzErr,
30 <                          Double_t thetaErr);
31 <      
32 <      Double_t  Phi()      const { return fPhi; }
33 <      Double_t  D0()       const { return fD0; }
34 <      Double_t  Pt()       const { return fPt; }
35 <      Double_t  Dz()       const { return fDz; }
36 <      Double_t  Theta()    const { return fTheta; }
37 <      
38 <      Double_t  PhiErr()   const { return fPhiErr; }
39 <      Double_t  D0Err()    const { return fD0Err; }
40 <      Double_t  PtErr()    const { return fPtErr; }
41 <      Double_t  DzErr()    const { return fDzErr; }
42 <      Double_t  ThetaErr() const { return fThetaErr; }
43 <
44 <      Double_t  Px() { return cos(fPhi)*fabs(fPt); }      
45 <      Double_t  Py() { return sin(fPhi)*fabs(fPt); }
46 <      Double_t  Pz() { return fabs(fPt)/tan(fTheta); }
47 <      Double_t  P() { return sqrt( Px()*Px() + Py()*Py() + Pz()*Pz() ); }
48 <      
49 <      ThreeVector Mom() { return ThreeVector(Px(),Py(),Pz()); }
50 <      
51 <      Int_t     Charge()   const { return fCharge; }
52 <      
53 <      void      SetCharge(Int_t charge) { fCharge = charge; }
54 <      
55 <      SimParticle* GetSimParticle() { return (SimParticle*)fSimParticleRef.GetObject(); }
56 <      
57 <      void      SetSimParticle(SimParticle* simPart) { fSimParticleRef = simPart; }
28 >      Int_t             Charge()   const { return fCharge; }      
29 >      Double_t          D0()       const { return fD0; }
30 >      Double_t          D0Err()    const { return fD0Err; }
31 >      Double_t          Dz()       const { return fDz; }
32 >      Double_t          DzErr()    const { return fDzErr; }
33 >      ThreeVector       Mom()      const { return ThreeVector(Px(),Py(),Pz()); }
34 >      Double_t          P()        const { return sqrt( Px()*Px() + Py()*Py() + Pz()*Pz() ); }
35 >      Double_t          Px()       const { return cos(fPhi)*fabs(fPt); }      
36 >      Double_t          Py()       const { return sin(fPhi)*fabs(fPt); }
37 >      Double_t          Pz()       const { return fabs(fPt)/tan(fTheta); }
38 >      Double_t          Phi()      const { return fPhi; }
39 >      Double_t          PhiErr()   const { return fPhiErr; }
40 >      Double_t          Pt()       const { return fPt; }
41 >      Double_t          PtErr()    const { return fPtErr; }
42 >      Double_t          Theta()    const { return fTheta; }
43 >      Double_t          ThetaErr() const { return fThetaErr; }
44 >      
45 >      void              SetCharge(Int_t charge) { fCharge = charge; }
46 >      void              SetHelix (Double_t phi, Double_t d0, Double_t pt, Double_t dz, Double_t theta);
47 >      void              SetErrors(Double_t phiErr, Double_t d0Err, Double_t ptErr,
48 >                                  Double_t dzErr, Double_t thetaErr);
49        
50 +      SimParticle*      GetSimParticle() const         { return (SimParticle*)fSimParticleRef.GetObject(); }
51 +      void              SetSimParticle(SimParticle* p) { fSimParticleRef = p; }
52        
53      protected:
54 <      Double_t fPhi;      // azimuthal angle
55 <      Double_t fD0;       // raw impact parameter
56 <      Double_t fPt;       // transverse momentum
57 <      Double_t fDz;       // z-displacement
58 <      Double_t fTheta;    // polar angle
59 <      Double_t fPhiErr;   // uncertainy on phi
60 <      Double_t fD0Err;    // uncertainty on D0
61 <      Double_t fPtErr;    // uncertainty on pt
62 <      Double_t fDzErr;    // uncertainty on dz
63 <      Double_t fThetaErr; // uncertainty on theta
64 <      Int_t    fCharge;   // electric charge of reconstructed track
65 <      TRef     fSimParticleRef; //reference to sim particle (for monte carlo)
54 >      Double_t          fPhi;            // azimuthal angle
55 >      Double_t          fD0;             // raw impact parameter
56 >      Double_t          fPt;             // transverse momentum
57 >      Double_t          fDz;             // z-displacement
58 >      Double_t          fTheta;          // polar angle
59 >      Double_t          fPhiErr;         // uncertainy on phi
60 >      Double_t          fD0Err;          // uncertainty on D0
61 >      Double_t          fPtErr;          // uncertainty on pt
62 >      Double_t          fDzErr;          // uncertainty on dz
63 >      Double_t          fThetaErr;       // uncertainty on theta
64 >      Int_t             fCharge;         // electric charge of reconstructed track
65 >      TRef              fSimParticleRef; //reference to sim particle (for monte carlo)
66                
67      ClassDef(Track, 1) // Track class
68    };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines