LDMX Software
TrackersTrackingGeometry.h
1#ifndef TRACKING_RECO_TRACKERSTRACKINGGEOMETRY_H_
2#define TRACKING_RECO_TRACKERSTRACKINGGEOMETRY_H_
3
4// Acts
5
6// geometry
7#include <Acts/Geometry/TrackingGeometry.hpp>
8
9#include "Acts/Geometry/CuboidVolumeBuilder.hpp"
10#include "Acts/Geometry/GeometryContext.hpp"
11#include "Acts/Geometry/TrackingGeometryBuilder.hpp"
12#include "Acts/Geometry/TrackingVolume.hpp"
13#include "Acts/Surfaces/RectangleBounds.hpp"
14
15// Material
16#include "Acts/Material/HomogeneousSurfaceMaterial.hpp"
17#include "Acts/Material/Material.hpp"
18#include "Acts/Material/MaterialSlab.hpp"
19
21#include <Acts/Visualization/GeometryView3D.hpp>
22#include <Acts/Visualization/ObjVisualization3D.hpp>
23#include <Acts/Visualization/ViewConfig.hpp>
24
25// G4
26#include <G4GDMLParser.hh>
27#include <G4LogicalVolume.hh>
28#include <G4Material.hh>
29#include <G4Polyhedra.hh>
30#include <G4Types.hh>
31#include <G4VPhysicalVolume.hh>
32
33// Tracking
34#include <boost/filesystem.hpp>
35#include <string>
36
37#include "Tracking/geo/TrackingGeometry.h"
38
39namespace tracking::geo {
40
44class TrackersTrackingGeometryProvider;
45
47 public:
48 static const std::string NAME;
49 void buildTaggerLayoutMap(G4VPhysicalVolume* pvol, std::string surfacename);
50
51 void buildRecoilLayoutMap(G4VPhysicalVolume* pvol, std::string surfacename);
52
53 // Provided a physical volume, extract a silicon rectangular plane surface
54 std::shared_ptr<Acts::PlaneSurface> getSurfacePtr(G4VPhysicalVolume* pvol,
55 Acts::Transform3 ref_trans);
56
57 Acts::CuboidVolumeBuilder::VolumeConfig buildVolumeConfig(
58 const G4VPhysicalVolume* detector,
59 const std::map<std::string,
60 std::vector<std::shared_ptr<const Acts::Surface>>>
61 layout,
62 double tracker_y_length, double tracker_z_length,
63 const std::string& volumeName);
64
65 // TODO Implement these
66 Acts::CuboidVolumeBuilder::VolumeConfig buildTSVolume() { return {}; }
67 Acts::CuboidVolumeBuilder::VolumeConfig buildTargetVolume() { return {}; }
68
69 private:
71 TrackersTrackingGeometry(const Acts::GeometryContext& gctx,
72 const std::string& gdml, double tracker_y_length,
73 double tracker_z_length);
74
75 G4VPhysicalVolume* tagger_;
76 G4VPhysicalVolume* recoil_;
77
78 // I store the layout as a map to distinguish layers/sides
79 // They are not too many modules, so it should be ok to use this data
80 // structure
81
82 // Tracker mapping.
83 // Each key represent the layer index and each entry is the vector of
84 // surfaces that one wants to add to the same layer In this way we can pass
85 // multiple surfaces to the same layer to the builder.
86 std::map<std::string, std::vector<std::shared_ptr<const Acts::Surface>>>
87 tagger_layout_;
88 std::map<std::string, std::vector<std::shared_ptr<const Acts::Surface>>>
89 recoil_layout_;
90
91 private:
92 enableLogging("TrackersTrackingGeometry")
93};
94
95} // namespace tracking::geo
96
97#endif
This class is a abstract base class (ABC) doing common tasks that tracking geometries need done.
Visualization.