62 int main(
int argc,
char **argv)
65 G4cout <<
"Usage: gdml_det <intput_gdml_file:mandatory>"
71 G4cout <<
"Error! Mandatory input file is not specified!" <<
G4endl;
97 G4String trackerChamberSDname =
"Tracker";
106 std::cout <<
"Found " << auxmap->size()
107 <<
" volume(s) with auxiliary information."
109 for(G4GDMLAuxMapType::const_iterator iter=auxmap->begin();
110 iter!=auxmap->end(); iter++)
112 G4cout <<
"Volume " << ((*iter).first)->GetName()
113 <<
" has the following list of auxiliary information: "
115 for (G4GDMLAuxListType::const_iterator vit=(*iter).second.begin();
116 vit!=(*iter).second.end(); vit++)
118 std::cout <<
"--> Type: " << (*vit).type
119 <<
" Value: " << (*vit).value << std::endl;
127 for(G4GDMLAuxMapType::const_iterator iter=auxmap->begin();
128 iter!=auxmap->end(); iter++)
130 G4cout <<
"Volume " << ((*iter).first)->GetName()
131 <<
" has the following list of auxiliary information: "
133 for (G4GDMLAuxListType::const_iterator vit=(*iter).second.begin();
134 vit!=(*iter).second.end();vit++)
136 if ((*vit).type==
"SensDet")
138 G4cout <<
"Attaching sensitive detector " << (*vit).value
139 <<
" to volume " << ((*iter).first)->GetName()
150 G4cout << (*vit).value <<
" detector not found" <<
G4endl;
167 G4String command =
"/control/execute ";
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
G4VPhysicalVolume * GetWorldVolume(const G4String &setupName="Default") const
Definition of the G04DetectorConstruction class.
Detector construction for laoding GDML geometry.
Physics list for the GDML senstive detector example.
int main(int argc, char **argv)
Definition of the G04PhysicsList class.
static G4UImanager * GetUIpointer()
G4GLOB_DLL std::ostream G4cout
Definition of the G04SensitiveDetector class.
Primary generator action for GDML sensitive detector example.
Definition of the G04PrimaryGeneratorAction class.
G4VSensitiveDetector * FindSensitiveDetector(G4String dName, G4bool warning=true)
void AddNewDetector(G4VSensitiveDetector *aSD)
const G4GDMLAuxMapType * GetAuxMap() const
static G4SDManager * GetSDMpointer()
void Read(const G4String &filename, G4bool Validate=true)
virtual void Initialize()
std::map< G4LogicalVolume *, G4GDMLAuxListType > G4GDMLAuxMapType
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
Sensitive detector to be attached to the GDML geometry.
G4int ApplyCommand(const char *aCommand)
virtual void SetUserAction(G4UserRunAction *userAction)