19 #include "G4ProcessManager.hh"
20 #include "G4RunManager.hh"
21 #include "G4EventManager.hh"
22 #include "G4hMultipleScattering.hh"
23 #include "G4hIonisation.hh"
24 #include "G4hBremsstrahlung.hh"
25 #include "G4hPairProduction.hh"
28 #include <G4VPhysicsConstructor.hh>
38 #include "G4Version.hh"
39 #if G4VERSION_NUMBER > 1029
40 #define PARTICLEITERATOR (this->GetParticleIterator())
41 #elif G4VERSION_NUMBER > 1009
42 #define PARTICLEITERATOR aParticleIterator
44 #define PARTICLEITERATOR theParticleIterator
51 const std::string& nam,
const IInterface*
parent )
56 f.open(
"quirks_setup.txt");
88 return StatusCode::SUCCESS;
92 return std::make_unique<QuirksPhysicsTool::PhysicsConstructor>(
93 name(), this->msgLevel(), m_mass, m_charge, m_pdgid, m_stringForce,
94 m_firstStringLength, m_maxBoost, m_maxMergeT, m_maxMergeMag);
131 G4ProcessManager* pmanager =
particle->GetProcessManager();
136 while (pmanager->GetProcessListLength() != 0) pmanager->RemoveProcess(0);
138 pmanager->AddProcess(aTransportation);
139 pmanager->SetProcessOrderingToFirst(aTransportation, idxAlongStep);
140 pmanager->SetProcessOrderingToFirst(aTransportation, idxPostStep);
141 pmanager->AddProcess(
new G4hMultipleScattering,-1, 1, 1);
142 pmanager->AddProcess(
new G4hIonisation, -1, 2, 2);
143 pmanager->AddProcess(
new G4hBremsstrahlung, -1, 3, 3);
144 pmanager->AddProcess(
new G4hPairProduction, -1, 4, 4);
153 G4RunManager* runManager = G4RunManager::GetRunManager();
154 runManager->SetNumberOfAdditionalWaitingStacks(1);
155 G4UserStackingAction* defaultStackingAction = G4EventManager::GetEventManager()->GetUserStackingAction();
156 ATH_MSG_WARNING(
"This tool is interfering with the normal G4Atlas workflow, by forcing a differentcustom StackingAction instead of the default one. This is acceptable only as a temporary solution, and should be fixed asap.");