Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhysicsListHelper.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//
28//
29// ------------------------------------------------------------
30// GEANT 4 class header file
31//
32// ------------------------------------------------------------
33// History
34// first version 29 Apr 2011 by H.Kurashige
35// ------------------------------------------------------------
36
39#include "G4ParticleTable.hh"
40#include "G4ProcessManager.hh"
41#include "globals.hh"
42
43#include "G4ios.hh"
44#include <fstream>
45#include <iomanip>
46
47////////////////////////////////////////////////////////
48G4ThreadLocal G4PhysicsListHelper* G4PhysicsListHelper::pPLHelper = nullptr;
49
50////////////////////////////////////////////////////////
51G4PhysicsListHelper::G4PhysicsListHelper()
52 : useCoupledTransportation(false)
53 , theTransportationProcess(nullptr)
54 , verboseLevel(1)
55 , theTable(nullptr)
56 , sizeOfTable(0)
57 , ordParamFileName("")
58{
59 // pointer to the particle table
60 theParticleTable = G4ParticleTable::GetParticleTable();
61 aParticleIterator = theParticleTable->GetIterator();
62
63 ReadOrdingParameterTable();
64
65#ifdef G4VERBOSE
66 if(verboseLevel > 1)
67 {
68 DumpOrdingParameterTable();
69 }
70#endif
71}
72
73////////////////////////////////////////////////////////
74G4PhysicsListHelper::~G4PhysicsListHelper()
75{
76 if(theTable != 0)
77 {
78 theTable->clear();
79 delete theTable;
80 theTable = 0;
81 sizeOfTable = 0;
82 }
83 /*
84 if (theTransportationProcess!=0) {
85 delete theTransportationProcess;
86 theTransportationProcess=0;
87 }
88 */
89}
90
91////////////////////////////////////////////////////////
93{
94 if(!pPLHelper)
95 {
97 pPLHelper = inst.Instance();
98 }
99 return pPLHelper;
100}
101
102////////////////////////////////////////////////////////
104{
105 G4bool isElectron = false;
106 G4bool isPositron = false;
107 G4bool isGamma = false;
108 G4bool isProton = false;
109 G4bool isGenericIon = false;
110 G4bool isAnyIon = false;
111 G4bool isAnyChargedBaryon = false;
112 G4bool isEmProc = false;
113
114 // loop over all particles in G4ParticleTable
115 aParticleIterator->reset();
116 while((*aParticleIterator)())
117 {
118 G4ParticleDefinition* particle = aParticleIterator->value();
119 G4String name = particle->GetParticleName();
120 // check if any EM process exists
121 if(!isEmProc)
122 {
123 G4ProcessVector* list = particle->GetProcessManager()->GetProcessList();
124 for(std::size_t idx = 0; idx < list->size(); ++idx)
125 {
126 isEmProc = ((*list)[idx])->GetProcessType() == fElectromagnetic;
127 if(isEmProc)
128 break;
129 }
130 }
131
132 if(name == "e-")
133 isElectron = true;
134 else if(name == "e+")
135 isPositron = true;
136 else if(name == "gamma")
137 isGamma = true;
138 else if(name == "GenericIon")
139 isGenericIon = true;
140 else if(name == "proton")
141 isProton = true;
142 else if(particle->GetParticleType() == "nucleus")
143 isAnyIon = true;
144 else if(particle->GetParticleType() == "baryon")
145 {
146 if(particle->GetPDGCharge() != 0.0)
147 isAnyChargedBaryon = true;
148 }
149 }
150
151 if(!isEmProc)
152 return;
153
154 // RULE 1
155 // e+, e- and gamma should exist
156 // if one of them exist
157 G4bool isEmBasic = isElectron || isPositron || isGamma;
158 G4bool isMissingEmBasic = !isElectron || !isPositron || !isGamma;
159 if(isEmBasic && isMissingEmBasic)
160 {
161 G4String missingName = "";
162 if(!isElectron)
163 missingName += "e- ";
164 if(!isPositron)
165 missingName += "e+ ";
166 if(!isGamma)
167 missingName += "gamma ";
168
169#ifdef G4VERBOSE
170 if(verboseLevel > 0)
171 {
172 G4cout << "G4PhysicsListHelper::CheckParticleList: " << missingName
173 << " do not exist " << G4endl;
174 G4cout << " These particle are necessary for basic EM processes"
175 << G4endl;
176 }
177#endif
178 G4Exception("G4PhysicsListHelper::CheckParticleList", "Run0101",
179 FatalException, "Missing EM basic particle");
180 }
181
182 // RULE 2
183 // proton should exist
184 // if any other charged baryon exist
185 if(!isProton && isAnyChargedBaryon)
186 {
187 G4String missingName = "proton ";
188
189#ifdef G4VERBOSE
190 if(verboseLevel > 0)
191 {
192 G4cout << "G4PhysicsListHelper::CheckParticleList: " << missingName
193 << " does not exist " << G4endl;
194 G4cout << " Proton is necessary for EM baryon processes" << G4endl;
195 }
196#endif
197 missingName += " should be created ";
198 G4Exception("G4PhysicsListHelper::CheckParticleList", "Run0102",
199 FatalException, "Missing Proton");
200 }
201
202 // RULE 3
203 // GenericIonn should exist
204 // if any other ion exist
205 if(!isGenericIon && isAnyIon)
206 {
207 G4String missingName = "GenericIon ";
208
209#ifdef G4VERBOSE
210 if(verboseLevel > 0)
211 {
212 G4cout << "G4PhysicsListHelper::CheckParticleList: " << missingName
213 << " does not exist " << G4endl;
214 G4cout << " GenericIon should be created if any ion is necessary"
215 << G4endl;
216 }
217#endif
218 G4Exception("G4PhysicsListHelper::CheckParticleList", "Run0103",
219 FatalException, "Missing GenericIon");
220 }
221}
222
223////////////////////////////////////////////////////////
225#include "G4RunManagerKernel.hh"
226#include "G4ScoringManager.hh"
227#include "G4Transportation.hh"
228
230{
231 G4int verboseLevelTransport = 0;
232
233#ifdef G4VERBOSE
234 if(verboseLevel > 2)
235 {
236 G4cout << "G4PhysicsListHelper::AddTransportation() " << G4endl;
237 }
238#endif
239
240 G4int nParaWorld =
242
243 if(nParaWorld > 0 || useCoupledTransportation ||
245 {
246 auto coupledTransport = new G4CoupledTransportation(verboseLevelTransport);
247 if(theLooperThresholds == 0)
248 coupledTransport->SetLowLooperThresholds();
249 if(theLooperThresholds == 2)
250 coupledTransport->SetHighLooperThresholds();
251 theTransportationProcess = coupledTransport;
252
253 if(verboseLevel > 0)
254 {
255 G4cout << "--- G4CoupledTransportation is used " << G4endl;
256 }
257 }
258 else
259 {
260 auto simpleTransport = new G4Transportation(verboseLevelTransport);
261 if(theLooperThresholds == 0)
262 simpleTransport->SetLowLooperThresholds();
263 if(theLooperThresholds == 2)
264 simpleTransport->SetHighLooperThresholds();
265 theTransportationProcess = simpleTransport;
266 }
267
268 // loop over all particles in G4ParticleTable
269 aParticleIterator->reset();
270 while((*aParticleIterator)())
271 {
272 G4ParticleDefinition* particle = aParticleIterator->value();
273 G4ProcessManager* pmanager = particle->GetProcessManager();
274 // Add transportation process for all particles
275 if(pmanager == 0)
276 {
277 // Error !! no process manager
278#ifdef G4VERBOSE
279 if(verboseLevel > 0)
280 {
281 G4cout << "G4PhysicsListHelper::AddTransportation "
282 << " : No Process Manager for " << particle->GetParticleName()
283 << G4endl;
284 }
285#endif
286 G4Exception("G4PhysicsListHelper::AddTransportation", "Run0104",
287 FatalException, "No process manager");
288 continue;
289 }
290 // Molecule use different type transportation
291 if(particle->GetParticleType() == "Molecule")
292 continue;
293
294 // add transportation with ordering = ( -1, "first", "first" )
295 pmanager->AddProcess(theTransportationProcess);
296 pmanager->SetProcessOrderingToFirst(theTransportationProcess, idxAlongStep);
297 pmanager->SetProcessOrderingToFirst(theTransportationProcess, idxPostStep);
298 }
299}
300
301////////////////////////////////////////////////////////
302#include "G4ProcessManager.hh"
303
304void G4PhysicsListHelper::ReadOrdingParameterTable()
305{
306 G4bool readInFile = false;
307 std::ifstream fIn;
308
309 if(std::getenv("G4ORDPARAMTABLE"))
310 {
311 ordParamFileName = std::getenv("G4ORDPARAMTABLE");
312#ifdef G4VERBOSE
313 if(verboseLevel > 1)
314 {
315 G4cout << "G4PhysicsListHelper::ReadOrdingParameterTable :"
316 << ordParamFileName << " is assigned to Ordering Parameter Table "
317 << G4endl;
318 }
319#endif
320 // open input file //
321 fIn.open(ordParamFileName, std::ios::in);
322 // check if the file has been opened successfully
323 if(!fIn)
324 {
325#ifdef G4VERBOSE
326 if(verboseLevel > 0)
327 {
328 G4cout << "G4PhysicsListHelper::ReadOrdingParameterTable "
329 << " Can not open file " << ordParamFileName << G4endl;
330 }
331#endif
332 G4Exception("G4PhysicsListHelper::ReadOrdingParameterTable", "Run0105",
333 JustWarning, "Fail to open ordering parameter table ");
334 }
335 else
336 {
337 readInFile = true;
338 }
339 }
340
341 // create OrdParamTable
342 if(theTable != 0)
343 {
344 theTable->clear();
345 delete theTable;
346 theTable = 0;
347 sizeOfTable = 0;
348 }
349 theTable = new G4OrdParamTable();
350 sizeOfTable = 0;
351
352 if(readInFile)
353 {
354 // read in the file and fill the table
355 while(!fIn.eof())
356 {
358 G4int flag;
359 fIn >> tmp.processTypeName >> tmp.processType >> tmp.processSubType >>
360 tmp.ordering[0] >> tmp.ordering[1] >> tmp.ordering[2] >> flag;
361 tmp.isDuplicable = (flag != 0);
362 theTable->push_back(tmp);
363 sizeOfTable += 1;
364 }
365 fIn.close();
366 }
367 else
368 {
369 ReadInDefaultOrderingParameter();
370 }
371
372 if(sizeOfTable == 0)
373 {
374#ifdef G4VERBOSE
375 if(verboseLevel > 0)
376 {
377 G4cout << "G4PhysicsListHelper::ReadOrdingParameterTable "
378 << " Empty file " << ordParamFileName << G4endl;
379 }
380#endif
381 G4Exception("G4PhysicsListHelper::ReadOrdingParameterTable", "Run0106",
382 JustWarning, "The ordering parameter table is empty ");
383 delete theTable;
384 theTable = 0;
385 }
386 return;
387}
388
389////////////////////////////////////////////////////////
391{
392 if(theTable == 0)
393 {
394#ifdef G4VERBOSE
395 if(verboseLevel > 0)
396 {
397 G4cout << "G4PhysicsListHelper::DumpOrdingParameterTable "
398 << " No ordering parameter table : " << ordParamFileName
399 << G4endl;
400 }
401#endif
402 return;
403 }
404 G4cout << "G4PhysicsListHelper::DumpOrdingParameterTable : "
405 << ordParamFileName << G4endl;
406 G4cout << " TypeName "
407 << " ProcessType"
408 << " SubType"
409 << " AtRest"
410 << " AlongStep"
411 << " PostStep"
412 << " Duplicable" << G4endl;
413 for(G4int i = 0; i < sizeOfTable; ++i)
414 {
415 G4PhysicsListOrderingParameter* tmp = &(theTable->at(i));
416 if((subType >= 0) && (subType != tmp->processSubType))
417 continue;
418 G4cout << std::setw(18) << tmp->processTypeName << std::setw(15)
419 << tmp->processType << std::setw(15) << tmp->processSubType
420 << std::setw(15) << tmp->ordering[0] << std::setw(15)
421 << tmp->ordering[1] << std::setw(15) << tmp->ordering[2];
422 if(tmp->isDuplicable)
423 {
424 G4cout << " true";
425 }
426 else
427 {
428 G4cout << " false";
429 }
430 G4cout << G4endl;
431 }
432}
433
434////////////////////////////////////////////////////////
436 G4int subType) const
437{
439
440 if(theTable == 0)
441 {
442#ifdef G4VERBOSE
443 if(verboseLevel > 0)
444 {
445 G4cout << "G4PhysicsListHelper::GetOrderingParameter : "
446 << " No ordering parameter table : " << ordParamFileName
447 << G4endl;
448 }
449#endif
450 return value;
451 }
452
453 for(G4int i = 0; i < sizeOfTable; ++i)
454 {
455 G4PhysicsListOrderingParameter* tmp = &(theTable->at(i));
456 if(subType == tmp->processSubType)
457 {
458 value.processTypeName = tmp->processTypeName;
459 value.processType = tmp->processType;
460 value.processSubType = tmp->processSubType;
461 value.ordering[0] = tmp->ordering[0];
462 value.ordering[1] = tmp->ordering[1];
463 value.ordering[2] = tmp->ordering[2];
464 value.isDuplicable = tmp->isDuplicable;
465 }
466 }
467 return value;
468}
469
470////////////////////////////////////////////////////////
472 G4ParticleDefinition* particle)
473{
474 if(theTable == 0)
475 {
476#ifdef G4VERBOSE
477 if(verboseLevel > 0)
478 {
479 G4cout << "G4PhysicsListHelper::RegisterProcess :"
480 << " No ordering parameter table : " << ordParamFileName
481 << G4endl;
482 }
483#endif
484 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0107",
485 FatalException, "No Ordering Parameter Table");
486 return false;
487 }
488
489 const G4String pName = process->GetProcessName();
490 const G4int pType = process->GetProcessType();
491 const G4int pSubType = process->GetProcessSubType();
492
493#ifdef G4VERBOSE
494 if(verboseLevel > 2)
495 {
496 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName
497 << " Process Type = " << pType << " SubType = " << pSubType << " to "
498 << particle->GetParticleName() << G4endl;
499 }
500#endif
501
502 // Check Process Type/SubType
503 if((pType < 1) || (pSubType < 1))
504 {
505#ifdef G4VERBOSE
506 if(verboseLevel > 0)
507 {
508 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
509 << particle->GetParticleName()
510 << " has illegal Process Type = " << pType
511 << " SubType = " << pSubType << G4endl;
512 }
513#endif
514 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0108",
515 FatalException, "No Matching process Type/SubType");
516 return false;
517 }
518
519 G4bool isFound = false;
520 G4int ord[3];
521 G4bool duplicable = false;
522 for(G4int i = 0; i < sizeOfTable; ++i)
523 {
524 G4PhysicsListOrderingParameter* tmp = &(theTable->at(i));
525 if((tmp->processType == pType) && (tmp->processSubType == pSubType))
526 {
527 ord[0] = tmp->ordering[0];
528 ord[1] = tmp->ordering[1];
529 ord[2] = tmp->ordering[2];
530 duplicable = tmp->isDuplicable;
531 isFound = true;
532 break;
533 }
534 }
535 if(!isFound)
536 {
537#ifdef G4VERBOSE
538 if(verboseLevel > 0)
539 {
540 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
541 << particle->GetParticleName() << " with type/subtype =" << pType
542 << "/" << pSubType
543 << " is not registered in OrdingParameterTable " << G4endl;
544 }
545#endif
546 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0109",
547 FatalException, "No Matching process Type/SubType");
548 return false;
549 }
550
551 // Check Process Manager
552 G4ProcessManager* pManager = particle->GetProcessManager();
553 if(pManager == 0)
554 {
555 // Error !! no process manager
556#ifdef G4VERBOSE
557 if(verboseLevel > 0)
558 {
559 G4cout << "G4PhysicsListHelper::RegisterProcess "
560 << " : No Process Manager for " << particle->GetParticleName()
561 << G4endl;
562 }
563#endif
564 G4Exception("G4PhysicsListHelper::RegisterProcess ", "Riun0110",
565 FatalException, "No process manager");
566 return false;
567 }
568
569 // Check Duplication
570 if(!duplicable)
571 {
572 G4bool duplicated = false;
573 G4ProcessVector* pList = pManager->GetProcessList();
574 for(std::size_t idx = 0; idx < pList->size(); ++idx)
575 {
576 const G4VProcess* p = (*pList)[idx];
577 if((p->GetProcessType() == pType) && (p->GetProcessSubType() == pSubType))
578 {
579 duplicated = true;
580#ifdef G4VERBOSE
581 if(verboseLevel > 0)
582 {
583 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
584 << particle->GetParticleName()
585 << " with type/subtype =" << pType << "/" << pSubType
586 << " is has same subType as " << p->GetProcessName()
587 << " for " << particle->GetParticleName() << G4endl;
588 G4cout << "It will not be added !!" << G4endl;
589 }
590#endif
591 G4Exception("G4PhysicsListHelper::RegisterProcess", "Run0111",
592 JustWarning, "Duplication of processes");
593 }
594 }
595 if(duplicated)
596 return false;
597 }
598
599 // Add Process
600 G4int code = pManager->AddProcess(process);
601 if(code < 0)
602 return false;
603
604 // Set Ordering Parameter
605 for(G4int idx = 0; idx < 3; ++idx)
606 {
608 static_cast<G4ProcessVectorDoItIndex>(idx);
609 if(ord[idx] < 0)
610 {
611 // Do Nothing because NO DOIT
612 }
613 else if(ord[idx] == 0)
614 {
615 pManager->SetProcessOrderingToFirst(process, idxOrd);
616 }
617 else if(ord[idx] < 9999)
618 {
619 pManager->SetProcessOrdering(process, idxOrd, ord[idx]);
620 }
621 else
622 {
623 pManager->SetProcessOrderingToLast(process, idxOrd);
624 }
625 }
626#ifdef G4VERBOSE
627 if(verboseLevel > 1)
628 {
629 G4cout << "G4PhysicsListHelper::RegisterProcess :" << pName << " for "
630 << particle->GetParticleName() << " with type/subtype =" << pType
631 << "/" << pSubType
632 << " is successfully registered with ordering parameters " << ord[0]
633 << ":" << ord[1] << ":" << ord[2] << G4endl;
634 }
635#endif
636 return true;
637}
638
639void G4PhysicsListHelper::ReadInDefaultOrderingParameter()
640{
642
643 tmp.processTypeName = "Transportation";
644 tmp.processType = 1;
645 tmp.processSubType = 91;
646 tmp.ordering[0] = -1;
647 tmp.ordering[1] = 0;
648 tmp.ordering[2] = 0;
649 tmp.isDuplicable = false;
650 theTable->push_back(tmp);
651 sizeOfTable += 1;
652
653 tmp.processTypeName = "CoupleTrans";
654 tmp.processType = 1;
655 tmp.processSubType = 92;
656 tmp.ordering[0] = -1;
657 tmp.ordering[1] = 0;
658 tmp.ordering[2] = 0;
659 tmp.isDuplicable = false;
660 theTable->push_back(tmp);
661 sizeOfTable += 1;
662
663 tmp.processTypeName = "CoulombScat";
664 tmp.processType = 2;
665 tmp.processSubType = 1;
666 tmp.ordering[0] = -1;
667 tmp.ordering[1] = -1;
668 tmp.ordering[2] = 1000;
669 tmp.isDuplicable = false;
670 theTable->push_back(tmp);
671 sizeOfTable += 1;
672
673 tmp.processTypeName = "Ionisation";
674 tmp.processType = 2;
675 tmp.processSubType = 2;
676 tmp.ordering[0] = -1;
677 tmp.ordering[1] = 2;
678 tmp.ordering[2] = 2;
679 tmp.isDuplicable = false;
680 theTable->push_back(tmp);
681 sizeOfTable += 1;
682
683 tmp.processTypeName = "Brems";
684 tmp.processType = 2;
685 tmp.processSubType = 3;
686 tmp.ordering[0] = -1;
687 tmp.ordering[1] = -1;
688 tmp.ordering[2] = 3;
689 tmp.isDuplicable = false;
690 theTable->push_back(tmp);
691 sizeOfTable += 1;
692
693 tmp.processTypeName = "PairProdCharged";
694 tmp.processType = 2;
695 tmp.processSubType = 4;
696 tmp.ordering[0] = -1;
697 tmp.ordering[1] = -1;
698 tmp.ordering[2] = 4;
699 tmp.isDuplicable = false;
700 theTable->push_back(tmp);
701 sizeOfTable += 1;
702
703 tmp.processTypeName = "Annih";
704 tmp.processType = 2;
705 tmp.processSubType = 5;
706 tmp.ordering[0] = 5;
707 tmp.ordering[1] = -1;
708 tmp.ordering[2] = 5;
709 tmp.isDuplicable = false;
710 theTable->push_back(tmp);
711 sizeOfTable += 1;
712
713 tmp.processTypeName = "AnnihToMuMu";
714 tmp.processType = 2;
715 tmp.processSubType = 6;
716 tmp.ordering[0] = -1;
717 tmp.ordering[1] = -1;
718 tmp.ordering[2] = 6;
719 tmp.isDuplicable = false;
720 theTable->push_back(tmp);
721 sizeOfTable += 1;
722
723 tmp.processTypeName = "AnnihToHad";
724 tmp.processType = 2;
725 tmp.processSubType = 7;
726 tmp.ordering[0] = -1;
727 tmp.ordering[1] = -1;
728 tmp.ordering[2] = 7;
729 tmp.isDuplicable = false;
730 theTable->push_back(tmp);
731 sizeOfTable += 1;
732
733 tmp.processTypeName = "NuclearStopp";
734 tmp.processType = 2;
735 tmp.processSubType = 8;
736 tmp.ordering[0] = -1;
737 tmp.ordering[1] = 8;
738 tmp.ordering[2] = -1;
739 tmp.isDuplicable = false;
740 theTable->push_back(tmp);
741 sizeOfTable += 1;
742
743 tmp.processTypeName = "ElectronSuper";
744 tmp.processType = 2;
745 tmp.processSubType = 9;
746 tmp.ordering[0] = -1;
747 tmp.ordering[1] = 1;
748 tmp.ordering[2] = 1;
749 tmp.isDuplicable = false;
750 theTable->push_back(tmp);
751 sizeOfTable += 1;
752
753 tmp.processTypeName = "Msc";
754 tmp.processType = 2;
755 tmp.processSubType = 10;
756 tmp.ordering[0] = -1;
757 tmp.ordering[1] = 1;
758 tmp.ordering[2] = -1;
759 tmp.isDuplicable = false;
760 theTable->push_back(tmp);
761 sizeOfTable += 1;
762
763 tmp.processTypeName = "Rayleigh";
764 tmp.processType = 2;
765 tmp.processSubType = 11;
766 tmp.ordering[0] = -1;
767 tmp.ordering[1] = -1;
768 tmp.ordering[2] = 1000;
769 tmp.isDuplicable = false;
770 theTable->push_back(tmp);
771 sizeOfTable += 1;
772
773 tmp.processTypeName = "PhotoElectric";
774 tmp.processType = 2;
775 tmp.processSubType = 12;
776 tmp.ordering[0] = -1;
777 tmp.ordering[1] = -1;
778 tmp.ordering[2] = 1000;
779 tmp.isDuplicable = false;
780 theTable->push_back(tmp);
781 sizeOfTable += 1;
782
783 tmp.processTypeName = "Compton";
784 tmp.processType = 2;
785 tmp.processSubType = 13;
786 tmp.ordering[0] = -1;
787 tmp.ordering[1] = -1;
788 tmp.ordering[2] = 1000;
789 tmp.isDuplicable = false;
790 theTable->push_back(tmp);
791 sizeOfTable += 1;
792
793 tmp.processTypeName = "Conv";
794 tmp.processType = 2;
795 tmp.processSubType = 14;
796 tmp.ordering[0] = -1;
797 tmp.ordering[1] = -1;
798 tmp.ordering[2] = 1000;
799 tmp.isDuplicable = false;
800 theTable->push_back(tmp);
801 sizeOfTable += 1;
802
803 tmp.processTypeName = "ConvToMuMu";
804 tmp.processType = 2;
805 tmp.processSubType = 15;
806 tmp.ordering[0] = -1;
807 tmp.ordering[1] = -1;
808 tmp.ordering[2] = 1000;
809 tmp.isDuplicable = false;
810 theTable->push_back(tmp);
811 sizeOfTable += 1;
812
813 tmp.processTypeName = "GammaSuper";
814 tmp.processType = 2;
815 tmp.processSubType = 16;
816 tmp.ordering[0] = -1;
817 tmp.ordering[1] = -1;
818 tmp.ordering[2] = 1000;
819 tmp.isDuplicable = false;
820 theTable->push_back(tmp);
821 sizeOfTable += 1;
822
823 tmp.processTypeName = "Cerenkov";
824 tmp.processType = 2;
825 tmp.processSubType = 21;
826 tmp.ordering[0] = -1;
827 tmp.ordering[1] = -1;
828 tmp.ordering[2] = 1000;
829 tmp.isDuplicable = false;
830 theTable->push_back(tmp);
831 sizeOfTable += 1;
832
833 tmp.processTypeName = "Scintillation";
834 tmp.processType = 2;
835 tmp.processSubType = 22;
836 tmp.ordering[0] = 9999;
837 tmp.ordering[1] = -1;
838 tmp.ordering[2] = 9999;
839 tmp.isDuplicable = false;
840 theTable->push_back(tmp);
841 sizeOfTable += 1;
842
843 tmp.processTypeName = "SynchRad";
844 tmp.processType = 2;
845 tmp.processSubType = 23;
846 tmp.ordering[0] = -1;
847 tmp.ordering[1] = -1;
848 tmp.ordering[2] = 1000;
849 tmp.isDuplicable = false;
850 theTable->push_back(tmp);
851 sizeOfTable += 1;
852
853 tmp.processTypeName = "TransRad";
854 tmp.processType = 2;
855 tmp.processSubType = 24;
856 tmp.ordering[0] = -1;
857 tmp.ordering[1] = -1;
858 tmp.ordering[2] = 1000;
859 tmp.isDuplicable = false;
860 theTable->push_back(tmp);
861 sizeOfTable += 1;
862
863 tmp.processTypeName = "OpAbsorb";
864 tmp.processType = 3;
865 tmp.processSubType = 31;
866 tmp.ordering[0] = -1;
867 tmp.ordering[1] = -1;
868 tmp.ordering[2] = 1000;
869 tmp.isDuplicable = false;
870 theTable->push_back(tmp);
871 sizeOfTable += 1;
872
873 tmp.processTypeName = "OpBoundary";
874 tmp.processType = 3;
875 tmp.processSubType = 32;
876 tmp.ordering[0] = -1;
877 tmp.ordering[1] = -1;
878 tmp.ordering[2] = 1000;
879 tmp.isDuplicable = false;
880 theTable->push_back(tmp);
881 sizeOfTable += 1;
882
883 tmp.processTypeName = "OpRayleigh";
884 tmp.processType = 3;
885 tmp.processSubType = 33;
886 tmp.ordering[0] = -1;
887 tmp.ordering[1] = -1;
888 tmp.ordering[2] = 1000;
889 tmp.isDuplicable = false;
890 theTable->push_back(tmp);
891 sizeOfTable += 1;
892
893 tmp.processTypeName = "OpWLS";
894 tmp.processType = 3;
895 tmp.processSubType = 34;
896 tmp.ordering[0] = -1;
897 tmp.ordering[1] = -1;
898 tmp.ordering[2] = 1000;
899 tmp.isDuplicable = false;
900 theTable->push_back(tmp);
901 sizeOfTable += 1;
902
903 tmp.processTypeName = "OpMieHG";
904 tmp.processType = 3;
905 tmp.processSubType = 35;
906 tmp.ordering[0] = -1;
907 tmp.ordering[1] = -1;
908 tmp.ordering[2] = 1000;
909 tmp.isDuplicable = false;
910 theTable->push_back(tmp);
911 sizeOfTable += 1;
912
913 tmp.processTypeName = "OpWLS2";
914 tmp.processType = 3;
915 tmp.processSubType = 36;
916 tmp.ordering[0] = -1;
917 tmp.ordering[1] = -1;
918 tmp.ordering[2] = 1000;
919 tmp.isDuplicable = false;
920 theTable->push_back(tmp);
921 sizeOfTable +=1;
922
923 tmp.processTypeName = "DNAElastic";
924 tmp.processType = 2;
925 tmp.processSubType = 51;
926 tmp.ordering[0] = -1;
927 tmp.ordering[1] = -1;
928 tmp.ordering[2] = 1000;
929 tmp.isDuplicable = false;
930 theTable->push_back(tmp);
931 sizeOfTable += 1;
932
933 tmp.processTypeName = "DNAExcit";
934 tmp.processType = 2;
935 tmp.processSubType = 52;
936 tmp.ordering[0] = -1;
937 tmp.ordering[1] = -1;
938 tmp.ordering[2] = 1000;
939 tmp.isDuplicable = false;
940 theTable->push_back(tmp);
941 sizeOfTable += 1;
942
943 tmp.processTypeName = "DNAIonisation";
944 tmp.processType = 2;
945 tmp.processSubType = 53;
946 tmp.ordering[0] = -1;
947 tmp.ordering[1] = -1;
948 tmp.ordering[2] = 1000;
949 tmp.isDuplicable = false;
950 theTable->push_back(tmp);
951 sizeOfTable += 1;
952
953 tmp.processTypeName = "DNAVibExcit";
954 tmp.processType = 2;
955 tmp.processSubType = 54;
956 tmp.ordering[0] = -1;
957 tmp.ordering[1] = -1;
958 tmp.ordering[2] = 1000;
959 tmp.isDuplicable = false;
960 theTable->push_back(tmp);
961 sizeOfTable += 1;
962
963 tmp.processTypeName = "DNAAttachment";
964 tmp.processType = 2;
965 tmp.processSubType = 55;
966 tmp.ordering[0] = -1;
967 tmp.ordering[1] = -1;
968 tmp.ordering[2] = 1000;
969 tmp.isDuplicable = false;
970 theTable->push_back(tmp);
971 sizeOfTable += 1;
972
973 tmp.processTypeName = "DNAChargeDec";
974 tmp.processType = 2;
975 tmp.processSubType = 56;
976 tmp.ordering[0] = -1;
977 tmp.ordering[1] = -1;
978 tmp.ordering[2] = 1000;
979 tmp.isDuplicable = false;
980 theTable->push_back(tmp);
981 sizeOfTable += 1;
982
983 tmp.processTypeName = "DNAChargeInc";
984 tmp.processType = 2;
985 tmp.processSubType = 57;
986 tmp.ordering[0] = -1;
987 tmp.ordering[1] = -1;
988 tmp.ordering[2] = 1000;
989 tmp.isDuplicable = false;
990 theTable->push_back(tmp);
991 sizeOfTable += 1;
992
993 tmp.processTypeName = "DNAElectronSolvatation";
994 tmp.processType = 2;
995 tmp.processSubType = 58;
996 tmp.ordering[0] = -1;
997 tmp.ordering[1] = -1;
998 tmp.ordering[2] = 1000;
999 tmp.isDuplicable = false;
1000 theTable->push_back(tmp);
1001 sizeOfTable += 1;
1002
1003 tmp.processTypeName = "DNAMolecularDecay";
1004 tmp.processType = 6;
1005 tmp.processSubType = 59;
1006 tmp.ordering[0] = 1000;
1007 tmp.ordering[1] = -1;
1008 tmp.ordering[2] = -1;
1009 tmp.isDuplicable = false;
1010 theTable->push_back(tmp);
1011 sizeOfTable += 1;
1012
1013 tmp.processTypeName = "ITTransportation";
1014 tmp.processType = 1;
1015 tmp.processSubType = 60;
1016 tmp.ordering[0] = -1;
1017 tmp.ordering[1] = 0;
1018 tmp.ordering[2] = 0;
1019 tmp.isDuplicable = false;
1020 theTable->push_back(tmp);
1021 sizeOfTable += 1;
1022
1023 tmp.processTypeName = "DNABrownianTransportation";
1024 tmp.processType = 1;
1025 tmp.processSubType = 61;
1026 tmp.ordering[0] = -1;
1027 tmp.ordering[1] = 0;
1028 tmp.ordering[2] = 0;
1029 tmp.isDuplicable = false;
1030 theTable->push_back(tmp);
1031 sizeOfTable += 1;
1032
1033 tmp.processTypeName = "DNADoubleIonisation";
1034 tmp.processType = 2;
1035 tmp.processSubType = 62;
1036 tmp.ordering[0] = -1;
1037 tmp.ordering[1] = -1;
1038 tmp.ordering[2] = 1000;
1039 tmp.isDuplicable = false;
1040 theTable->push_back(tmp);
1041 sizeOfTable += 1;
1042
1043 tmp.processTypeName = "DNADoubleCapture";
1044 tmp.processType = 2;
1045 tmp.processSubType = 63;
1046 tmp.ordering[0] = -1;
1047 tmp.ordering[1] = -1;
1048 tmp.ordering[2] = 1000;
1049 tmp.isDuplicable = false;
1050 theTable->push_back(tmp);
1051 sizeOfTable += 1;
1052
1053 tmp.processTypeName = "DNAIonisingTransfer";
1054 tmp.processType = 2;
1055 tmp.processSubType = 64;
1056 tmp.ordering[0] = -1;
1057 tmp.ordering[1] = -1;
1058 tmp.ordering[2] = 1000;
1059 tmp.isDuplicable = false;
1060 theTable->push_back(tmp);
1061 sizeOfTable += 1;
1062
1063 tmp.processTypeName = "HadElastic";
1064 tmp.processType = 4;
1065 tmp.processSubType = 111;
1066 tmp.ordering[0] = -1;
1067 tmp.ordering[1] = -1;
1068 tmp.ordering[2] = 1000;
1069 tmp.isDuplicable = false;
1070 theTable->push_back(tmp);
1071 sizeOfTable += 1;
1072
1073 tmp.processTypeName = "HadInElastic";
1074 tmp.processType = 4;
1075 tmp.processSubType = 121;
1076 tmp.ordering[0] = -1;
1077 tmp.ordering[1] = -1;
1078 tmp.ordering[2] = 1000;
1079 tmp.isDuplicable = false;
1080 theTable->push_back(tmp);
1081 sizeOfTable += 1;
1082
1083 tmp.processTypeName = "HadCapture";
1084 tmp.processType = 4;
1085 tmp.processSubType = 131;
1086 tmp.ordering[0] = -1;
1087 tmp.ordering[1] = -1;
1088 tmp.ordering[2] = 1000;
1089 tmp.isDuplicable = false;
1090 theTable->push_back(tmp);
1091 sizeOfTable += 1;
1092
1093 tmp.processTypeName = "MuAtomicCapture";
1094 tmp.processType = 4;
1095 tmp.processSubType = 132;
1096 tmp.ordering[0] = -1;
1097 tmp.ordering[1] = -1;
1098 tmp.ordering[2] = 1000;
1099 tmp.isDuplicable = false;
1100 theTable->push_back(tmp);
1101 sizeOfTable += 1;
1102
1103 tmp.processTypeName = "HadFission";
1104 tmp.processType = 4;
1105 tmp.processSubType = 141;
1106 tmp.ordering[0] = -1;
1107 tmp.ordering[1] = -1;
1108 tmp.ordering[2] = 1000;
1109 tmp.isDuplicable = false;
1110 theTable->push_back(tmp);
1111 sizeOfTable += 1;
1112
1113 tmp.processTypeName = "HadAtRest";
1114 tmp.processType = 4;
1115 tmp.processSubType = 151;
1116 tmp.ordering[0] = 1000;
1117 tmp.ordering[1] = -1;
1118 tmp.ordering[2] = -1;
1119 tmp.isDuplicable = false;
1120 theTable->push_back(tmp);
1121 sizeOfTable += 1;
1122
1123 tmp.processTypeName = "HadCEX";
1124 tmp.processType = 4;
1125 tmp.processSubType = 161;
1126 tmp.ordering[0] = -1;
1127 tmp.ordering[1] = -1;
1128 tmp.ordering[2] = 1000;
1129 tmp.isDuplicable = false;
1130 theTable->push_back(tmp);
1131 sizeOfTable += 1;
1132
1133 tmp.processTypeName = "Decay";
1134 tmp.processType = 6;
1135 tmp.processSubType = 201;
1136 tmp.ordering[0] = 1000;
1137 tmp.ordering[1] = -1;
1138 tmp.ordering[2] = 1000;
1139 tmp.isDuplicable = false;
1140 theTable->push_back(tmp);
1141 sizeOfTable += 1;
1142
1143 tmp.processTypeName = "DecayWSpin";
1144 tmp.processType = 6;
1145 tmp.processSubType = 202;
1146 tmp.ordering[0] = 1000;
1147 tmp.ordering[1] = -1;
1148 tmp.ordering[2] = 1000;
1149 tmp.isDuplicable = false;
1150 theTable->push_back(tmp);
1151 sizeOfTable += 1;
1152
1153 tmp.processTypeName = "DecayPiSpin";
1154 tmp.processType = 6;
1155 tmp.processSubType = 203;
1156 tmp.ordering[0] = 1000;
1157 tmp.ordering[1] = -1;
1158 tmp.ordering[2] = 1000;
1159 tmp.isDuplicable = false;
1160 theTable->push_back(tmp);
1161 sizeOfTable += 1;
1162
1163 tmp.processTypeName = "DecayRadio";
1164 tmp.processType = 6;
1165 tmp.processSubType = 210;
1166 tmp.ordering[0] = 1000;
1167 tmp.ordering[1] = -1;
1168 tmp.ordering[2] = 1000;
1169 tmp.isDuplicable = false;
1170 theTable->push_back(tmp);
1171 sizeOfTable += 1;
1172
1173 tmp.processTypeName = "DecayUnKnown";
1174 tmp.processType = 6;
1175 tmp.processSubType = 211;
1176 tmp.ordering[0] = -1;
1177 tmp.ordering[1] = -1;
1178 tmp.ordering[2] = 1000;
1179 tmp.isDuplicable = false;
1180 theTable->push_back(tmp);
1181 sizeOfTable += 1;
1182
1183 tmp.processTypeName = "DecayMuAtom";
1184 tmp.processType = 6;
1185 tmp.processSubType = 221;
1186 tmp.ordering[0] = 1000;
1187 tmp.ordering[1] = -1;
1188 tmp.ordering[2] = 1000;
1189 tmp.isDuplicable = false;
1190 theTable->push_back(tmp);
1191 sizeOfTable += 1;
1192
1193 tmp.processTypeName = "DecayExt";
1194 tmp.processType = 6;
1195 tmp.processSubType = 231;
1196 tmp.ordering[0] = 1000;
1197 tmp.ordering[1] = -1;
1198 tmp.ordering[2] = 1000;
1199 tmp.isDuplicable = false;
1200 theTable->push_back(tmp);
1201 sizeOfTable += 1;
1202
1203 tmp.processTypeName = "StepLimiter";
1204 tmp.processType = 7;
1205 tmp.processSubType = 401;
1206 tmp.ordering[0] = -1;
1207 tmp.ordering[1] = -1;
1208 tmp.ordering[2] = 1000;
1209 tmp.isDuplicable = false;
1210 theTable->push_back(tmp);
1211 sizeOfTable += 1;
1212
1213 tmp.processTypeName = "UsrSepcCuts";
1214 tmp.processType = 7;
1215 tmp.processSubType = 402;
1216 tmp.ordering[0] = -1;
1217 tmp.ordering[1] = -1;
1218 tmp.ordering[2] = 1000;
1219 tmp.isDuplicable = false;
1220 theTable->push_back(tmp);
1221 sizeOfTable += 1;
1222
1223 tmp.processTypeName = "NeutronKiller";
1224 tmp.processType = 7;
1225 tmp.processSubType = 403;
1226 tmp.ordering[0] = -1;
1227 tmp.ordering[1] = -1;
1228 tmp.ordering[2] = 1000;
1229 tmp.isDuplicable = false;
1230 theTable->push_back(tmp);
1231 sizeOfTable += 1;
1232
1233 tmp.processTypeName = "ParallelWorld";
1234 tmp.processType = 10;
1235 tmp.processSubType = 491;
1236 tmp.ordering[0] = 9900;
1237 tmp.ordering[1] = 1;
1238 tmp.ordering[2] = 9900;
1239 tmp.isDuplicable = true;
1240 theTable->push_back(tmp);
1241 sizeOfTable += 1;
1242}
@ JustWarning
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
G4ProcessVectorDoItIndex
@ idxPostStep
@ idxAlongStep
@ fElectromagnetic
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleType() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
void reset(G4bool ifSkipIon=true)
static G4ParticleTable * GetParticleTable()
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
void DumpOrdingParameterTable(G4int subType=-1) const
G4PhysicsListOrderingParameter GetOrdingParameter(G4int subType) const
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
G4ProcessVector * GetProcessList() const
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
void SetProcessOrderingToFirst(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
std::size_t size() const
static G4RunManagerKernel * GetRunManagerKernel()
G4int GetNumberOfParallelWorld() const
static G4ScoringManager * GetScoringManagerIfExist()
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
#define G4ThreadLocal
Definition: tls.hh:77