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";
107 G4cout <<
"Found " << auxmap->size()
108 <<
" volume(s) with auxiliary information."
110 for(G4GDMLAuxMapType::const_iterator iter=auxmap->begin();
111 iter!=auxmap->end(); iter++)
113 G4cout <<
"Volume " << ((*iter).first)->GetName()
114 <<
" has the following list of auxiliary information: "
116 for (G4GDMLAuxListType::const_iterator vit=(*iter).second.begin();
117 vit!=(*iter).second.end(); vit++)
119 G4cout <<
"--> Type: " << (*vit).type
120 <<
" Value: " << (*vit).value <<
G4endl;
128 for(G4GDMLAuxMapType::const_iterator iter=auxmap->begin();
129 iter!=auxmap->end(); iter++)
131 G4cout <<
"Volume " << ((*iter).first)->GetName()
132 <<
" has the following list of auxiliary information: "
134 for (G4GDMLAuxListType::const_iterator vit=(*iter).second.begin();
135 vit!=(*iter).second.end();vit++)
137 if ((*vit).type==
"SensDet")
139 G4cout <<
"Attaching sensitive detector " << (*vit).value
140 <<
" to volume " << ((*iter).first)->GetName()
152 G4cout << (*vit).value <<
" detector not found" <<
G4endl;
169 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.
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)
CommandLineParser * parser(0)
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)
int main(int argc, char **argv)
Sensitive detector to be attached to the GDML geometry.
G4int ApplyCommand(const char *aCommand)
virtual void SetUserAction(G4UserRunAction *userAction)