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 
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 
21  _cluAxisB = tmp ;
22  }
23 }
24 
25 
26 
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 
CLHEP::Hep3Vector Vector3D
bool isPointInClusterEllipse(const gear::Vector3D &pos)
True, if the 2D projection to the ladder surface of the given position is within the ellipse defined ...