ATLAS Offline Software
ObjHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // This file was largely imported from the Acts testing framework
6 
7 #pragma once
8 
9 #include <fstream>
10 #include <vector>
11 #include "Acts/Definitions/Algebra.hpp"
12 
13 
14 namespace ObjHelper {
15 
17  struct VtnCounter
18  {
19  unsigned int vcounter = 0;
20  unsigned int vtcounter = 0;
21  unsigned int ncounter = 0;
22  };
23 
28  void
29  writeVTN(std::ofstream& stream,
30  VtnCounter& vtnCounter,
31  double scalor,
32  const Acts::Vector3& vertex,
33  const std::string& vtntype = "v",
34  bool point = false);
35 
38  void
39  constructVerticalFaces(std::ofstream& stream,
40  unsigned int start,
41  const std::vector<unsigned int>& vsides);
42 
50  void
51  writePlanarFace(std::ofstream& stream,
52  VtnCounter& vtnCounter,
53  double scalor,
54  const std::vector<Acts::Vector3>& vertices,
55  double thickness = 0.,
56  const std::vector<unsigned int>& vsides = {});
57 
61  void
62  writeTube(std::ofstream& stream,
63  VtnCounter& vtnCounter,
64  double scalor,
65  unsigned int nSegments,
66  const Acts::Transform3& transform,
67  double r,
68  double hZ,
69  double thickness = 0.);
70 
71 } // enf of namespace
72 
beamspotman.r
def r
Definition: beamspotman.py:676
ObjHelper::VtnCounter::vcounter
unsigned int vcounter
Definition: ObjHelper.h:19
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
ObjHelper::writePlanarFace
void writePlanarFace(std::ofstream &stream, VtnCounter &vtnCounter, double scalor, const std::vector< Acts::Vector3 > &vertices, double thickness=0., const std::vector< unsigned int > &vsides={})
This will write a planar face.
Definition: ObjHelper.cxx:69
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
ObjHelper::writeTube
void writeTube(std::ofstream &stream, VtnCounter &vtnCounter, double scalor, unsigned int nSegments, const Acts::Transform3 &transform, double r, double hZ, double thickness=0.)
This will write a cylindrical object.
Definition: ObjHelper.cxx:114
ObjHelper::VtnCounter::vtcounter
unsigned int vtcounter
Definition: ObjHelper.h:20
ObjHelper::VtnCounter::ncounter
unsigned int ncounter
Definition: ObjHelper.h:21
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
ObjHelper
Definition: ObjHelper.h:14
ObjHelper::VtnCounter
This is the counter struct for keeping track of the vertices.
Definition: ObjHelper.h:18
ObjHelper::constructVerticalFaces
void constructVerticalFaces(std::ofstream &stream, unsigned int start, const std::vector< unsigned int > &vsides)
construct vertical faces this takes a range and constructs faces
Definition: ObjHelper.cxx:42
ObjHelper::writeVTN
void writeVTN(std::ofstream &stream, VtnCounter &vtnCounter, double scalor, const Acts::Vector3 &vertex, const std::string &vtntype="v", bool point=false)
This will write a vertex to the fstream.
Definition: ObjHelper.cxx:12