LDMX Software
|
This class is a abstract base class (ABC) doing common tasks that tracking geometries need done. More...
#include <TrackingGeometry.h>
Public Member Functions | |
TrackingGeometry (const std::string &name, const Acts::GeometryContext &gctx, const std::string &gdml, bool debug) | |
virtual | ~TrackingGeometry ()=default |
Destructor. | |
G4VPhysicalVolume * | findDaughterByName (G4VPhysicalVolume *pvol, G4String name) |
void | getAllDaughters (G4VPhysicalVolume *pvol) |
void | ConvertG4Rot (const G4RotationMatrix *g4rot, Acts::RotationMatrix3 &rot) const |
Acts::Vector3 | ConvertG4Pos (const G4ThreeVector &g4pos) const |
void | dumpGeometry (const std::string &outputDir, const Acts::GeometryContext &gctx) const |
std::shared_ptr< const Acts::TrackingGeometry > | getTG () const |
Acts::Transform3 | GetTransform (const G4VPhysicalVolume &phex, bool toTrackingFrame=false) const |
Acts::Transform3 | toTracker (const Acts::Transform3 &trans) const |
void | makeLayerSurfacesMap () |
void | getSurfaces (std::vector< const Acts::Surface * > &surfaces) const |
const Acts::Surface * | getSurface (int layerid) const |
Public Member Functions inherited from framework::ConditionsObject | |
ConditionsObject (const std::string &name) | |
Class constructor. | |
virtual | ~ConditionsObject () |
Destructor. | |
std::string | getName () const |
Get the name of this object. | |
Static Public Member Functions | |
static bool | compareZlocation (const G4VPhysicalVolume &pvol_a, const G4VPhysicalVolume &pvol_b) |
Public Attributes | |
std::unordered_map< unsigned int, const Acts::Surface * > | layer_surface_map_ |
std::vector< std::shared_ptr< DetectorElement > > | detElements |
Protected Attributes | |
const Acts::GeometryContext & | gctx_ |
std::string | gdml_ {""} |
bool | debug_ {false} |
Acts::RotationMatrix3 | x_rot_ |
Acts::RotationMatrix3 | y_rot_ |
std::shared_ptr< const Acts::TrackingGeometry > | tGeometry_ {nullptr} |
G4VPhysicalVolume * | fWorldPhysVol_ {nullptr} |
This class is a abstract base class (ABC) doing common tasks that tracking geometries need done.
Right now, in LDMX, there are two (or three) distinct tracking geometries: The tagger tracker, the recoil tracker, and the ECal. Sometimes the tagger and recoil are combined into a single tracker geometry but the ECal is always distinct.
While this class inherits from ConditionsObject, it should never have a provider. Only the concrete derived classes should have providers.
Definition at line 49 of file TrackingGeometry.h.
tracking::geo::TrackingGeometry::TrackingGeometry | ( | const std::string & | name, |
const Acts::GeometryContext & | gctx, | ||
const std::string & | gdml, | ||
bool | debug | ||
) |
[in] | name | the name of this geometry condition object |
[in] | gctx | the geometry context for this geometry |
[in] | gdml | the path to the detector GDML to load |
[in] | debug | whether to print extra information or nah |
We are about to use the G4GDMLParser and would like to silence the output from parsing the geometry. This can only be done by redirecting G4cout and G4cerr via the G4UImanager.
The Simulator (if it is running) will already do this redirection for us and we don't want to override it, so we check if there is a simulation running by seeing if the run manager is created. If it isn't, then we redirect G4cout and G4cerr to a G4Session that just throws away all those messages.
Definition at line 25 of file TrackingGeometry.cxx.
|
inlinestatic |
Definition at line 66 of file TrackingGeometry.h.
Acts::Vector3 tracking::geo::TrackingGeometry::ConvertG4Pos | ( | const G4ThreeVector & | g4pos | ) | const |
Definition at line 249 of file TrackingGeometry.cxx.
void tracking::geo::TrackingGeometry::ConvertG4Rot | ( | const G4RotationMatrix * | g4rot, |
Acts::RotationMatrix3 & | rot | ||
) | const |
Definition at line 225 of file TrackingGeometry.cxx.
void tracking::geo::TrackingGeometry::dumpGeometry | ( | const std::string & | outputDir, |
const Acts::GeometryContext & | gctx | ||
) | const |
Definition at line 147 of file TrackingGeometry.cxx.
G4VPhysicalVolume * tracking::geo::TrackingGeometry::findDaughterByName | ( | G4VPhysicalVolume * | pvol, |
G4String | name | ||
) |
Definition at line 97 of file TrackingGeometry.cxx.
void tracking::geo::TrackingGeometry::getAllDaughters | ( | G4VPhysicalVolume * | pvol | ) |
Definition at line 110 of file TrackingGeometry.cxx.
|
inline |
Definition at line 94 of file TrackingGeometry.h.
void tracking::geo::TrackingGeometry::getSurfaces | ( | std::vector< const Acts::Surface * > & | surfaces | ) | const |
Definition at line 261 of file TrackingGeometry.cxx.
|
inline |
Definition at line 78 of file TrackingGeometry.h.
Acts::Transform3 tracking::geo::TrackingGeometry::GetTransform | ( | const G4VPhysicalVolume & | phex, |
bool | toTrackingFrame = false |
||
) | const |
Definition at line 185 of file TrackingGeometry.cxx.
void tracking::geo::TrackingGeometry::makeLayerSurfacesMap | ( | ) |
Definition at line 284 of file TrackingGeometry.cxx.
Acts::Transform3 tracking::geo::TrackingGeometry::toTracker | ( | const Acts::Transform3 & | trans | ) | const |
Definition at line 210 of file TrackingGeometry.cxx.
|
protected |
Definition at line 110 of file TrackingGeometry.h.
std::vector<std::shared_ptr<DetectorElement> > tracking::geo::TrackingGeometry::detElements |
Definition at line 102 of file TrackingGeometry.h.
|
protected |
Definition at line 114 of file TrackingGeometry.h.
|
protected |
Definition at line 107 of file TrackingGeometry.h.
|
protected |
Definition at line 109 of file TrackingGeometry.h.
std::unordered_map<unsigned int, const Acts::Surface*> tracking::geo::TrackingGeometry::layer_surface_map_ |
Definition at line 98 of file TrackingGeometry.h.
|
protected |
Definition at line 113 of file TrackingGeometry.h.
|
protected |
Definition at line 112 of file TrackingGeometry.h.
|
protected |
Definition at line 112 of file TrackingGeometry.h.