Geant4-11
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends
G4PhysicsListHelper Class Reference

#include <G4PhysicsListHelper.hh>

Public Member Functions

void AddTransportation ()
 
void CheckParticleList () const
 
void DumpOrdingParameterTable (G4int subType=-1) const
 
G4PhysicsListOrderingParameter GetOrdingParameter (G4int subType) const
 
G4int GetVerboseLevel () const
 
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
void SetVerboseLevel (G4int value)
 
void UseCoupledTransportation (G4bool vl=true)
 
void UseHighLooperThresholds ()
 
void UseLowLooperThresholds ()
 

Static Public Member Functions

static G4PhysicsListHelperGetPhysicsListHelper ()
 

Private Types

using G4OrdParamTable = std::vector< G4PhysicsListOrderingParameter >
 

Private Member Functions

 G4PhysicsListHelper ()
 
void ReadInDefaultOrderingParameter ()
 
void ReadOrdingParameterTable ()
 
 ~G4PhysicsListHelper ()
 

Private Attributes

G4ParticleTable::G4PTblDicIteratoraParticleIterator = nullptr
 
G4String ordParamFileName = ""
 
G4int sizeOfTable = 0
 
G4int theLooperThresholds = 1
 
G4ParticleTabletheParticleTable = nullptr
 
G4OrdParamTabletheTable = nullptr
 
G4VProcesstheTransportationProcess = nullptr
 
G4bool useCoupledTransportation = false
 
G4int verboseLevel = 1
 

Static Private Attributes

static G4ThreadLocal G4PhysicsListHelperpPLHelper = nullptr
 

Friends

class G4ThreadLocalSingleton< G4PhysicsListHelper >
 

Detailed Description

Definition at line 50 of file G4PhysicsListHelper.hh.

Member Typedef Documentation

◆ G4OrdParamTable

Definition at line 100 of file G4PhysicsListHelper.hh.

Constructor & Destructor Documentation

◆ G4PhysicsListHelper()

G4PhysicsListHelper::G4PhysicsListHelper ( )
private

Definition at line 60 of file G4PhysicsListHelper.cc.

61{
62 // pointer to the particle table
65
67
68#ifdef G4VERBOSE
69 if(verboseLevel > 1)
70 {
72 }
73#endif
74}
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
G4ParticleTable::G4PTblDicIterator * aParticleIterator
void DumpOrdingParameterTable(G4int subType=-1) const
G4ParticleTable * theParticleTable

References aParticleIterator, DumpOrdingParameterTable(), G4ParticleTable::GetIterator(), G4ParticleTable::GetParticleTable(), ReadOrdingParameterTable(), theParticleTable, and verboseLevel.

◆ ~G4PhysicsListHelper()

G4PhysicsListHelper::~G4PhysicsListHelper ( )
private

Definition at line 77 of file G4PhysicsListHelper.cc.

78{
79 if(theTable != nullptr)
80 {
81 theTable->clear();
82 delete theTable;
83 theTable = nullptr;
84 sizeOfTable = 0;
85 }
86}
G4OrdParamTable * theTable

References sizeOfTable, and theTable.

Member Function Documentation

◆ AddTransportation()

void G4PhysicsListHelper::AddTransportation ( )

Definition at line 221 of file G4PhysicsListHelper.cc.

222{
223 G4int verboseLevelTransport = 0;
224
225#ifdef G4VERBOSE
226 if(verboseLevel > 2)
227 {
228 G4cout << "G4PhysicsListHelper::AddTransportation() " << G4endl;
229 }
230#endif
231
232 G4int nParaWorld =
234
235 if(nParaWorld > 0 || useCoupledTransportation ||
237 {
238 auto coupledTransport = new G4CoupledTransportation(verboseLevelTransport);
239 if(theLooperThresholds == 0)
240 coupledTransport->SetLowLooperThresholds();
241 if(theLooperThresholds == 2)
242 coupledTransport->SetHighLooperThresholds();
243 theTransportationProcess = coupledTransport;
244
245 if(verboseLevel > 0)
246 {
247 G4cout << "--- G4CoupledTransportation is used " << G4endl;
248 }
249 }
250 else
251 {
252 auto simpleTransport = new G4Transportation(verboseLevelTransport);
253 if(theLooperThresholds == 0)
254 simpleTransport->SetLowLooperThresholds();
255 if(theLooperThresholds == 2)
256 simpleTransport->SetHighLooperThresholds();
257 theTransportationProcess = simpleTransport;
258 }
259
260 // loop over all particles in G4ParticleTable
262 while((*aParticleIterator)())
263 {
265 G4ProcessManager* pmanager = particle->GetProcessManager();
266 // Add transportation process for all particles
267 if(pmanager == 0)
268 {
269 // Error !! no process manager
270#ifdef G4VERBOSE
271 if(verboseLevel > 0)
272 {
273 G4cout << "G4PhysicsListHelper::AddTransportation "
274 << " : No Process Manager for " << particle->GetParticleName()
275 << G4endl;
276 }
277#endif
278 G4Exception("G4PhysicsListHelper::AddTransportation", "Run0104",
279 FatalException, "No process manager");
280 continue;
281 }
282 // Molecule use different type transportation
283 if(particle->GetParticleType() == "Molecule")
284 continue;
285
286 // add transportation with ordering = ( -1, "first", "first" )
290 }
291}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
@ idxPostStep
@ idxAlongStep
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleType() const
const G4String & GetParticleName() const
void reset(G4bool ifSkipIon=true)
G4VProcess * theTransportationProcess
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetProcessOrderingToFirst(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
static G4RunManagerKernel * GetRunManagerKernel()
G4int GetNumberOfParallelWorld() const
static G4ScoringManager * GetScoringManagerIfExist()

References G4ProcessManager::AddProcess(), aParticleIterator, FatalException, G4cout, G4endl, G4Exception(), G4RunManagerKernel::GetNumberOfParallelWorld(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleType(), G4ParticleDefinition::GetProcessManager(), G4RunManagerKernel::GetRunManagerKernel(), G4ScoringManager::GetScoringManagerIfExist(), idxAlongStep, idxPostStep, G4ParticleTableIterator< K, V >::reset(), G4ProcessManager::SetProcessOrderingToFirst(), theLooperThresholds, theTransportationProcess, useCoupledTransportation, G4ParticleTableIterator< K, V >::value(), and verboseLevel.

◆ CheckParticleList()

void G4PhysicsListHelper::CheckParticleList ( ) const

Definition at line 100 of file G4PhysicsListHelper.cc.

101{
102 G4bool isElectron = false;
103 G4bool isPositron = false;
104 G4bool isGamma = false;
105 G4bool isProton = false;
106 G4bool isGenericIon = false;
107 G4bool isAnyIon = false;
108 G4bool isAnyChargedBaryon = false;
109 G4bool isEmProc = false;
110
111 // loop over all particles in G4ParticleTable
113 while((*aParticleIterator)())
114 {
116 G4String name = particle->GetParticleName();
117 // check if any EM process exists
118 if(!isEmProc)
119 {
120 G4ProcessVector* list = particle->GetProcessManager()->GetProcessList();
121 for(std::size_t idx = 0; idx < list->size(); ++idx)
122 {
123 isEmProc = ((*list)[idx])->GetProcessType() == fElectromagnetic;
124 if(isEmProc)
125 break;
126 }
127 }
128
129 if(name == "e-")
130 isElectron = true;
131 else if(name == "e+")
132 isPositron = true;
133 else if(name == "gamma")
134 isGamma = true;
135 else if(name == "GenericIon")
136 isGenericIon = true;
137 else if(name == "proton")
138 isProton = true;
139 else if(particle->GetParticleType() == "nucleus")
140 isAnyIon = true;
141 else if(particle->GetParticleType() == "baryon")
142 {
143 if(particle->GetPDGCharge() != 0.0)
144 isAnyChargedBaryon = true;
145 }
146 }
147
148 if(!isEmProc)
149 return;
150
151 // RULE 1
152 // e+, e- and gamma should exist
153 // if one of them exist
154 G4bool isEmBasic = isElectron || isPositron || isGamma;
155 G4bool isMissingEmBasic = !isElectron || !isPositron || !isGamma;
156 if(isEmBasic && isMissingEmBasic)
157 {
158 G4String missingName = "";
159 if(!isElectron)
160 missingName += "e- ";
161 if(!isPositron)
162 missingName += "e+ ";
163 if(!isGamma)
164 missingName += "gamma ";
165
166#ifdef G4VERBOSE
167 if(verboseLevel > 0)
168 {
169 G4cout << "G4PhysicsListHelper::CheckParticleList: " << missingName
170 << " do not exist " << G4endl;
171 G4cout << " These particle are necessary for basic EM processes"
172 << G4endl;
173 }
174#endif
175 G4Exception("G4PhysicsListHelper::CheckParticleList", "Run0101",
176 FatalException, "Missing EM basic particle");
177 }
178
179 // RULE 2
180 // proton should exist
181 // if any other charged baryon exist
182 if(!isProton && isAnyChargedBaryon)
183 {
184 G4String missingName = "proton ";
185
186#ifdef G4VERBOSE
187 if(verboseLevel > 0)
188 {
189 G4cout << "G4PhysicsListHelper::CheckParticleList: " << missingName
190 << " does not exist " << G4endl;
191 G4cout << " Proton is necessary for EM baryon processes" << G4endl;
192 }
193#endif
194 missingName += " should be created ";
195 G4Exception("G4PhysicsListHelper::CheckParticleList", "Run0102",
196 FatalException, "Missing Proton");
197 }
198
199 // RULE 3
200 // GenericIonn should exist
201 // if any other ion exist
202 if(!isGenericIon && isAnyIon)
203 {
204 G4String missingName = "GenericIon ";
205
206#ifdef G4VERBOSE
207 if(verboseLevel > 0)
208 {
209 G4cout << "G4PhysicsListHelper::CheckParticleList: " << missingName
210 << " does not exist " << G4endl;
211 G4cout << " GenericIon should be created if any ion is necessary"
212 << G4endl;
213 }
214#endif
215 G4Exception("G4PhysicsListHelper::CheckParticleList", "Run0103",
216 FatalException, "Missing GenericIon");
217 }
218}
@ fElectromagnetic
bool G4bool
Definition: G4Types.hh:86
G4double GetPDGCharge() const
G4ProcessVector * GetProcessList() const
std::size_t size() const
G4bool isElectron(G4int ityp)
const char * name(G4int ptype)

References aParticleIterator, FatalException, fElectromagnetic, G4cout, G4endl, G4Exception(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleType(), G4ParticleDefinition::GetPDGCharge(), G4ProcessManager::GetProcessList(), G4ParticleDefinition::GetProcessManager(), G4InuclParticleNames::isElectron(), G4InuclParticleNames::name(), G4ParticleTableIterator< K, V >::reset(), G4ProcessVector::size(), G4ParticleTableIterator< K, V >::value(), and verboseLevel.

◆ DumpOrdingParameterTable()

void G4PhysicsListHelper::DumpOrdingParameterTable ( G4int  subType = -1) const

Definition at line 380 of file G4PhysicsListHelper.cc.

381{
382 if(theTable == nullptr)
383 {
384#ifdef G4VERBOSE
385 if(verboseLevel > 0)
386 {
387 G4cout << "G4PhysicsListHelper::DumpOrdingParameterTable "
388 << " No ordering parameter table : " << ordParamFileName
389 << G4endl;
390 }
391#endif
392 return;
393 }
394 G4cout << "G4PhysicsListHelper::DumpOrdingParameterTable : "
396 G4cout << " TypeName "
397 << " ProcessType"
398 << " SubType"
399 << " AtRest"
400 << " AlongStep"
401 << " PostStep"
402 << " Duplicable" << G4endl;
403 for(G4int i = 0; i < sizeOfTable; ++i)
404 {
406 if((subType >= 0) && (subType != tmp->processSubType))
407 continue;
408 G4cout << std::setw(18) << tmp->processTypeName << std::setw(15)
409 << tmp->processType << std::setw(15) << tmp->processSubType
410 << std::setw(15) << tmp->ordering[0] << std::setw(15)
411 << tmp->ordering[1] << std::setw(15) << tmp->ordering[2];
412 if(tmp->isDuplicable)
413 {
414 G4cout << " true";
415 }
416 else
417 {
418 G4cout << " false";
419 }
420 G4cout << G4endl;
421 }
422}

References G4cout, G4endl, G4PhysicsListOrderingParameter::isDuplicable, G4PhysicsListOrderingParameter::ordering, ordParamFileName, G4PhysicsListOrderingParameter::processSubType, G4PhysicsListOrderingParameter::processType, G4PhysicsListOrderingParameter::processTypeName, sizeOfTable, theTable, and verboseLevel.

Referenced by G4PhysicsListHelper(), and G4UserPhysicsListMessenger::SetNewValue().

◆ GetOrdingParameter()

G4PhysicsListOrderingParameter G4PhysicsListHelper::GetOrdingParameter ( G4int  subType) const

Definition at line 426 of file G4PhysicsListHelper.cc.

427{
429
430 if(theTable == nullptr)
431 {
432#ifdef G4VERBOSE
433 if(verboseLevel > 0)
434 {
435 G4cout << "G4PhysicsListHelper::GetOrderingParameter : "
436 << " No ordering parameter table : " << ordParamFileName
437 << G4endl;
438 }
439#endif
440 return value;
441 }
442
443 for(G4int i = 0; i < sizeOfTable; ++i)
444 {
446 if(subType == tmp->processSubType)
447 {
448 value.processTypeName = tmp->processTypeName;
449 value.processType = tmp->processType;
450 value.processSubType = tmp->processSubType;
451 value.ordering[0] = tmp->ordering[0];
452 value.ordering[1] = tmp->ordering[1];
453 value.ordering[2] = tmp->ordering[2];
454 value.isDuplicable = tmp->isDuplicable;
455 }
456 }
457 return value;
458}

References G4cout, G4endl, G4PhysicsListOrderingParameter::isDuplicable, G4PhysicsListOrderingParameter::ordering, ordParamFileName, G4PhysicsListOrderingParameter::processSubType, G4PhysicsListOrderingParameter::processType, G4PhysicsListOrderingParameter::processTypeName, sizeOfTable, theTable, and verboseLevel.

◆ GetPhysicsListHelper()

G4PhysicsListHelper * G4PhysicsListHelper::GetPhysicsListHelper ( )
static

Definition at line 89 of file G4PhysicsListHelper.cc.

90{
91 if(pPLHelper == nullptr)
92 {
94 pPLHelper = inst.Instance();
95 }
96 return pPLHelper;
97}
static G4ThreadLocal G4PhysicsListHelper * pPLHelper

References G4ThreadLocalSingleton< T >::Instance(), and pPLHelper.

Referenced by G4HadronicBuilder::BuildElastic(), G4HadronicBuilder::BuildFTFP_BERT(), G4HadronicBuilder::BuildFTFQGSP_BERT(), G4HadronicBuilder::BuildQGSP_FTFP_BERT(), G4EmBuilder::ConstructBasicEmPhysics(), G4EmBuilder::ConstructCharged(), G4EmBuilder::ConstructChargedSS(), G4EmExtraPhysics::ConstructGammaElectroNuclear(), G4EmDNAPhysics::ConstructGammaPositronProcesses(), G4EmBuilder::ConstructIonEmPhysics(), G4EmBuilder::ConstructIonEmPhysicsSS(), G4EmBuilder::ConstructLightHadrons(), G4EmBuilder::ConstructLightHadronsSS(), G4EmDNAChemistry::ConstructProcess(), G4EmDNAChemistry_option1::ConstructProcess(), G4EmDNAChemistry_option3::ConstructProcess(), G4EmDNAPhysics_option1::ConstructProcess(), G4EmDNAPhysics_option2::ConstructProcess(), G4EmDNAPhysics_option3::ConstructProcess(), G4EmDNAPhysics_option4::ConstructProcess(), G4EmDNAPhysics_option5::ConstructProcess(), G4EmDNAPhysics_option6::ConstructProcess(), G4EmDNAPhysics_option7::ConstructProcess(), G4EmDNAPhysics_option8::ConstructProcess(), G4EmDNAPhysics_stationary_option2::ConstructProcess(), G4EmDNAPhysics_stationary_option4::ConstructProcess(), G4EmDNAPhysics_stationary_option6::ConstructProcess(), G4EmExtraPhysics::ConstructProcess(), G4DecayPhysics::ConstructProcess(), G4MuonicAtomDecayPhysics::ConstructProcess(), G4RadioactiveDecayPhysics::ConstructProcess(), G4UnknownDecayPhysics::ConstructProcess(), G4EmDNAChemistry_option2::ConstructProcess(), G4EmDNAPhysics::ConstructProcess(), G4EmDNAPhysics_stationary::ConstructProcess(), G4EmDNAPhysicsActivator::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsGS::ConstructProcess(), G4EmStandardPhysicsSS::ConstructProcess(), G4EmStandardPhysicsWVI::ConstructProcess(), G4HadronDElasticPhysics::ConstructProcess(), G4HadronElasticPhysics::ConstructProcess(), G4HadronHElasticPhysics::ConstructProcess(), G4HadronInelasticQBBC::ConstructProcess(), G4HadronPhysicsFTFQGSP_BERT::ConstructProcess(), G4VUserPhysicsList::G4VUserPhysicsList(), G4VUPLData::initialize(), G4VPhysicsConstructor::RegisterProcess(), and G4UserPhysicsListMessenger::SetNewValue().

◆ GetVerboseLevel()

G4int G4PhysicsListHelper::GetVerboseLevel ( ) const
inline

Definition at line 131 of file G4PhysicsListHelper.hh.

132{
133 return verboseLevel;
134}

Referenced by G4MuonicAtomDecayPhysics::ConstructProcess().

◆ ReadInDefaultOrderingParameter()

void G4PhysicsListHelper::ReadInDefaultOrderingParameter ( )
private

Definition at line 630 of file G4PhysicsListHelper.cc.

631{
633
634 // NOTE: please use enum values, rather than numerical values,
635 // for both the processType and processSubType below.
636
637 tmp.processTypeName = "Transportation";
640 tmp.ordering[0] = -1;
641 tmp.ordering[1] = 0;
642 tmp.ordering[2] = 0;
643 tmp.isDuplicable = false;
644 theTable->push_back(tmp);
645 sizeOfTable += 1;
646
647 tmp.processTypeName = "CoupleTrans";
650 tmp.ordering[0] = -1;
651 tmp.ordering[1] = 0;
652 tmp.ordering[2] = 0;
653 tmp.isDuplicable = false;
654 theTable->push_back(tmp);
655 sizeOfTable += 1;
656
657 tmp.processTypeName = "CoulombScat";
660 tmp.ordering[0] = -1;
661 tmp.ordering[1] = -1;
662 tmp.ordering[2] = 1000;
663 tmp.isDuplicable = false;
664 theTable->push_back(tmp);
665 sizeOfTable += 1;
666
667 tmp.processTypeName = "Ionisation";
670 tmp.ordering[0] = -1;
671 tmp.ordering[1] = 2;
672 tmp.ordering[2] = 2;
673 tmp.isDuplicable = false;
674 theTable->push_back(tmp);
675 sizeOfTable += 1;
676
677 tmp.processTypeName = "Brems";
680 tmp.ordering[0] = -1;
681 tmp.ordering[1] = -1;
682 tmp.ordering[2] = 3;
683 tmp.isDuplicable = false;
684 theTable->push_back(tmp);
685 sizeOfTable += 1;
686
687 tmp.processTypeName = "PairProdCharged";
690 tmp.ordering[0] = -1;
691 tmp.ordering[1] = -1;
692 tmp.ordering[2] = 4;
693 tmp.isDuplicable = false;
694 theTable->push_back(tmp);
695 sizeOfTable += 1;
696
697 tmp.processTypeName = "Annih";
700 tmp.ordering[0] = 5;
701 tmp.ordering[1] = -1;
702 tmp.ordering[2] = 5;
703 tmp.isDuplicable = false;
704 theTable->push_back(tmp);
705 sizeOfTable += 1;
706
707 tmp.processTypeName = "AnnihToMuMu";
710 tmp.ordering[0] = -1;
711 tmp.ordering[1] = -1;
712 tmp.ordering[2] = 6;
713 tmp.isDuplicable = false;
714 theTable->push_back(tmp);
715 sizeOfTable += 1;
716
717 tmp.processTypeName = "AnnihToTauTau";
720 tmp.ordering[0] = -1;
721 tmp.ordering[1] = -1;
722 tmp.ordering[2] = 7;
723 tmp.isDuplicable = false;
724 theTable->push_back(tmp);
725 sizeOfTable += 1;
726
727 tmp.processTypeName = "AnnihToHad";
730 tmp.ordering[0] = -1;
731 tmp.ordering[1] = -1;
732 tmp.ordering[2] = 8;
733 tmp.isDuplicable = false;
734 theTable->push_back(tmp);
735 sizeOfTable += 1;
736
737 tmp.processTypeName = "NuclearStopp";
740 tmp.ordering[0] = -1;
741 tmp.ordering[1] = 9;
742 tmp.ordering[2] = -1;
743 tmp.isDuplicable = false;
744 theTable->push_back(tmp);
745 sizeOfTable += 1;
746
747 tmp.processTypeName = "ElectronSuper";
750 tmp.ordering[0] = -1;
751 tmp.ordering[1] = 1;
752 tmp.ordering[2] = 1;
753 tmp.isDuplicable = false;
754 theTable->push_back(tmp);
755 sizeOfTable += 1;
756
757 tmp.processTypeName = "Msc";
760 tmp.ordering[0] = -1;
761 tmp.ordering[1] = 1;
762 tmp.ordering[2] = -1;
763 tmp.isDuplicable = false;
764 theTable->push_back(tmp);
765 sizeOfTable += 1;
766
767 tmp.processTypeName = "Rayleigh";
770 tmp.ordering[0] = -1;
771 tmp.ordering[1] = -1;
772 tmp.ordering[2] = 1000;
773 tmp.isDuplicable = false;
774 theTable->push_back(tmp);
775 sizeOfTable += 1;
776
777 tmp.processTypeName = "PhotoElectric";
780 tmp.ordering[0] = -1;
781 tmp.ordering[1] = -1;
782 tmp.ordering[2] = 1000;
783 tmp.isDuplicable = false;
784 theTable->push_back(tmp);
785 sizeOfTable += 1;
786
787 tmp.processTypeName = "Compton";
790 tmp.ordering[0] = -1;
791 tmp.ordering[1] = -1;
792 tmp.ordering[2] = 1000;
793 tmp.isDuplicable = false;
794 theTable->push_back(tmp);
795 sizeOfTable += 1;
796
797 tmp.processTypeName = "Conv";
800 tmp.ordering[0] = -1;
801 tmp.ordering[1] = -1;
802 tmp.ordering[2] = 1000;
803 tmp.isDuplicable = false;
804 theTable->push_back(tmp);
805 sizeOfTable += 1;
806
807 tmp.processTypeName = "ConvToMuMu";
810 tmp.ordering[0] = -1;
811 tmp.ordering[1] = -1;
812 tmp.ordering[2] = 1000;
813 tmp.isDuplicable = false;
814 theTable->push_back(tmp);
815 sizeOfTable += 1;
816
817 tmp.processTypeName = "GammaSuper";
820 tmp.ordering[0] = -1;
821 tmp.ordering[1] = -1;
822 tmp.ordering[2] = 1000;
823 tmp.isDuplicable = false;
824 theTable->push_back(tmp);
825 sizeOfTable += 1;
826
827 tmp.processTypeName = "PositronSuper";
830 tmp.ordering[0] = 1;
831 tmp.ordering[1] = 1;
832 tmp.ordering[2] = 1;
833 tmp.isDuplicable = false;
834 theTable->push_back(tmp);
835 sizeOfTable += 1;
836
837 tmp.processTypeName = "Cerenkov";
840 tmp.ordering[0] = -1;
841 tmp.ordering[1] = -1;
842 tmp.ordering[2] = 1000;
843 tmp.isDuplicable = false;
844 theTable->push_back(tmp);
845 sizeOfTable += 1;
846
847 tmp.processTypeName = "Scintillation";
850 tmp.ordering[0] = 9999;
851 tmp.ordering[1] = -1;
852 tmp.ordering[2] = 9999;
853 tmp.isDuplicable = false;
854 theTable->push_back(tmp);
855 sizeOfTable += 1;
856
857 tmp.processTypeName = "SynchRad";
860 tmp.ordering[0] = -1;
861 tmp.ordering[1] = -1;
862 tmp.ordering[2] = 1000;
863 tmp.isDuplicable = false;
864 theTable->push_back(tmp);
865 sizeOfTable += 1;
866
867 tmp.processTypeName = "TransRad";
870 tmp.ordering[0] = -1;
871 tmp.ordering[1] = -1;
872 tmp.ordering[2] = 1000;
873 tmp.isDuplicable = false;
874 theTable->push_back(tmp);
875 sizeOfTable += 1;
876
877 tmp.processTypeName = "SurfaceRefl";
880 tmp.ordering[0] = -1;
881 tmp.ordering[1] = -1;
882 tmp.ordering[2] = 1000;
883 tmp.isDuplicable = false;
884 theTable->push_back(tmp);
885 sizeOfTable += 1;
886
887 tmp.processTypeName = "OpAbsorb";
888 tmp.processType = fOptical;
890 tmp.ordering[0] = -1;
891 tmp.ordering[1] = -1;
892 tmp.ordering[2] = 1000;
893 tmp.isDuplicable = false;
894 theTable->push_back(tmp);
895 sizeOfTable += 1;
896
897 tmp.processTypeName = "OpBoundary";
898 tmp.processType = fOptical;
900 tmp.ordering[0] = -1;
901 tmp.ordering[1] = -1;
902 tmp.ordering[2] = 1000;
903 tmp.isDuplicable = false;
904 theTable->push_back(tmp);
905 sizeOfTable += 1;
906
907 tmp.processTypeName = "OpRayleigh";
908 tmp.processType = fOptical;
910 tmp.ordering[0] = -1;
911 tmp.ordering[1] = -1;
912 tmp.ordering[2] = 1000;
913 tmp.isDuplicable = false;
914 theTable->push_back(tmp);
915 sizeOfTable += 1;
916
917 tmp.processTypeName = "OpWLS";
918 tmp.processType = fOptical;
920 tmp.ordering[0] = -1;
921 tmp.ordering[1] = -1;
922 tmp.ordering[2] = 1000;
923 tmp.isDuplicable = false;
924 theTable->push_back(tmp);
925 sizeOfTable += 1;
926
927 tmp.processTypeName = "OpMieHG";
928 tmp.processType = fOptical;
930 tmp.ordering[0] = -1;
931 tmp.ordering[1] = -1;
932 tmp.ordering[2] = 1000;
933 tmp.isDuplicable = false;
934 theTable->push_back(tmp);
935 sizeOfTable += 1;
936
937 tmp.processTypeName = "OpWLS2";
938 tmp.processType = fOptical;
940 tmp.ordering[0] = -1;
941 tmp.ordering[1] = -1;
942 tmp.ordering[2] = 1000;
943 tmp.isDuplicable = false;
944 theTable->push_back(tmp);
945 sizeOfTable += 1;
946
947 tmp.processTypeName = "DNAElastic";
950 tmp.ordering[0] = -1;
951 tmp.ordering[1] = -1;
952 tmp.ordering[2] = 1000;
953 tmp.isDuplicable = false;
954 theTable->push_back(tmp);
955 sizeOfTable += 1;
956
957 tmp.processTypeName = "DNAExcit";
960 tmp.ordering[0] = -1;
961 tmp.ordering[1] = -1;
962 tmp.ordering[2] = 1000;
963 tmp.isDuplicable = false;
964 theTable->push_back(tmp);
965 sizeOfTable += 1;
966
967 tmp.processTypeName = "DNAIonisation";
970 tmp.ordering[0] = -1;
971 tmp.ordering[1] = -1;
972 tmp.ordering[2] = 1000;
973 tmp.isDuplicable = false;
974 theTable->push_back(tmp);
975 sizeOfTable += 1;
976
977 tmp.processTypeName = "DNAVibExcit";
980 tmp.ordering[0] = -1;
981 tmp.ordering[1] = -1;
982 tmp.ordering[2] = 1000;
983 tmp.isDuplicable = false;
984 theTable->push_back(tmp);
985 sizeOfTable += 1;
986
987 tmp.processTypeName = "DNAAttachment";
990 tmp.ordering[0] = -1;
991 tmp.ordering[1] = -1;
992 tmp.ordering[2] = 1000;
993 tmp.isDuplicable = false;
994 theTable->push_back(tmp);
995 sizeOfTable += 1;
996
997 tmp.processTypeName = "DNAChargeDec";
1000 tmp.ordering[0] = -1;
1001 tmp.ordering[1] = -1;
1002 tmp.ordering[2] = 1000;
1003 tmp.isDuplicable = false;
1004 theTable->push_back(tmp);
1005 sizeOfTable += 1;
1006
1007 tmp.processTypeName = "DNAChargeInc";
1010 tmp.ordering[0] = -1;
1011 tmp.ordering[1] = -1;
1012 tmp.ordering[2] = 1000;
1013 tmp.isDuplicable = false;
1014 theTable->push_back(tmp);
1015 sizeOfTable += 1;
1016
1017 tmp.processTypeName = "DNAElecSolv";
1020 tmp.ordering[0] = -1;
1021 tmp.ordering[1] = -1;
1022 tmp.ordering[2] = 1000;
1023 tmp.isDuplicable = false;
1024 theTable->push_back(tmp);
1025 sizeOfTable += 1;
1026
1027 tmp.processTypeName = "DNAMolecDecay";
1028 tmp.processType = fDecay;
1030 tmp.ordering[0] = 1000;
1031 tmp.ordering[1] = -1;
1032 tmp.ordering[2] = -1;
1033 tmp.isDuplicable = false;
1034 theTable->push_back(tmp);
1035 sizeOfTable += 1;
1036
1037 tmp.processTypeName = "ITTransport";
1040 tmp.ordering[0] = -1;
1041 tmp.ordering[1] = 0;
1042 tmp.ordering[2] = 0;
1043 tmp.isDuplicable = false;
1044 theTable->push_back(tmp);
1045 sizeOfTable += 1;
1046
1047 tmp.processTypeName = "DNABrownTrans";
1050 tmp.ordering[0] = -1;
1051 tmp.ordering[1] = 0;
1052 tmp.ordering[2] = 0;
1053 tmp.isDuplicable = false;
1054 theTable->push_back(tmp);
1055 sizeOfTable += 1;
1056
1057 tmp.processTypeName = "DNADoubleIoni";
1060 tmp.ordering[0] = -1;
1061 tmp.ordering[1] = -1;
1062 tmp.ordering[2] = 1000;
1063 tmp.isDuplicable = false;
1064 theTable->push_back(tmp);
1065 sizeOfTable += 1;
1066
1067 tmp.processTypeName = "DNADoubleCap";
1070 tmp.ordering[0] = -1;
1071 tmp.ordering[1] = -1;
1072 tmp.ordering[2] = 1000;
1073 tmp.isDuplicable = false;
1074 theTable->push_back(tmp);
1075 sizeOfTable += 1;
1076
1077 tmp.processTypeName = "DNAIoniTransfer";
1080 tmp.ordering[0] = -1;
1081 tmp.ordering[1] = -1;
1082 tmp.ordering[2] = 1000;
1083 tmp.isDuplicable = false;
1084 theTable->push_back(tmp);
1085 sizeOfTable += 1;
1086
1087 tmp.processTypeName = "DNAStaticMol";
1090 tmp.ordering[0] = -1;
1091 tmp.ordering[1] = -1;
1092 tmp.ordering[2] = 1000;
1093 tmp.isDuplicable = false;
1094 theTable->push_back(tmp);
1095 sizeOfTable +=1;
1096
1097 tmp.processTypeName = "HadElastic";
1098 tmp.processType = fHadronic;
1100 tmp.ordering[0] = -1;
1101 tmp.ordering[1] = -1;
1102 tmp.ordering[2] = 1000;
1103 tmp.isDuplicable = false;
1104 theTable->push_back(tmp);
1105 sizeOfTable += 1;
1106
1107 tmp.processTypeName = "HadInelastic";
1108 tmp.processType = fHadronic;
1110 tmp.ordering[0] = -1;
1111 tmp.ordering[1] = -1;
1112 tmp.ordering[2] = 1000;
1113 tmp.isDuplicable = false;
1114 theTable->push_back(tmp);
1115 sizeOfTable += 1;
1116
1117 tmp.processTypeName = "HadCapture";
1118 tmp.processType = fHadronic;
1120 tmp.ordering[0] = -1;
1121 tmp.ordering[1] = -1;
1122 tmp.ordering[2] = 1000;
1123 tmp.isDuplicable = false;
1124 theTable->push_back(tmp);
1125 sizeOfTable += 1;
1126
1127 tmp.processTypeName = "MuAtomCapture";
1128 tmp.processType = fHadronic;
1130 tmp.ordering[0] = -1;
1131 tmp.ordering[1] = -1;
1132 tmp.ordering[2] = 1000;
1133 tmp.isDuplicable = false;
1134 theTable->push_back(tmp);
1135 sizeOfTable += 1;
1136
1137 tmp.processTypeName = "HadFission";
1138 tmp.processType = fHadronic;
1140 tmp.ordering[0] = -1;
1141 tmp.ordering[1] = -1;
1142 tmp.ordering[2] = 1000;
1143 tmp.isDuplicable = false;
1144 theTable->push_back(tmp);
1145 sizeOfTable += 1;
1146
1147 tmp.processTypeName = "HadAtRest";
1148 tmp.processType = fHadronic;
1150 tmp.ordering[0] = 1000;
1151 tmp.ordering[1] = -1;
1152 tmp.ordering[2] = -1;
1153 tmp.isDuplicable = false;
1154 theTable->push_back(tmp);
1155 sizeOfTable += 1;
1156
1157 tmp.processTypeName = "HadCEX";
1158 tmp.processType = fHadronic;
1160 tmp.ordering[0] = -1;
1161 tmp.ordering[1] = -1;
1162 tmp.ordering[2] = 1000;
1163 tmp.isDuplicable = false;
1164 theTable->push_back(tmp);
1165 sizeOfTable += 1;
1166
1167 tmp.processTypeName = "Decay";
1168 tmp.processType = fDecay;
1169 tmp.processSubType = DECAY;
1170 tmp.ordering[0] = 1000;
1171 tmp.ordering[1] = -1;
1172 tmp.ordering[2] = 1000;
1173 tmp.isDuplicable = false;
1174 theTable->push_back(tmp);
1175 sizeOfTable += 1;
1176
1177 tmp.processTypeName = "DecayWSpin";
1178 tmp.processType = fDecay;
1180 tmp.ordering[0] = 1000;
1181 tmp.ordering[1] = -1;
1182 tmp.ordering[2] = 1000;
1183 tmp.isDuplicable = false;
1184 theTable->push_back(tmp);
1185 sizeOfTable += 1;
1186
1187 tmp.processTypeName = "DecayPiSpin";
1188 tmp.processType = fDecay;
1190 tmp.ordering[0] = 1000;
1191 tmp.ordering[1] = -1;
1192 tmp.ordering[2] = 1000;
1193 tmp.isDuplicable = false;
1194 theTable->push_back(tmp);
1195 sizeOfTable += 1;
1196
1197 tmp.processTypeName = "DecayRadio";
1198 tmp.processType = fDecay;
1200 tmp.ordering[0] = 1000;
1201 tmp.ordering[1] = -1;
1202 tmp.ordering[2] = 1000;
1203 tmp.isDuplicable = false;
1204 theTable->push_back(tmp);
1205 sizeOfTable += 1;
1206
1207 tmp.processTypeName = "DecayUnKnown";
1208 tmp.processType = fDecay;
1210 tmp.ordering[0] = -1;
1211 tmp.ordering[1] = -1;
1212 tmp.ordering[2] = 1000;
1213 tmp.isDuplicable = false;
1214 theTable->push_back(tmp);
1215 sizeOfTable += 1;
1216
1217 tmp.processTypeName = "DecayMuAtom";
1218 tmp.processType = fDecay;
1220 tmp.ordering[0] = 1000;
1221 tmp.ordering[1] = -1;
1222 tmp.ordering[2] = 1000;
1223 tmp.isDuplicable = false;
1224 theTable->push_back(tmp);
1225 sizeOfTable += 1;
1226
1227 tmp.processTypeName = "DecayExt";
1228 tmp.processType = fDecay;
1230 tmp.ordering[0] = 1000;
1231 tmp.ordering[1] = -1;
1232 tmp.ordering[2] = 1000;
1233 tmp.isDuplicable = false;
1234 theTable->push_back(tmp);
1235 sizeOfTable += 1;
1236
1237 tmp.processTypeName = "StepLimiter";
1238 tmp.processType = fGeneral;
1240 tmp.ordering[0] = -1;
1241 tmp.ordering[1] = -1;
1242 tmp.ordering[2] = 1000;
1243 tmp.isDuplicable = false;
1244 theTable->push_back(tmp);
1245 sizeOfTable += 1;
1246
1247 tmp.processTypeName = "UsrSepcCuts";
1248 tmp.processType = fGeneral;
1250 tmp.ordering[0] = -1;
1251 tmp.ordering[1] = -1;
1252 tmp.ordering[2] = 1000;
1253 tmp.isDuplicable = false;
1254 theTable->push_back(tmp);
1255 sizeOfTable += 1;
1256
1257 tmp.processTypeName = "NeutronKiller";
1258 tmp.processType = fGeneral;
1260 tmp.ordering[0] = -1;
1261 tmp.ordering[1] = -1;
1262 tmp.ordering[2] = 1000;
1263 tmp.isDuplicable = false;
1264 theTable->push_back(tmp);
1265 sizeOfTable += 1;
1266
1267 tmp.processTypeName = "ParallelWorld";
1268 tmp.processType = fParallel;
1270 tmp.ordering[0] = 9900;
1271 tmp.ordering[1] = 1;
1272 tmp.ordering[2] = 9900;
1273 tmp.isDuplicable = true;
1274 theTable->push_back(tmp);
1275 sizeOfTable += 1;
1276}
@ DECAY_WithSpin
@ DECAY_Unknown
@ DECAY_External
@ DECAY_MuAtom
@ DECAY_PionMakeSpin
@ DECAY_Radioactive
@ fGammaConversionToMuMu
@ fAnnihilationToHadrons
@ fBremsstrahlung
@ fCoulombScattering
@ fAnnihilationToTauTau
@ fGammaGeneralProcess
@ fGammaConversion
@ fRayleigh
@ fPositronGeneralProcess
@ fIonisation
@ fPairProdByCharged
@ fSynchrotronRadiation
@ fCerenkov
@ fAnnihilationToMuMu
@ fScintillation
@ fNuclearStopping
@ fComptonScattering
@ fTransitionRadiation
@ fElectronGeneralProcess
@ fAnnihilation
@ fSurfaceReflection
@ fMultipleScattering
@ fPhotoElectricEffect
@ fChargeExchange
@ fHadronAtRest
@ fMuAtomicCapture
@ fHadronElastic
@ fHadronInelastic
@ fLowEnergyBrownianTransportation
@ fLowEnergyDoubleIonisation
@ fLowEnergyChargeIncrease
@ fLowEnergyMolecularDecay
@ fLowEnergyVibrationalExcitation
@ fLowEnergyElectronSolvation
@ fLowEnergyTransportation
@ fLowEnergyChargeDecrease
@ fOpRayleigh
@ fOpMieHG
@ fOpAbsorption
@ fOpWLS
@ fOpBoundary
@ fOpWLS2
@ fOptical
@ fParallel
@ fGeneral
@ fDecay
@ fHadronic
@ fUserDefined
@ fTransportation

References COUPLED_TRANSPORTATION, DECAY, DECAY_External, DECAY_MuAtom, DECAY_PionMakeSpin, DECAY_Radioactive, DECAY_Unknown, DECAY_WithSpin, fAnnihilation, fAnnihilationToHadrons, fAnnihilationToMuMu, fAnnihilationToTauTau, fBremsstrahlung, fCapture, fCerenkov, fChargeExchange, fComptonScattering, fCoulombScattering, fDecay, fElectromagnetic, fElectronGeneralProcess, fFission, fGammaConversion, fGammaConversionToMuMu, fGammaGeneralProcess, fGeneral, fHadronAtRest, fHadronElastic, fHadronic, fHadronInelastic, fIonisation, fLowEnergyAttachment, fLowEnergyBrownianTransportation, fLowEnergyChargeDecrease, fLowEnergyChargeIncrease, fLowEnergyDoubleCap, fLowEnergyDoubleIonisation, fLowEnergyElastic, fLowEnergyElectronSolvation, fLowEnergyExcitation, fLowEnergyIonisation, fLowEnergyIoniTransfer, fLowEnergyMolecularDecay, fLowEnergyStaticMol, fLowEnergyTransportation, fLowEnergyVibrationalExcitation, fMuAtomicCapture, fMultipleScattering, fNuclearStopping, fOpAbsorption, fOpBoundary, fOpMieHG, fOpRayleigh, fOptical, fOpWLS, fOpWLS2, fPairProdByCharged, fParallel, fPhotoElectricEffect, fPositronGeneralProcess, fRayleigh, fScintillation, fSurfaceReflection, fSynchrotronRadiation, fTransitionRadiation, fTransportation, fUserDefined, G4PhysicsListOrderingParameter::isDuplicable, NEUTRON_KILLER, G4PhysicsListOrderingParameter::ordering, PARALLEL_WORLD_PROCESS, G4PhysicsListOrderingParameter::processSubType, G4PhysicsListOrderingParameter::processType, G4PhysicsListOrderingParameter::processTypeName, sizeOfTable, STEP_LIMITER, theTable, TRANSPORTATION, and USER_SPECIAL_CUTS.

Referenced by ReadOrdingParameterTable().

◆ ReadOrdingParameterTable()

void G4PhysicsListHelper::ReadOrdingParameterTable ( )
private

Definition at line 294 of file G4PhysicsListHelper.cc.

295{
296 G4bool readInFile = false;
297 std::ifstream fIn;
298
299 if(std::getenv("G4ORDPARAMTABLE"))
300 {
301 ordParamFileName = std::getenv("G4ORDPARAMTABLE");
302#ifdef G4VERBOSE
303 if(verboseLevel > 1)
304 {
305 G4cout << "G4PhysicsListHelper::ReadOrdingParameterTable :"
306 << ordParamFileName << " is assigned to Ordering Parameter Table "
307 << G4endl;
308 }
309#endif
310 // open input file //
311 fIn.open(ordParamFileName, std::ios::in);
312 // check if the file has been opened successfully
313 if(!fIn)
314 {
315#ifdef G4VERBOSE
316 if(verboseLevel > 0)
317 {
318 G4cout << "G4PhysicsListHelper::ReadOrdingParameterTable "
319 << " Can not open file " << ordParamFileName << G4endl;
320 }
321#endif
322 G4Exception("G4PhysicsListHelper::ReadOrdingParameterTable", "Run0105",
323 JustWarning, "Fail to open ordering parameter table ");
324 }
325 else
326 {
327 readInFile = true;
328 }
329 }
330
331 // create OrdParamTable
332 if(theTable != nullptr)
333 {
334 theTable->clear();
335 delete theTable;
336 theTable = nullptr;
337 sizeOfTable = 0;
338 }
340 sizeOfTable = 0;
341
342 if(readInFile)
343 {
344 // read in the file and fill the table
345 while(!fIn.eof())
346 {
348 G4int flag;
349 fIn >> tmp.processTypeName >> tmp.processType >> tmp.processSubType >>
350 tmp.ordering[0] >> tmp.ordering[1] >> tmp.ordering[2] >> flag;
351 tmp.isDuplicable = (flag != 0);
352 theTable->push_back(tmp);
353 ++sizeOfTable;
354 }
355 fIn.close();
356 }
357 else
358 {
360 }
361
362 if(sizeOfTable == 0)
363 {
364#ifdef G4VERBOSE
365 if(verboseLevel > 0)
366 {
367 G4cout << "G4PhysicsListHelper::ReadOrdingParameterTable "
368 << " Empty file " << ordParamFileName << G4endl;
369 }
370#endif
371 G4Exception("G4PhysicsListHelper::ReadOrdingParameterTable", "Run0106",
372 JustWarning, "The ordering parameter table is empty ");
373 delete theTable;
374 theTable = nullptr;
375 }
376 return;
377}
@ JustWarning
std::vector< G4PhysicsListOrderingParameter > G4OrdParamTable

References G4cout, G4endl, G4Exception(), G4PhysicsListOrderingParameter::isDuplicable, JustWarning, G4PhysicsListOrderingParameter::ordering, ordParamFileName, G4PhysicsListOrderingParameter::processSubType, G4PhysicsListOrderingParameter::processType, G4PhysicsListOrderingParameter::processTypeName, ReadInDefaultOrderingParameter(), sizeOfTable, theTable, and verboseLevel.

Referenced by G4PhysicsListHelper().

◆ RegisterProcess()

G4bool G4PhysicsListHelper::RegisterProcess ( G4VProcess process,
G4ParticleDefinition particle 
)

Definition at line 461 of file G4PhysicsListHelper.cc.

463{
464 if(theTable == nullptr)
465 {
466#ifdef G4VERBOSE
467 if(verboseLevel > 0)
468 {
469 G4cout << "G4PhysicsListHelper::RegisterProcess :"
470 << " No ordering parameter table : " << ordParamFileName
471 << G4endl;
472 }
473#endif
474 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0107",
475 FatalException, "No Ordering Parameter Table");
476 return false;
477 }
478
479 const G4String pName = process->GetProcessName();
480 const G4int pType = process->GetProcessType();
481 const G4int pSubType = process->GetProcessSubType();
482
483#ifdef G4VERBOSE
484 if(verboseLevel > 2)
485 {
486 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName
487 << " Process Type = " << pType << " SubType = " << pSubType << " to "
488 << particle->GetParticleName() << G4endl;
489 }
490#endif
491
492 // Check Process Type/SubType
493 if((pType < 1) || (pSubType < 1))
494 {
495#ifdef G4VERBOSE
496 if(verboseLevel > 0)
497 {
498 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
499 << particle->GetParticleName()
500 << " has illegal Process Type = " << pType
501 << " SubType = " << pSubType << G4endl;
502 }
503#endif
504 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0108",
505 FatalException, "No Matching process Type/SubType");
506 return false;
507 }
508
509 G4bool isFound = false;
510 G4int ord[3];
511 G4bool duplicable = false;
512 for(G4int i = 0; i < sizeOfTable; ++i)
513 {
515 if((tmp->processType == pType) && (tmp->processSubType == pSubType))
516 {
517 ord[0] = tmp->ordering[0];
518 ord[1] = tmp->ordering[1];
519 ord[2] = tmp->ordering[2];
520 duplicable = tmp->isDuplicable;
521 isFound = true;
522 break;
523 }
524 }
525 if(!isFound)
526 {
527#ifdef G4VERBOSE
528 if(verboseLevel > 0)
529 {
530 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
531 << particle->GetParticleName() << " with type/subtype =" << pType
532 << "/" << pSubType
533 << " is not registered in OrdingParameterTable " << G4endl;
534 }
535#endif
536 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0109",
537 FatalException, "No Matching process Type/SubType");
538 return false;
539 }
540
541 // Check Process Manager
542 G4ProcessManager* pManager = particle->GetProcessManager();
543 if(pManager == nullptr)
544 {
545 // Error !! no process manager
546#ifdef G4VERBOSE
547 if(verboseLevel > 0)
548 {
549 G4cout << "G4PhysicsListHelper::RegisterProcess "
550 << " : No Process Manager for " << particle->GetParticleName()
551 << G4endl;
552 }
553#endif
554 G4Exception("G4PhysicsListHelper::RegisterProcess ", "Riun0110",
555 FatalException, "No process manager");
556 return false;
557 }
558
559 // Check Duplication
560 if(!duplicable)
561 {
562 G4bool duplicated = false;
563 G4ProcessVector* pList = pManager->GetProcessList();
564 for(std::size_t idx = 0; idx < pList->size(); ++idx)
565 {
566 const G4VProcess* p = (*pList)[idx];
567 if((p->GetProcessType() == pType) && (p->GetProcessSubType() == pSubType))
568 {
569 duplicated = true;
570#ifdef G4VERBOSE
571 if(verboseLevel > 0)
572 {
573 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
574 << particle->GetParticleName()
575 << " with type/subtype =" << pType << "/" << pSubType
576 << " is has same subType as " << p->GetProcessName()
577 << " for " << particle->GetParticleName() << G4endl;
578 G4cout << "It will not be added !!" << G4endl;
579 }
580#endif
581 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0111",
582 JustWarning, "Duplication of processes");
583 }
584 }
585 if(duplicated)
586 return false;
587 }
588
589 // Add Process
590 G4int code = pManager->AddProcess(process);
591 if(code < 0)
592 return false;
593
594 // Set Ordering Parameter
595 for(G4int idx = 0; idx < 3; ++idx)
596 {
598 static_cast<G4ProcessVectorDoItIndex>(idx);
599 if(ord[idx] < 0)
600 {
601 // Do Nothing because NO DOIT
602 }
603 else if(ord[idx] == 0)
604 {
605 pManager->SetProcessOrderingToFirst(process, idxOrd);
606 }
607 else if(ord[idx] < 9999)
608 {
609 pManager->SetProcessOrdering(process, idxOrd, ord[idx]);
610 }
611 else
612 {
613 pManager->SetProcessOrderingToLast(process, idxOrd);
614 }
615 }
616#ifdef G4VERBOSE
617 if(verboseLevel > 1)
618 {
619 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
620 << particle->GetParticleName() << " with type/subtype =" << pType
621 << "/" << pSubType
622 << " is successfully registered with ordering parameters " << ord[0]
623 << ":" << ord[1] << ":" << ord[2] << G4endl;
624 }
625#endif
626 return true;
627}
G4ProcessVectorDoItIndex
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4ProcessType GetProcessType() const
Definition: G4VProcess.hh:388
G4int GetProcessSubType() const
Definition: G4VProcess.hh:400
const G4String & GetProcessName() const
Definition: G4VProcess.hh:382
Definition: inftrees.h:24

References G4ProcessManager::AddProcess(), FatalException, G4cout, G4endl, G4Exception(), G4ParticleDefinition::GetParticleName(), G4ProcessManager::GetProcessList(), G4ParticleDefinition::GetProcessManager(), G4VProcess::GetProcessName(), G4VProcess::GetProcessSubType(), G4VProcess::GetProcessType(), G4PhysicsListOrderingParameter::isDuplicable, JustWarning, G4PhysicsListOrderingParameter::ordering, ordParamFileName, G4PhysicsListOrderingParameter::processSubType, G4PhysicsListOrderingParameter::processType, G4ProcessManager::SetProcessOrdering(), G4ProcessManager::SetProcessOrderingToFirst(), G4ProcessManager::SetProcessOrderingToLast(), G4ProcessVector::size(), sizeOfTable, theTable, and verboseLevel.

Referenced by G4HadronicBuilder::BuildElastic(), G4HadronicBuilder::BuildFTFP_BERT(), G4HadronicBuilder::BuildFTFQGSP_BERT(), G4HadronicBuilder::BuildQGSP_FTFP_BERT(), G4EmBuilder::ConstructBasicEmPhysics(), G4EmBuilder::ConstructCharged(), G4EmBuilder::ConstructChargedSS(), G4EmExtraPhysics::ConstructGammaElectroNuclear(), G4EmDNAPhysics::ConstructGammaPositronProcesses(), G4EmBuilder::ConstructIonEmPhysics(), G4EmBuilder::ConstructIonEmPhysicsSS(), G4EmBuilder::ConstructLightHadrons(), G4EmBuilder::ConstructLightHadronsSS(), G4EmDNAChemistry_option1::ConstructProcess(), G4EmDNAChemistry_option3::ConstructProcess(), G4EmDNAPhysics_option1::ConstructProcess(), G4EmDNAPhysics_option2::ConstructProcess(), G4EmDNAPhysics_option3::ConstructProcess(), G4EmDNAPhysics_option4::ConstructProcess(), G4EmDNAPhysics_option5::ConstructProcess(), G4EmDNAPhysics_option6::ConstructProcess(), G4EmDNAPhysics_option7::ConstructProcess(), G4EmDNAPhysics_option8::ConstructProcess(), G4EmDNAPhysics_stationary_option2::ConstructProcess(), G4EmDNAPhysics_stationary_option4::ConstructProcess(), G4EmDNAPhysics_stationary_option6::ConstructProcess(), G4EmExtraPhysics::ConstructProcess(), G4DecayPhysics::ConstructProcess(), G4UnknownDecayPhysics::ConstructProcess(), G4EmDNAPhysics::ConstructProcess(), G4EmDNAPhysics_stationary::ConstructProcess(), G4EmDNAPhysicsActivator::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsGS::ConstructProcess(), G4EmStandardPhysicsSS::ConstructProcess(), G4EmStandardPhysicsWVI::ConstructProcess(), G4HadronDElasticPhysics::ConstructProcess(), G4HadronElasticPhysics::ConstructProcess(), G4HadronHElasticPhysics::ConstructProcess(), G4HadronInelasticQBBC::ConstructProcess(), G4HadronPhysicsFTFQGSP_BERT::ConstructProcess(), and G4VPhysicsConstructor::RegisterProcess().

◆ SetVerboseLevel()

void G4PhysicsListHelper::SetVerboseLevel ( G4int  value)
inline

Definition at line 126 of file G4PhysicsListHelper.hh.

127{
128 verboseLevel = value;
129}

References verboseLevel.

Referenced by G4MuonicAtomDecayPhysics::ConstructProcess().

◆ UseCoupledTransportation()

void G4PhysicsListHelper::UseCoupledTransportation ( G4bool  vl = true)
inline

Definition at line 121 of file G4PhysicsListHelper.hh.

122{
124}

References useCoupledTransportation.

◆ UseHighLooperThresholds()

void G4PhysicsListHelper::UseHighLooperThresholds ( )
inline

Definition at line 70 of file G4PhysicsListHelper.hh.

References theLooperThresholds.

◆ UseLowLooperThresholds()

void G4PhysicsListHelper::UseLowLooperThresholds ( )
inline

Definition at line 71 of file G4PhysicsListHelper.hh.

References theLooperThresholds.

Friends And Related Function Documentation

◆ G4ThreadLocalSingleton< G4PhysicsListHelper >

Definition at line 131 of file G4PhysicsListHelper.hh.

Field Documentation

◆ aParticleIterator

G4ParticleTable::G4PTblDicIterator* G4PhysicsListHelper::aParticleIterator = nullptr
private

◆ ordParamFileName

G4String G4PhysicsListHelper::ordParamFileName = ""
private

◆ pPLHelper

G4ThreadLocal G4PhysicsListHelper * G4PhysicsListHelper::pPLHelper = nullptr
staticprivate

Definition at line 102 of file G4PhysicsListHelper.hh.

Referenced by GetPhysicsListHelper().

◆ sizeOfTable

G4int G4PhysicsListHelper::sizeOfTable = 0
private

◆ theLooperThresholds

G4int G4PhysicsListHelper::theLooperThresholds = 1
private

◆ theParticleTable

G4ParticleTable* G4PhysicsListHelper::theParticleTable = nullptr
private

Definition at line 104 of file G4PhysicsListHelper.hh.

Referenced by G4PhysicsListHelper().

◆ theTable

G4OrdParamTable* G4PhysicsListHelper::theTable = nullptr
private

◆ theTransportationProcess

G4VProcess* G4PhysicsListHelper::theTransportationProcess = nullptr
private

Definition at line 110 of file G4PhysicsListHelper.hh.

Referenced by AddTransportation().

◆ useCoupledTransportation

G4bool G4PhysicsListHelper::useCoupledTransportation = false
private

Definition at line 108 of file G4PhysicsListHelper.hh.

Referenced by AddTransportation(), and UseCoupledTransportation().

◆ verboseLevel

G4int G4PhysicsListHelper::verboseLevel = 1
private

The documentation for this class was generated from the following files: