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/TrackingVolume.hpp"
12
13// Material
14
16#include <Acts/Visualization/GeometryView3D.hpp>
17
18// G4
19#include <G4VPhysicalVolume.hh>
20
21// Tracking
22#include <string>
23
24#include "Tracking/geo/TrackingGeometry.h"
25
26namespace tracking::geo {
27
31class TrackersTrackingGeometryProvider;
32
34 public:
35 static const std::string NAME;
36 void buildTaggerLayoutMap(G4VPhysicalVolume* pvol, std::string surfacename);
37
38 void buildRecoilLayoutMap(G4VPhysicalVolume* pvol, std::string surfacename);
39
40 // Provided a physical volume, extract a silicon rectangular plane surface
41 std::shared_ptr<Acts::PlaneSurface> getSurfacePtr(G4VPhysicalVolume* pvol,
42 Acts::Transform3 ref_trans);
43
44 Acts::CuboidVolumeBuilder::VolumeConfig buildVolumeConfig(
45 const G4VPhysicalVolume* detector,
46 const std::map<std::string,
47 std::vector<std::shared_ptr<const Acts::Surface>>>
48 layout,
49 double tracker_y_length, double tracker_z_length,
50 const std::string& volumeName);
51
52 // TODO Implement these
53 Acts::CuboidVolumeBuilder::VolumeConfig buildTSVolume() { return {}; }
54 Acts::CuboidVolumeBuilder::VolumeConfig buildTargetVolume() { return {}; }
55
56 private:
58 TrackersTrackingGeometry(const Acts::GeometryContext& gctx,
59 const std::string& gdml, double tracker_y_length,
60 double tracker_z_length);
61
62 G4VPhysicalVolume* tagger_{nullptr};
63 G4VPhysicalVolume* recoil_{nullptr};
64
65 // I store the layout as a map to distinguish layers/sides
66 // They are not too many modules, so it should be ok to use this data
67 // structure
68
69 // Tracker mapping.
70 // Each key represent the layer index and each entry is the vector of
71 // surfaces that one wants to add to the same layer In this way we can pass
72 // multiple surfaces to the same layer to the builder.
73 std::map<std::string, std::vector<std::shared_ptr<const Acts::Surface>>>
74 tagger_layout_;
75 std::map<std::string, std::vector<std::shared_ptr<const Acts::Surface>>>
76 recoil_layout_;
77
78 private:
79 enableLogging("TrackersTrackingGeometry")
80};
81
82} // namespace tracking::geo
83
84#endif
This class is a abstract base class (ABC) doing common tasks that tracking geometries need done.
Visualization.