ATLAS Offline Software
Loading...
Searching...
No Matches
SiSpacePointForSeed.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <cmath>
6
7
8
10
14#include "TrkSurfaces/Surface.h"
15
16namespace InDet {
17
19 (const Trk::SpacePoint* sp, std::span<float const, 3> r)
20 {
21 set(sp,r); m_param = 0.;
22 }
23
25 (const Trk::SpacePoint* sp, std::span<float const, 3> r, std::span<float const, 4> sc)
26 {
27 set(sp,r,sc); m_param = 0.;
28 }
29
30
32 // Set
34
36 (const Trk::SpacePoint* sp,std::span<float const, 3> r)
37 {
38 spacepoint = sp ;
39 m_x = r[0];
40 m_y = r[1];
41 m_z = r[2];
42 m_r =std::sqrt(m_x*m_x+m_y*m_y);
43 m_q = 100000.;
44
45 const InDet::SiCluster* c = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
46 const InDetDD::SiDetectorElement* de = c ->detectorElement();
47
48 if( de->isPixel() ) {
49
50 const Amg::MatrixX& v = c->localCovariance();
51 float f22 = float(v(1,1) );
52 float wid = float(c->width().z());
53 float cov = wid*wid*.08333f; if(cov < f22) cov = f22;
54 if(de->isBarrel()) {m_covz = 9.f*cov; m_covr = .06f;}
55 else {m_covr = 9.f*cov; m_covz = .06f;}
56 m_sn = nullptr;
57 }
58 else {
59
60 const Amg::MatrixX& v = sp->localCovariance();
61 float f22 = float(v(1,1));
62 if(de->isBarrel()) {m_covz = 8.f*f22; m_covr = .1f;}
63 else {m_covr = 8.f*f22; m_covz = .1f;}
64 m_sn = &sp->clusterList().second->detectorElement()->surface();
65 }
66 m_su = &sp->clusterList().first->detectorElement()->surface();
67 }
68
70 // Set with error correction
71 // sc[0] - barrel pixels error correction
72 // sc[1] - endcap pixels
73 // sc[2] - barrel sct
74 // sc[3] - endcap sct
76
78 (const Trk::SpacePoint* sp,std::span<float const, 3> r,std::span<float const, 4> sc)
79 {
80 spacepoint = sp ;
81 m_x = r[0];
82 m_y = r[1];
83 m_z = r[2];
84 m_r =std::sqrt(m_x*m_x+m_y*m_y);
85 m_q = 100000.;
86
87 const InDet::SiCluster* c = static_cast<const InDet::SiCluster*>(sp->clusterList().first);
88 const InDetDD::SiDetectorElement* de = c ->detectorElement();
89
90 if( de->isPixel() ) {
91
92 const Amg::MatrixX& v = c->localCovariance();
93 float f22 = float(v(1,1));
94 float wid = float(c->width().z());
95 float cov = wid*wid*.08333f; if(cov < f22) cov = f22;
96 if(de->isBarrel()) {m_covz = 9.f*cov*sc[0]; m_covr = .06f;}
97 else {m_covr = 9.f*cov*sc[1]; m_covz = .06f;}
98 m_sn = nullptr;
99 }
100 else {
101
102 const Amg::MatrixX& v = sp->localCovariance();
103 float f22 = float(v(1,1));
104 if(de->isBarrel()) {m_covz = 8.f*f22*sc[2]; m_covr = .1f;}
105 else {m_covr = 8.f*f22*sc[3]; m_covz = .1f;}
106 m_sn = &sp->clusterList().second->detectorElement()->surface();
107 }
108 m_su = &sp->clusterList().first->detectorElement()->surface();
109 }
110} // end of name space
static Double_t sp
static Double_t sc
Class to hold geometrical description of a silicon detector element.
const Trk::SpacePoint * spacepoint
float m_q
penalty term in the seed score
void set(const Trk::SpacePoint *, std::span< float const, 3 >)
const Trk::Surface * m_su
quality of the best seed this candidate was seen on
int r
Definition globals.cxx:22
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Primary Vertex Finder.