34 static const int layer100[] = {
35 2, 2, 3, 2, 2, 2, 0, 2, 3, 2, 0, 2, 3, 2, 3, 2, 0, 2, 3, 0, 2, 0, 2, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 3, 2, 0, 2,
36 2, 0, 3, 3, 3, 0, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3,
37 2, 3, 2, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2
39 static const int phi100[] = {
40 29, 29, 6, 13, 23, 13, 14, 29, 9, 29, 14, 29, 9, 29, 39, 32, 21, 32, 13, 22, 32, 22, 32, 13, 32, 32, 32, 20, 20, 20,
41 20, 20, 20, 13, 21, 17, 33, 5, 33, 33, 31, 6, 19, 47, 21, 37, 37, 37, 37, 33, 37, 37, 24, 33, 33, 47, 19, 33, 33,
42 37, 37, 37, 55, 9, 38, 24, 37, 38, 8, 9, 9, 26, 38, 38, 38, 38, 39, 39, 38, 11, 45, 54, 54, 24, 31, 14, 47, 45, 47,
45 static const int eta100[] = {
46 3, -4, -6, 2, 6, 3, -5, -1, 6, -2, -6, -5, 5, -3, 2, 6, -3, 5, 5, 3, 4, 2, 2, 2, -1, -3, -4, 1, -1, -2, -3, -4, 4,
47 -1, -5, 6, 2, 4, 3, 1, 6, -2, 6, 3, -6, -1, 2, 1, 3, -5, 4, 5, -3, -4, -3, -5, -2, -1, -2, -3, -2, -4, -3, 2, 3, -6,
48 -5, 4, 6, 1, -6, 1, 1, -5, -4, -3, -3, -5, -2, 1, 5, 5, 4, 4, 5, 4, -1, -5, 3, 4, 1, -5
50 constexpr
unsigned int layer100_n{
sizeof(layer100) /
sizeof(*layer100)};
51 constexpr
unsigned int phi100_n{
sizeof(phi100) /
sizeof(*phi100)};
52 constexpr
unsigned int eta100_n{
sizeof(eta100) /
sizeof(*eta100)};
53 constexpr
bool theseArraysAreEqualInLength{(layer100_n == phi100_n) and (phi100_n == eta100_n)};
54 static_assert(theseArraysAreEqualInLength,
"Coordinate arrays for <100> wafers are not of equal length");
60 if (elements==
nullptr) {
62 return StatusCode::SUCCESS;
65 if (not tracks.isValid()) {
67 return StatusCode::SUCCESS;
71 std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map;
73 prd_to_track_map =
m_assoTool->createPRDtoTrackMap();
87 if (trackStates==
nullptr) {
88 ATH_MSG_WARNING(
"for current track, TrackStateOnSurfaces == Null, no data will be written for this track");
93 std::unique_ptr<Trk::TrackSummary> mySummary;
108 if (prd_to_track_map and prd_to_track_map->
isShared(*(clus->prepRawData())) ) {
113 if (RawDataClus==
nullptr) {
116 if (RawDataClus->detectorElement()->isSCT()) {
126 for (
unsigned int i{0};
i < layer100_n;
i++) {
127 if ((layer100[
i] ==
layer) and (eta100[
i] == eta) and (phi100[
i] == phi)) {
133 const std::vector<Identifier>& rdoList{RawDataClus->rdoList()};
134 int nStrip{
static_cast<int>(rdoList.size())};
144 float phiToWafer{90.f};
145 float thetaToWafer(90.
f);
148 pTrack[0] = trkp->momentum().x();
149 pTrack[1] = trkp->momentum().y();
150 pTrack[2] = trkp->momentum().z();
151 float etaTrack = trkp->eta();
158 bool passesCuts{
true};
161 (trkp->momentum().perp() > 500.) and
166 (std::abs(perigee->parameters()[
Trk::d0]) < 1.) and
167 (trkp->momentum().perp() > 500.) and
177 std::string xVar{
"phiToWafer"};
178 std::string yVar{
"nStrip"};
203 }
else if (eta == 1) {
223 fill(
"SCTLorentzMonitor", phiToWaferAcc, nStripAcc, isCentralAcc);
233 return StatusCode::SUCCESS;
249 if (element==
nullptr) {
250 ATH_MSG_ERROR(
"findAnglesToWaferSurface: failed to find detector element for id=" <<
255 float cosAlpha{sqrt(1.0
f - sinAlpha * sinAlpha)};
256 double phix{ cosAlpha * element->phiAxis().x() + sinAlpha * element->phiAxis().y()};
257 double phiy{-sinAlpha * element->phiAxis().x() + cosAlpha * element->phiAxis().y()};
259 double pNormal{
vec[0] * element->normal().x() +
vec[1] * element->normal().y() +
vec[2] * element->normal().z()};
260 double pEta{
vec[0] * element->etaAxis().x() +
vec[1] * element->etaAxis().y() +
vec[2] * element->etaAxis().z()};
261 double pPhi{
vec[0] * phix +
vec[1] * phiy +
vec[2] * element->phiAxis().z()};