ATLAS Offline Software
Loading...
Searching...
No Matches
EventPrimitives.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// EventPrimitives.h, (c) ATLAS Detector software
8
9#ifndef EVENT_EVENTPRIMITIVES_H
10#define EVENT_EVENTPRIMITIVES_H
11
12// Define plugins to extend Eigen classes.
13// Note that these definitions are also provided on the command line
14// (via the EventPrimitives CMakeFiles.txt) so that things will work
15// properly even if Eigen/Core is included before this.
16#define EIGEN_MATRIXBASE_PLUGIN "EventPrimitives/AmgMatrixBasePlugin.h"
17#define EIGEN_TRANSFORM_PLUGIN "EventPrimitives/AmgTransformPlugin.h"
18
19
20#include <Eigen/Core>
21#include <Eigen/Dense>
22
23// These are the typedefs from Eigen to AMG ( Atlas Math and Geometry )
24// some of those can be refined when switching to C++11
25// @author: Eigen
26// @responsible: Andreas.Salzburger -at- cern.ch
27
28namespace Amg {
29
31using MatrixX = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>;
32using SymMatrixX = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>;
34using VectorX = Eigen::Matrix<double, Eigen::Dynamic, 1>;
35
39template <int MaxRows, int MaxCols>
41 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxRows, MaxCols>;
42
43template <int MaxDim>
45 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxDim, MaxDim>;
46
47template <int MaxRows>
48using VectorMaxX = Eigen::Matrix<double, Eigen::Dynamic, 1, 0, MaxRows, 1>;
49
51#ifndef AmgMatrixDef
52#define AmgMatrixDef
53#define AmgMatrix(rows, cols) Eigen::Matrix<double, rows, cols, 0, rows, cols>
54#define AmgSymMatrix(dim) Eigen::Matrix<double, dim, dim, 0, dim, dim>
55#endif
56
57#ifndef AmgVectorDef
58#define AmgVectorDef
59#define AmgVector(rows) Eigen::Matrix<double, rows, 1, 0, rows, 1>
60#define AmgRowVector(cols) Eigen::Matrix<double, 1, cols, Eigen::RowMajor, 1, cols>
61#endif
62
63} // namespace Amg
64
65#endif /* EVENT_EVENTPRIMITIVES_H */
Definition of ATLAS Math & Geometry primitives (Amg).
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, MaxRows, 1 > VectorMaxX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxRows, MaxCols > MatrixMaxX
Fixed capacity dynamic size types.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxDim, MaxDim > SymMatrixMaxX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > SymMatrixX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.