All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
VXDClusterParameters.h
Go to the documentation of this file.
1 #ifndef VXDClusterParameters_h
2 #define VXDClusterParameters_h 1
3 
4 #include "lcio.h"
5 #include "LCRTRelations.h"
6 #include "gear/GEAR.h"
7 
8 /**
9 \addtogroup TrackDigi TrackDigi
10 @{
11 
12 
13 /** ======= VXDClusterParameters ========== <br>
14  * Holds cluster parameters for a VXD hit - to be attached at runtime to the SimTrackerHit.
15  * Cluster is defined by two (principal component) axis and the corresponding extensions (eigenvalues).
16  *
17  * @version $Id$
18  * @author F.Gaede, DESY
19  */
20 
21 class VXDClusterParameters {
22 
23 public:
24 
25  /** The standard constructor: takes the position of the hit in ladder coordinates
26  * and the cluster axes in ladder coordinates. Also store the layerId and ladderId for saving cpu
27  * time later.
28  */
29  VXDClusterParameters(const gear::Vector3D& localPos,
30  const gear::Vector3D& a, const gear::Vector3D& b,
31  int lay,int lad) ;
32 
33 
34  gear::Vector3D getClusterPosition() {return _localPos ; }
35  gear::Vector3D getClusterAxisA() {return _cluAxisA ; }
36  gear::Vector3D getClusterAxisB() {return _cluAxisB ; }
37 
38  int getLayerId() { return _layerId ; }
39  int getLadderId() { return _ladderId ; }
40 
41 
42 
43  /** True, if the 2D projection to the ladder surface of the given position is within the ellipse
44  * defined by the two cluster axes.
45  */
46  bool isPointInClusterEllipse(const gear::Vector3D& pos) ;
47 
48 protected:
49 
50  VXDClusterParameters() :
51  _localPos(0,0,0),
52  _cluAxisA(0,0,0),
53  _cluAxisB(0,0,0),
54  _layerId (-1) ,
55  _ladderId(-1) {
56  }
57 
58  gear::Vector3D _localPos{}; // position of hit on ladder
59  gear::Vector3D _cluAxisA{};
60  gear::Vector3D _cluAxisB{};
61  int _layerId{};
62  int _ladderId{};
63 } ;
64 
65 
66 
67 
68 /** Allows to use VXDClusterParameters as runtime extension object.
69  */
70 struct ClusterParams: public lcio::LCOwnedExtension< ClusterParams, VXDClusterParameters > {};
71 /** @} */
72 #endif