#include <G4FastSimulationManager.hh>
Definition at line 83 of file G4FastSimulationManager.hh.
Definition at line 53 of file G4FastSimulationManager.cc.
55 fFastTrack(anEnvelope,IsUnique),fTriggedFastSimulationModel(0),
56 fLastCrossedParticle(0)
64 AddFastSimulationManager(
this);
static G4GlobalFastSimulationManager * GetGlobalFastSimulationManager()
void SetFastSimulationManager(G4FastSimulationManager *fsm)
G4FastSimulationManager::~G4FastSimulationManager |
( |
| ) |
|
Definition at line 70 of file G4FastSimulationManager.cc.
80 RemoveFastSimulationManager(
this);
static G4GlobalFastSimulationManager * GetGlobalFastSimulationManager()
void ClearFastSimulationManager()
G4FastSimulationManager * GetFastSimulationManager() const
G4Envelope * GetEnvelope() const
G4bool G4FastSimulationManager::ActivateFastSimulationModel |
( |
const G4String & |
aName | ) |
|
Definition at line 88 of file G4FastSimulationManager.cc.
93 for (iModel=0; iModel<ModelList.size(); iModel++)
94 if(ModelList[iModel]->GetName() == aName)
99 for (iModel=0; iModel<fInactivatedModels.size(); iModel++)
100 if(fInactivatedModels[iModel]->GetName() == aName) {
102 push_back (fInactivatedModels.
removeAt(iModel));
104 fLastCrossedParticle=0;
G4bool G4FastSimulationManager::AtRestGetFastSimulationManagerTrigger |
( |
const G4Track & |
track, |
|
|
const G4Navigator * |
a = 0 |
|
) |
| |
Definition at line 249 of file G4FastSimulationManager.cc.
257 fApplicableModelList.clear();
259 if(ModelList.size()==0)
return false;
260 for (iModel=0; iModel<ModelList.size(); iModel++)
261 if(ModelList[iModel]->IsApplicable(*(track.
GetDefinition())))
262 fApplicableModelList.push_back (ModelList[iModel]);
266 if(fApplicableModelList.size()==0)
return false;
276 for (iModel=0; iModel < fApplicableModelList.size(); iModel++)
277 if(fApplicableModelList[iModel]->AtRestModelTrigger(fFastTrack))
280 fTriggedFastSimulationModel=fApplicableModelList[iModel];
G4ParticleDefinition * GetDefinition() const
void Initialize(const G4FastTrack &)
void SetCurrentTrack(const G4Track &, const G4Navigator *a=0)
const G4Envelope * G4FastSimulationManager::GetEnvelope |
( |
| ) |
const |
|
inline |
Definition at line 127 of file G4FastSimulationManager.cc.
132 for (
size_t iModel=0; iModel<ModelList.size(); iModel++)
134 if(ModelList[iModel]->GetName() == modelName)
136 if (previousFound == 0)
138 model = ModelList[iModel];
143 if (ModelList[iModel] == previousFound)
145 foundPrevious =
true;
150 model = ModelList[iModel];
const XML_Char XML_Content * model
G4bool G4FastSimulationManager::InActivateFastSimulationModel |
( |
const G4String & |
aName | ) |
|
Definition at line 111 of file G4FastSimulationManager.cc.
115 for (
size_t iModel=0; iModel<ModelList.size(); iModel++)
116 if(ModelList[iModel]->GetName() == aName) {
118 push_back (ModelList.
removeAt(iModel));
120 fLastCrossedParticle=0;
Definition at line 238 of file G4FastSimulationManager.cc.
241 fTriggedFastSimulationModel->
DoIt(fFastTrack,fFastStep);
virtual void DoIt(const G4FastTrack &, G4FastStep &)=0
void G4FastSimulationManager::ListModels |
( |
| ) |
const |
Definition at line 307 of file G4FastSimulationManager.cc.
311 G4cout <<
"Current Models for the ";
315 for (iModel=0; iModel<ModelList.size(); iModel++)
316 G4cout <<
" " << ModelList[iModel]->GetName() <<
"\n";
318 for (iModel=0; iModel<fInactivatedModels.size(); iModel++)
319 G4cout <<
" " << fInactivatedModels[iModel]->GetName()
320 <<
"(inactivated)\n";
G4GLOB_DLL std::ostream G4cout
Definition at line 378 of file G4FastSimulationManager.cc.
384 for ( iModel=0; iModel<ModelList.size(); iModel++ )
385 if ( ModelList[iModel]->IsApplicable(*particleDefinition) )
390 << ModelList[iModel]->GetName()
393 for (
auto jModel = iModel + 1; jModel < ModelList.size(); jModel++ )
394 if ( ModelList[jModel]->IsApplicable(*particleDefinition) ) unique =
false;
398 for ( iModel=0; iModel<fInactivatedModels.size(); iModel++ )
399 if( fInactivatedModels[iModel]->IsApplicable(*particleDefinition) )
404 << fInactivatedModels[iModel]->GetName()
405 <<
" (inactivated)." <<
G4endl;
411 ed <<
"Two or more active Models are available for the same particle type, in the same envelope/region." <<
G4endl;
412 G4Exception(
"G4FastSimulationManager::ListModels(const G4ParticleDefinition* particleDefinition) const",
415 "Models risk to exclude each other.");
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void G4FastSimulationManager::ListModels |
( |
const G4String & |
aName | ) |
const |
Definition at line 323 of file G4FastSimulationManager.cc.
330 for ( iModel=0; iModel<ModelList.size(); iModel++ )
331 if( ModelList[iModel]->GetName() == modelName || modelName ==
"all" )
335 G4cout <<
"In the envelope ";
339 G4cout <<
" the model " << ModelList[iModel]->GetName()
340 <<
" is applicable for :\n ";
342 G4int list_started=0;
343 for (
G4int iParticle = 0; iParticle<theParticleTable->
entries(); iParticle++)
344 if( ModelList[iModel] -> IsApplicable( *(theParticleTable->
GetParticle(iParticle))) )
346 if(list_started++)
G4cout <<
", ";
347 G4cout << theParticleTable->
354 for (iModel=0; iModel<fInactivatedModels.size(); iModel++)
355 if(fInactivatedModels[iModel]->GetName() == modelName || modelName ==
"all" )
359 G4cout <<
"In the envelope ";
363 G4cout <<
" the model " << fInactivatedModels[iModel]->GetName()
364 <<
" (inactivated) is applicable for :\n ";
366 G4int list_started=0;
367 for (
G4int iParticle=0; iParticle<theParticleTable->
entries(); iParticle++ )
368 if( fInactivatedModels[iModel] -> IsApplicable( *(theParticleTable->
GetParticle(iParticle))) )
370 if(list_started++)
G4cout <<
", ";
371 G4cout << theParticleTable->
const G4String & GetParticleName(G4int index) const
G4ParticleDefinition * GetParticle(G4int index) const
G4GLOB_DLL std::ostream G4cout
static G4ParticleTable * GetParticleTable()
void G4FastSimulationManager::ListTitle |
( |
| ) |
const |
Definition at line 297 of file G4FastSimulationManager.cc.
302 else G4cout <<
" (// geom.)";
const G4String & GetName() const
G4Navigator * GetNavigatorForTracking() const
G4VPhysicalVolume * GetWorldPhysical() const
G4GLOB_DLL std::ostream G4cout
static G4TransportationManager * GetTransportationManager()
G4VPhysicalVolume * GetWorldVolume() const
G4Envelope * GetEnvelope() const
G4bool G4FastSimulationManager::PostStepGetFastSimulationManagerTrigger |
( |
const G4Track & |
track, |
|
|
const G4Navigator * |
a = 0 |
|
) |
| |
Definition at line 184 of file G4FastSimulationManager.cc.
192 fApplicableModelList.clear();
194 if(ModelList.size()==0)
return false;
195 for (iModel=0; iModel<ModelList.size(); iModel++)
196 if(ModelList[iModel]->IsApplicable(*(track.
GetDefinition())))
197 fApplicableModelList.push_back (ModelList[iModel]);
201 if(fApplicableModelList.size()==0)
return false;
211 for (iModel=0; iModel<fApplicableModelList.size(); iModel++)
217 if(fApplicableModelList[iModel]->ModelTrigger(fFastTrack)) {
228 fTriggedFastSimulationModel=fApplicableModelList[iModel];
G4ParticleDefinition * GetDefinition() const
G4bool OnTheBoundaryButExiting() const
void Initialize(const G4FastTrack &)
void SetCurrentTrack(const G4Track &, const G4Navigator *a=0)
The documentation for this class was generated from the following files: