| 327 | |
| 328 | |
| 329 | void CexmcRunManager::SaveProject( void ) |
| 330 | { |
| 331 | if ( ! ProjectIsSaved() ) |
| 332 | return; |
| 333 | |
| 334 | /* save run data */ |
| 335 | if ( ! physicsManager ) |
| 336 | throw CexmcException( CexmcWeirdException ); |
| 337 | |
| 338 | CexmcSimpleDecayTableStore etaDecayTable( |
| 339 | G4Eta::Definition()->GetDecayTable() ); |
| 340 | const CexmcPrimaryGeneratorAction * primaryGeneratorAction( |
| 341 | static_cast< const CexmcPrimaryGeneratorAction * >( |
| 342 | userPrimaryGeneratorAction ) ); |
| 343 | CexmcPrimaryGeneratorAction * thePrimaryGeneratorAction( |
| 344 | const_cast< CexmcPrimaryGeneratorAction * >( |
| 345 | primaryGeneratorAction ) ); |
| 346 | CexmcParticleGun * particleGun( |
| 347 | thePrimaryGeneratorAction->GetParticleGun() ); |
| 348 | |
| 349 | G4DigiManager * digiManager( G4DigiManager::GetDMpointer() ); |
| 350 | CexmcEnergyDepositDigitizer * edDigitizer( |
| 351 | static_cast< CexmcEnergyDepositDigitizer * >( |
| 352 | digiManager->FindDigitizerModule( CexmcEDDigitizerName ) ) ); |
| 353 | if ( ! edDigitizer ) |
| 354 | throw CexmcException( CexmcWeirdException ); |
| 355 | |
| 356 | const CexmcEventAction * eventAction( |
| 357 | static_cast< const CexmcEventAction * >( userEventAction ) ); |
| 358 | CexmcEventAction * theEventAction( const_cast< CexmcEventAction * >( |
| 359 | eventAction ) ); |
| 360 | CexmcChargeExchangeReconstructor * reconstructor( |
| 361 | theEventAction->GetReconstructor() ); |
| 362 | |
| 363 | std::vector< G4double > calorimeterRegCuts( 4 ); |
| 364 | if ( ProjectIsRead() ) |
| 365 | { |
| 366 | calorimeterRegCuts = sObject.calorimeterRegCuts; |
| 367 | } |
| 368 | else |
| 369 | { |
| 370 | G4Region * region( G4RegionStore::GetInstance()->GetRegion( |
| 371 | CexmcCalorimeterRegionName ) ); |
| 372 | if ( ! region ) |
| 373 | throw CexmcException( CexmcCalorimeterRegionNotInitialized ); |
| 374 | |
| 375 | calorimeterRegCuts = region->GetProductionCuts()->GetProductionCuts(); |
| 376 | } |
| 377 | |
| 378 | CexmcNmbOfHitsInRanges nmbOfHitsSampled; |
| 379 | CexmcNmbOfHitsInRanges nmbOfHitsSampledFull; |
| 380 | CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRealRange; |
| 381 | CexmcNmbOfHitsInRanges nmbOfHitsTriggeredRecRange; |
| 382 | CexmcNmbOfHitsInRanges nmbOfOrphanHits; |
| 383 | G4int nmbOfFalseHitsTriggeredEDT( 0 ); |
| 384 | G4int nmbOfFalseHitsTriggeredRec( 0 ); |
| 385 | G4int nmbOfSavedEvents( 0 ); |
| 386 | G4int nmbOfSavedFastEvents( 0 ); |
no test coverage detected