Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-17 07:58:31

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <iostream>
0012 
0013 namespace Acts {
0014 
0015 ///  @enum BoundarySurfaceFace
0016 ///
0017 ///  Enum to describe the position of the BoundarySurface
0018 ///  respectively to the frame orientatin of the volume,
0019 ///  this is mainly meant for code readability.
0020 ///
0021 ///  The different numeration sequences can be found in the
0022 ///  documentation of the actual VolumeBounds implementations.
0023 ///
0024 ///  The order of faces is chosen to follow - as much as
0025 ///  possible - a circular structure.
0026 enum BoundarySurfaceFace {
0027   negativeFaceXY = 0,
0028   positiveFaceXY = 1,
0029   negativeFaceYZ = 2,
0030   positiveFaceYZ = 3,
0031   negativeFaceZX = 4,
0032   positiveFaceZX = 5,
0033   cylinderCover = 2,
0034   tubeInnerCover = 3,
0035   tubeOuterCover = 2,
0036   tubeSectorNegativePhi = 4,
0037   tubeSectorPositivePhi = 5,
0038   tubeSectorInnerCover = 3,
0039   tubeSectorOuterCover = 2,
0040   trapezoidFaceAlpha = 2,
0041   trapezoidFaceBeta = 3,
0042   index0 = 0,
0043   index1 = 1,
0044   index2 = 2,
0045   index3 = 3,
0046   index4 = 4,
0047   index5 = 5,
0048   index6 = 6,
0049   index7 = 7,
0050   index8 = 8,
0051   index9 = 9,
0052   index10 = 10,
0053   index11 = 11,
0054   undefinedFace = 99
0055 
0056 };
0057 
0058 /// Stream operator for BoundarySurfaceFace
0059 /// @param os Output stream
0060 /// @param face BoundarySurfaceFace to output
0061 /// @return Reference to output stream
0062 inline std::ostream& operator<<(std::ostream& os, BoundarySurfaceFace& face) {
0063   os << "BoundarySurfaceFace::";
0064 
0065   switch (face) {
0066     case negativeFaceXY:
0067       os << "negativeFaceXY";
0068       break;
0069     case positiveFaceXY:
0070       os << "positiveFaceXY";
0071       break;
0072     case negativeFaceYZ:
0073       os << "negativeFaceYZ|cylinderCover|tubeOuterCover|tubeSectorOuterCover|"
0074             "trapezoidFaceAlpha";
0075       break;
0076     case positiveFaceYZ:
0077       os << "positiveFaceYZ|tubeInnerCover|tubeSectorInnerCover|"
0078             "trapezoidFaceBeta";
0079       break;
0080     case negativeFaceZX:
0081       os << "negativeFaceZX|tubeSectorNegativePhi";
0082       break;
0083     case positiveFaceZX:
0084       os << "positiveFaceZX|tubeSectorPositivePhi";
0085       break;
0086     case undefinedFace:
0087       os << "undefinedFace";
0088       break;
0089     default:
0090       os << face;
0091   }
0092 
0093   return os;
0094 }
0095 }  // namespace Acts