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,
const
GlobalPoint
& innerHit)
4
: theOuterHit(outerHit), theInnerHit(innerHit), theRho(0.), theN1(0.), theN2(0.), theC(0.), theValid(
true
) {
5
createLineParameters
();
6
}
7
8
FastLine::FastLine
(
const
GlobalPoint
& outerHit,
const
GlobalPoint
& innerHit,
double
rho
)
9
: theOuterHit(outerHit), theInnerHit(innerHit), theRho(
rho
), theN1(0.), theN2(0.), theC(0.), theValid(
true
) {
10
createLineParameters
();
11
}
12
13
void
FastLine::createLineParameters
() {
14
double
rphi0 = 0., rphi1 = 0.;
15
16
if
(
theRho
> 0.) {
17
if
(fabs(1. -
theInnerHit
.
perp2
() / (2. *
theRho
*
theRho
)) > 1.)
18
rphi0 =
theInnerHit
.
perp
();
19
else
20
rphi0 =
theRho
* acos(1. -
theInnerHit
.
perp2
() / (2. *
theRho
*
theRho
));
21
if
(fabs(1. -
theOuterHit
.
perp2
() / (2. *
theRho
*
theRho
)) > 1.)
22
rphi1 =
theOuterHit
.
perp
();
23
else
24
rphi1 =
theRho
* acos(1. -
theOuterHit
.
perp2
() / (2. *
theRho
*
theRho
));
25
}
else
{
26
rphi0 =
theInnerHit
.
perp
();
27
rphi1 =
theOuterHit
.
perp
();
28
}
29
30
double
n1
=
theInnerHit
.
z
() -
theOuterHit
.
z
();
31
double
n2
= -(rphi0 - rphi1);
32
double
norm =
sqrt
(
n1
*
n1
+
n2
*
n2
);
33
theN1
=
n1
/ norm;
34
theN2
=
n2
/ norm;
35
theC
= -(
theN1
* rphi0 +
theN2
*
theInnerHit
.
z
());
36
// theC = -(theN1*rphi1 + theN2*theOuterHit.z());
37
}
ZElectronSkim_cff.rho
rho
Definition:
ZElectronSkim_cff.py:38
FastLine::FastLine
FastLine(const GlobalPoint &outerHit, const GlobalPoint &innerHit)
Definition:
FastLine.cc:3
FastLine::theN1
double theN1
Definition:
FastLine.h:36
PV3DBase::z
T z() const
Definition:
PV3DBase.h:61
FastLine::theC
double theC
Definition:
FastLine.h:38
FastLine::theInnerHit
GlobalPoint theInnerHit
Definition:
FastLine.h:33
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
Point3DBase< float, GlobalTag >
FastLine.h
funct::true
true
Definition:
Factorize.h:173
FastLine::theRho
double theRho
Definition:
FastLine.h:34
FastLine::theOuterHit
GlobalPoint theOuterHit
Definition:
FastLine.h:32
FastLine::createLineParameters
void createLineParameters()
Definition:
FastLine.cc:13
FastLine::n1
double n1() const
Definition:
FastLine.h:23
FastLine::n2
double n2() const
Definition:
FastLine.h:25
PV3DBase::perp
T perp() const
Definition:
PV3DBase.h:69
PV3DBase::perp2
T perp2() const
Definition:
PV3DBase.h:68
FastLine::theN2
double theN2
Definition:
FastLine.h:37
Generated for CMSSW Reference Manual by
1.8.16