ATLAS Offline Software
Loading...
Searching...
No Matches
SCTinformation.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7
9// Header file for class SCTinformation
11// (c) ATLAS Detector software
13// Class for sct strips information
15// Version 1.0 19/04/2018 I.Gavrilenko
17
18#ifndef SCTinformation_h
19#define SCTinformation_h
20#include "GeoPrimitives/GeoPrimitives.h" //Amg::Vector3D
21
22namespace InDet {
23 class SiCluster;
24
25 class SCTinformation final {
26
28 // Public methods:
30
31 public:
32 SCTinformation() = default;
34 const Amg::Vector3D& strip_start,
35 const Amg::Vector3D& strip_end,
36 const Amg::Vector3D& vec,
37 const double& locx);
38
39
40 const InDet::SiCluster* cluster() const {return m_cluster;}
41 const Amg::Vector3D& strip_center () const {return m_center ;}
42 const Amg::Vector3D& strip_direction () const {return m_sdir ;}
43 const Amg::Vector3D& traj_direction () const {return m_tdir ;}
44 const Amg::Vector3D& normal() const {return m_normal;}
45 const double& oneOverStrip() const {return m_oneOverStrip;}
46 const double& locX() const {return m_locX;}
47
48 double step(SCTinformation&) const;
49 Amg::Vector3D position(const double& s) const;
50 void set(const InDet::SiCluster* CL,
51 const Amg::Vector3D& strip_start,
52 const Amg::Vector3D& strip_end,
53 const Amg::Vector3D& vec,
54 const double& locx);
55
56
57 private:
58
59 const InDet::SiCluster* m_cluster{}; // SCT cluster
60 Amg::Vector3D m_center; // Center of strip
61 Amg::Vector3D m_sdir; // Direction of strip (strip_start-strip_end)
62 Amg::Vector3D m_tdir; // Direction of trajectory (strip_start+strip_end-2*vertexVec)
63 Amg::Vector3D m_normal; // Normal to strip diretion and trjectory direction plane
64 double m_oneOverStrip{}; // Invert length of the strip
65 double m_locX{}; // cluster local X
66 };
67
68
69
71 // Constructor with initialisation
73
75 const Amg::Vector3D& strip_start,
76 const Amg::Vector3D& strip_end,
77 const Amg::Vector3D& vec,
78 const double& locx) {
79 this->set(cluster, strip_start, strip_end, vec, locx);
80 }
81
82
84 // Step along strip
86
87 inline double SCTinformation::step(SCTinformation& In) const
88 {
89 // this function returns the ratio between the components of the
90 // In normal vector over the strip direction and trajectory direction.
91
92 // first evaluate the denominator:
93 // a is component of the In normal vector on the strip direction.
94 double a = m_sdir.dot(In.m_normal);
95
96 // a = 0 if the In.m_normal and m_sdir are perpendicular.
97 // If so, return a very big number.
98 // Otherwise, evaluate the numerator and return
99 if (a!=0.) return (-m_tdir.dot(In.m_normal)/a);
100 else return 10000.;
101 }
102
103 inline Amg::Vector3D SCTinformation::position(const double& s) const
104 {
105 return (m_center+(0.5*s)*m_sdir);
106 }
108 const Amg::Vector3D& strip_start,
109 const Amg::Vector3D& strip_end,
110 const Amg::Vector3D& vec,
111 const double& locx) {
113 m_center = 0.5*(strip_start+strip_end);
114 m_sdir = strip_start-strip_end;
115 m_tdir = 2.*(m_center-vec);
116 m_normal = m_sdir.cross(m_tdir);
117 m_oneOverStrip = 1./m_sdir.mag();
118 m_locX = locx;
119 }
120
121} // end of name space
122
123#endif // SCTinformation_h
std::vector< size_t > vec
static Double_t a
Amg::Vector3D position(const double &s) const
const InDet::SiCluster * cluster() const
const Amg::Vector3D & strip_center() const
const Amg::Vector3D & normal() const
void set(const InDet::SiCluster *CL, const Amg::Vector3D &strip_start, const Amg::Vector3D &strip_end, const Amg::Vector3D &vec, const double &locx)
const Amg::Vector3D & strip_direction() const
const double & locX() const
const InDet::SiCluster * m_cluster
const Amg::Vector3D & traj_direction() const
double step(SCTinformation &) const
const double & oneOverStrip() const
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.