4 // Author: I. Hrivnacova
6 // Class TG4PhysicsConstructorGeneral
7 // ------------------------------
8 // See the class description in the header file.
9 // According to ExN04IonPhysics.cc,v 1.1.2.1 2001/06/28 19:07:37 gunter Exp
10 // GEANT4 tag Name: geant4-03-02
12 #include "TG4PhysicsConstructorGeneral.h"
13 #include "TG4ProcessControlMap.h"
14 #include "TG4ProcessMCMap.h"
15 #include "TG4G3Control.h"
16 #include "TG4ExtDecayer.h"
17 #include "AliDecayer.h"
20 #include <G4ParticleDefinition.hh>
21 #include <G4ProcessManager.hh>
22 #include <G4ChargedGeantino.hh>
23 #include <G4Geantino.hh>
25 //_____________________________________________________________________________
26 TG4PhysicsConstructorGeneral::TG4PhysicsConstructorGeneral(const G4String& name)
27 : TG4VPhysicsConstructor(name) {
31 //_____________________________________________________________________________
32 TG4PhysicsConstructorGeneral::TG4PhysicsConstructorGeneral(
35 : TG4VPhysicsConstructor(name, verboseLevel) {
39 //_____________________________________________________________________________
40 TG4PhysicsConstructorGeneral::~TG4PhysicsConstructorGeneral() {
46 //_____________________________________________________________________________
47 void TG4PhysicsConstructorGeneral::ConstructParticle()
49 // Instantiates particles.
53 G4Geantino::GeantinoDefinition();
54 G4ChargedGeantino::ChargedGeantinoDefinition();
57 //_____________________________________________________________________________
58 void TG4PhysicsConstructorGeneral::ConstructProcess()
60 // Constructs electromagnetic processes for e+.
63 // Set external decayer
64 AliDecayer* aliDecayer = gMC->Decayer();
66 TG4ExtDecayer* tg4Decayer = new TG4ExtDecayer(aliDecayer);
67 // the tg4Decayer is deleted in G4Decay destructor
68 tg4Decayer->VerboseLevel(VerboseLevel());
69 fDecayProcess.SetExtDecayer(tg4Decayer);
71 if (VerboseLevel() > 0) {
72 G4cout << "### External decayer is set" << G4endl;
76 theParticleIterator->reset();
77 while( (*theParticleIterator)() ){
78 G4ParticleDefinition* particle = theParticleIterator->value();
79 G4ProcessManager* pmanager = particle->GetProcessManager();
80 if (fDecayProcess.IsApplicable(*particle)) {
81 pmanager ->AddProcess(&fDecayProcess);
82 // set ordering for PostStepDoIt and AtRestDoIt
83 pmanager ->SetProcessOrdering(&fDecayProcess, idxPostStep);
84 pmanager ->SetProcessOrdering(&fDecayProcess, idxAtRest);
89 TG4ProcessControlMap* processMap = TG4ProcessControlMap::Instance();
90 processMap->Add(&fDecayProcess, kDCAY);
92 if (VerboseLevel() > 0) {
93 G4cout << "### General physics constructed." << G4endl;