ATLAS Offline Software
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 
22 namespace 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  }
107  inline void SCTinformation::set (const InDet::SiCluster* cluster,
108  const Amg::Vector3D& strip_start,
109  const Amg::Vector3D& strip_end,
110  const Amg::Vector3D& vec,
111  const double& locx) {
112  m_cluster = cluster;
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
InDet::SCTinformation::normal
const Amg::Vector3D & normal() const
Definition: SCTinformation.h:44
InDet::SCTinformation::oneOverStrip
const double & oneOverStrip() const
Definition: SCTinformation.h:45
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
InDet::SCTinformation::m_oneOverStrip
double m_oneOverStrip
Definition: SCTinformation.h:64
InDet::SCTinformation::m_center
Amg::Vector3D m_center
Definition: SCTinformation.h:60
InDet::SCTinformation::set
void set(const InDet::SiCluster *CL, const Amg::Vector3D &strip_start, const Amg::Vector3D &strip_end, const Amg::Vector3D &vec, const double &locx)
Definition: SCTinformation.h:107
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
SiCluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SiCluster.h:9
InDet::SCTinformation::cluster
const InDet::SiCluster * cluster() const
Definition: SCTinformation.h:40
InDet::SCTinformation
Definition: SCTinformation.h:25
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
GeoPrimitives.h
InDet::SCTinformation::m_locX
double m_locX
Definition: SCTinformation.h:65
InDet::SCTinformation::traj_direction
const Amg::Vector3D & traj_direction() const
Definition: SCTinformation.h:43
InDet::SCTinformation::m_tdir
Amg::Vector3D m_tdir
Definition: SCTinformation.h:62
InDet::SCTinformation::SCTinformation
SCTinformation()=default
InDet::SCTinformation::m_sdir
Amg::Vector3D m_sdir
Definition: SCTinformation.h:61
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
a
TList * a
Definition: liststreamerinfos.cxx:10
InDet::SCTinformation::locX
const double & locX() const
Definition: SCTinformation.h:46
InDet::SCTinformation::strip_direction
const Amg::Vector3D & strip_direction() const
Definition: SCTinformation.h:42
InDet::SCTinformation::m_normal
Amg::Vector3D m_normal
Definition: SCTinformation.h:63
InDet::SCTinformation::position
Amg::Vector3D position(const double &s) const
Definition: SCTinformation.h:103
InDet::SCTinformation::strip_center
const Amg::Vector3D & strip_center() const
Definition: SCTinformation.h:41
InDet::SCTinformation::m_cluster
const InDet::SiCluster * m_cluster
Definition: SCTinformation.h:59
InDet::SiCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:40
InDet::SCTinformation::step
double step(SCTinformation &) const
Definition: SCTinformation.h:87