ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ObjHelper.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ObjHelper.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 #include <fstream>
12 #include <vector>
13 
15 
16 namespace FW {
17 
18 namespace Obj {
19 
21 struct VtnCounter {
22  unsigned int vcounter = 0;
23  unsigned int vtcounter = 0;
24  unsigned int ncounter = 0;
25 };
26 
31 void writeVTN(std::ofstream& stream, VtnCounter& vtnCounter, double scalor,
32  const Acts::Vector3D& vertex, const std::string& vtntype = "v",
33  bool point = false);
34 
37 void constructVerticalFaces(std::ofstream& stream, unsigned int start,
38  const std::vector<unsigned int>& vsides);
39 
47 void writePlanarFace(std::ofstream& stream, VtnCounter& vtnCounter,
48  double scalor, const std::vector<Acts::Vector3D>& vertices,
49  double thickness = 0.,
50  const std::vector<unsigned int>& vsides = {});
51 
55 void writeTube(std::ofstream& stream, VtnCounter& vtnCounter, double scalor,
56  unsigned int nSegments, const Acts::Transform3D& transform,
57  double r, double hZ, double thickness = 0.);
58 
69  const Acts::Vector3D& p1,
70  const Acts::Vector3D& p2,
71  const Acts::Vector3D& p3);
72 
73 } // namespace Obj
74 } // namespace FW