ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/VertexFitInterface/interface/TrackParameters.h
Revision: 1.1
Committed: Thu Aug 28 22:09:20 2008 UTC (16 years, 8 months ago) by paus
Content type: text/plain
Branch: MAIN
Log Message:
Adding HelixIntersector interface.

File Contents

# Content
1 //==================================================================================================
2 // $Id $
3 //
4 // Description: class TrackParameters
5 //
6 // Class to manage track parameters of different conventions and convert one into the other. This is
7 // not really done very well and could be done more efficient but this is what it is for the moment.
8 //
9 // Original Author: Christoph Paus
10 // Created: Thu Aug 21 02:29:00 CEST 2008
11 //
12 // -------------------------------------------------------------------------------------------------
13 // CMS parameter ordering for the vector/matrix, which is assumed here:
14 //
15 // qoverp, lambda, phi0, dxy, dsz; (lambda = pi/2 - theta)
16 // mapping to CDF is therefore { 1*, 0*, 4, 3, 2* }, where * indicates that a transformation is
17 // needed
18 //
19 // Note that the radius of curvature (in cm) is then:
20 //
21 // Rc = cos(theta) / [ 0.0029979.... * (q/p) * B ],
22 //
23 // where B is the magnetic field in Tesla and tht is the angle between the field and the
24 // direction. With p * cos(theta) = pT it follows:
25 //
26 // Rc = pT / [ 0.0029979.... * q * B ],
27 // fullCurvature = 1 / Rc = 0.0029979 * q * B / pT = - 0.0029979 * B / pT.
28 //
29 // see the conventions for the MultiVertexFitter in its own header file.
30 //==================================================================================================
31
32 #ifndef _VERTEXFITINTERFACE_TRACKPARAMETERS_H_
33 #define _VERTEXFITINTERFACE_TRACKPARAMETERS_H_
34
35 #include "TMatrixDSym.h"
36 #include "TVectorD.h"
37 #include "DataFormats/TrackReco/interface/Track.h"
38
39 namespace mitedm
40 {
41 // Define existing track parameter conventions
42 enum TrackConvention { iCms, iMvf };
43
44 // Declare the track parameter class
45 class TrackParameters
46 {
47 public:
48 // *structors
49 TrackParameters() {}
50 TrackParameters(const reco::Track *trk, TrackConvention tcv = iCms, double bField = 3.8);
51 TrackParameters(const TrackParameters &trk);
52 ~TrackParameters() {};
53
54 // Access the specific contents
55 const TVectorD *pars () const { return &pars_; };
56 double pars (int i) const { return pars_[i]; };
57 const TMatrixDSym *cMat () const { return &cMat_; };
58 double cMat (int i, int j) const { return cMat_(i,j); };
59
60 // Access the different parametrizations independently of the local storage
61 TrackParameters cmsTrack() const;
62 TrackParameters mvfTrack() const;
63
64 void setPars (int i, double v) { pars_(i) = v; }
65 void setCMat (int i, int j, double v) { cMat_(i,j) = v; }
66 void addCMat (int i, int j, double v) { cMat_(i,j) += v; }
67
68 // Utilities
69 void print () const;
70
71 private:
72 TrackConvention iConvention_; // track parameter convention (def. CMS)
73 double bField_; // magnetic field in Tesla
74 double fCurv_; // combined curvature constant
75 TVectorD pars_; // track paramters (helix)
76 TMatrixDSym cMat_; // corresponding covariance matrix (sig_i * sig_j)
77 };
78 }
79 #endif