All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
VXDClusterParameters.cc
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
#include "
VXDClusterParameters.h
"
3
#include "
VXDGeometry.h
"
4
5
6
VXDClusterParameters::VXDClusterParameters
(
const
gear::Vector3D
& localPos,
7
const
gear::Vector3D
& a,
const
gear::Vector3D
& b,
8
int
lay,
int
lad) :
9
_localPos(localPos),
10
_cluAxisA(a),
11
_cluAxisB(b),
12
_layerId (lay) ,
13
_ladderId(lad) {
14
15
// make sure a is the larger axes
16
17
if
(
_cluAxisA
.r() <
_cluAxisB
.r() ) {
18
19
gear::Vector3D
tmp =
_cluAxisA
;
20
_cluAxisA
=
_cluAxisB
;
21
_cluAxisB
= tmp ;
22
}
23
}
24
25
26
27
bool
VXDClusterParameters::isPointInClusterEllipse
(
const
gear::Vector3D
& pos) {
28
29
30
// compute focal points of ellipse:
31
32
double
a =
_cluAxisA
.r() ;
33
double
b =
_cluAxisB
.r() ;
34
double
epsilon = sqrt( a*a - b*b ) ;
35
36
gear::Vector3D
f0 =
_localPos
+ epsilon/a *
_cluAxisA
;
37
gear::Vector3D
f1 =
_localPos
- epsilon/a *
_cluAxisA
;
38
39
// distance of points from focal points
40
gear::Vector3D
d0 = f0 - pos ;
41
gear::Vector3D
d1 = f1 - pos ;
42
43
// ignore x-coordinate, i.e. project to ladder surface
44
d0[0] = 0.0 ;
45
d1[0] = 0.0 ;
46
47
double
dSum = d0.r() + d1.r() ;
48
49
50
return
dSum <= 2.* a ;
51
52
}
53
54
55
56
VXDClusterParameters::_cluAxisA
gear::Vector3D _cluAxisA
Definition:
VXDClusterParameters.h:59
VXDClusterParameters.h
Vector3D
CLHEP::Hep3Vector Vector3D
Definition:
DistilledPFOCreator.cc:11
VXDGeometry.h
VXDClusterParameters::_cluAxisB
gear::Vector3D _cluAxisB
Definition:
VXDClusterParameters.h:60
VXDClusterParameters::isPointInClusterEllipse
bool isPointInClusterEllipse(const gear::Vector3D &pos)
True, if the 2D projection to the ladder surface of the given position is within the ellipse defined ...
Definition:
VXDClusterParameters.cc:27
VXDClusterParameters::VXDClusterParameters
VXDClusterParameters()
Definition:
VXDClusterParameters.h:50
VXDClusterParameters::_localPos
gear::Vector3D _localPos
Definition:
VXDClusterParameters.h:58
TrackDigi
VTXDigi
src
VXDClusterParameters.cc
Generated on Tue Mar 29 2022 10:09:43 by
1.8.5