Main Page
Namespaces
Classes
Package Documentation
RecoTracker
TkSeedGenerator
src
FastLine.cc
Go to the documentation of this file.
1
#include "
RecoTracker/TkSeedGenerator/interface/FastLine.h
"
2
3
FastLine::FastLine
(
const
GlobalPoint
& outerHit,
4
const
GlobalPoint
& innerHit) :
5
theOuterHit(outerHit),
6
theInnerHit(innerHit),
7
theRho(0.),
8
theN1(0.),
9
theN2(0.),
10
theC(0.),
11
theValid(
true
) {
12
13
createLineParameters
();
14
15
}
16
17
FastLine::FastLine
(
const
GlobalPoint
& outerHit,
18
const
GlobalPoint
& innerHit,
19
double
rho
) :
20
theOuterHit
(outerHit),
21
theInnerHit
(innerHit),
22
theRho
(rho),
23
theN1
(0.),
24
theN2
(0.),
25
theC
(0.),
26
theValid
(
true
) {
27
28
createLineParameters
();
29
30
}
31
32
void
FastLine::createLineParameters
() {
33
34
double
rphi0 = 0., rphi1 = 0.;
35
36
if
(
theRho
> 0.) {
37
if
(fabs( 1. -
theInnerHit
.
perp2
()/(2.*
theRho
*
theRho
) ) > 1.) rphi0 =
theInnerHit
.
perp
();
38
else
rphi0 =
theRho
*acos(1. -
theInnerHit
.
perp2
()/(2.*
theRho
*
theRho
));
39
if
(fabs(1. -
theOuterHit
.
perp2
()/(2.*
theRho
*
theRho
) ) >1.) rphi1 =
theOuterHit
.
perp
();
40
else
rphi1 =
theRho
*acos(1. -
theOuterHit
.
perp2
()/(2.*
theRho
*
theRho
));
41
}
else
{
42
rphi0 =
theInnerHit
.
perp
();
43
rphi1 =
theOuterHit
.
perp
();
44
}
45
46
double
n1
=
theInnerHit
.
z
() -
theOuterHit
.
z
();
47
double
n2
= -(rphi0 - rphi1);
48
double
norm =
sqrt
(n1*n1 + n2*n2);
49
theN1
= n1/norm;
50
theN2
= n2/norm;
51
theC
= -(
theN1
*rphi0 +
theN2
*
theInnerHit
.
z
());
52
// theC = -(theN1*rphi1 + theN2*theOuterHit.z());
53
54
}
55
56
57
58
59
60
FastLine::theOuterHit
GlobalPoint theOuterHit
Definition:
FastLine.h:38
DDAxes::rho
PV3DBase::perp
T perp() const
Definition:
PV3DBase.h:72
FastLine::FastLine
FastLine(const GlobalPoint &outerHit, const GlobalPoint &innerHit)
Definition:
FastLine.cc:3
PV3DBase::perp2
T perp2() const
Definition:
PV3DBase.h:71
funct::true
true
Definition:
Factorize.h:183
FastLine.h
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:18
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
FastLine::n1
double n1() const
Definition:
FastLine.h:28
FastLine::theRho
double theRho
Definition:
FastLine.h:40
FastLine::createLineParameters
void createLineParameters()
Definition:
FastLine.cc:32
FastLine::theN2
double theN2
Definition:
FastLine.h:43
FastLine::theValid
bool theValid
Definition:
FastLine.h:46
FastLine::theInnerHit
GlobalPoint theInnerHit
Definition:
FastLine.h:39
FastLine::theC
double theC
Definition:
FastLine.h:44
FastLine::theN1
double theN1
Definition:
FastLine.h:42
Point3DBase< float, GlobalTag >
FastLine::n2
double n2() const
Definition:
FastLine.h:30
Generated for CMSSW Reference Manual by
1.8.11