ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/Utilities.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrkVxJetFitter_utilities_H
6#define TrkVxJetFitter_utilities_H
7
8namespace Trk {
9
10 namespace {
11 int numRow(int numVertex) {
12 return numVertex+5;
13 }
14
15 Amg::MatrixX deleteRowFromSymMatrix(const Amg::MatrixX & orig,unsigned int rowToDelete) {
16 unsigned int size=orig.rows();
17 Amg::MatrixX modified(size-1,size-1);
18 modified.setZero();
19 for (unsigned int i=0;i<size;i++) {
20 for (unsigned int j=0;j<size;j++) {
21 if (i<rowToDelete&&j<rowToDelete) {
22 modified(i,j)=orig(i,j);
23 } else if (i>rowToDelete&&j<rowToDelete) {
24 modified(i-1,j)=orig(i,j);
25 } else if (i<rowToDelete&&j>rowToDelete) {
26 modified(i,j-1)=orig(i,j);
27 } else if (i>rowToDelete&&j>rowToDelete) {
28 modified(i-1,j-1)=orig(i,j);
29 }
30 }
31 }
32 return modified;
33 }
34
35 Amg::VectorX deleteRowFromVector(const Amg::VectorX & orig,unsigned int rowToDelete) {
36 unsigned int size=orig.rows();
37 Amg::VectorX modified(size-1);modified.setZero();
38 for (unsigned int i=0;i<size;i++) {
39 if (i<rowToDelete) {
40 modified(i)=orig(i);
41 } else if (i>rowToDelete) {
42 modified(i-1)=orig(i);
43 }
44 }
45 return modified;
46 }
47 }
48}
49#endif
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
Ensure that the ATLAS eigen extensions are properly loaded.
bool modified
Definition calibdata.py:672