RecoPixelVertexing
PixelTrackFitting
src
ConformalMappingFit.cc
Go to the documentation of this file.
1
#include "
ConformalMappingFit.h
"
2
3
using namespace
std
;
4
5
template
<
class
T>
6
T
sqr
(
T
t
) {
7
return
t
*
t
;
8
}
9
10
ConformalMappingFit::ConformalMappingFit
(
const
std::vector<PointXY>&
hits
,
11
const
std::vector<float>& errRPhi2,
12
const
Rotation
*
rot
)
13
: theRotation(
rot
), myRotation(
rot
== nullptr) {
14
typedef
ConformalMappingFit::MappedPoint<double>
PointUV;
15
int
hits_size =
hits
.size();
16
for
(
int
i
= 0;
i
< hits_size;
i
++) {
17
if
(!
theRotation
)
18
findRot
(
hits
[
i
]);
19
PointUV
point
(
hits
[
i
], 1. / errRPhi2[
i
],
theRotation
);
20
theFit
.
addPoint
(
point
.u(),
point
.v(),
point
.weight());
21
}
22
}
23
24
void
ConformalMappingFit::findRot
(
const
PointXY
&
p
) {
25
myRotation
=
true
;
26
typedef
Rotation::GlobalVector
GlobalVector
;
// ::GlobalVector is float!
27
GlobalVector
aX =
GlobalVector
(
p
.x(),
p
.y(), 0.).
unit
();
28
GlobalVector
aY(-aX.
y
(), aX.
x
(), 0.);
29
GlobalVector
aZ(0., 0., 1.);
30
theRotation
=
new
Rotation
(aX, aY, aZ);
31
}
32
33
ConformalMappingFit::~ConformalMappingFit
() {
34
if
(
myRotation
)
35
delete
theRotation
;
36
}
37
38
double
ConformalMappingFit::phiRot
()
const
{
return
atan2(
theRotation
->
xy
(),
theRotation
->
xx
()); }
39
40
Measurement1D
ConformalMappingFit::curvature
()
const
{
41
double
val
= fabs(2. *
theFit
.
parA
());
42
double
err
= 2. *
sqrt
(
theFit
.
varAA
());
43
return
Measurement1D
(
val
,
err
);
44
}
45
46
Measurement1D
ConformalMappingFit::directionPhi
()
const
{
47
double
val
=
phiRot
() + atan(
theFit
.
parB
());
48
double
err
=
sqrt
(
theFit
.
varBB
());
49
return
Measurement1D
(
val
,
err
);
50
}
51
52
Measurement1D
ConformalMappingFit::impactParameter
()
const
{
53
double
val
= -
theFit
.
parC
();
54
double
err
=
sqrt
(
theFit
.
varCC
());
55
return
Measurement1D
(
val
,
err
);
56
}
57
58
int
ConformalMappingFit::charge
()
const
{
return
(
theFit
.
parA
() > 0.) ? -1 : 1; }
Vector3DBase
Definition:
Vector3DBase.h:8
TkRotation< double >
Measurement1D
Definition:
Measurement1D.h:11
mps_fire.i
i
Definition:
mps_fire.py:428
hfClusterShapes_cfi.hits
hits
Definition:
hfClusterShapes_cfi.py:5
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
ConformalMappingFit.h
ParabolaFit::varAA
double varAA() const
Definition:
ParabolaFit.h:45
ConformalMappingFit::Rotation
TkRotation< double > Rotation
Definition:
ConformalMappingFit.h:18
GlobalVector
Global3DVector GlobalVector
Definition:
GlobalVector.h:10
ConformalMappingFit::ConformalMappingFit
ConformalMappingFit(const std::vector< PointXY > &hits, const std::vector< float > &errRPhi2, const Rotation *rotation=nullptr)
Definition:
ConformalMappingFit.cc:10
ConformalMappingFit::findRot
void findRot(const PointXY &)
Definition:
ConformalMappingFit.cc:24
Vector3DBase::unit
Vector3DBase unit() const
Definition:
Vector3DBase.h:54
ConformalMappingFit::curvature
Measurement1D curvature() const
Definition:
ConformalMappingFit.cc:40
ParabolaFit::parA
double parA() const
Definition:
ParabolaFit.h:30
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
ConformalMappingFit::theFit
ParabolaFit theFit
Definition:
ConformalMappingFit.h:46
Basic2DVector< double >
AlCaHLTBitMon_ParallelJobs.p
def p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
TkRotation::xx
T xx() const
Definition:
extTkRotation.h:251
ConformalMappingFit::phiRot
double phiRot() const
Definition:
ConformalMappingFit.cc:38
ParabolaFit::addPoint
void addPoint(double x, double y)
Definition:
ParabolaFit.cc:9
ConformalMappingFit::MappedPoint
Definition:
ConformalMappingFit.h:49
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
ConformalMappingFit::directionPhi
Measurement1D directionPhi() const
Definition:
ConformalMappingFit.cc:46
sqr
T sqr(T t)
Definition:
ConformalMappingFit.cc:6
ConformalMappingFit::charge
int charge() const
Definition:
ConformalMappingFit.cc:58
TkRotation::xy
T xy() const
Definition:
extTkRotation.h:252
ParabolaFit::varBB
double varBB() const
Definition:
ParabolaFit.h:50
submitPVResolutionJobs.err
err
Definition:
submitPVResolutionJobs.py:85
ConformalMappingFit::myRotation
bool myRotation
Definition:
ConformalMappingFit.h:45
heppy_batch.val
val
Definition:
heppy_batch.py:351
std
Definition:
JetResolutionObject.h:76
T
long double T
Definition:
Basic3DVectorLD.h:48
ConformalMappingFit::impactParameter
Measurement1D impactParameter() const
Definition:
ConformalMappingFit.cc:52
ParabolaFit::parC
double parC() const
Definition:
ParabolaFit.h:40
ConformalMappingFit::theRotation
const Rotation * theRotation
Definition:
ConformalMappingFit.h:44
makeMuonMisalignmentScenario.rot
rot
Definition:
makeMuonMisalignmentScenario.py:322
ParabolaFit::varCC
double varCC() const
Definition:
ParabolaFit.h:55
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition:
invegas.h:5
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
ConformalMappingFit::~ConformalMappingFit
~ConformalMappingFit()
Definition:
ConformalMappingFit.cc:33
ParabolaFit::parB
double parB() const
Definition:
ParabolaFit.h:35
Generated for CMSSW Reference Manual by
1.8.16