ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/VertexFitInterface/interface/TrackParameters.h
Revision: 1.6
Committed: Mon Jan 18 14:41:34 2010 UTC (15 years, 3 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, HEAD
Branch point for: Mit_025c_branch
Changes since 1.5: +3 -1 lines
Log Message:
Fix Track Paramater phi-related bugs and add consistent propagation to origin

File Contents

# User Rev Content
1 loizides 1.2 //--------------------------------------------------------------------------------------------------
2 bendavid 1.6 // $Id: TrackParameters.h,v 1.5 2009/03/20 17:13:34 loizides Exp $
3 paus 1.1 //
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 loizides 1.2 //
31     // Author: C.Paus
32     //--------------------------------------------------------------------------------------------------
33 paus 1.1
34 loizides 1.3 #ifndef MITEDM_VERTEXFITINTERFACE_TRACKPARAMETERS_H
35     #define MITEDM_VERTEXFITINTERFACE_TRACKPARAMETERS_H
36 paus 1.1
37 loizides 1.3 #include <TMatrixDSym.h>
38     #include <TVectorD.h>
39 paus 1.1 #include "DataFormats/TrackReco/interface/Track.h"
40 bendavid 1.6 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
41 paus 1.1
42     namespace mitedm
43     {
44 loizides 1.4 enum TrackConvention { // Define existing track parameter conventions
45     iCms,
46     iMvf
47     };
48 paus 1.1
49     // Declare the track parameter class
50     class TrackParameters
51     {
52     public:
53     TrackParameters() {}
54 bendavid 1.6 TrackParameters(const reco::TransientTrack &ttrk, TrackConvention tcv = iCms);
55 loizides 1.4 TrackParameters(const reco::Track *trk, TrackConvention tcv = iCms, double bField = 3.8);
56 paus 1.1 TrackParameters(const TrackParameters &trk);
57     ~TrackParameters() {};
58    
59     // Access the specific contents
60 loizides 1.4 const TVectorD *pars() const { return &pars_; };
61     double pars(int i) const { return pars_[i]; };
62     const TMatrixDSym *cMat() const { return &cMat_; };
63     double cMat(int i, int j) const { return cMat_(i,j); };
64 paus 1.1
65     // Access the different parametrizations independently of the local storage
66     TrackParameters cmsTrack() const;
67     TrackParameters mvfTrack() const;
68    
69 loizides 1.4 void setPars(int i, double v) { pars_(i) = v; }
70     void setCMat(int i, int j, double v) { cMat_(i,j) = v; }
71     void addCMat(int i, int j, double v) { cMat_(i,j) += v; }
72 paus 1.1
73     // Utilities
74 loizides 1.4 void print() const;
75 paus 1.1
76     private:
77 loizides 1.4 TrackConvention iConvention_; //track parameter convention (def. CMS)
78     double bField_; //magnetic field in Tesla
79     double fCurv_; //combined curvature constant
80     TVectorD pars_; //track paramters (helix)
81     TMatrixDSym cMat_; //corresponding covariance matrix (sig_i * sig_j)
82 paus 1.1 };
83     }
84     #endif