ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
InDet::SiTrajectory_xk Class Referencefinal

#include <SiTrajectory_xk.h>

Collaboration diagram for InDet::SiTrajectory_xk:

Public Member Functions

 SiTrajectory_xk ()
 
 SiTrajectory_xk (const SiTrajectory_xk &)
 
 ~SiTrajectory_xk ()=default
 
SiTrajectory_xkoperator= (const SiTrajectory_xk &)
 
const int & nholes () const
 
const int & dholes () const
 
const int & nHolesBefore () const
 
const int & nHolesAfter () const
 
const int & nclusters () const
 
const int & ndf () const
 
const int & nclustersNoAdd () const
 
const int & nElements () const
 
const int & naElements () const
 
const int & difference () const
 
const int & elementsMap (int &i) const
 
const PatternHoleSearchOutcomegetHoleSearchResult () const
 
void setTools (const InDet::SiTools_xk *)
 
void setParameters ()
 
bool initialize (bool, bool, const PixelClusterContainer *, const SCT_ClusterContainer *, const Trk::TrackParameters &, std::vector< const InDet::SiCluster * > &, std::vector< const InDet::SiDetElementBoundaryLink_xk * > &, bool &, const EventContext &)
 
double pTseed (const Trk::TrackParameters &, std::vector< const InDet::SiCluster * > &, std::vector< const InDet::SiDetElementBoundaryLink_xk * > &, const EventContext &)
 
bool trackParametersToClusters (const PixelClusterContainer *, const SCT_ClusterContainer *, const Trk::TrackParameters &, std::vector< const InDet::SiDetElementBoundaryLink_xk * > &, std::multimap< const Trk::PrepRawData *, const Trk::Track * > &, std::vector< const InDet::SiCluster * > &, const EventContext &ctx)
 
bool globalPositionsToClusters (const PixelClusterContainer *, const SCT_ClusterContainer *, const std::vector< Amg::Vector3D > &, std::vector< const InDet::SiDetElementBoundaryLink_xk * > &, std::multimap< const Trk::PrepRawData *, const Trk::Track * > &, std::vector< const InDet::SiCluster * > &)
 
bool backwardExtension (int, const EventContext &)
 
bool forwardExtension (bool, int, const EventContext &)
 
bool forwardFilter (const EventContext &)
 
bool filterWithPreciseClustersError (const EventContext &)
 
bool backwardSmoother (bool, const EventContext &)
 
bool isLastPixel () const
 
const Trk::PatternTrackParametersfirstParameters () const
 Return the pattern track parameters of the first element of this trajectory matching its status. More...
 
std::unique_ptr< Trk::TrackParametersfirstTrackParameters ()
 
void getClusters (std::vector< const InDet::SiCluster * > &) const
 
Trk::TrackStates convertToTrackStateOnSurface ()
 
Trk::TrackStates convertToTrackStateOnSurface (int)
 
Trk::TrackStates convertToTrackStateOnSurfaceWithNewDirection ()
 
Trk::TrackStates convertToNextTrackStateOnSurface ()
 
Trk::TrackStates convertToSimpleTrackStateOnSurface (const EventContext &ctx)
 
Trk::TrackStates convertToSimpleTrackStateOnSurface (int, const EventContext &ctx)
 
Trk::TrackStates convertToSimpleTrackStateOnSurfaceWithNewDirection ()
 
Trk::TrackStates convertToSimpleTrackStateOnSurfaceForDisTrackTrigger (const EventContext &ctx)
 
Trk::TrackStates convertToSimpleTrackStateOnSurfaceForDisTrackTrigger (int, const EventContext &ctx)
 
std::unique_ptr< Trk::FitQualityconvertToFitQuality () const
 
void updateHoleSearchResult ()
 Helper method to determine the hole search outcome for use in the later reco. More...
 
void sortStep ()
 
bool goodOrder ()
 
bool jumpThroughPerigee ()
 
double quality () const
 
double qualityOptimization ()
 
double pTfirst () const
 
std::ostream & dump (std::ostream &out) const
 

Protected Member Functions

void erase (int)
 
bool isNewTrack (std::multimap< const Trk::PrepRawData *, const Trk::Track * > &) const
 

Protected Attributes

int m_firstElement {}
 
int m_lastElement {}
 index of the first element where we have
More...
 
int m_nclusters {}
 index of the last element where we have
More...
 
int m_nclustersNoAdd {}
 Number of clusters on trajectory. More...
 
int m_difference {}
 
int m_nHolesBefore {}
 
int m_nHolesAfter {}
 
int m_nholes {}
 
int m_dholes {}
 
int m_nActiveElements {}
 
int m_nElements {}
 count active elements More...
 
int m_elementsMap [300] {}
 
int m_ndfcut {}
 
int m_ndf {}
 
int m_ntos {}
 
int m_atos [100] {}
 
int m_itos [100] {}
 
SiTrajectoryElement_xk m_elements [300] {}
 
const InDet::SiTools_xkm_tools {}
 Trajectory elements on this trajectory. More...
 
std::unique_ptr< const Trk::Surfacem_surfacedead
 
PatternHoleSearchOutcome m_patternHoleOutcome {}
 

Friends

class SiCombinatorialTrackFinder_xk
 

Detailed Description

Definition at line 43 of file SiTrajectory_xk.h.

Constructor & Destructor Documentation

◆ SiTrajectory_xk() [1/2]

InDet::SiTrajectory_xk::SiTrajectory_xk ( )

◆ SiTrajectory_xk() [2/2]

InDet::SiTrajectory_xk::SiTrajectory_xk ( const SiTrajectory_xk )

◆ ~SiTrajectory_xk()

InDet::SiTrajectory_xk::~SiTrajectory_xk ( )
default

Member Function Documentation

◆ backwardExtension()

bool InDet::SiTrajectory_xk::backwardExtension ( int  itmax,
const EventContext &  ctx 
)

Definition at line 1186 of file SiTrajectory_xk.cxx.

1187 {
1188  if (m_firstElement >= m_lastElement) return false;
1189  int L = m_firstElement;
1190  if (L==0) return true;
1191 
1192  int MPbest[300] ;
1193  int TE [100] ;
1194  const InDet::SiCluster* CL [100] ;
1195  double XI2B [100] ;
1196  Trk::PatternTrackParameters PUB[100] ;
1198 
1199  int maxholes = m_tools->maxholes ();
1200  int maxdholes = m_tools->maxdholes();
1201  const int itm = itmax-1 ;
1202  int it = 0 ;
1203  int itbest = 0 ;
1204  int qbest =-100 ;
1205  int nbest = 0 ;
1206  int ndfbest = 0 ;
1207  int lbest = L ;
1208  int hbest = 0 ;
1209  int hbestb = 0 ;
1210  int nclbest = 0 ;
1211  int ndcut = 3 ;
1212  int F = L ;
1213  double Xi2best = 0. ;
1214 
1216 
1217  for (; it!=itmax; ++it) {
1218 
1219  int l = F;
1220  int lastElementWithExpHit = F;
1221 
1222  for (--F; F>=0; --F) {
1223 
1226 
1227  if (!Ef.BackwardPropagationFilter(El, ctx)) break;
1228 
1229  if (Ef.cluster()) {
1230  lastElementWithExpHit = F;
1231  l = F;
1232  }
1233  else if (Ef.inside() < 0) {
1234  lastElementWithExpHit = F;
1235  if (Ef.nholesB() > maxholes || Ef.dholesB() > maxdholes) break;
1236  }
1237 
1238  int nm = Ef.nclustersB()+F;
1239  if (Ef.ndist() > ndcut ||
1240  nm < nclbest ||
1241  (nm == nclbest && Ef.xi2totalB() > Xi2best) ) break;
1242  }
1243 
1244  int fl = F;
1245  if (fl<0) fl = 0;
1246 
1247  int m = m_elementsMap[l];
1248  int nc = m_elements[m].nclustersB();
1249 
1250  if (it==0 && nc==m_nclusters) return true;
1251 
1252  int np = m_elements[m].npixelsB();
1253  int nh = m_elements[m].nholesB();
1254  int nd = m_elements[m_elementsMap[fl]].ndist();
1255  int q = nc-nh;
1256  double X = m_elements[m].xi2totalB();
1257 
1258  if ( (q > qbest) || (q==qbest && X < Xi2best ) ) {
1259 
1260  qbest = q ;
1261  nbest = 0 ;
1262  ndfbest = 0 ;
1263  hbest = nh ;
1264  hbestb = m_elements[m_elementsMap[lastElementWithExpHit]].nholesB()-nh ;
1265  itbest = it ;
1266  Xi2best = X ;
1268 
1269  if (fl==0 && nd < ndcut) ndcut = nd;
1270 
1271  if (fl!=0 || nd > 0 || np < 3) {
1272 
1273  lbest = l-1;
1274  for (int i=l; i!=L; ++i) {
1275 
1277 
1278  if (Ei.inside() <= 0 ) {
1279  MPbest[++lbest] = i;
1280  if (Ei.cluster()) {
1281  CL[nbest] = Ei.cluster();
1282  XI2B[nbest] = Ei.xi2B();
1283  PUB[nbest] = Ei.parametersUB();
1284  TE[nbest++] = lbest;
1285  ndfbest += Ei.ndf();
1286  }
1287  }
1288  }
1289  }
1290  else {
1291 
1292  l = -1;
1293  lbest = fl-1;
1294  for (int i=fl; i!=L; ++i) {
1295 
1297 
1298  if (Ei.inside() <= 0 && ++lbest >=0 ) {
1299  MPbest[lbest] = lbest;
1300  if (Ei.cluster()) {
1301  CL[nbest] = Ei.cluster();
1302  XI2B[nbest] = Ei.xi2B();
1303  PUB[nbest] = Ei.parametersUB();
1304  TE[nbest++] = lbest;
1305  ndfbest += Ei.ndf();
1306  if (l<0) l=lbest;
1307  }
1308  m_elementsMap[lbest] = m_elementsMap[i];
1309  }
1310 
1311  }
1312 
1313  int dn = L-1-lbest;
1314 
1315  if (dn!=0) {
1316 
1317  for (int i=L; i!= m_nElements; ++i) {
1319  }
1320 
1321  L -=dn;
1322  m_nElements -=dn;
1323  m_lastElement-=dn;
1324  }
1325  }
1326  nclbest = m_nclusters+nbest;
1327  }
1328 
1329  F = -1;
1330  if (l<=0) l=1;
1331  bool cl = false;
1332  double Xn = 0.;
1333 
1334  for (; l < L; ++l) {
1336 
1337  if (Ei.cluster() && Ei.isNextClusterHoleB(cl,Xn)) {
1338  int nm = l+Ei.nclustersB();
1339  if (!cl) {
1340  if (Ei.dist() < -2. && Ei.ndist() > ndcut-1 ) continue;
1341  --nm;
1342  }
1343  if (nm < nclbest || (nm == nclbest && Xn > Xi2best)) continue;
1344  F=l; break;
1345  }
1346  }
1347 
1348  if (F < 0 ) break;
1349  if (it!=itm) if (!m_elements[m_elementsMap[F]].addNextClusterB()) break;
1350  }
1351  if (it == itmax) --it;
1352  if (!nbest) return true;
1353 
1354  m_nholes = hbest ;
1355  m_nHolesBefore = hbestb;
1356  m_nclusters += nbest ;
1357  m_ndf += ndfbest;
1358  m_firstElement = TE[0] ;
1360 
1361  int dn = L-1-lbest;
1362 
1363  if (dn != 0) {
1364 
1365  m_nElements -=dn;
1366  m_lastElement-=dn;
1367 
1368  int n = m_firstElement;
1369  for (; n <= lbest ; ++n) m_elementsMap[n]=m_elementsMap[MPbest[n]];
1370  for (; n!= m_nElements; ++n) m_elementsMap[n]=m_elementsMap[n +dn ];
1371  }
1372 
1373  if (itbest==it) return true;
1374 
1375  for (int n = L-1-dn; n>=0; --n) {
1376 
1378  int m = nbest-1;
1379  for (; m>=0; --m) if (TE[m]==n) break;
1380 
1381  if (m>=0) {
1382  if (m_tools->useFastTracking()) {
1383  En.setClusterB(CL[m],XI2B[m]);
1384  En.setParametersB(PUB[m]);
1385  }
1386  else En.setCluster(CL[m]);
1387  if (--nbest==0) break;
1388  }
1389  else {
1390  if (m_tools->useFastTracking()) En.setClusterB( nullptr ,10000.);
1391  else En.setCluster( nullptr );
1392  }
1393  }
1394  return true;
1395 }

◆ backwardSmoother()

bool InDet::SiTrajectory_xk::backwardSmoother ( bool  TWO,
const EventContext &  ctx 
)

Definition at line 1094 of file SiTrajectory_xk.cxx.

1095 {
1096  if (m_firstElement >= m_lastElement) return false;
1097 
1098  // Trajectory difference test
1099  //
1100  int m = m_lastElement;
1101  for (; m>=m_firstElement; --m) {
1102  if (m_elements[m_elementsMap[m]].difference()) break;
1103  }
1104  if (m < m_firstElement) return true;
1105 
1106  if (!m_elements[m_elementsMap[m_lastElement]].lastTrajectorElement()) return false;
1107 
1108  int firstElement = m_lastElement ;
1109  int maxholes = m_tools->maxholes ();
1110  int maxdholes = m_tools->maxdholes();
1111  m_nclustersNoAdd = 0 ;
1112  m_difference = 0 ;
1113 
1114  m = m_lastElement-1;
1115  int n = m ;
1116 
1117  for (; m>=m_firstElement; --m) {
1118 
1121 
1122  if (!Em.BackwardPropagationSmoother(En,TWO,ctx)) {
1123 
1124  if (m == m_firstElement) break;
1125 
1126  for (int i=m+1; i!=m_nElements; ++i) m_elementsMap[i-1] = m_elementsMap[i];
1127  --m_lastElement;
1128  --m_nElements;
1129  --firstElement;
1130  continue;
1131  }
1132 
1133  if ((Em.cluster() && Em.clusterOld()) && (Em.cluster()!=Em.clusterOld())) ++m_difference;
1134 
1135  if (Em.cluster()) {
1136  firstElement = m;
1137  }
1138  else {
1139  n=m;
1140  if (Em.clusterNoAdd()) ++m_nclustersNoAdd;
1141  if (Em.nholesB() > maxholes || Em.dholesB() > maxdholes) {
1142  ++m_difference; break;
1143  }
1144  }
1145  }
1146 
1147  m_firstElement = firstElement ;
1148  m = m_elementsMap[firstElement] ;
1149  n = m_elementsMap[ n ] ;
1151  m_nholes = m_elements[m].nholesB () ;
1153  m_ndf = m_elements[m].ndfB() ;
1154  if (m_ndf < m_ndfcut) return false;
1155 
1156  // Erase trajectory elements with big distance from the track
1157  //
1158  m = firstElement+1;
1159  n = m;
1160  for (; m!=m_lastElement; ++m) {
1161 
1163  if (Em.inside() > 0) {
1164  if (Em.detstatus() > 0) --m_nActiveElements;
1165  }
1166  else {
1168  }
1169  }
1170  m_lastElement = n;
1171 
1172  // Test number trajector elemenst with clusters
1173  //
1174  if (m_nActiveElements < m_tools->clustersmin() && m_nholes+m_nHolesAfter) return false;
1175  if (n!=m) {
1176  for (; m!=m_nElements; ++m) m_elementsMap[n++] = m_elementsMap[m];
1177  m_nElements = n;
1178  }
1179  return true;
1180 }

◆ convertToFitQuality()

std::unique_ptr< Trk::FitQuality > InDet::SiTrajectory_xk::convertToFitQuality ( ) const

Definition at line 290 of file SiTrajectory_xk.cxx.

290  {
292  return std::make_unique<Trk::FitQuality>(xi2, (m_ndf - 5));
293 }

◆ convertToNextTrackStateOnSurface()

Trk::TrackStates InDet::SiTrajectory_xk::convertToNextTrackStateOnSurface ( )

Definition at line 2202 of file SiTrajectory_xk.cxx.

2203 {
2204  int i=0;
2205  for (; i!=m_ntos; ++i) {
2206  if (m_itos[i]+1 < m_elements[m_atos[i]].ntsos()) {++m_itos[i]; break;}
2207  m_itos[i] = 0;
2208  }
2209  if (i==m_ntos) {
2210  return Trk::TrackStates();
2211  }
2212 
2213  auto dtsos = Trk::TrackStates();
2214 
2215  for (i=0; i!=m_ntos; ++i) {
2216 
2218  if (tsos) dtsos.push_back(tsos);
2219  }
2220  return dtsos;
2221 }

◆ convertToSimpleTrackStateOnSurface() [1/2]

Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurface ( const EventContext &  ctx)

Definition at line 152 of file SiTrajectory_xk.cxx.

153 {
154  auto dtsos = Trk::TrackStates();
155 
156  int i = m_firstElement;
157 
160 
161  if (tsos) dtsos.push_back(tsos);
162 
164 
165  if (tsos) dtsos.push_back(tsos);
166 
167  int lastClusterElement = 0;
168  for (int j=m_lastElement; j>=i; j--) {
169  int m = m_elementsMap[j];
170  if (m_elements[m].cluster()) {
171  lastClusterElement = j;
172  break;
173  }
174  }
175  if( lastClusterElement==0 || lastClusterElement==i ) return dtsos;
176 
177  for (++i; i<std::min(lastClusterElement,m_lastElement); ++i) {
178 
179  int m = m_elementsMap[i];
180  if (m_elements[m].cluster()) {
181  tsos = m_elements[m].trackSimpleStateOnSurface(false,false,0);
182  if (tsos) dtsos.push_back(tsos);
183  }
184  }
185 
186  i = std::min(lastClusterElement,m_lastElement);
187  tsos = m_elements[m_elementsMap[i]].trackSimpleStateOnSurface(false,true,2);
188  if (tsos) dtsos.push_back(tsos);
189 
190  return dtsos;
191 }

◆ convertToSimpleTrackStateOnSurface() [2/2]

Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurface ( int  cosmic,
const EventContext &  ctx 
)

Definition at line 139 of file SiTrajectory_xk.cxx.

140 {
141  if (!cosmic || m_elements[m_elementsMap[m_firstElement]].parametersUB().parameters()[2] < 0.) {
143  }
145 }

◆ convertToSimpleTrackStateOnSurfaceForDisTrackTrigger() [1/2]

Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceForDisTrackTrigger ( const EventContext &  ctx)

Definition at line 245 of file SiTrajectory_xk.cxx.

246 {
247  auto dtsos = Trk::TrackStates();
248 
249  int i = m_firstElement;
250 
253 
254  if (tsos) dtsos.push_back(tsos);
255 
256  tsos = m_elements[m_elementsMap[i]].trackSimpleStateOnSurface(false,false,0);
257 
258  if (tsos) dtsos.push_back(tsos);
259 
260  int lastClusterElement = 0;
261  for (int j=m_lastElement; j>=i; j--) {
262  int m = m_elementsMap[j];
263  if (m_elements[m].cluster()) {
264  lastClusterElement = j;
265  break;
266  }
267  }
268  if( lastClusterElement==0 || lastClusterElement==i ) return dtsos;
269 
270  for (++i; i<std::min(lastClusterElement,m_lastElement); ++i) {
271 
272  int m = m_elementsMap[i];
273  if (m_elements[m].cluster()) {
274  tsos = m_elements[m].trackSimpleStateOnSurface(false,false,0);
275  if (tsos) dtsos.push_back(tsos);
276  }
277  }
278 
279  i = std::min(lastClusterElement,m_lastElement);
280  tsos = m_elements[m_elementsMap[i]].trackSimpleStateOnSurface(false,true,2);
281  if (tsos) dtsos.push_back(tsos);
282 
283  return dtsos;
284 }

◆ convertToSimpleTrackStateOnSurfaceForDisTrackTrigger() [2/2]

Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceForDisTrackTrigger ( int  cosmic,
const EventContext &  ctx 
)

Definition at line 231 of file SiTrajectory_xk.cxx.

232 {
233  if (!cosmic || m_elements[m_elementsMap[m_firstElement]].parametersUB().parameters()[2] < 0.) {
235  }
237 }

◆ convertToSimpleTrackStateOnSurfaceWithNewDirection()

Trk::TrackStates InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceWithNewDirection ( )

Definition at line 198 of file SiTrajectory_xk.cxx.

199 {
200  auto dtsos = Trk::TrackStates();
201 
202  int i = m_lastElement;
203 
205  tsos = m_elements[m_elementsMap[i]].trackSimpleStateOnSurface(true,true,2);
206 
207  if (tsos) dtsos.push_back(tsos);
208 
209  for (--i; i!=m_firstElement; --i) {
210 
211  int m = m_elementsMap[i];
212  if (m_elements[m].cluster() || m_elements[m].clusterNoAdd() ) {
213  tsos = m_elements[m].trackSimpleStateOnSurface(true,false,0);
214  if (tsos) dtsos.push_back(tsos);
215  }
216  }
217 
218  i = m_firstElement;
219  tsos = m_elements[m_elementsMap[i]].trackSimpleStateOnSurface(true,false,1);
220  if (tsos) dtsos.push_back(tsos);
221 
222  return dtsos;
223 }

◆ convertToTrackStateOnSurface() [1/2]

Trk::TrackStates InDet::SiTrajectory_xk::convertToTrackStateOnSurface ( )

Definition at line 56 of file SiTrajectory_xk.cxx.

57 {
58 
59  auto dtsos = Trk::TrackStates();
60 
61  bool multi = m_tools->multiTrack();
62  if (m_nclusters <= m_tools->clustersmin() ||
63  pTfirst() < m_tools->pTmin()) multi = false;
64 
65  int i = m_firstElement;
66 
68  tsos = m_elements[m_elementsMap[i]].trackStateOnSurface(false,true,multi,1);
69 
70  if (tsos) dtsos.push_back(tsos);
71 
72  for (++i; i!=m_lastElement; ++i) {
73 
74  int m = m_elementsMap[i];
75  if (m_elements[m].cluster() || m_elements[m].clusterNoAdd() ) {
76  tsos = m_elements[m].trackStateOnSurface(false,false,multi,0);
77  if (tsos) dtsos.push_back(tsos);
78  }
79  }
80 
81  i = m_lastElement;
82  tsos = m_elements[m_elementsMap[i]].trackStateOnSurface(false,false,multi,2);
83  if (tsos) dtsos.push_back(tsos);
84 
85  if (multi) {
86  m_ntos = 0;
87  for (int i=m_firstElement; i<=m_lastElement; ++i) {
88 
89  int m = m_elementsMap[i];
90  if (!m_elements[m].ntsos()) continue;
91  m_atos[m_ntos ] = m;
92  m_itos[m_ntos++] = 0;
93  }
94  }
95  return dtsos;
96 }

◆ convertToTrackStateOnSurface() [2/2]

Trk::TrackStates InDet::SiTrajectory_xk::convertToTrackStateOnSurface ( int  cosmic)

Definition at line 43 of file SiTrajectory_xk.cxx.

44 {
45  if (!cosmic || m_elements[m_elementsMap[m_firstElement]].parametersUB().parameters()[2] < 0.) {
47  }
49 }

◆ convertToTrackStateOnSurfaceWithNewDirection()

Trk::TrackStates InDet::SiTrajectory_xk::convertToTrackStateOnSurfaceWithNewDirection ( )

Definition at line 103 of file SiTrajectory_xk.cxx.

104 {
105 
106  auto dtsos = Trk::TrackStates();
107 
108  bool multi = m_tools->multiTrack();
109  if (pTfirst() < m_tools->pTmin()) multi = false;
110 
111  int i = m_lastElement;
112 
114  tsos = m_elements[m_elementsMap[i]].trackStateOnSurface(true,true,multi,2);
115 
116  if (tsos) dtsos.push_back(tsos);
117 
118  for (--i; i!=m_firstElement; --i) {
119 
120  int m = m_elementsMap[i];
121  if (m_elements[m].cluster() || m_elements[m].clusterNoAdd() ) {
122  tsos = m_elements[m].trackStateOnSurface(true,false,multi,0);
123  if (tsos) dtsos.push_back(tsos);
124  }
125  }
126 
127  i = m_firstElement;
128  tsos = m_elements[m_elementsMap[i]].trackStateOnSurface(true,false,multi,1);
129  if (tsos) dtsos.push_back(tsos);
130 
131  return dtsos;
132 }

◆ dholes()

const int& InDet::SiTrajectory_xk::dholes ( ) const
inline

Definition at line 63 of file SiTrajectory_xk.h.

63 {return m_dholes ;}

◆ difference()

const int& InDet::SiTrajectory_xk::difference ( ) const
inline

Definition at line 71 of file SiTrajectory_xk.h.

71 {return m_difference ;}

◆ dump()

std::ostream & InDet::SiTrajectory_xk::dump ( std::ostream &  out) const

Definition at line 352 of file SiTrajectory_xk.cxx.

353 {
354  boost::io::ios_all_saver ias(out);
355 
356  if (m_nElements <=0 ) {
357  out<<"Trajectory does not exist"<<std::endl; ias.restore();
358  return out;
359  }
360  if (m_firstElement >= m_lastElement ) {
361  out<<"Trajectory is wrong"<<std::endl; ias.restore();
362  return out;
363  }
364 
365  out<<"|--------------------------------------------------------------------------------------------------------|"
366  <<std::endl;
367  out<<"| TRAJECTORY "
368  <<" |"
369  <<std::endl;
370 
371  out<<"| Has"<<std::setw(3)<<m_nElements
372  <<" ("
373  <<std::setw(3)<<m_nActiveElements
374  <<")"
375  <<" elements and "
376  <<std::setw(2)<<m_nclusters+m_nclustersNoAdd<<" ("
377  <<std::setw(2)<<m_nclustersNoAdd<<") clusters and "
378  <<std::setw(2)<<m_ndf<<" weighted clusters and quality = "<<std::setw(12)<<std::setprecision(5)<<quality()
379  <<" |"
380  <<std::endl;
381  out<<"| Has number of holes before, inside, after and gap= "
382  <<std::setw(2)<<m_nHolesBefore
383  <<std::setw(2)<<m_nholes
384  <<std::setw(2)<<m_nHolesAfter
385  <<std::setw(3)<<m_dholes<<" |"
386  <<std::endl;
387  out<<"| F B |"
388  <<std::endl;
389 
390  out<<"|---|--|---|-----|-|-|---------|---------|---------|---------|----------|---------|-|--|--|--|-|-|-|-|-|-|---------|"
391  <<std::endl;
392  out<<"| # |SS| D| Ncl |C|O| Xi2F | Xi2B | Az.Angle| Radius | pT(GeV) | dZ/dR |N|In|Lf|Lb|S|D|H|G|H|G| Step |"
393  <<std::endl;
394  out<<"|---|--|---|-----|-|-|---------|---------|---------|---------|----------|---------|-|--|--|--|-|-|-|-|-|-|---------|"
395  <<std::endl;
396 
397  for (int i=0; i!=m_nElements; ++i) {
398 
399  int m = m_elementsMap[i];
400 
401  std::string DET = "D ";
403  std::string DE = " ";
404  if (m_elements[m].detstatus() < 0) DE = "-";
405  if (D) {
406  if (D->isPixel()) {
407  if (D->isBarrel()) DET = "Pb"; else DET = "Pe";
408  }
409  else if (D->isSCT()) {
410  if (D->isBarrel()) DET = "Sb"; else DET = "Se";
411  }
412  }
413  int c = 0;
414  if (m_elements[m].detstatus() > 0) c = m_elements[m].numberClusters();
415 
416  out<<"|"<<std::setw(3)<<unsigned(i);
417 
418  std::string S0=" ";
419  if (m_firstElement == i) S0="=>";
420  if (m_lastElement == i) S0="=>";
421 
422  std::string S1=" ";
423  std::string S2=" ";
424  if (m_elements[m].cluster ()) S1="+";
425  if (m_elements[m].clusterNoAdd()) S2="+";
426 
427  out<<"|"
428  <<S0<<"|"
429  <<std::setw(1)<<DE
430  <<std::setw(2)<<DET <<"|"
431  <<std::setw(5)<<c <<"|"
432  <<S1<<"|"
433  <<S2<<"|";
434 
435  if (m_elements[m].status()) {
436 
437  out<<std::setw(9)<<std::setprecision(3)<<m_elements[m].xi2F()<<"|";
438  out<<std::setw(9)<<std::setprecision(3)<<m_elements[m].xi2B()<<"|";
439 
440  double ra = 0.;
441  double pt = 0.;
442  double tz = 0.;
443  double fa = 0.;
444 
445  if (m_elements[m].status()==1) {
446 
447  if (m_elements[m].cluster()) {
448 
450  ra = sqrt(gp.x()*gp.x()+gp.y()*gp.y());
451  fa = atan2(gp.y(),gp.x());
452  pt = m_elements[m].parametersUF().momentum().perp();
453  tz = m_elements[m].parametersUF().cotTheta();
454  }
455  else {
456 
458  ra = sqrt(gp.x()*gp.x()+gp.y()*gp.y());
459  fa = atan2(gp.y(),gp.x());
460  pt = m_elements[m].parametersPF().momentum().perp();
461  tz = m_elements[m].parametersPF().cotTheta();
462  }
463  }
464  else if ((m_tools->useFastTracking() and m_elements[m].status()>2) or m_elements[m].status()==2) {
465 
466  if (m_elements[m].cluster()) {
467 
469  ra = sqrt(gp.x()*gp.x()+gp.y()*gp.y());
470  fa = atan2(gp.y(),gp.x());
471  pt = m_elements[m].parametersUB().momentum().perp();
472  tz = m_elements[m].parametersUB().cotTheta();
473  }
474  else {
475 
477  ra = sqrt(gp.x()*gp.x()+gp.y()*gp.y());
478  fa = atan2(gp.y(),gp.x());
479  pt = m_elements[m].parametersPB().momentum().perp();
480  tz = m_elements[m].parametersPB().cotTheta();
481  }
482  }
483  else {
484 
485  Trk::PatternTrackParameters S1,SM,S2(m_elements[m].parametersPF());
486 
487  if (m_elements[m].cluster()) S1 = m_elements[m].parametersUB();
488  else S1 = m_elements[m].parametersPB();
489 
490  bool QA = m_tools->updatorTool()->combineStates(S1,S2,SM);
491 
492  if (QA) {
493 
494  Amg::Vector3D gp = SM.position();
495  ra = sqrt(gp.x()*gp.x()+gp.y()*gp.y());
496  fa = atan2(gp.y(),gp.x());
497  pt = SM.momentum().perp();
498  tz = SM.cotTheta();
499  }
500  }
501  out<<std::setw( 9)<<std::setprecision(4)<<fa <<"|";
502  out<<std::setw( 9)<<std::setprecision(4)<<ra <<"|";
503  out<<std::setw(10)<<std::setprecision(4)<<pt*.001<<"|";
504  out<<std::setw( 9)<<std::setprecision(4)<<tz <<"|";
505  out<<std::setw(1)<<unsigned(m_elements[m].noiseModel())<<"|";
506  out<<std::setw(2)<<m_elements[m].inside()<<"|";
507  out<<std::setw(2)<<unsigned(m_elements[m].nlinksF())<<"|";
508  out<<std::setw(2)<<unsigned(m_elements[m].nlinksB())<<"|";
509  out<<std::setw(1)<<unsigned(m_elements[m].status())<<"|";
510  out<<std::setw(1)<<unsigned(m_elements[m].difference())<<"|";
511  out<<std::setw(1)<<unsigned(m_elements[m].nholesF())<<"|";
512  out<<std::setw(1)<<unsigned(m_elements[m].dholesF())<<"|";
513  out<<std::setw(1)<<unsigned(m_elements[m].nholesB())<<"|";
514  out<<std::setw(1)<<unsigned(m_elements[m].dholesB())<<"|";
515  out<<std::setw(9)<<std::setprecision(4)<<m_elements[m].step()<<"|";
516  }
517  else {
518  out<<" |";
519  out<<" |";
520  out<<" |";
521  out<<" |";
522  out<<" |";
523  out<<" |";
524  out<<" |";
525  out<<" |";
526  out<<" |";
527  out<<" |";
528  out<<" |";
529  out<<" |";
530  out<<" |";
531  out<<" |";
532  out<<" |";
533  out<<" |";
534  out<<std::setw(9)<<std::setprecision(4)<<m_elements[m].step();
535  out<<"|";
536  }
537  out<<std::endl;
538  }
539  out<<"|---|--|---|-----|-|-|---------|---------|---------|---------|----------|---------|-|--|--|--|-|-|-|-|-|-|---------|"
540  <<std::endl;
541  ias.restore();
542  return out;
543 }

◆ elementsMap()

const int& InDet::SiTrajectory_xk::elementsMap ( int &  i) const
inline

Definition at line 72 of file SiTrajectory_xk.h.

72 {return m_elementsMap[i];}

◆ erase()

void InDet::SiTrajectory_xk::erase ( int  n)
protected

Definition at line 30 of file SiTrajectory_xk.cxx.

31 {
32  if (n>=0 && n<m_nElements) {
33  for (int i=n; i!=m_nElements-1; ++i) m_elementsMap[i] = m_elementsMap[i+1];
34  --m_nElements;
35  }
36 }

◆ filterWithPreciseClustersError()

bool InDet::SiTrajectory_xk::filterWithPreciseClustersError ( const EventContext &  ctx)

Definition at line 1892 of file SiTrajectory_xk.cxx.

1893 {
1894  int L = m_firstElement;
1895  int I = 0 ;
1896 
1897  if(!m_elements[m_elementsMap[L]].cluster()) return false;
1899 
1900  for(++L; L<=m_lastElement; ++L) {
1901 
1902  int K = m_elementsMap[L];
1903  if(m_elements[K].cluster() ||
1904  m_elements[K].clusterNoAdd() ||
1905  m_elements[K].inside() < 0 ) m_elementsMap[++I] = K;
1906  }
1907  m_firstElement = 0 ;
1908  m_lastElement = I ;
1909  m_nElements = I+1;
1910 
1911  // Forward filter
1912  //
1913  L = 0;
1914 
1915  // firstTrajectorElement with correction = true
1916  if(!m_elements[m_elementsMap[L]].firstTrajectorElement(true)) return false;
1917 
1918  for(++L; L<=m_lastElement; ++L) {
1919 
1922 
1923  if(!Ef.ForwardPropagationWithoutSearchPreciseWithCorrection(El, ctx)) return false;
1924  }
1925 
1926  // Backward smoother
1927  //
1928  if(!m_elements[m_elementsMap[m_lastElement]].lastTrajectorElementPrecise()) return false;
1929 
1930  int m = m_lastElement-1;
1931  for(; m>=0; --m) {
1932 
1935 
1936  if(!Em.BackwardPropagationPrecise(En, ctx)) return false;
1937  }
1938 
1939  return true;
1940 }

◆ firstParameters()

const Trk::PatternTrackParameters* InDet::SiTrajectory_xk::firstParameters ( ) const

Return the pattern track parameters of the first element of this trajectory matching its status.

Returns
nullptr or a pointer to the element owned pattern track parameters matching the current status of the trajectory element.

◆ firstTrackParameters()

std::unique_ptr<Trk::TrackParameters> InDet::SiTrajectory_xk::firstTrackParameters ( )

◆ forwardExtension()

bool InDet::SiTrajectory_xk::forwardExtension ( bool  smoother,
int  itmax,
const EventContext &  ctx 
)

index at which we start the extension

last element on the trajectory

smoothing step, if requested. Will re-evaluate the extension start and parameters there

This checks if we already ran a forward and backward propagation within the current hits on the trajectory. Will enter this branch if we have not.

in this case, we will simply set up for forward propagation, projecting the predicted state forward without searching for new hits yet

prepare first element for forward propagation

for all following elements with until the last with a known hit:

propagate forward the state from the previous element

this branch is entered if the first element is already in agreement between forward and back so we already ran a smoothing step for the current hits on the trajectory

for all elements starting from the one after our first hit, up to the last one with a hit:

this branch is entered while the range of hits we are looking at was still covered by the previously made backward smoothing

update flag if we are still covered by the smoothing

if not (first element not covered):

re-add cluster - this will update the counters and chi2 based on the refined upstream elements

case if we have entered a piece of the tracks where there was no back smoothing yet

propagate forward

end loop from second to last element with hit

end case of existing smoothing

decrement extensionStartIndex to get back to the last element with a hit on it

end smoother

if we are already at the last element on the trajectory, we have no-where to extend further

These represent the indices used for the extension. Only contains the elements beyond the start (so not the piece already existing).

Trajectory elements of clusters on the best candidate

Clusters on the best candidate

hole and double-hole cuts

max iteration we expect to reach

current iteration

index of best iteration so far

best quality seen so far

number of hits on the best extension

holes for best extension (only up to last hit)

holes beyond last hit for best extension

number of missing expected hits on best extension (holes + deads)

max holes plus deads

best number of clusters

start index for best extension

index for looping over detector elements

current index in the MP array - runs along all elements on the candidate track

first point of current trajectory: start of extension

maximum dPhi

this is the at the location of the first hit on track

start to iterate

index of the previous detector element in the forward propagation

Last index in the M array where we found a cluster

missing clusters on the best candidate compared to the maximum possible

hole flag

loop over detector elements - the first time this is called, we start at the first one beyond the one that saw the last hit

propagate forward to the current element, and search for matching clusters

In case of a forward propagation error, try to recover cases due to barrel-endcap transitions

we are already in the endcaps, or if the incompatible elements the failure are not subsequent: abooooort!

in the barrel or if the previous element is the one just before this, loop over the remaining elements and look for the first one not in the barrel. This detects barrel-endcap transitions

we didn't find any endcap elements? Likely a bad attempt, so abort

If we found a barrel-endcap transition, we continue our loop at the first endcap element along the trajectory.

end of propagation failure handling

NOTE: The 'else' here is mainly for clarity - due to the 'continue'/'break' statements in the 'if' above, we only reach here if the condition above (propagation failure) is not met.

if the forward propagation was succesful: update the 'previous element' to the current one

Reminder: we only reach this point in case of a succesful forward propagation

add the current element to the MP list, increment M index

if we found a matching cluster at this element:

get the dPhi w.r.t the first hit

wrap into 0...pi space

and bail out if the track is curving too extremely in phi

update indices for last hit

we did not find a compatible hit, but we would expect one --> hole!

check if we exceeded the maximum number of holes or double holes. If yes, abort!

and do the dPhi check again, but using the predicted parameters (as no hit)

we did not find a hit, but also do not cross the active surface (no hit expected)

apply only the dPhi check

number of missing clusters so far (for whatever reason) note: negative number (0 == all possible collected)

Now, check a number of reasons to exit early:

if we have too many deads

or we have already missed more hits than in the best so far

or we have missed the same #hits but have a worse chi2

end of loop over elements

now we have assembled a full candidate for the extended trajectory.

get the index of the element where we last saw a hit

get the number of clusters we saw at that point

and the number of holes (this means we exclude holes after the last hit!)

set the number of holes after the last hit - total holes minus holes until last hit

if we are in the first iteration, and have not found any new clusters beyond the ones already collected in initialize(), return.

get the last element we reached before exiting the loop

if we looped over all, make it the last element there is

number of missed expected hits seen

clusters minus holes before last hit This is used as a quality estimator

total chi2

if the quality is better than the current best (chi2 as tie-breaker):

update the quality flags

reset the running index of clusters on best track (will now be populated)

and the degree-of-freedom count

update best candidate hole counts

as well as holes after last hit

store the iteration number...

extensionStartIndex-value used for the best candidate (starting point)

the chi2...

the number of missed expected hits

if our track went through the full trajectory and we collect a small number of missed expected hits: update the cut for the future (need to be better)

now, loop over the elements on this possible extension again, up to the last cluster

get the corresponding element

if we are inside or within tolerance

then store this index in MPbest (meaning we skip any element that isn't crossed)

if we have a hit here,

store the cluster and l-index

and increment NDF count

best total cluster count: clusters we had so far + newly found ones

if we have an amazing track with at least 14(!) clusters and no holes, or if we passed along the full trajectory without any missed expected hits, we stop iterating, as we can not improve

end of branch for quality better than current best

set index_currentElement negative (use as iteration exit condition below)

boolean to check if we have two clusters on a given element

helper number - used below

chi square holder

Now, we prepare for the next iteration. This is done by walking backward along the found trajectory and seeing if, by not using one cluster, we could theoretically come to a better solution if doing so would give us hits everywhere else along the remaining trajectory. The first such case is used to start the next iteration.

Start reverse loop

corresponding element

if we are not on the last element, have a hit, and removing the hit would not make us fail the cuts:

this is Ei.nclustersF() + [steps from lastElementOnTraj to i] - nclbest - 1 ==> change in number of hits that would be possible w.r.t the best track if ALL following elements had hits, if we removed this hit (to get a better extension)

if removing this hit would result in us losing a hit on track (no backup on hand):

if we would gain a missed expected hit by removing this one and fail the missing hit cut due to this, keep iterating and don't do anything here

if we would keep a hit even if we remove this cluster, increment the counter to account for this

if we can not possibly improve (nm < 0) or if we can not improve and the chi2 can not go below the best one, keep looping, look for another cluster to pull out

otherwise, start the next iteration here!

end of reverse loop

if we did not find any candidate where we could improve by removing a hit, stop iteration

if we are not in the last iteration, final preparation for iterating by making our new start point skip the cluster used there so far.

if reaching max iterations, reset iteration counter to the last iteration that was run

exit if no good track found

set members to counters of best track

if the indices do not match, there is an element along the way which we do not traverse on the sensitive area

update the element map, removing unused elements

if the last iteration was the best, all is good and we return

reset index_currentElement again

loop over all detector elements beyond the start point

get the corresponding element

find the index in the hits-on-track array corresponding to this DE

if we found this element in the array:

if we have since switched to a different cluster on this element compared to the one in the best track:

if this is the time we need to update a cluster:

update the index

set the cluster to be used at this element to the one used for the best extension and propagate info from previous element

if we already updated one element: Can't use addNextClusterF directly, need to clean up later. For now, just update the cluster info itself

end branch for different active cluster on DE

exit if we have dealt with all of the clusters now

end of case if we found this element in the cluster-on-track array

case if a detector element is not on best trajectory

if this element has an active cluster:

if this is the first we need to update a cluster, can do the full work

tell this DE to not use a cluster, and propagate info from prev. element

if we already updated one element: Can't use addNextClusterF directly, need to clean up later. For now, just update the cluster info itself

tell this DE to not use a cluster

end of loop over all DE beyond start point

if we did not have to update any cluster, or if we only had to change the last hit: all good, can exit

otherwise, if we had to update a cluster along the way, need one more forward propagation run to make sure all the counters and chi2 etc reflect the best track's cluster configuration

now we can finally exit

Definition at line 1401 of file SiTrajectory_xk.cxx.

1402 {
1403  const double pi2 = 2.*M_PI;
1404  const double pi = M_PI;
1405 
1406  if (m_firstElement >= m_lastElement) return false;
1407 
1409  int extensionStartIndex = m_lastElement;
1411  int lastElementOnTraj = m_nElements-1;
1412 
1415  if (smoother) {
1416 
1417  extensionStartIndex = m_firstElement;
1418 
1421  if (m_elements[m_elementsMap[extensionStartIndex]].difference()) {
1424 
1426  if (!m_elements[m_elementsMap[extensionStartIndex]].firstTrajectorElement(false)) return false;
1428  for (++extensionStartIndex; extensionStartIndex<=m_lastElement; ++extensionStartIndex) {
1429  InDet::SiTrajectoryElement_xk& previousElement = m_elements[m_elementsMap[extensionStartIndex-1]];
1430  InDet::SiTrajectoryElement_xk& thisElement = m_elements[m_elementsMap[extensionStartIndex ]];
1432  if (!thisElement.ForwardPropagationWithoutSearch(previousElement,ctx)) return false;
1433  }
1434  }
1437  else{
1438  bool diff = false;
1440  for (++extensionStartIndex; extensionStartIndex<=m_lastElement; ++extensionStartIndex) {
1441 
1442  InDet::SiTrajectoryElement_xk& previousElement = m_elements[m_elementsMap[extensionStartIndex-1]];
1443  InDet::SiTrajectoryElement_xk& thisElement = m_elements[m_elementsMap[extensionStartIndex ]];
1446  if (!diff) {
1448  diff = thisElement.difference();
1450  if (diff) {
1452  if (!thisElement.addNextClusterF(previousElement,thisElement.cluster())) return false;
1453  }
1454  }
1456  else {
1458  if (!thisElement.ForwardPropagationWithoutSearch(previousElement,ctx)) return false;
1459  }
1460  }
1461  }
1462  --extensionStartIndex;
1463  }
1464 
1466  if ( extensionStartIndex== lastElementOnTraj) return true;
1467 
1468  // Search best forward trajectory prolongation
1471  int MP [300] ;
1472  int MPbest[300] ;
1474  int TE [100] ;
1476  const InDet::SiCluster* CL [100] ;
1477 
1479  int maxholes = m_tools->maxholes () ;
1480  int maxdholes = m_tools->maxdholes() ;
1482  const int itm = itmax-1 ;
1484  int iteration = 0 ;
1486  int itbest = 0 ;
1488  int qbest =-100 ;
1490  int nbest = 0 ;
1491  int ndfbest = 0 ;
1493  int hbest = 0 ;
1495  int hbeste = 0 ;
1497  int ndbest = 0 ;
1499  int ndcut = 3 ;
1501  int nclbest = 0 ;
1503  int lbest = extensionStartIndex ;
1505  int index_currentElement = extensionStartIndex ;
1507  int M = extensionStartIndex ;
1509  MP [M] = extensionStartIndex ;
1510  double Xi2best = 0. ;
1512  const double dfmax = 2.2 ;
1513 
1515  double f0 = m_elements[m_elementsMap[m_firstElement]].parametersUF().parameters()[2];
1516 
1517 
1518  m_elements[m_elementsMap[index_currentElement]].setNdist(0);
1519 
1521  for (; iteration!=itmax; ++iteration) {
1522 
1523  int lastElementWithSeenHit = index_currentElement;
1524  int lastElementWithExpHit = index_currentElement;
1526  int index_previousElement = index_currentElement;
1528  int mLastCluster = M;
1530  int Cm = nclbest-lastElementOnTraj;
1532  bool haveHole = false;
1533 
1536  for (++index_currentElement; index_currentElement!=m_nElements; ++index_currentElement) {
1537 
1539  InDet::SiTrajectoryElement_xk& prevElement = m_elements[m_elementsMap[index_previousElement]];
1540  InDet::SiTrajectoryElement_xk& currentElement = m_elements[m_elementsMap[index_currentElement ]];
1541 
1543  if (!currentElement.ForwardPropagationWithSearch(prevElement, ctx)) {
1545 
1547  if (!currentElement.isBarrel() || index_previousElement!=index_currentElement-1) break;
1548 
1552  int index_auxElement = index_currentElement;
1553  for (; index_auxElement!=m_nElements; ++index_auxElement) {
1554  if (!m_elements[m_elementsMap[index_auxElement]].isBarrel() ) break;
1555  }
1557  if (index_auxElement==m_nElements) break;
1558 
1562  index_currentElement = index_auxElement-1;
1563  continue;
1564  }
1565 
1568  else {
1571  index_previousElement = index_currentElement;
1572  }
1574 
1576  MP[++M] = index_currentElement;
1577 
1579  if (currentElement.cluster()) {
1580  if (not m_tools->isITkGeometry()) {
1582  double df = std::abs(currentElement.parametersUF().parameters()[2]-f0);
1584  if (df > pi) df = pi2-df;
1586  if (df > dfmax) break;
1587  }
1589  lastElementWithExpHit = index_currentElement;
1590  lastElementWithSeenHit = index_currentElement;
1591  mLastCluster = M;
1592  haveHole = false;
1593  }
1594 
1596  else if (currentElement.inside() < 0 ) {
1597  lastElementWithExpHit=index_currentElement;
1599  if (currentElement.nholesF() > maxholes || currentElement.dholesF() > maxdholes) break;
1600 
1601  haveHole = true;
1602  if (not m_tools->isITkGeometry()) {
1604  double df = std::abs(currentElement.parametersPF().parameters()[2]-f0);
1605  if (df > pi) df = pi2-df;
1606  if (df > dfmax ) break;
1607  }
1608  }
1609 
1611  else if (not m_tools->isITkGeometry()) {
1613  double df = std::abs(currentElement.parametersPF().parameters()[2]-f0);
1614  if (df > pi) df = pi2-df;
1615  if (df > dfmax) break;
1616  }
1619  int nm = currentElement.nclustersF()-index_currentElement;
1621  if ( currentElement.ndist() > ndcut
1622  || nm < Cm
1623  || (nm == Cm && currentElement.xi2totalF() > Xi2best)
1624  ) break;
1625  }
1626 
1628 
1630  int m = m_elementsMap[lastElementWithSeenHit];
1632  int nc = m_elements[m].nclustersF();
1634  int nh = m_elements[m].nholesF();
1636  m_nHolesAfter = m_elements[m_elementsMap[lastElementWithExpHit]].nholesF()-nh;
1637 
1640  if (iteration==0 && nc==m_nclusters) return true;
1641 
1643  int lastElementProcessed = index_currentElement;
1645  if (lastElementProcessed==m_nElements) --lastElementProcessed;
1646 
1648  int nd = m_elements[m_elementsMap[lastElementProcessed]].ndist();
1651  int q = nc-nh;
1653  double X = m_elements[m].xi2totalF();
1655  if ( (q > qbest) || (q==qbest && X < Xi2best ) ) {
1657  qbest = q;
1659  nbest = 0;
1661  ndfbest = 0;
1663  hbest = nh;
1665  hbeste = m_elements[m_elementsMap[lastElementWithExpHit]].nholesF()-nh;
1667  itbest = iteration;
1670  lbest = extensionStartIndex ;
1672  Xi2best = X ;
1674  ndbest = nd;
1677  if (lastElementProcessed==lastElementOnTraj && nd < ndcut) ndcut = nd;
1678 
1680  for (int j=extensionStartIndex+1; j<=mLastCluster; ++j) {
1682  int i = MP[j];
1685  if (Ei.inside() <= 0) {
1687  MPbest[++lbest] = i;
1689  if (Ei.cluster()) {
1691  CL[nbest] = Ei.cluster();
1692  TE[nbest++] = lbest;
1694  ndfbest += Ei.ndf();
1695  }
1696  }
1697  }
1699  nclbest = m_nclusters+nbest;
1702  if ( (nclbest >= 14 && !haveHole) || (lastElementProcessed==lastElementOnTraj && ndbest == 0)) break;
1703  }
1704 
1706  index_currentElement = -1;
1708  bool cl = false;
1710  int nb = lastElementOnTraj-nclbest-1;
1712  double Xn;
1713 
1719 
1721  for (int j=mLastCluster; j!=extensionStartIndex; --j) {
1723  int i = MP[j];
1725 
1727  if (i!=lastElementOnTraj && Ei.cluster() && Ei.isNextClusterHoleF(cl,Xn)) {
1728 
1732  int nm = nb-i+Ei.nclustersF();
1733 
1735  if (!cl) {
1738  if (Ei.dist() < -2. && Ei.ndist() > ndcut-1) continue;
1739  }
1741  else ++nm;
1742 
1745  if (nm < 0 || (nm == 0 && Xn > Xi2best)) continue;
1747  index_currentElement = i;
1748  M = j;
1749  break;
1750  }
1751  }
1752 
1754  if (index_currentElement < 0 ) break;
1757  if (iteration!=itm && !m_elements[m_elementsMap[index_currentElement]].addNextClusterF()) break;
1758  }
1759 
1761  if (iteration == itmax) --iteration;
1762 
1764  if (!nbest) return true;
1765 
1767  m_nholes = hbest ;
1768  m_nHolesAfter = hbeste ;
1769  m_nclusters += nbest ;
1770  m_ndf += ndfbest ;
1771  m_lastElement = TE[nbest-1];
1773 
1775  if (m_lastElement != MPbest[m_lastElement]) {
1777  for (int n = extensionStartIndex+1; n<=m_lastElement; ++n){
1778  m_elementsMap[n]=m_elementsMap[MPbest[n]];
1779  }
1780  }
1782  if (itbest==iteration) return true;
1783 
1785  int mb = 0;
1787  index_currentElement = -1;
1788 
1790  for (int n = extensionStartIndex+1; n!=m_nElements; ++n) {
1793 
1794  int m = mb;
1796  for (; m!=nbest; ++m) if (TE[m]==n) break;
1798  if (m!=nbest) {
1800  if (CL[m]!=En.cluster()) {
1802  if (index_currentElement<0) {
1804  index_currentElement=n;
1808  }
1811  else {
1812  En.setCluster(CL[m]);
1813  }
1814  }
1815  if (++mb == nbest) break;
1817  }
1818  else {
1821  if (En.cluster()) {
1823  if (index_currentElement<0) {
1824  index_currentElement = n;
1826  En.addNextClusterF(m_elements[m_elementsMap[n-1]],nullptr);
1827  }
1830  else {
1832  En.setCluster(nullptr);
1833  }
1834  }
1835  }
1836  }
1837 
1840  if (index_currentElement < 0 || m_lastElement == index_currentElement) {
1841  return true;
1842  }
1843 
1846  for (++index_currentElement; index_currentElement<=m_lastElement; ++index_currentElement) {
1847  InDet::SiTrajectoryElement_xk& prevElement = m_elements[m_elementsMap[index_currentElement-1]];
1848  InDet::SiTrajectoryElement_xk& currentElement = m_elements[m_elementsMap[index_currentElement ]];
1849  if (!currentElement.ForwardPropagationWithoutSearch(prevElement, ctx)) return false;
1850  }
1852  return true;
1853 }

◆ forwardFilter()

bool InDet::SiTrajectory_xk::forwardFilter ( const EventContext &  ctx)

Definition at line 1872 of file SiTrajectory_xk.cxx.

1873 {
1874  int L = m_firstElement;
1875 
1876  if (!m_elements[m_elementsMap[L]].firstTrajectorElement(false)) return false;
1877 
1878  for (++L; L<=m_lastElement; ++L) {
1879 
1882  if (!Ef.ForwardPropagationWithoutSearch(El,ctx)) return false;
1883  }
1884  return true;
1885 }

◆ getClusters()

void InDet::SiTrajectory_xk::getClusters ( std::vector< const InDet::SiCluster * > &  Cl) const

Definition at line 1859 of file SiTrajectory_xk.cxx.

1861 {
1862  for (int i = m_firstElement; i<=m_lastElement; ++i) {
1863  int m = m_elementsMap[i];
1864  if (m_elements[m].cluster()) Cl.push_back(m_elements[m].cluster());
1865  }
1866 }

◆ getHoleSearchResult()

const PatternHoleSearchOutcome& InDet::SiTrajectory_xk::getHoleSearchResult ( ) const
inline

Definition at line 73 of file SiTrajectory_xk.h.

73 {return m_patternHoleOutcome;}

◆ globalPositionsToClusters()

bool InDet::SiTrajectory_xk::globalPositionsToClusters ( const PixelClusterContainer ,
const SCT_ClusterContainer ,
const std::vector< Amg::Vector3D > &  ,
std::vector< const InDet::SiDetElementBoundaryLink_xk * > &  ,
std::multimap< const Trk::PrepRawData *, const Trk::Track * > &  ,
std::vector< const InDet::SiCluster * > &   
)

Definition at line 999 of file SiTrajectory_xk.cxx.

1006 {
1007  std::vector<const InDet::SiDetElementBoundaryLink_xk*>::iterator iter_boundaryLink = DE.begin(), endBoundaryLinks = DE.end();
1008  std::vector<Amg::Vector3D>::const_iterator g,gb = Gp.begin(), ge = Gp.end();
1009  InDet::PixelClusterCollection::const_iterator pib, pie;
1010  InDet::SCT_ClusterCollection::const_iterator sib, sie;
1011  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator t, te =PT.end();
1012 
1014 
1015  double pv[ 5]={0.,0.,0.,0.,0.};
1016  double cv[15]={ .1 ,
1017  0. , .1,
1018  0. , 0.,.001,
1019  0. , 0., 0.,.001,
1020  0. , 0., 0., 0.,.00001};
1021 
1022  double xi2Cut = 10.;
1023  m_ndf = 0 ;
1024 
1025  for (; iter_boundaryLink!=endBoundaryLinks; ++iter_boundaryLink) {
1026 
1027  const InDetDD::SiDetectorElement* d = (*iter_boundaryLink)->detElement();
1028  IdentifierHash id = d->identifyHash ();
1029  const Trk::Surface* su = &d->surface();
1030  const Trk::PlaneSurface* pla = static_cast<const Trk::PlaneSurface*>(su);
1031  if (!pla) continue;
1032 
1033  const Amg::Transform3D& tr = pla->transform();
1034  double Ax[3] = {tr(0,0),tr(1,0),tr(2,0)};
1035  double Ay[3] = {tr(0,1),tr(1,1),tr(2,1)};
1036  double Az[3] = {tr(0,2),tr(1,2),tr(2,2)};
1037  double x0 = tr(0,3);
1038  double y0 = tr(1,3);
1039  double z0 = tr(2,3);
1040  double zcut = .001 ;
1041 
1042  bool sct = d->isSCT();
1043  if (!sct) {
1044  const InDet::PixelClusterCollection *w = (*PIXc).indexFindPtr(id);
1045  if (w!=nullptr && w->begin()!=w->end()) {
1046  pib = w->begin();
1047  pie = w->end ();
1048  } else {
1049  continue;
1050  }
1051  } else {
1052  zcut = 1.;
1053  const InDet::SCT_ClusterCollection *w = (*SCTc).indexFindPtr(id);
1054  if (w!=nullptr && w->begin()!=w->end()) {
1055  sib = w->begin();
1056  sie = w->end ();
1057  } else {
1058  continue;
1059  }
1060  }
1061 
1062  for (g=gb; g!=ge; ++g) {
1063 
1064  double dx = (*g).x()-x0;
1065  double dy = (*g).y()-y0;
1066  double dz = (*g).z()-z0;
1067  double z = dx*Az[0]+dy*Az[1]+dz*Az[2];
1068  if (std::abs(z) > zcut) continue;
1069 
1070  pv[0] = dx*Ax[0]+dy*Ax[1]+dz*Ax[2];
1071  pv[1] = dx*Ay[0]+dy*Ay[1]+dz*Ay[2];
1072 
1073  Tp.setParametersWithCovariance(su,pv,cv);
1074 
1075  if (!sct) m_elements[0].CloseClusterSeach(Tp, (*iter_boundaryLink), pib, pie);
1076  else m_elements[0].CloseClusterSeach(Tp, (*iter_boundaryLink), sib, sie);
1077  const InDet::SiCluster* c = m_elements[0].cluster();
1078  if (!c || m_elements[0].xi2F() > xi2Cut) continue;
1079  if (sct) {
1080  t = PT.find(c);
1081  if (t!=te && (*t).second->measurementsOnTrack()->size() >= 10) continue;
1082  }
1083  sct ? m_ndf+=1 : m_ndf+=2;
1084  lSiCluster.push_back(c);
1085  }
1086  }
1087  return m_ndf >= 6;
1088 }

◆ goodOrder()

bool InDet::SiTrajectory_xk::goodOrder ( )

Definition at line 1947 of file SiTrajectory_xk.cxx.

1948 {
1949  int L = m_firstElement ;
1950  int n = m_elementsMap[L];
1951  double step = 0. ;
1952  bool order = true ;
1953 
1954  for (++L; L<=m_lastElement; ++L) {
1955 
1956  int m = m_elementsMap[L];
1957  if (!m_elements[m].cluster() &&
1958  !m_elements[m].clusterNoAdd() &&
1959  m_elements[m].inside()>=0) continue;
1960 
1961  double stp = m_elements[m].step(m_elements[n]);
1962  if ( step == 0.) step = stp ;
1963  else if ((step*stp) < 0.) {order = false; break;}
1964  n = m;
1965  }
1966  if (order) return true;
1967 
1968  L = m_firstElement ;
1969  n = m_elementsMap[L];
1971  double rad = gp.x()*gp.x()+gp.y()*gp.y();
1972  for (++L; L<=m_lastElement; ++L) {
1973 
1974  int m = m_elementsMap[L];
1975  if (!m_elements[m].cluster() &&
1976  !m_elements[m].clusterNoAdd() &&
1977  m_elements[m].inside()>=0) continue;
1978 
1979  gp = m_elements[m].globalPosition();
1980  double R = gp.x()*gp.x()+gp.y()*gp.y();
1981  if (R < rad) return false;
1982  rad = R;
1983  n=m;
1984  }
1985  return true;
1986 }

◆ initialize()

bool InDet::SiTrajectory_xk::initialize ( bool  ,
bool  ,
const PixelClusterContainer ,
const SCT_ClusterContainer ,
const Trk::TrackParameters ,
std::vector< const InDet::SiCluster * > &  ,
std::vector< const InDet::SiDetElementBoundaryLink_xk * > &  ,
bool &  ,
const EventContext &   
)

reset state

loop over all detector elements and assign the starting set of silicon clusters at the right indices

get the associated detector element from the boundary link

book a placeholder for a potential cluster on this element

First case: Current element is a pixel module

check if we are configured to use pixels!

check for the pixel clusters on the given detector element, using the ID hash

if we have any hits:

set iterators to the local cluster collection

Loop over the passed list with Si clusters to initiate the track with - these are for example the clusters on our seed in inside-out- or backtracking.

if this cluster is on the current element...

if it is the first cluster we see, set the first element to the current index

otherwise, set the last element to the current index (will eventually point to the final cluster)

increment cluster counter

add 2 to the number of degrees of freedom counter (Pix is 2D)

set our cluster pointer to point to this cluster

remove the cluster from the list

and exit the loop over Si clusters. We can do this because no two clusters are allowed to be on the same detector element

done, now we know if one of the existing clusters is on this element set status = 1 (there are hits on this module), give it the boundary link and the space points on this element. Finally, also give it the cluster, if we found one.

and increment the counter of active (nonzero hits) elements

this branch is the case of a pixel module with no hits on it, if we have previously had an active element

here we set a status of 0.

this branch is taken if we have not yet found an active element and there are no hits on this module. No need to already start the trajectory!

map the index to itself. Always useful. Don't worry, it will get more interesting later...

if we exceed the bounds of our array, bail out. Also increment the detector element index

end of check on pixel flag

end of pixel case

case 2: Strip module

again, we fetch the clusters for this detector element

do we have any?

is this the first cluster we found?

then mark it as the first element

otherwise, mark it as the last element

increment cluster counter

for SCT, add one degree of freedom (1D measurement)

and update the cluster pointer, before cleaning up

remember - only one cluster per detector element is possible due to upstream filtering. So we can exit when we found one.

Now, set up the trajectory element (det status 1) as in the pixel case

and increment the active element count

branch if no clusters on module and previously seen active element

set an corresponding element to detstatus = 0

branch for no clusters and no active elements seen so far

skip this one

update elements map

and array boundary checking (yuck!!) Also increment the detector element index

end of SCT if-statement

if the element we are currently processing is the first one where we saw a cluster:

set the upper populated point to the current index

and update the current trajectory

element with the track parameters we obtained upstream for the starting surface

if the element we are currently processing saw a cluster but is not the first one

run forward propagation from the last element with a cluster to this one

update index of last element that had a cluster to point to this one

if the chi2 looks good for the forward extension step, update index of last good cluster

if it does not look good

add the ndf to "ndfwrong"

if we have collected more than 3 badly fitting DoF (2 pix or 1 Pix + 1 SCT or 3 SCT), bail out

reduce ndf for cut by the bad degrees of freedom

reduce cluster count, don't include this track

and erase the cluster again

Case if we already have clusters from the seed on track, and some clusters left to put on it, but no seed cluster on this element Corresponds to have a hole in the seed.

propagate to the current DE from the last one where we had a cluster from the seed if the propagation fails

if we have a cluster here, something went wrong in the upstream logic

otherwise, remove this guy from consideration. It will be overwritten by the next one we see

also adapt the number of active elements if needed

if the propagation succeeded

increment hole count if we expect a hit

update the index of the last element

end of case of no hit and expecting a hit

end of loop over boundary links

did we manage to assign all our seed hits to elements on the road?

no? Then our search road was badly chosen. Return this info for logging and bail out

if some seed hits are badly fitting and we have less than 6 remaining good DoF, we give up

update degrees of freedom to the current count of good ones

truncate the ndfcut variable to 6

Kill empty trajectory elements at the end of our trajectory

count downwards

and if the element is active, stop looping

the index where we aborted is the last one where we found an active element.

Find last detector element with clusters

Kill uncrossed detector elements this repopulates the elementsMap we started to fill earlier

loop from the element after the one with the first hit to the one with the last hit from the seed

if we either have a cluster on track or at least cross the element, plug it into the m_elementsMap at the next position

now m_elementsMap contains the interesting elements

if we kicked out some elements:

update the index of the last element

then add the remaining ones beyond the last cluster back to the map

If we run with brem, update noise model for last trajectory elements

Definition at line 579 of file SiTrajectory_xk.cxx.

589 {
591  m_nholes = 0;
592  m_nHolesBefore = 0;
593  m_nHolesAfter = 0;
594  m_dholes = 0;
595  m_nclusters = 0;
596  m_nclustersNoAdd = 0;
597  m_nElements = 0;
598  m_nActiveElements = 0;
599  m_firstElement = -100;
600  m_lastElement = 0;
601  m_ndfcut = 0;
602  rquality = true;
603  m_ntos = 0;
604  int ndfwrong = 0;
605  double Xi2cut = 2.*m_tools->xi2max();
606 
607  // radius of the dead cylinder
608  double Rdead = 142.5;
609  // boolean to decide if initialisation is needed or not
610  // initDeadMaterial is False (which means dead material needs be initialised)
611  // for ITk fast tracking configuration
612  bool initDeadMaterial = not(m_tools->isITkGeometry() and m_tools->useFastTracking());
613 
614  if(!initDeadMaterial and !m_surfacedead) m_surfacedead = std::make_unique<const Trk::CylinderSurface>(Rdead,5000.);
615 
617  if (lSiCluster.size() < 2) return false;
618 
619  std::vector<const InDet::SiDetElementBoundaryLink_xk*>::iterator iter_boundaryLink,endBoundaryLinks=DE.end();
620 
621  int up = 0;
622  int last = 0;
623 
626  for (iter_boundaryLink=DE.begin(); iter_boundaryLink!=endBoundaryLinks; ++iter_boundaryLink) {
627 
629  const InDetDD::SiDetectorElement* detectorElement = (*iter_boundaryLink)->detElement();
630  IdentifierHash id = detectorElement->identifyHash();
631 
633  const InDet::SiCluster* theCluster = nullptr;
634 
636  if (detectorElement->isPixel()) {
637  if (PIX) {
638 
639  // Set dead material
640  //
641  // if already initialised, not doing it again
642  if(not initDeadMaterial) {
643  const Trk::PlaneSurface* pla = static_cast<const Trk::PlaneSurface*>(&detectorElement->surface());
644  double R = pla->center().perp();
645  if(R > Rdead) {
646  initDeadMaterial = true;
647  if(!m_elements[m_nElements].setDead(m_surfacedead.get())) return false;
649  if(m_nclusters && !lSiCluster.empty()) {
650  if(!m_elements[m_nElements].ForwardPropagationWithoutSearch(m_elements[up], ctx)) return false;
651  up = m_nElements;
652  }
653  if(++m_nElements==300) break;
654  }
655  }
656 
657  InDet::PixelClusterCollection::const_iterator iter_PixelClusterColl, iter_PixelClusterCollEnd;
659  const InDet::PixelClusterCollection *clustersOnElement = (*PIXc).indexFindPtr(id);
661  if (clustersOnElement!=nullptr && clustersOnElement->begin()!=clustersOnElement->end()) {
662 
664  iter_PixelClusterColl = clustersOnElement->begin();
665  iter_PixelClusterCollEnd = clustersOnElement->end();
666 
669  for (iter_cluster=lSiCluster.begin(); iter_cluster!=lSiCluster.end(); ++iter_cluster) {
671  if ((*iter_cluster)->detectorElement()==detectorElement) {
673  if (m_nclusters==0){
675  }
677  else{
679  }
681  ++m_nclusters;
683  m_ndfcut+=2;
685  theCluster=(*iter_cluster);
687  iter_cluster=lSiCluster.erase(iter_cluster);
691  break;
692  }
693  }
696  bool valid_set = m_elements[m_nElements].set(1,(*iter_boundaryLink),iter_PixelClusterColl,iter_PixelClusterCollEnd,theCluster,ctx);
697  if(m_tools->isITkGeometry() && !valid_set) return false;
700  }
702  else if (m_nActiveElements) {
704  bool valid_set = m_elements[m_nElements].set(0,(*iter_boundaryLink),iter_PixelClusterColl,iter_PixelClusterCollEnd,theCluster,ctx);
705  if(m_tools->isITkGeometry() && !valid_set) return false;
706  }
708  else {
709 
710  continue;
711  }
717  if (++m_nElements==300) break;
718  }
719  }
720  else if (SCT) {
722  InDet::SCT_ClusterCollection::const_iterator iter_stripClusterColl, iter_StripClusterCollEnd;
724  const InDet::SCT_ClusterCollection *clustersOnElement = (*SCTc).indexFindPtr(id);
725 
727  if (clustersOnElement!=nullptr && clustersOnElement->begin()!=clustersOnElement->end()) {
728 
729  iter_stripClusterColl = clustersOnElement->begin();
730  iter_StripClusterCollEnd = clustersOnElement->end();
731 
733  for (iter_cluster=lSiCluster.begin(); iter_cluster!=lSiCluster.end(); ++iter_cluster) {
734  if ((*iter_cluster)->detectorElement()==detectorElement) {
736  if (m_nclusters==0){
739  }
741  else{
743  }
745  ++m_nclusters;
747  m_ndfcut+=1;
749  theCluster=(*iter_cluster);
750  iter_cluster=lSiCluster.erase(iter_cluster);
753  break;
754  }
755  }
757  bool valid_set = m_elements[m_nElements].set(1,(*iter_boundaryLink),iter_stripClusterColl,iter_StripClusterCollEnd,theCluster,ctx);
758  if(m_tools->isITkGeometry() && !valid_set) return false;
761  }
763  else if (m_nActiveElements) {
765  bool valid_set = m_elements[m_nElements].set(0,(*iter_boundaryLink),iter_stripClusterColl,iter_StripClusterCollEnd,theCluster,ctx);
766  if(m_tools->isITkGeometry() && !valid_set) return false;
767  }
769  else {
771  continue;
772  }
777  if (++m_nElements==300) break;
778  }
779 
781  if (m_firstElement == m_nElements-1) {
782  up = m_nElements-1;
783  if (!m_elements[up].firstTrajectorElement(Tp, ctx)) return false;
784  }
789  else if (theCluster) {
790 
792  if (!m_elements[m_nElements-1].ForwardPropagationWithoutSearch(m_elements[up],ctx)) {
793  return false;
794  }
796  up = m_nElements-1;
798  if (m_elements[m_nElements-1].xi2F() <= Xi2cut) {
799  last=up;
800  }
802  else {
803  if (m_tools->isITkGeometry()) return false;
804  else{
806  ndfwrong+=m_elements[m_nElements-1].ndf();
808  if (ndfwrong > 3) return false;
812  --m_nclusters;
815  }
816  }
817  }
821  else if (m_nclusters && !lSiCluster.empty()) {
824  if (!m_elements[m_nElements-1].ForwardPropagationWithoutSearch(m_elements[up], ctx)) {
826  if(not m_tools->isITkGeometry() and m_elements[m_nElements-1].cluster()) return false;
829  --m_nElements;
831  if (m_elements[m_nElements-1].detstatus()) --m_nActiveElements;
832  }
834  else {
836  if (m_elements[m_nElements-1].inside()<0) ++m_nholes;
838  up = m_nElements-1;
839  }
840  }
841  }
842 
844  if (!lSiCluster.empty()) {
846  rquality = false;
847  return false;
848  }
851  if (not m_tools->isITkGeometry() && ndfwrong && m_ndfcut < 6) return false;
852 
854  m_ndf = m_ndfcut;
856  if (m_tools->isITkGeometry() || m_ndfcut > 6) m_ndfcut = 6;
857 
859  int n = m_nElements-1;
861  for (; n>0; --n) {
863  if (m_elements[n].detstatus()>=0) break;
864  }
867  m_nElements = n+1;
868 
870  for (; n>0; --n) {
871  if (m_elements[n].detstatus() == 1) {
873  break;
874  }
875  }
876 
879  int m = m_firstElement+1;
880  m_lastElement = last ;
883  for (n = m; n!=m_lastElement; ++n) {
887  if (En.cluster() || En.inside() <= 0) m_elementsMap[m++] = m_elementsMap[n];
888  }
890 
892  if (m!=n) {
894  m_lastElement = m;
896  for (; n!=m_nElements; ++n){
898  }
899  m_nElements = m;
900  }
901  if (!m_tools->bremNoise()) return true;
902 
904  for (n=m_lastElement; n!=m_nElements; ++n) {
906  }
907  return true;
908 }

◆ isLastPixel()

bool InDet::SiTrajectory_xk::isLastPixel ( ) const

◆ isNewTrack()

bool InDet::SiTrajectory_xk::isNewTrack ( std::multimap< const Trk::PrepRawData *, const Trk::Track * > &  map) const
protected

Definition at line 299 of file SiTrajectory_xk.cxx.

301 {
302  if (m_firstElement==-100) return false;//i.e. the int array never had elements inserted
303  const Trk::PrepRawData* prd [100];
304  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator
305  ti,t[100],te = map.end();
306  int n = 0 ;
307  for (int i=m_firstElement; i<=m_lastElement; ++i) {
308  if (n >= 100) break;
309  int m = m_elementsMap[i];
310 
311  if (m_elements[m].cluster()) {
312  prd[n] = m_elements[m].cluster();
313  t[n] = map.find(prd[n]);
314  if (t[n]==te) return true;
315  ++n;
316  } else if (m_elements[m].clusterNoAdd()) {
317  prd[n] = m_elements[m].clusterNoAdd();
318  t[n] = map.find(prd[n]);
319  if (t[n]==te) return true;
320  ++n;
321  }
322  }
323 
324  int nclt = m_nclusters + m_nclustersNoAdd;
325 
326  for (int i=0; i!=n; ++i) {
327  int nclmax = 0;
328  for (ti=t[i]; ti!=te; ++ti) {
329  if ( (*ti).first != prd[i] ) break;
330  int ncl = (*ti).second->measurementsOnTrack()->size();
331  if (ncl > nclmax) nclmax = ncl;
332  }
333  if (nclt > nclmax) return true;
334  }
335  return false;
336 }

◆ jumpThroughPerigee()

bool InDet::SiTrajectory_xk::jumpThroughPerigee ( )

Definition at line 2091 of file SiTrajectory_xk.cxx.

2092 {
2093  int i = m_firstElement;
2095 
2096  for (; i<=m_lastElement; ++i) {
2097  int m = m_elementsMap[i];
2098  if (m_elements[m].cluster() &&
2099  (m_elements[m].ndf()!=2 || (m_elements[m].stepToPerigee()*St) <= 0.)) break;
2100 
2101  if (m_elements[m].cluster()){
2102  --m_nclusters;
2103  m_ndf -= m_elements[m].ndf();
2104  }
2105  else if (m_elements[m].clusterNoAdd()) --m_nclustersNoAdd;
2106  else --m_nholes ;
2107  }
2108 
2109  if (i == m_firstElement) return false;
2110  m_firstElement = i;
2111  return true;
2112 }

◆ naElements()

const int& InDet::SiTrajectory_xk::naElements ( ) const
inline

Definition at line 70 of file SiTrajectory_xk.h.

70 {return m_nActiveElements;}

◆ nclusters()

const int& InDet::SiTrajectory_xk::nclusters ( ) const
inline

Definition at line 66 of file SiTrajectory_xk.h.

66 {return m_nclusters ;}

◆ nclustersNoAdd()

const int& InDet::SiTrajectory_xk::nclustersNoAdd ( ) const
inline

Definition at line 68 of file SiTrajectory_xk.h.

68 {return m_nclustersNoAdd;}

◆ ndf()

const int& InDet::SiTrajectory_xk::ndf ( ) const
inline

Definition at line 67 of file SiTrajectory_xk.h.

67 {return m_ndf ;}

◆ nElements()

const int& InDet::SiTrajectory_xk::nElements ( ) const
inline

Definition at line 69 of file SiTrajectory_xk.h.

69 {return m_nElements ;}

◆ nholes()

const int& InDet::SiTrajectory_xk::nholes ( ) const
inline

Definition at line 62 of file SiTrajectory_xk.h.

62 {return m_nholes ;}

◆ nHolesAfter()

const int& InDet::SiTrajectory_xk::nHolesAfter ( ) const
inline

Definition at line 65 of file SiTrajectory_xk.h.

65 {return m_nHolesAfter ;}

◆ nHolesBefore()

const int& InDet::SiTrajectory_xk::nHolesBefore ( ) const
inline

Definition at line 64 of file SiTrajectory_xk.h.

64 {return m_nHolesBefore ;}

◆ operator=()

SiTrajectory_xk& InDet::SiTrajectory_xk::operator= ( const SiTrajectory_xk )

◆ pTfirst()

double InDet::SiTrajectory_xk::pTfirst ( ) const

Definition at line 2227 of file SiTrajectory_xk.cxx.

2228 {
2229  int n = m_firstElement ; if (n <0 || n>=300) return 0.;
2230  n = m_elementsMap[n]; if (n <0 || n>=300) return 0.;
2231  int s = m_elements[n].status();
2232  if (s<=1) return 0.;
2233  return m_elements[n].parametersUB().momentum().perp();
2234 }

◆ pTseed()

double InDet::SiTrajectory_xk::pTseed ( const Trk::TrackParameters Tp,
std::vector< const InDet::SiCluster * > &  Cl,
std::vector< const InDet::SiDetElementBoundaryLink_xk * > &  DE,
const EventContext &  ctx 
)

Definition at line 549 of file SiTrajectory_xk.cxx.

554 {
555  double Xi2cut = 30.;
556 
557  InDet::SiClusterCollection::const_iterator sib,sie;
559  std::vector<const InDet::SiCluster*> ::iterator s=Cl.begin();
560 
561  int n = 0;
562  if(!m_elements[n].set(1,(*r),sib,sie,(*s),ctx) ) return 0.;
563  if(!m_elements[n].firstTrajectorElement(Tp,ctx)) return 0.;
564 
565  for(++r; r!=re; ++r) {
566  ++n; ++s;
567  if(!m_elements[n].set(1,(*r),sib,sie,(*s),ctx) ) return 0.;
568  if(!m_elements[n].ForwardPropagationWithoutSearch(m_elements[n-1], ctx)) return 0.;
569  if( m_elements[n].xi2F() > Xi2cut ) return 0.;
570  }
571  return m_elements[n].parametersUF().momentum().perp();
572 }

◆ quality()

double InDet::SiTrajectory_xk::quality ( ) const

Definition at line 2118 of file SiTrajectory_xk.cxx.

2119 {
2120  int holes = 0 ;
2121  double quality = 0.;
2122 
2123  for (int i = m_firstElement; i<=m_lastElement; ++i) {
2125  }
2126  return quality;
2127 }

◆ qualityOptimization()

double InDet::SiTrajectory_xk::qualityOptimization ( )

Definition at line 2133 of file SiTrajectory_xk.cxx.

2134 {
2135  int lE = m_firstElement;
2136  int h = 0 ;
2137  double q = 0 ;
2138  double qM = 0. ;
2139 
2140  for (int i = m_firstElement; i<=m_lastElement; ++i) {
2141  int m = m_elementsMap[i];
2142  q+=m_elements[m].quality(h);
2143  if (m_elements[m].cluster() && q > qM) {
2144  qM = q;
2145  lE = i;
2146  }
2147  }
2148 
2149  if (lE == m_firstElement) return -100;
2150 
2151  int fE = lE;
2152  int nclustersNoAdd = 0 ;
2153  int nclusters = 0 ;
2154  int nholes = 0 ;
2155  int dholes = 0 ;
2156  int ndf = 0 ;
2157  h = 0 ;
2158  q = 0.;
2159  qM = 0.;
2160 
2161  for (int i = lE; i>=m_firstElement; --i) {
2162 
2163  int m = m_elementsMap[i];
2164  q+=m_elements[m].quality(h);
2165 
2166  if (m_elements[m].cluster()) {
2167 
2168  ++nclusters;
2169  ndf+=m_elements[m].ndf();
2170 
2171  if (q > qM) {
2172  qM = q;
2173  fE = i;
2176  m_nholes = nholes ;
2177  m_dholes = dholes ;
2178  m_ndf = ndf ;
2179  }
2180 
2181  }
2182  else if (m_elements[m].clusterNoAdd()) {
2183  ++nclustersNoAdd;
2184  }
2185  else if (m_elements[m].inside() < 0 && m_elements[m].detstatus() >=0) {
2186  ++nholes;
2187  if (h > dholes) dholes = h;
2188  }
2189  }
2190 
2191  if (fE==lE || m_nclusters+m_nclustersNoAdd < m_tools->clustersmin()) return -100.;
2192  m_firstElement = fE;
2193  m_lastElement = lE;
2194  return qM;
2195 }

◆ setParameters()

void InDet::SiTrajectory_xk::setParameters ( )

Definition at line 21 of file SiTrajectory_xk.cxx.

22 {
23  for (int i=0; i!=300; ++i) m_elements[i].setParameters();
24 }

◆ setTools()

void InDet::SiTrajectory_xk::setTools ( const InDet::SiTools_xk t)

Definition at line 15 of file SiTrajectory_xk.cxx.

16 {
17  m_tools = t;
18  for (int i=0; i!=300; ++i) m_elements[i].setTools(t);
19 }

◆ sortStep()

void InDet::SiTrajectory_xk::sortStep ( )

Definition at line 1992 of file SiTrajectory_xk.cxx.

1993 {
1994  int L = m_firstElement;
1995  int LA = m_firstElement;
1996 
1997  for (++L; L<=m_lastElement; ++L) {
1998 
1999  int m = m_elementsMap[L];
2000  if (!m_elements[m].cluster() &&
2001  !m_elements[m].clusterNoAdd() &&
2002  m_elements[m].inside()>=0) continue;
2003 
2004  m_elementsMap[++LA] = m;
2005  }
2006 
2007  m_lastElement = LA;
2008  L = m_firstElement;
2009  m_nElements = LA+1;
2010 
2011  bool nc = true;
2012  bool so = true;
2014 
2015  if (ds > 0.) { // Sort in increase order
2016 
2017  while(nc) {
2018  nc = false;
2019  int m = L, n = L+1;
2020  for (; n<=LA; ++n) {
2021 
2022  int Mn = m_elementsMap[n];
2023  int Mm = m_elementsMap[m];
2024 
2025  if (m_elements[Mn].step() < m_elements[Mm].step()) {
2026  if (m_elements[Mn].step(m_elements[Mm]) < 0.) {
2027  m_elementsMap[m] = Mn;
2028  m_elementsMap[n] = Mm;
2029  nc = true; so = false;
2030  }
2031  }
2032  ++m;
2033  }
2034  }
2035  }
2036  else {
2037 
2038  while(nc) { // Sort in decrease order
2039  nc = false;
2040  int m = L, n = L+1;
2041  for (; n<=LA; ++n) {
2042 
2043  int Mn = m_elementsMap[n];
2044  int Mm = m_elementsMap[m];
2045 
2046  if (m_elements[Mn].step() > m_elements[Mm].step()) {
2047  if (m_elements[Mn].step(m_elements[Mm]) > 0.) {
2048  m_elementsMap[m] = Mn;
2049  m_elementsMap[n] = Mm;
2050  nc = true; so = false;
2051  }
2052  }
2053  ++m;
2054  }
2055  }
2056  }
2057  if (so) return;
2058 
2059  // Search first detector elements with cluster
2060  //
2061  int n = L;
2062  for (; n<= LA; ++n) {
2063 
2064  int e = m_elementsMap[n];
2065  if (m_elements[e].cluster()) break;
2066  if (m_elements[e].clusterNoAdd()) --m_nclustersNoAdd;
2067  else if (m_elements[e].inside() < 0 &&
2068  m_elements[e].detstatus()>=0) {--m_nholes; ++m_nHolesBefore;}
2069  }
2070 
2071  // Search last detector elements with cluster
2072  //
2073  int m = LA;
2074  for (; m>=n ; --m) {
2075 
2076  int e = m_elementsMap[m];
2077  if (m_elements[e].cluster()) break;
2078  if (m_elements[e].clusterNoAdd()) --m_nclustersNoAdd;
2079  else if (m_elements[e].inside() < 0 &&
2080  m_elements[e].detstatus()>=0) {--m_nholes; ++m_nHolesAfter;}
2081  }
2082  m_firstElement = n;
2083  m_lastElement = m;
2084 
2085 }

◆ trackParametersToClusters()

bool InDet::SiTrajectory_xk::trackParametersToClusters ( const PixelClusterContainer ,
const SCT_ClusterContainer ,
const Trk::TrackParameters ,
std::vector< const InDet::SiDetElementBoundaryLink_xk * > &  ,
std::multimap< const Trk::PrepRawData *, const Trk::Track * > &  ,
std::vector< const InDet::SiCluster * > &  ,
const EventContext &  ctx 
)

Definition at line 914 of file SiTrajectory_xk.cxx.

922 {
923  m_nElements = 0;
924  m_ndf = 0;
925 
926  std::multimap<double,const InDet::SiCluster*> xi2cluster;
927 
928  std::vector<const InDet::SiDetElementBoundaryLink_xk*>::iterator iter_boundaryLink,endBoundaryLinks=DE.end();
929  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator t, te =PT.end();
930 
931  double xi2Cut = .5;
932  int ndfCut = 6;
933 
934  for (iter_boundaryLink=DE.begin(); iter_boundaryLink!=endBoundaryLinks; ++iter_boundaryLink) {
935 
936  const InDetDD::SiDetectorElement* detectorElement = (*iter_boundaryLink)->detElement();
937  IdentifierHash id = detectorElement->identifyHash();
938 
939  bool sct = detectorElement->isSCT();
940 
941  if (!sct) {
942  InDet::PixelClusterCollection::const_iterator sib, sie;
943  const InDet::PixelClusterCollection *w = (*PIXc).indexFindPtr(id);
944 
945  if (w!=nullptr && w->begin()!=w->end()) {
946  sib = w->begin();
947  sie = w->end ();
948  } else {
949  continue;
950  }
951  if (!m_elements[0].ForwardPropagationForClusterSeach(m_nElements,Tp,(*iter_boundaryLink),sib,sie,ctx)) return false;
952  } else {
953  InDet::SCT_ClusterCollection::const_iterator sib, sie;
954  const InDet::SCT_ClusterCollection *w = (*SCTc).indexFindPtr(id);
955 
956  if (w!=nullptr && w->begin()!=w->end()) {
957  sib = w->begin();
958  sie = w->end ();
959  } else {
960  continue;
961  }
962  if (!m_elements[0].ForwardPropagationForClusterSeach(m_nElements,Tp,(*iter_boundaryLink),sib,sie,ctx)) return false;
963  }
964 
965  for (int i=0; i!=m_elements[0].nlinksF(); ++i) {
966 
967  double x = m_elements[0].linkF(i).xi2();
968 
969  if (sct) {
970  t = PT.find(m_elements[0].linkF(i).cluster());
971  if (t!=te && (*t).second->measurementsOnTrack()->size() >= 10) continue;
972  } else {
973  x*=.5;
974  }
975 
976  if (x <= xi2Cut) xi2cluster.insert(std::make_pair(x,m_elements[0].linkF(i).cluster()));
977  break;
978  }
979  ++m_nElements;
980  }
981 
982  if (xi2cluster.size() < 3) return false;
983 
984  std::multimap<double,const InDet::SiCluster*>::iterator xc = xi2cluster.begin(), xce = xi2cluster.end();
985 
986  for (; xc!=xce; ++xc) {
987  lSiCluster.push_back((*xc).second);
988  (*xc).second->detectorElement()->isSCT() ? m_ndf+=1 : m_ndf+=2;
989  if ( m_ndf >= ndfCut ) break;
990  }
991 
992  return m_ndf >= 6;
993 }

◆ updateHoleSearchResult()

void InDet::SiTrajectory_xk::updateHoleSearchResult ( )

Helper method to determine the hole search outcome for use in the later reco.

instantiate an outcome object to populate

counter to find subsequent SCT holes

loop between the first and last hit on the trajectory

Now get the current element

check if this is a pixel element

if we have a cluster on-track, this is neither a hole nor a dead Same goes for outliers

otherwise, need to check more carefully:

if this is a candidate (we expect a hit and we are not on a dead sensor)

in this case, we have a hole.

end of SCT case

in all other cases, apart from dead, nothing to be incremented

fallthrough

fallthrough

fallthrough

fallthrough

in all of these cases, we have to reset the double holes

if we encounter a dead element, increment the appropriate counters

end switch over boundary check result

end no-cluster case

if the previous element was also an SCT hole, we now have a double hole

end loop over elements

Definition at line 2237 of file SiTrajectory_xk.cxx.

2237  {
2238 
2241 
2243  bool prevIsSctHole = false;
2244 
2246 
2247  for (int theEle = m_firstElement+1; theEle<m_lastElement; ++theEle) {
2249  int m = m_elementsMap[theEle];
2250  InDet::SiTrajectoryElement_xk & theElement = m_elements[m];
2252  bool isPix = theElement.ndf() == 2;
2253  bool isSCTHole=false;
2254 
2257  if (theElement.cluster() || theElement.clusterNoAdd()) {
2258  prevIsSctHole = false;
2259  continue;
2260  }
2261 
2263  else {
2264  std::unique_ptr<const Trk::TrackParameters> pars {theElement.trackParameters(true,0)};
2266  switch (boundaryStatus){
2270  if (isPix) {
2272  }
2273  else {
2275  isSCTHole=true;
2276  }
2277  break;
2283  break;
2287  if (isPix){
2289  }
2290  else{
2292  }
2293  break;
2294  }
2295  }
2296 
2299  if (isSCTHole && prevIsSctHole){
2300  prevIsSctHole = false;
2302  }
2303  else {
2304  prevIsSctHole = isSCTHole;
2305  }
2306  }
2310  }
2311 }

Friends And Related Function Documentation

◆ SiCombinatorialTrackFinder_xk

friend class SiCombinatorialTrackFinder_xk
friend

Definition at line 45 of file SiTrajectory_xk.h.

Member Data Documentation

◆ m_atos

int InDet::SiTrajectory_xk::m_atos[100] {}
protected

Definition at line 187 of file SiTrajectory_xk.h.

◆ m_dholes

int InDet::SiTrajectory_xk::m_dholes {}
protected

Definition at line 180 of file SiTrajectory_xk.h.

◆ m_difference

int InDet::SiTrajectory_xk::m_difference {}
protected

Definition at line 176 of file SiTrajectory_xk.h.

◆ m_elements

SiTrajectoryElement_xk InDet::SiTrajectory_xk::m_elements[300] {}
protected

Definition at line 189 of file SiTrajectory_xk.h.

◆ m_elementsMap

int InDet::SiTrajectory_xk::m_elementsMap[300] {}
protected

Definition at line 183 of file SiTrajectory_xk.h.

◆ m_firstElement

int InDet::SiTrajectory_xk::m_firstElement {}
protected

Definition at line 170 of file SiTrajectory_xk.h.

◆ m_itos

int InDet::SiTrajectory_xk::m_itos[100] {}
protected

Definition at line 188 of file SiTrajectory_xk.h.

◆ m_lastElement

int InDet::SiTrajectory_xk::m_lastElement {}
protected

index of the first element where we have

a cluster

Definition at line 172 of file SiTrajectory_xk.h.

◆ m_nActiveElements

int InDet::SiTrajectory_xk::m_nActiveElements {}
protected

Definition at line 181 of file SiTrajectory_xk.h.

◆ m_nclusters

int InDet::SiTrajectory_xk::m_nclusters {}
protected

index of the last element where we have

a cluster

Definition at line 174 of file SiTrajectory_xk.h.

◆ m_nclustersNoAdd

int InDet::SiTrajectory_xk::m_nclustersNoAdd {}
protected

Number of clusters on trajectory.

Definition at line 175 of file SiTrajectory_xk.h.

◆ m_ndf

int InDet::SiTrajectory_xk::m_ndf {}
protected

Definition at line 185 of file SiTrajectory_xk.h.

◆ m_ndfcut

int InDet::SiTrajectory_xk::m_ndfcut {}
protected

Definition at line 184 of file SiTrajectory_xk.h.

◆ m_nElements

int InDet::SiTrajectory_xk::m_nElements {}
protected

count active elements

Definition at line 182 of file SiTrajectory_xk.h.

◆ m_nholes

int InDet::SiTrajectory_xk::m_nholes {}
protected

Definition at line 179 of file SiTrajectory_xk.h.

◆ m_nHolesAfter

int InDet::SiTrajectory_xk::m_nHolesAfter {}
protected

Definition at line 178 of file SiTrajectory_xk.h.

◆ m_nHolesBefore

int InDet::SiTrajectory_xk::m_nHolesBefore {}
protected

Definition at line 177 of file SiTrajectory_xk.h.

◆ m_ntos

int InDet::SiTrajectory_xk::m_ntos {}
protected

Definition at line 186 of file SiTrajectory_xk.h.

◆ m_patternHoleOutcome

PatternHoleSearchOutcome InDet::SiTrajectory_xk::m_patternHoleOutcome {}
protected

Definition at line 194 of file SiTrajectory_xk.h.

◆ m_surfacedead

std::unique_ptr<const Trk::Surface> InDet::SiTrajectory_xk::m_surfacedead
protected

Definition at line 193 of file SiTrajectory_xk.h.

◆ m_tools

const InDet::SiTools_xk* InDet::SiTrajectory_xk::m_tools {}
protected

Trajectory elements on this trajectory.


Each one corresponds to one detector element on the search road

Definition at line 192 of file SiTrajectory_xk.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
InDet::SiTrajectoryElement_xk::xi2B
const double & xi2B() const
Definition: SiTrajectoryElement_xk.h:122
InDet::SiTrajectory_xk::m_nclusters
int m_nclusters
index of the last element where we have
Definition: SiTrajectory_xk.h:174
InDet::SiTrajectory_xk::convertToTrackStateOnSurface
Trk::TrackStates convertToTrackStateOnSurface()
Definition: SiTrajectory_xk.cxx:56
InDet::SiTools_xk::multiTrack
const bool & multiTrack() const
Definition: SiTools_xk.h:68
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
beamspotman.r
def r
Definition: beamspotman.py:676
InDet::SiTrajectoryElement_xk::isNextClusterHoleF
bool isNextClusterHoleF(bool &, double &)
checks if removing this cluster from the forward propagation would result in a critical number of hol...
Definition: SiTrajectoryElement_xk.cxx:2103
InDet::SiTrajectoryElement_xk::nholesF
const int & nholesF() const
Definition: SiTrajectoryElement_xk.h:54
InDet::SiTrajectoryElement_xk::step
const double & step() const
Definition: SiTrajectoryElement_xk.h:68
S1
struct TBPatternUnitContext S1
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:260
Trk::PatternTrackParameters::setParametersWithCovariance
void setParametersWithCovariance(const Surface *, const double *, const double *)
InDet::SiTrajectoryElement_xk
Definition: SiTrajectoryElement_xk.h:36
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
InDet::SiTrajectory_xk::m_lastElement
int m_lastElement
index of the first element where we have
Definition: SiTrajectory_xk.h:172
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
InDet::SiTrajectoryElement_xk::BackwardPropagationFilter
bool BackwardPropagationFilter(SiTrajectoryElement_xk &, const EventContext &ctx)
Definition: SiTrajectoryElement_xk.cxx:532
Trk::BoundaryCheckResult::DeadElement
@ DeadElement
outside the element
InDet::SiTrajectoryElement_xk::nholesB
const int & nholesB() const
Definition: SiTrajectoryElement_xk.h:55
InDet::SiTrajectory_xk::m_ndf
int m_ndf
Definition: SiTrajectory_xk.h:185
Trk::BoundaryCheckResult
BoundaryCheckResult
Definition: IBoundaryCheckTool.h:14
Trk::IBoundaryCheckTool::boundaryCheck
virtual BoundaryCheckResult boundaryCheck(const Trk::TrackParameters &) const =0
InDet::SiTrajectoryElement_xk::inside
const int & inside() const
Definition: SiTrajectoryElement_xk.h:49
InDet::SiTrajectoryElement_xk::nlinksF
const int & nlinksF() const
Definition: SiTrajectoryElement_xk.h:52
Trk::BoundaryCheckResult::Insensitive
@ Insensitive
close to the edge of an active element
InDetDD::holes
@ holes
Definition: InDetDD_Defs.h:17
hist_file_dump.d
d
Definition: hist_file_dump.py:137
InDet::SiTrajectoryElement_xk::setNdist
void setNdist(int)
Definition: SiTrajectoryElement_xk.cxx:2153
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
Trk::BoundaryCheckResult::Candidate
@ Candidate
InDet::SiTrajectory_xk::m_nholes
int m_nholes
Definition: SiTrajectory_xk.h:179
InDet::SiTrajectoryElement_xk::isNextClusterHoleB
bool isNextClusterHoleB(bool &, double &)
Definition: SiTrajectoryElement_xk.cxx:2082
InDet::PatternHoleSearchOutcome::nPixelDeads
int nPixelDeads
Definition: SiTrajectory_xk.h:37
InDet::SiTrajectoryElement_xk::clusterOld
const InDet::SiCluster * clusterOld() const
Definition: SiTrajectoryElement_xk.h:74
skel.it
it
Definition: skel.GENtoEVGEN.py:396
test_pyathena.pt
pt
Definition: test_pyathena.py:11
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
python.PhysicalConstants.pi2
float pi2
Definition: PhysicalConstants.py:52
InDet::SiTrajectory_xk::pTfirst
double pTfirst() const
Definition: SiTrajectory_xk.cxx:2227
M_PI
#define M_PI
Definition: ActiveFraction.h:11
InDet::SiTrajectoryElement_xk::ndfB
const int & ndfB() const
Definition: SiTrajectoryElement_xk.h:66
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
mc.diff
diff
Definition: mc.SFGenPy8_MuMu_DD.py:14
InDet::SiTrajectoryElement_xk::xi2totalF
const double & xi2totalF() const
Definition: SiTrajectoryElement_xk.h:123
InDet::SiTrajectoryElement_xk::dist
const double & dist() const
Definition: SiTrajectoryElement_xk.h:69
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
InDet::SiTrajectoryElement_xk::lastActive
void lastActive()
Definition: SiTrajectoryElement_xk.cxx:2313
cosmic
@ cosmic
Definition: SUSYToolsTester.cxx:101
InDet::SiTools_xk::boundaryCheckTool
const Trk::IBoundaryCheckTool * boundaryCheckTool() const
Definition: SiTools_xk.h:56
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PlotCalibFromCool.multi
multi
Definition: PlotCalibFromCool.py:99
InDet::SiTrajectoryElement_xk::setCluster
void setCluster(const InDet::SiCluster *)
Definition: SiTrajectoryElement_xk.cxx:2130
PlotPulseshapeFromCool.np
np
Definition: PlotPulseshapeFromCool.py:64
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
mc.SM
SM
Definition: mc.PhPy8EG_A14NNPDF23_DY_SLQ_example.py:47
InDet::SiTrajectory_xk::m_nHolesAfter
int m_nHolesAfter
Definition: SiTrajectory_xk.h:178
x
#define x
InDet::SiTrajectory_xk::m_atos
int m_atos[100]
Definition: SiTrajectory_xk.h:187
InDet::SiTrajectoryElement_xk::parametersUB
const Trk::PatternTrackParameters & parametersUB() const
observed
Definition: SiTrajectoryElement_xk.h:135
InDet::PatternHoleSearchOutcome::nSCTDeads
int nSCTDeads
Definition: SiTrajectory_xk.h:38
InDet::SiTrajectoryElement_xk::isBarrel
bool isBarrel() const
Definition: SiTrajectoryElement_xk.h:70
InDet::SiTrajectoryElement_xk::ndf
const int & ndf() const
Definition: SiTrajectoryElement_xk.h:64
InDet::SiTrajectoryElement_xk::trackSimpleStateOnSurface
Trk::TrackStateOnSurface * trackSimpleStateOnSurface(bool, bool, int)
Definition: SiTrajectoryElement_xk.cxx:980
InDet::SiTrajectory_xk::nclustersNoAdd
const int & nclustersNoAdd() const
Definition: SiTrajectory_xk.h:68
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
InDet::SiTrajectoryElement_xk::eraseClusterForwardPropagation
void eraseClusterForwardPropagation()
Definition: SiTrajectoryElement_xk.cxx:1336
pi
#define pi
Definition: TileMuonFitter.cxx:65
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
InDet::SiTrajectoryElement_xk::xi2totalB
const double & xi2totalB() const
Definition: SiTrajectoryElement_xk.h:124
InDet::SiTrajectoryElement_xk::numberClusters
int numberClusters() const
Definition: SiTrajectoryElement_xk.cxx:2037
InDet::SiTrajectoryElement_xk::detstatus
const int & detstatus() const
Definition: SiTrajectoryElement_xk.h:48
InDet::SiTrajectoryElement_xk::setParametersB
void setParametersB(Trk::PatternTrackParameters &)
Definition: SiTrajectoryElement_xk.cxx:2143
InDet::SiTrajectoryElement_xk::npixelsB
const int & npixelsB() const
Definition: SiTrajectoryElement_xk.h:60
InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurface
Trk::TrackStates convertToSimpleTrackStateOnSurface(const EventContext &ctx)
Definition: SiTrajectory_xk.cxx:152
InDet::SiTrajectory_xk::nholes
const int & nholes() const
Definition: SiTrajectory_xk.h:62
InDet::SiTools_xk::isITkGeometry
const bool & isITkGeometry() const
Definition: SiTools_xk.h:73
InDet::SiTrajectoryElement_xk::parametersPB
const Trk::PatternTrackParameters & parametersPB() const
predicted
Definition: SiTrajectoryElement_xk.h:133
InDet::SiTrajectory_xk::difference
const int & difference() const
Definition: SiTrajectory_xk.h:71
InDet::SiTrajectoryElement_xk::quality
double quality(int &) const
Definition: SiTrajectoryElement_xk.cxx:1348
InDet::SiTrajectory_xk::m_nElements
int m_nElements
count active elements
Definition: SiTrajectory_xk.h:182
InDet::SiTrajectory_xk::setParameters
void setParameters()
Definition: SiTrajectory_xk.cxx:21
InDet::SiTrajectoryElement_xk::ForwardPropagationWithSearch
bool ForwardPropagationWithSearch(SiTrajectoryElement_xk &, const EventContext &)
Definition: SiTrajectoryElement_xk.cxx:428
InDet::SiTools_xk::useFastTracking
const bool & useFastTracking() const
Definition: SiTools_xk.h:72
Trk::TrackStates
DataVector< const Trk::TrackStateOnSurface > TrackStates
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:30
ActsTrk::DetectorType::Mm
@ Mm
Maybe not needed in the migration.
InDet::SiTrajectory_xk::m_elements
SiTrajectoryElement_xk m_elements[300]
Definition: SiTrajectory_xk.h:189
InDet::SiTrajectoryElement_xk::dholesB
const int & dholesB() const
Definition: SiTrajectoryElement_xk.h:57
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDet::SiTrajectoryElement_xk::clusterNoAdd
const InDet::SiCluster * clusterNoAdd() const
Definition: SiTrajectoryElement_xk.h:75
InDet::SiTrajectory_xk::m_nclustersNoAdd
int m_nclustersNoAdd
Number of clusters on trajectory.
Definition: SiTrajectory_xk.h:175
z
#define z
InDet::SiTrajectoryElement_xk::bremNoiseModel
void bremNoiseModel()
Definition: SiTrajectoryElement_xk.cxx:2334
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
InDet::SiTrajectoryElement_xk::trackStateOnSurface
Trk::TrackStateOnSurface * trackStateOnSurface(bool, bool, bool, int)
Definition: SiTrajectoryElement_xk.cxx:902
InDet::SiTrajectoryElement_xk::globalPosition
Amg::Vector3D globalPosition()
Definition: SiTrajectoryElement_xk.cxx:1282
extractSporadic.h
list h
Definition: extractSporadic.py:97
mc.order
order
Configure Herwig7.
Definition: mc.Herwig7_Dijet.py:12
InDet::SiTrajectory_xk::convertToTrackStateOnSurfaceWithNewDirection
Trk::TrackStates convertToTrackStateOnSurfaceWithNewDirection()
Definition: SiTrajectory_xk.cxx:103
python.getCurrentFolderTag.dn
dn
Definition: getCurrentFolderTag.py:64
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDet::SiTools_xk::maxholes
const int & maxholes() const
Definition: SiTools_xk.h:63
Trk::PatternTrackParameters::cotTheta
double cotTheta() const
CalibCoolCompareRT.up
up
Definition: CalibCoolCompareRT.py:109
InDet::PatternHoleSearchOutcome::nSCTDoubleHoles
int nSCTDoubleHoles
Definition: SiTrajectory_xk.h:36
InDet::SiTrajectoryElement_xk::BackwardPropagationPrecise
bool BackwardPropagationPrecise(SiTrajectoryElement_xk &, const EventContext &ctx)
Definition: SiTrajectoryElement_xk.cxx:720
InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceForDisTrackTrigger
Trk::TrackStates convertToSimpleTrackStateOnSurfaceForDisTrackTrigger(const EventContext &ctx)
Definition: SiTrajectory_xk.cxx:245
InDet::SiTrajectory_xk::m_dholes
int m_dholes
Definition: SiTrajectory_xk.h:180
InDet::SiTrajectory_xk::m_difference
int m_difference
Definition: SiTrajectory_xk.h:176
InDet::SiTrajectoryElement_xk::detElement
const InDetDD::SiDetectorElement * detElement() const
Definition: SiTrajectoryElement_xk.h:72
InDet::SiTrajectoryElement_xk::ndist
const int & ndist() const
number of crossed without hit - dead + holes
Definition: SiTrajectoryElement_xk.h:51
InDet::SiTrajectoryElement_xk::parametersPF
const Trk::PatternTrackParameters & parametersPF() const
track parameters for forward filter / smoother predicted
Definition: SiTrajectoryElement_xk.h:129
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
Trk::BoundaryCheckResult::Outside
@ Outside
with the insensitive area of an active element
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
MuonR4::SegmentFit::ParamDefs::x0
@ x0
InDet::SiTrajectory_xk::m_firstElement
int m_firstElement
Definition: SiTrajectory_xk.h:170
InDet::PatternHoleSearchOutcome::nSCTHoles
int nSCTHoles
Definition: SiTrajectory_xk.h:35
InDet::PatternHoleSearchOutcome::nPixelHoles
int nPixelHoles
Definition: SiTrajectory_xk.h:34
InDet::SiTrajectory_xk::ndf
const int & ndf() const
Definition: SiTrajectory_xk.h:67
InDet::SiTools_xk::bremNoise
const bool & bremNoise() const
Definition: SiTools_xk.h:69
InDet::SiTrajectoryElement_xk::nclustersB
const int & nclustersB() const
Definition: SiTrajectoryElement_xk.h:59
SCT
Definition: SCT_ChipUtils.h:14
InDet::SiTrajectoryElement_xk::dholesF
const int & dholesF() const
Definition: SiTrajectoryElement_xk.h:56
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
InDet::SiTrajectoryElement_xk::BackwardPropagationSmoother
bool BackwardPropagationSmoother(SiTrajectoryElement_xk &, bool, const EventContext &ctx)
Definition: SiTrajectoryElement_xk.cxx:622
InDetDD::SiDetectorElement::isPixel
bool isPixel() const
Trk::PrepRawData
Definition: PrepRawData.h:62
InDet::SiTrajectoryElement_xk::CloseClusterSeach
void CloseClusterSeach(Trk::PatternTrackParameters &Tpa, const InDet::SiDetElementBoundaryLink_xk *&dl, const T &sb, const T &se)
T = InDet::SiClusterCollection::const_iterator or InDet::PixelClusterCollection::const_iterator or In...
keylayer_zslicemap.isPix
isPix
Definition: keylayer_zslicemap.py:127
InDet::SiTrajectory_xk::m_surfacedead
std::unique_ptr< const Trk::Surface > m_surfacedead
Definition: SiTrajectory_xk.h:193
InDet::PatternHoleSearchOutcome
Helper struct for hole search results from the pattern recognition.
Definition: SiTrajectory_xk.h:33
InDet::SiTrajectoryElement_xk::tsos
Trk::TrackStateOnSurface * tsos(int i)
Definition: SiTrajectoryElement_xk.cxx:2318
MuonR4::SegmentFit::ParamDefs::y0
@ y0
InDet::SiTrajectoryElement_xk::cluster
const InDet::SiCluster * cluster() const
Definition: SiTrajectoryElement_xk.h:73
InDet::SiTrajectory_xk::m_itos
int m_itos[100]
Definition: SiTrajectory_xk.h:188
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
Trk::IPatternParametersUpdator::combineStates
virtual bool combineStates(PatternTrackParameters &, PatternTrackParameters &, PatternTrackParameters &) const =0
combine two track states into a resulting state.
InDet::SiTrajectory_xk::m_tools
const InDet::SiTools_xk * m_tools
Trajectory elements on this trajectory.
Definition: SiTrajectory_xk.h:192
InDet::SiTrajectory_xk::m_ndfcut
int m_ndfcut
Definition: SiTrajectory_xk.h:184
InDet::SiTrajectory_xk::dholes
const int & dholes() const
Definition: SiTrajectory_xk.h:63
InDet::SiTrajectoryElement_xk::set
bool set(int st, const InDet::SiDetElementBoundaryLink_xk *&dl, const T &sb, const T &se, const InDet::SiCluster *si, const EventContext &ctx)
T = InDet::SiClusterCollection::const_iterator or InDet::PixelClusterCollection::const_iterator or In...
InDet::SiTrajectoryElement_xk::trackPerigeeStateOnSurface
Trk::TrackStateOnSurface * trackPerigeeStateOnSurface(const EventContext &ctx)
Definition: SiTrajectoryElement_xk.cxx:1042
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
InDet::SiTrajectoryElement_xk::parametersUF
const Trk::PatternTrackParameters & parametersUF() const
updated
Definition: SiTrajectoryElement_xk.h:131
InDet::SiTrajectory_xk::m_nActiveElements
int m_nActiveElements
Definition: SiTrajectory_xk.h:181
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::SiTrajectoryElement_xk::difference
bool difference() const
check for a difference between forward and back propagation
Definition: SiTrajectoryElement_xk.cxx:2073
InDet::SiTrajectoryElement_xk::ForwardPropagationWithoutSearchPreciseWithCorrection
bool ForwardPropagationWithoutSearchPreciseWithCorrection(SiTrajectoryElement_xk &, const EventContext &)
Definition: SiTrajectoryElement_xk.cxx:370
InDet::SiTrajectory_xk::quality
double quality() const
Definition: SiTrajectory_xk.cxx:2118
InDet::PatternHoleSearchOutcome::passPatternHoleCut
bool passPatternHoleCut
Definition: SiTrajectory_xk.h:39
Trk::inside
@ inside
Definition: PropDirection.h:29
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
InDet::SiTrajectory_xk::nclusters
const int & nclusters() const
Definition: SiTrajectory_xk.h:66
InDet::SiTrajectory_xk::convertToSimpleTrackStateOnSurfaceWithNewDirection
Trk::TrackStates convertToSimpleTrackStateOnSurfaceWithNewDirection()
Definition: SiTrajectory_xk.cxx:198
InDet::SiTrajectoryElement_xk::addNextClusterF
bool addNextClusterF()
Definition: SiTrajectoryElement_xk.cxx:783
CalibCoolCompareRT.nm
nm
Definition: CalibCoolCompareRT.py:110
h
InDet::SiTools_xk::updatorTool
const Trk::IPatternParametersUpdator * updatorTool() const
Definition: SiTools_xk.h:50
InDet::SiTrajectoryElement_xk::xi2F
const double & xi2F() const
Definition: SiTrajectoryElement_xk.h:121
Trk::PlaneSurface
Definition: PlaneSurface.h:64
InDet::SiTrajectory_xk::m_ntos
int m_ntos
Definition: SiTrajectory_xk.h:186
TRT_PAI_physicsConstants::mb
const double mb
1mb to cm2
Definition: TRT_PAI_physicsConstants.h:15
Trk::PatternTrackParameters
Definition: PatternTrackParameters.h:32
re
const boost::regex re(r_e)
F
#define F(x, y, z)
Definition: MD5.cxx:112
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
python.changerun.pv
pv
Definition: changerun.py:81
S2
struct TBPatternUnitContext S2
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
InDet::SiTrajectoryElement_xk::nclustersF
const int & nclustersF() const
Definition: SiTrajectoryElement_xk.h:58
LArCellBinning.step
step
Definition: LArCellBinning.py:158
extractSporadic.q
list q
Definition: extractSporadic.py:98
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
InDetDD::SiDetectorElement::isSCT
bool isSCT() const
InDet::SiTrajectoryElement_xk::status
const int & status() const
Definition: SiTrajectoryElement_xk.h:62
merge.status
status
Definition: merge.py:17
InDet::SiTools_xk::xi2max
const double & xi2max() const
Definition: SiTools_xk.h:57
Trk::PatternTrackParameters::position
Amg::Vector3D position() const
Definition: PatternTrackParameters.cxx:79
I
#define I(x, y, z)
Definition: MD5.cxx:116
Trk::BoundaryCheckResult::Error
@ Error
within the nominally active area of a dead element
Trk::PatternTrackParameters::momentum
Amg::Vector3D momentum() const
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
InDet::SiTrajectoryElement_xk::trackParameters
std::unique_ptr< Trk::TrackParameters > trackParameters(bool, int)
Definition: SiTrajectoryElement_xk.cxx:1071
hotSpotInTAG.nb
nb
Definition: hotSpotInTAG.py:164
InDet::SiTrajectoryElement_xk::linkF
const InDet::SiClusterLink_xk & linkF(int i) const
Definition: SiTrajectoryElement_xk.h:145
H5Utils::internal::PT
H5::PredType PT
Definition: H5Traits.cxx:15
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
InDet::SCT_ClusterCollection
Trk::PrepRawDataCollection< SCT_Cluster > SCT_ClusterCollection
Definition: SCT_ClusterCollection.h:26
InDet::SiTools_xk::pTmin
const double & pTmin() const
Definition: SiTools_xk.h:62
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
InDet::SiTrajectory_xk::m_patternHoleOutcome
PatternHoleSearchOutcome m_patternHoleOutcome
Definition: SiTrajectory_xk.h:194
InDet::SiTrajectory_xk::m_nHolesBefore
int m_nHolesBefore
Definition: SiTrajectory_xk.h:177
python.compressB64.c
def c
Definition: compressB64.py:93
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
python.TriggerAPI.TriggerAPISession.df
df
Definition: TriggerAPISession.py:432
InDet::SiTrajectoryElement_xk::setClusterB
void setClusterB(const InDet::SiCluster *, double)
Definition: SiTrajectoryElement_xk.cxx:2135
InDet::SiTrajectory_xk::setTools
void setTools(const InDet::SiTools_xk *)
Definition: SiTrajectory_xk.cxx:15
InDet::SiCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:40
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83
InDet::PixelClusterCollection
Trk::PrepRawDataCollection< PixelCluster > PixelClusterCollection
Definition: PixelClusterCollection.h:26
InDet::SiTools_xk::maxdholes
const int & maxdholes() const
Definition: SiTools_xk.h:64
python.SystemOfUnits.rad
int rad
Definition: SystemOfUnits.py:111
InDet::SiTrajectory_xk::m_elementsMap
int m_elementsMap[300]
Definition: SiTrajectory_xk.h:183
Trk::BoundaryCheckResult::OnEdge
@ OnEdge
within the sensitive area of an active element
InDet::SiTrajectoryElement_xk::ForwardPropagationWithoutSearch
bool ForwardPropagationWithoutSearch(SiTrajectoryElement_xk &, const EventContext &)
Definition: SiTrajectoryElement_xk.cxx:280