RecoTracker
NuclearSeedGenerator
src
TangentHelix.cc
Go to the documentation of this file.
1
#include "
RecoTracker/NuclearSeedGenerator/interface/TangentHelix.h
"
2
3
TangentHelix::TangentHelix
(
const
TangentHelix
& primCircle,
const
GlobalPoint
& outerPoint,
const
GlobalPoint
& innerPoint)
4
: theInnerPoint(innerPoint), theOuterPoint(outerPoint), theCircle(primCircle.circle(), outerPoint, innerPoint) {
5
// Calculation of vertex.z :
6
GlobalPoint
inner_T(
innerPoint
.
x
(),
innerPoint
.
y
(), 0.0);
7
GlobalPoint
outer_T(
outerPoint
.
x
(),
outerPoint
.
y
(), 0.0);
8
GlobalPoint
vtx_T(
theCircle
.
vertexPoint
().
x
(),
theCircle
.
vertexPoint
().
y
(), 0.0);
9
10
double
d1
= (inner_T - vtx_T).
mag
();
11
double
d
= (inner_T - outer_T).
mag
();
12
13
theVertexPoint
=
GlobalPoint
(vtx_T.
x
(), vtx_T.
y
(),
innerPoint
.
z
() - (
outerPoint
.
z
() -
innerPoint
.
z
()) *
d1
/
d
);
14
theDirectionAtVertex
=
GlobalVector
(1000, 1000, 1000);
15
}
16
17
GlobalVector
TangentHelix::directionAtVertex
() {
18
if
(
theDirectionAtVertex
.
z
() > 999) {
19
GlobalPoint
inner_T(
theInnerPoint
.
x
(),
theInnerPoint
.
y
(), 0.0);
20
GlobalPoint
outer_T(
theOuterPoint
.
x
(),
theOuterPoint
.
y
(), 0.0);
21
double
p_z = (
theOuterPoint
.
z
() -
theInnerPoint
.
z
()) / (outer_T - inner_T).mag();
22
23
GlobalVector
dir_T =
theCircle
.
directionAtVertex
();
24
GlobalVector
dir
(dir_T.
x
(), dir_T.
y
(), p_z);
25
26
dir
/=
dir
.mag();
27
theDirectionAtVertex
=
dir
;
28
}
29
30
return
theDirectionAtVertex
;
31
}
Vector3DBase
Definition:
Vector3DBase.h:8
TangentHelix::theVertexPoint
GlobalPoint theVertexPoint
Definition:
TangentHelix.h:52
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
TangentHelix::theCircle
TangentCircle theCircle
Definition:
TangentHelix.h:54
GlobalVector
Global3DVector GlobalVector
Definition:
GlobalVector.h:10
TangentHelix::theOuterPoint
GlobalPoint theOuterPoint
Definition:
TangentHelix.h:51
PV3DBase::z
T z() const
Definition:
PV3DBase.h:61
TangentHelix::theInnerPoint
GlobalPoint theInnerPoint
Definition:
TangentHelix.h:50
TangentHelix.h
GlobalPoint
Global3DPoint GlobalPoint
Definition:
GlobalPoint.h:10
Point3DBase< float, GlobalTag >
TangentHelix::theDirectionAtVertex
GlobalVector theDirectionAtVertex
Definition:
TangentHelix.h:56
TangentHelix::innerPoint
GlobalPoint innerPoint() const
Definition:
TangentHelix.h:33
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
TangentCircle::vertexPoint
GlobalPoint vertexPoint() const
Definition:
TangentCircle.h:48
TangentHelix::TangentHelix
TangentHelix()
Definition:
TangentHelix.h:8
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition:
Basic3DVectorLD.h:127
TangentCircle::directionAtVertex
GlobalVector directionAtVertex()
Return the direction at the vertex.
Definition:
TangentCircle.cc:147
TangentHelix::outerPoint
GlobalPoint outerPoint() const
Definition:
TangentHelix.h:31
ztail.d
d
Definition:
ztail.py:151
TangentHelix
Definition:
TangentHelix.h:6
d1
static constexpr float d1
Definition:
L1EGammaCrystalsEmulatorProducer.cc:85
DeadROC_duringRun.dir
dir
Definition:
DeadROC_duringRun.py:23
TangentHelix::directionAtVertex
GlobalVector directionAtVertex()
Definition:
TangentHelix.cc:17
Generated for CMSSW Reference Manual by
1.8.16