1 |
loizides |
1.2 |
//--------------------------------------------------------------------------------------------------
|
2 |
loizides |
1.4 |
// $Id: TrackParameters.h,v 1.3 2008/09/10 03:28:38 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 |
|
|
|
41 |
|
|
namespace mitedm
|
42 |
|
|
{
|
43 |
loizides |
1.4 |
enum TrackConvention { // Define existing track parameter conventions
|
44 |
|
|
|
45 |
|
|
iCms,
|
46 |
|
|
iMvf
|
47 |
|
|
};
|
48 |
paus |
1.1 |
|
49 |
|
|
// Declare the track parameter class
|
50 |
|
|
class TrackParameters
|
51 |
|
|
{
|
52 |
|
|
public:
|
53 |
|
|
TrackParameters() {}
|
54 |
loizides |
1.4 |
TrackParameters(const reco::Track *trk, TrackConvention tcv = iCms, double bField = 3.8);
|
55 |
paus |
1.1 |
TrackParameters(const TrackParameters &trk);
|
56 |
|
|
~TrackParameters() {};
|
57 |
|
|
|
58 |
|
|
// Access the specific contents
|
59 |
loizides |
1.4 |
const TVectorD *pars() const { return &pars_; };
|
60 |
|
|
double pars(int i) const { return pars_[i]; };
|
61 |
|
|
const TMatrixDSym *cMat() const { return &cMat_; };
|
62 |
|
|
double cMat(int i, int j) const { return cMat_(i,j); };
|
63 |
paus |
1.1 |
|
64 |
|
|
// Access the different parametrizations independently of the local storage
|
65 |
|
|
TrackParameters cmsTrack() const;
|
66 |
|
|
TrackParameters mvfTrack() const;
|
67 |
|
|
|
68 |
loizides |
1.4 |
void setPars(int i, double v) { pars_(i) = v; }
|
69 |
|
|
void setCMat(int i, int j, double v) { cMat_(i,j) = v; }
|
70 |
|
|
void addCMat(int i, int j, double v) { cMat_(i,j) += v; }
|
71 |
paus |
1.1 |
|
72 |
|
|
// Utilities
|
73 |
loizides |
1.4 |
void print() const;
|
74 |
paus |
1.1 |
|
75 |
|
|
private:
|
76 |
loizides |
1.4 |
TrackConvention iConvention_; //track parameter convention (def. CMS)
|
77 |
|
|
double bField_; //magnetic field in Tesla
|
78 |
|
|
double fCurv_; //combined curvature constant
|
79 |
|
|
TVectorD pars_; //track paramters (helix)
|
80 |
|
|
TMatrixDSym cMat_; //corresponding covariance matrix (sig_i * sig_j)
|
81 |
paus |
1.1 |
};
|
82 |
|
|
}
|
83 |
|
|
#endif
|