LDMX Software
AuxInfoReader.h
1
2#ifndef SIMCORE_GEO_AUXINFOREADER_H
3#define SIMCORE_GEO_AUXINFOREADER_H
4
5//---< Geant4 >---//
6#include "G4GDMLParser.hh"
7
8//---< DetDescr >---//
10
11//---< Framework >---//
12#include "Framework/Configure/Parameters.h"
13#include "Framework/Logger.h"
14
15namespace simcore::geo {
16
29 public:
35 AuxInfoReader(G4GDMLParser *parser, const framework::config::Parameters &ps);
36
40 virtual ~AuxInfoReader();
41
45 void readGlobalAuxInfo();
46
51
57
58 private:
64 void createMagneticField(const G4String &name,
65 const G4GDMLAuxListType *auxInfoList);
66
72 void createRegion(const G4String &name, const G4GDMLAuxListType *auxInfoList);
73
78 void selectColorMode(const G4String &mode);
79
85 void createVisAttributes(const G4String &name,
86 const G4GDMLAuxListType *auxInfoList);
87
93 void createDetectorHeader(const G4String &detectorVersion,
94 const G4GDMLAuxListType *auxInfoList);
95
96 private:
100 G4GDMLParser *parser_;
101
105 G4GDMLEvaluator *eval_;
106
111
115 std::string color_mode_;
116 std::vector<std::string> universal_visattributes_;
117
121 enableLogging("AuxInfoReader")
122};
123
124} // namespace simcore::geo
125
126#endif
Class that defines a header with detector information.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
Defines detector header information.
Reads auxiliary information from GDML userinfo block.
void createDetectorHeader(const G4String &detectorVersion, const G4GDMLAuxListType *auxInfoList)
Create the detector header from the global auxinfo.
ldmx::DetectorHeader * getDetectorHeader()
Get the detector header that was created from the userinfo block.
virtual ~AuxInfoReader()
Class destructor.
void assignAuxInfoToVolumes()
Assign auxiliary info to volumes such as sensitive detectors.
void readGlobalAuxInfo()
Read the global auxiliary information from the auxinfo block.
AuxInfoReader(G4GDMLParser *parser, const framework::config::Parameters &ps)
Class constructor.
void createVisAttributes(const G4String &name, const G4GDMLAuxListType *auxInfoList)
Create visualization attributes from GDML data.
std::string color_mode_
Color mode for visattributes.
G4GDMLEvaluator * eval_
The GDML expression evaluator.
G4GDMLParser * parser_
The GDML parser.
ldmx::DetectorHeader * detector_header_
Detector header with name and version.
void createMagneticField(const G4String &name, const G4GDMLAuxListType *auxInfoList)
Create a magnetic field from GDML data.
void createRegion(const G4String &name, const G4GDMLAuxListType *auxInfoList)
Create a detector region from GDML data.
void selectColorMode(const G4String &mode)
Select the 'mode' for coloring in the visualization.