ATLAS Offline Software
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 
8 namespace 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();
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
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:32
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
calibdata.modified
bool modified
Definition: calibdata.py:673
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
lumiFormat.i
int i
Definition: lumiFormat.py:92
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9