ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsDataPreparation
src
StripSpacePointFormationTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
StripSpacePointFormationTool.h
"
6
7
#include <cmath>
8
9
namespace
ActsTrk
{
10
11
StatusCode
StripSpacePointFormationTool::makeStripSpacePoint
(
12
std::vector<StripSP>& collection,
13
const
StripInformationHelper
& firstInfo,
14
const
StripInformationHelper
& secondInfo,
15
const
Amg::Vector3D
&
/*beamSpotVertex*/
,
16
bool
isEndcap,
17
double
limit,
18
double
slimit)
const
19
{
20
// The vertex enters through StripInformationHelper::trajDirection().
21
22
double
a
=-firstInfo.
trajDirection
().dot(secondInfo.
normal
());
23
double
b = firstInfo.
stripDirection
().dot(secondInfo.
normal
());
24
double
l0 = firstInfo.
oneOverStrip
()*slimit+limit ;
25
26
if
(std::abs(
a
) > (std::abs(b)*l0)) {
27
ATH_MSG_DEBUG
(
"SP fails geometric cuts (first)"
);
28
if
(
m_useBeamSpotConstraint
) {
29
return
StatusCode::SUCCESS;
30
}
31
}
32
33
double
c =-secondInfo.
trajDirection
().dot(firstInfo.
normal
());
34
double
d = secondInfo.
stripDirection
().dot(firstInfo.
normal
());
35
double
l1 = secondInfo.
oneOverStrip
()*slimit+limit ;
36
37
if
(std::abs(c) > (std::abs(d)*l1)) {
38
ATH_MSG_DEBUG
(
"SP fails geometric cuts (second)"
);
39
if
(
m_useBeamSpotConstraint
) {
40
return
StatusCode::SUCCESS;
41
}
42
}
43
44
double
m =
a
/b;
45
46
if
(slimit!=0.) {
47
double
n = c/d;
48
if
(m > limit || n > limit) {
49
double
cs = firstInfo.
stripDirection
().dot(secondInfo.
stripDirection
())*(firstInfo.
oneOverStrip
()*firstInfo.
oneOverStrip
());
50
double
dm = (m-1);
51
double
dmn = (n-1.)*cs;
52
if
(dmn > dm) dm = dmn;
53
m-=dm; n-=(dm/cs);
54
if
(std::abs(m) > limit || std::abs(n) > limit) {
55
ATH_MSG_DEBUG
(
"SP falls outside of limit"
);
56
if
(
m_useBeamSpotConstraint
) {
57
return
StatusCode::SUCCESS;
58
}
59
}
60
}
else
if
(m < -limit || n < -limit) {
61
double
cs = firstInfo.
stripDirection
().dot(secondInfo.
stripDirection
())*(firstInfo.
oneOverStrip
()*firstInfo.
oneOverStrip
());
62
double
dm = -(1.+m);
63
double
dmn = -(1.+n)*cs;
64
if
(dmn > dm) dm = dmn;
65
m+=dm; n+=(dm/cs);
66
if
(std::abs(m) > limit || std::abs(n) > limit) {
67
ATH_MSG_DEBUG
(
"SP falls outside of limit"
);
68
if
(
m_useBeamSpotConstraint
) {
69
return
StatusCode::SUCCESS;
70
}
71
}
72
}
73
}
74
75
Eigen::Matrix<double, 3, 1> globalPosition(
m_useTopSp
? secondInfo.
position
(m) : firstInfo.
position
(m));
76
77
collection.push_back(
makeStripSP
(globalPosition, firstInfo, secondInfo, isEndcap));
78
79
return
StatusCode::SUCCESS;
80
}
81
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
StripSpacePointFormationTool.h
ActsTrk::StripInformationHelper
Definition
StripInformationHelper.h:17
ActsTrk::StripInformationHelper::stripDirection
const Amg::Vector3D & stripDirection() const
Definition
StripInformationHelper.h:61
ActsTrk::StripInformationHelper::position
Amg::Vector3D position(const double &shift) const
Definition
StripInformationHelper.cxx:39
ActsTrk::StripInformationHelper::trajDirection
const Amg::Vector3D & trajDirection() const
Definition
StripInformationHelper.h:62
ActsTrk::StripInformationHelper::normal
const Amg::Vector3D & normal() const
Definition
StripInformationHelper.h:63
ActsTrk::StripInformationHelper::oneOverStrip
const double & oneOverStrip() const
Definition
StripInformationHelper.h:64
ActsTrk::StripSpacePointFormationToolBase::makeStripSP
static StripSP makeStripSP(const Eigen::Matrix< double, 3, 1 > &globalPosition, const StripInformationHelper &firstInfo, const StripInformationHelper &secondInfo, bool isEndcap)
Fill the StripSP payload that is common to all implementations, i.e.
Definition
StripSpacePointFormationToolBase.cxx:378
ActsTrk::StripSpacePointFormationTool::m_useTopSp
Gaudi::Property< bool > m_useTopSp
Definition
StripSpacePointFormationTool.h:36
ActsTrk::StripSpacePointFormationTool::makeStripSpacePoint
virtual StatusCode makeStripSpacePoint(std::vector< StripSP > &collection, const StripInformationHelper &firstInfo, const StripInformationHelper &secondInfo, const Amg::Vector3D &beamSpotVertex, bool isEndcap, double limit, double slimit) const override
Compute the space point position for a compatible pair of strips and, if it satisfies the geometrical...
Definition
StripSpacePointFormationTool.cxx:11
ActsTrk::StripSpacePointFormationTool::m_useBeamSpotConstraint
Gaudi::Property< bool > m_useBeamSpotConstraint
For applying geometric cuts on SPs using beamspot constraint.
Definition
StripSpacePointFormationTool.h:38
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:48
Generated on
for ATLAS Offline Software by
1.17.0