Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added forgotten NeutronKiller process, cleanup comments #4477

Merged
merged 1 commit into from Jul 1, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions SimG4Core/Physics/interface/G4ProcessTypeEnumerator.h
Expand Up @@ -25,6 +25,8 @@ class G4ProcessTypeEnumerator {

std::string processG4Name(int);

int processId(const std::string& name);

};
#endif

71 changes: 62 additions & 9 deletions SimG4Core/Physics/src/G4ProcessTypeEnumerator.cc
@@ -1,24 +1,66 @@
#include "SimG4Core/Physics/interface/G4ProcessTypeEnumerator.h"

static const int nprocesses = 46;
static const int nprocesses = 47;
static const std::string g4processes[nprocesses] = {
"Transportation", "CoupleTrans", "CoulombScat", "Ionisation", "Brems",
"PairProdCharged", "Annih", "AnnihToMuMu", "AnnihToHad", "NuclearStopp",
"Msc", "Rayleigh", "PhotoElectric", "Compton", "Conv",
"ConvToMuMu", "Cerenkov", "Scintillation", "SynchRad", "TransRad",
"OpAbsorp", "OpBoundary", "OpRayleigh", "OpWLS", "OpMieHG",
"DNAElastic", "DNAExcit", "DNAIonisation", "DNAVibExcit", "DNAAttachment",
"DNAChargeDec", "DNAChargeInc", "HadElastic", "HadInElastic", "HadCaptue",
"DNAChargeDec", "DNAChargeInc", "HadElastic", "HadInelastic", "HadCapture",
"HadFission", "HadAtRest", "HadCEX", "Decay", "DecayWSpin",
"DecayPiWSpin", "DecayRadio", "DecayUnKnown", "DecayExt", "StepLimiter",
"UsrSpecCuts" };
"UsrSpecCuts", "NeutronKiller"};
static const int g4subtype[nprocesses] = {
91, 92, 1, 2, 3, 4, 5, 6, 7, 8,
10, 11, 12, 13, 14, 15, 21, 22, 23, 24,
31, 32, 33, 34, 35, 51, 52, 53, 54, 55,
56, 57, 111, 121, 131, 141, 151, 161, 201, 202,
203, 210, 211, 231, 401, 402 };

91, // Transportation
92, // CoupleTrans
1, // CoulombScat
2, // Ionisation
3, // Brems
4, // PairProdCharged
5, // Annih
6, // AnnihToMuMu
7, // AnnihToHad
8, // NuclearStopp
10, // Msc
11, //
12, // PhotoElectric
13, // Compton
14, // Conv
15, // ConvToMuMu
21,
22,
23,
24,
31,
32,
33,
34,
35,
51,
52,
53,
54,
55,
56,
57,
111, // HadElastic
121, // HadInelastic
131, // HadCapture
141, // HadFission
151, // HadAtRest
161,
201, // Decay
202, // DecayWSpin
203, // DecayPiWSpin
210, // DecayRadio
211, // DecayUnKnown
231, // DecayExt
401, // StepLimiter
402,
403 // NeutronKiller
};

G4ProcessTypeEnumerator::G4ProcessTypeEnumerator()
{}
Expand All @@ -38,3 +80,14 @@ std::string G4ProcessTypeEnumerator::processG4Name(int idx)
return res;
}

int G4ProcessTypeEnumerator::processId(const std::string& name)
{
int idx = 0;
for(int i=0; i<nprocesses; ++i) {
if(name == g4processes[i]) {
idx = g4subtype[i];
break;
}
}
return idx;
}