Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:27:43

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2018-2020 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Definitions/Algebra.hpp"
0012 
0013 #include <string>
0014 #include <vector>
0015 
0016 namespace Acts {
0017 
0018 struct TGeoPrimitivesHelper {
0019   /// Helper method to create a transform from
0020   /// Rotation matrix vectors:
0021   /// @param rotationMatrixCol0
0022   /// @param rotationMatrixCol1
0023   /// @param rotationMatrixCol2
0024   /// And translation
0025   /// @param translation
0026   static inline Transform3 makeTransform(
0027       const Eigen::Vector3d& rotationMatrixCol0,
0028       const Eigen::Vector3d& rotationMatrixCol1,
0029       const Eigen::Vector3d& rotationMatrixCol2,
0030       const Eigen::Vector3d& translation) {
0031     Transform3 trf;
0032     trf.matrix().block(0, 0, 3, 1) = rotationMatrixCol0;
0033     trf.matrix().block(0, 1, 3, 1) = rotationMatrixCol1;
0034     trf.matrix().block(0, 2, 3, 1) = rotationMatrixCol2;
0035     trf.matrix().block(0, 3, 3, 1) = translation;
0036     return trf;
0037   }
0038 
0039   /// Private helper method : match string with wildcards
0040   /// @param first is the one with the potential wildcard
0041   /// @param second is the test string
0042   static bool match(const char* first, const char* second);
0043 
0044   /// Private helper method : match string with wildcards
0045   /// Method that uses the match method with wild cards and
0046   /// performs it on an input list
0047   /// @param first is the one with the potential wildcard
0048   /// @param second is the test string
0049   static bool match(const std::vector<std::string>& first, const char* second);
0050 };
0051 }  // namespace Acts