72 G4bool validateGDMLFile_ ) :
73 world( 0 ), gdmlFile( gdmlFile_ ), validateGDMLFile( validateGDMLFile_ ),
74 calorimeterRegionInitialized(
false ),
75 calorimeterGeometryDataInitialized(
false ), monitorVolume( NULL ),
76 vetoCounterVolume( NULL ), calorimeterVolume( NULL ), targetVolume( NULL ),
77 rightVetoCounter( NULL ), rightCalorimeter( NULL )
104 dynamic_cast< const CexmcPhysicsManager * >(
107 if ( ! physicsManager )
111 const_cast< CexmcPhysicsManager * >( physicsManager ) );
124 for ( std::vector< G4LogicalVolume * >::const_iterator
125 lvIter( lvs->begin() ); lvIter != lvs->end(); ++lvIter )
132 for ( G4GDMLAuxListType::const_iterator pair( auxInfo.begin() );
133 pair != auxInfo.end(); ++pair )
136 G4String detectorName(
"uninitialized" );
139 if ( pair->type ==
"EnergyDepositDetector" )
143 if ( pair->value ==
"MonitorRole" )
151 if ( pair->value ==
"VetoCounterRole" )
160 if ( pair->value ==
"CalorimeterRole" )
172 detectorName <<
"' in volume '" << volumeName <<
176 if ( pair->type ==
"TrackPointsDetector" )
180 if ( pair->value ==
"MonitorRole" )
188 if ( pair->value ==
"VetoCounterRole" )
197 if ( pair->value ==
"CalorimeterRole" )
206 if ( pair->value ==
"TargetRole" )
217 detectorName <<
"' in volume '" << volumeName <<
227 if ( pair->type ==
"SensitiveRegion" )
231 if ( pair->value ==
"CalorimeterRegion" )
248 GetUserPhysicsList() );
250 defaultProductionCut =
261 "volume '" << volumeName <<
"' registered" <<
265 if ( pair->type ==
"SpecialVolume" )
269 if ( pair->value ==
"Monitor" )
275 if ( pair->value ==
"VetoCounter" )
281 if ( pair->value ==
"Calorimeter" )
289 if ( pair->value ==
"Target" )
305 if ( ! detector[ curDetectorRole ] )
307 detector[ curDetectorRole ] =
318 ( *lvIter )->SetSensitiveDetector(
319 detector[ curDetectorRole ] );
349 rotation = gdmlParser.
GetRotation(
"CalorimeterLeftRot" );
356 rotation = gdmlParser.
GetRotation(
"CalorimeterRightRot" );
379 if ( pVolume->IsReplicated() )
381 pVolume->GetReplicationData( axis,
383 width, offset, consuming );
386 lVolume = pVolume->GetLogicalVolume();
396 if ( pVolume->IsReplicated() )
399 width, offset, consuming );
402 lVolume = pVolume->GetLogicalVolume();
407 G4Box * crystalBox( dynamic_cast< G4Box * >( lVolume->
GetSolid() ) );
426 row =
G4int( ( src.
y() + crystalHeight * nCrystalsInColumn / 2 ) /
428 column =
G4int( ( src.
x() + crystalWidth * nCrystalsInRow / 2 ) /
432 crystalWidth + crystalWidth / 2 );
435 crystalHeight + crystalHeight / 2 );
436 dst.
setX( src.
x() - xInCalorimeterOffset );
437 dst.
setY( src.
y() - yInCalorimeterOffset );
445 for ( std::vector< G4VPhysicalVolume * >::const_iterator
k( pvs->begin() );
446 k != pvs->end(); ++
k )
460 if ( ( *k )->GetName().contains(
"Right" ) )
466 if ( ( *k )->GetName().contains(
"Right" ) )
481 detectorRole =
value;