Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
}
FastLine::theOuterHit
GlobalPoint theOuterHit
Definition:
FastLine.h:32
HLT_FULL_cff.rho
tuple rho
Definition:
HLT_FULL_cff.py:103771
PV3DBase::perp
T perp() const
Definition:
PV3DBase.h:69
FastLine::FastLine
FastLine(const GlobalPoint &outerHit, const GlobalPoint &innerHit)
Definition:
FastLine.cc:3
PV3DBase::perp2
T perp2() const
Definition:
PV3DBase.h:68
funct::true
true
Definition:
Factorize.h:173
FastLine.h
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
PV3DBase::z
T z() const
Definition:
PV3DBase.h:61
FastLine::n1
double n1() const
Definition:
FastLine.h:23
FastLine::theRho
double theRho
Definition:
FastLine.h:34
FastLine::createLineParameters
void createLineParameters()
Definition:
FastLine.cc:13
FastLine::theN2
double theN2
Definition:
FastLine.h:37
FastLine::theInnerHit
GlobalPoint theInnerHit
Definition:
FastLine.h:33
FastLine::theC
double theC
Definition:
FastLine.h:38
FastLine::theN1
double theN1
Definition:
FastLine.h:36
Point3DBase< float, GlobalTag >
FastLine::n2
double n2() const
Definition:
FastLine.h:25
Generated for CMSSW Reference Manual by
1.8.5