Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
TrackingTools
TrajectoryParametrization
src
GlobalTrajectoryParameters.cc
Go to the documentation of this file.
1
#include "
TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h
"
2
#include "
MagneticField/Engine/interface/MagneticField.h
"
3
#include "
FWCore/Utilities/interface/Likely.h
"
4
5
GlobalTrajectoryParameters::GlobalTrajectoryParameters
(
const
GlobalPoint
& aX,
6
const
GlobalVector
& direction,
7
float
transverseCurvature,
int
,
8
const
MagneticField
* fieldProvider) :
9
theField(fieldProvider),
10
theX
(aX), cachedCurvature_(transverseCurvature), hasCurvature_(
true
)
11
{
12
float
bza = -2.99792458e-3
f
*
theField
->
inTesla
(
theX
).
z
();
13
float
qbpi = bza/(direction.
perp
()*
transverseCurvature
);
14
theP
= direction*
std::abs
(qbpi);
15
theCharge
= qbpi > 0.f ? 1 : -1;
16
}
17
18
float
GlobalTrajectoryParameters::transverseCurvature
()
const
19
{
20
if
unlikely
(!
hasCurvature_
) {
21
float
bza = -2.99792458e-3
f
*
theField
->
inTesla
(
theX
).
z
();
22
cachedCurvature_
= bza*
signedInverseTransverseMomentum
();
23
hasCurvature_
=
true
;
24
}
25
return
cachedCurvature_
;
26
}
27
28
GlobalVector
GlobalTrajectoryParameters::magneticFieldInInverseGeV
(
const
GlobalPoint
&
x
)
const
29
{
30
return
2.99792458e-3
f
*
theField
->
inTesla
(x);
31
}
32
33
34
/* the field is different as it is attached to each given volume!!!!
35
// const MagneticField* GlobalTrajectoryParameters::theField=0;
36
#include<iostream>
37
// FIXME debug code mostly
38
void GlobalTrajectoryParameters::setMF(const MagneticField* fieldProvider) {
39
if (0==fieldProvider) return;
40
if (0!=theField && fieldProvider!=theField)
41
std::cout << "GlobalTrajectoryParameters: a different MF???? "
42
<< theField << " " << fieldProvider << std::endl;
43
theField =fieldProvider;
44
}
45
*/
GlobalTrajectoryParameters::cachedCurvature_
float cachedCurvature_
Definition:
GlobalTrajectoryParameters.h:120
GlobalTrajectoryParameters::signedInverseTransverseMomentum
float signedInverseTransverseMomentum() const
Definition:
GlobalTrajectoryParameters.h:85
PV3DBase::perp
T perp() const
Definition:
PV3DBase.h:72
Vector3DBase
Definition:
Vector3DBase.h:9
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
abs
#define abs(x)
Definition:
mlp_lapack.h:159
MagneticField
Definition:
MagneticField.h:18
GlobalTrajectoryParameters::GlobalTrajectoryParameters
GlobalTrajectoryParameters()
Definition:
GlobalTrajectoryParameters.h:19
GlobalTrajectoryParameters::magneticFieldInInverseGeV
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
Definition:
GlobalTrajectoryParameters.cc:28
GlobalTrajectoryParameters::theCharge
signed char theCharge
Definition:
GlobalTrajectoryParameters.h:121
MagneticField.h
GlobalTrajectoryParameters::transverseCurvature
float transverseCurvature() const
Definition:
GlobalTrajectoryParameters.cc:18
unlikely
#define unlikely(x)
Definition:
Likely.h:21
funct::true
true
Definition:
Factorize.h:183
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
f
double f[11][100]
Definition:
MuScleFitUtils.cc:79
GlobalTrajectoryParameters.h
Point3DBase< float, GlobalTag >
GlobalTrajectoryParameters::theField
const MagneticField * theField
Definition:
GlobalTrajectoryParameters.h:117
theX
T theX
Definition:
Basic3DVectorLD.h:270
GlobalTrajectoryParameters::hasCurvature_
bool hasCurvature_
Definition:
GlobalTrajectoryParameters.h:122
x
Definition:
DDAxes.h:10
Likely.h
GlobalTrajectoryParameters::theX
GlobalPoint theX
Definition:
GlobalTrajectoryParameters.h:118
GlobalTrajectoryParameters::theP
GlobalVector theP
Definition:
GlobalTrajectoryParameters.h:119
Generated for CMSSW Reference Manual by
1.8.5