+ // G3 default value: 1
+ // G4 processes: G4GammaConversion,
+ // G4MuPairProduction/G4IMuPairProduction
+ // G4LowEnergyGammaConversion
+ // Particles: gamma, mu
+ // Physics: EM
+ // flag = 0 no delta rays
+ // flag = 1 delta rays, secondaries processed
+ // flag = 2 delta rays, no secondaries stored
+ // gMC ->SetProcess("PAIR",1); // PAIRBREM 1. 0. 0. 3. lastmat
+ // EMFCUT 0. 0. -1. 3. lastmat 0. PHOT-THR
+ else if ((strncmp(&sProcessFlag[i][0],"PAIR",4) == 0) && (iProcessValue[i] == 1 || iProcessValue[i] == 2)) {
+ for (j=0; j<iNbOfProc; j++) {
+ if ((strncmp(&sProcessFlag[j][0],"BREM",4) == 0) && (iProcessValue[j] == 1 || iProcessValue[j] == 2)) {
+ AliceInp << "*";
+ AliceInp << endl;
+ AliceInp << "*Bremsstrahlung and pair production by muons and charged hadrons both activated";
+ AliceInp << endl;
+ AliceInp << "*Generated from call: SetProcess('BREM',1) and SetProcess('PAIR',1)";
+ AliceInp << endl;
+ AliceInp << "*Energy threshold set by call SetCut('BCUTM',cut) or set to 0.";
+ AliceInp << endl;
+ AliceInp << "*Energy threshold set by call SetCut('PPCUTM',cut) or set to 0.";
+ AliceInp << endl;
+ AliceInp << setw(10) << "PAIRBREM ";
+ AliceInp << setiosflags(ios::scientific) << setprecision(5);
+ AliceInp << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(1);
+ AliceInp << setw(10) << 3.0; // bremsstrahlung and pair production by muons and charged hadrons both are activated
+ // direct pair production by muons
+ // G4 particles: "e-", "e+"
+ // G3 default value: 0.01 GeV
+ //gMC ->SetCut("PPCUTM",cut); // total energy cut for direct pair prod. by muons
+ fCut = 0.0;
+ for (k=0; k<iNbOfCut; k++) {
+ if (strncmp(&sCutFlag[k][0],"PPCUTM",6) == 0) fCut = fCutValue[k];
+ }
+ AliceInp << setiosflags(ios::scientific) << setprecision(5);
+ AliceInp << setw(10) << fCut; // e+, e- kinetic energy threshold (in GeV) for explicit pair production.
+ // muon and hadron bremsstrahlung
+ // G4 particles: "gamma"
+ // G3 default value: CUTGAM=0.001 GeV
+ //gMC ->SetCut("BCUTM",cut); // cut for muon and hadron bremsstrahlung
+ fCut = 0.0;
+ for (k=0; k<iNbOfCut; k++) {
+ if (strncmp(&sCutFlag[k][0],"BCUTM",5) == 0) fCut = fCutValue[k];
+ }
+ AliceInp << setiosflags(ios::scientific) << setprecision(5);
+ AliceInp << setw(10) << fCut; // photon energy threshold (GeV) for explicit bremsstrahlung production
+ AliceInp << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(1);
+ AliceInp << setw(10) << 3.0; // lower bound of the material indices in which the respective thresholds apply
+ AliceInp << setw(10) << setprecision(2);
+ AliceInp << setw(10) << fLastMaterial; // upper bound of the material indices in which the respective thresholds apply
+ AliceInp << endl;
+
+ // for e+ and e-
+ AliceInp << "*";
+ AliceInp << endl;
+ AliceInp << "*Kinetic energy threshold (GeV) for e+/e- bremsstrahlung - resets to default=0.";
+ AliceInp << endl;
+ AliceInp << "*Generated from call: SetProcess('BREM',1);";
+ AliceInp << endl;
+ AliceInp << setw(10) << "EMFCUT ";
+ fCut = -1.0;
+ for (k=0; k<iNbOfCut; k++) {
+ if (strncmp(&sCutFlag[k][0],"BCUTE",5) == 0) fCut = fCutValue[k];
+ }
+ AliceInp << setiosflags(ios::scientific) << setprecision(5);
+ AliceInp << setw(10) << fCut; // kinetic energy threshold (GeV) for e+/e- bremsstrahlung (resets to default=0)
+ AliceInp << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(1);
+ AliceInp << setw(10) << 0.0; // not used
+ AliceInp << setw(10) << 0.0; // not used
+ AliceInp << setw(10) << 3.0; // lower bound of the material indices in which the respective thresholds apply
+ AliceInp << setw(10) << setprecision(2);
+ AliceInp << setw(10) << fLastMaterial; // upper bound of the material indices in which the respective thresholds apply
+ AliceInp << setprecision(1);
+ AliceInp << setw(10) << 1.0; // step length in assigning indices
+ AliceInp << setw(8) << "ELPO-THR";
+ AliceInp << endl;
+
+ // for e+ and e-
+ AliceInp << "*";
+ AliceInp << endl;
+ AliceInp << "*Pair production by electrons is activated";
+ AliceInp << endl;
+ AliceInp << "*Generated from call: SetProcess('PAIR',1);";
+ AliceInp << endl;
+ AliceInp << setw(10) << "EMFCUT ";
+ AliceInp << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(1);
+ AliceInp << setw(10) << 0.0; // energy threshold (GeV) for Compton scattering (= 0.0 : ignored)
+ AliceInp << setw(10) << 0.0; // energy threshold (GeV) for Photoelectric (= 0.0 : ignored)
+ fCut = -1.0;
+ for (j=0; j<iNbOfCut; j++) {
+ if (strncmp(&sCutFlag[j][0],"CUTGAM",6) == 0) fCut = fCutValue[j];
+ }
+ AliceInp << setiosflags(ios::scientific) << setprecision(5);
+ AliceInp << setw(10) << fCut; // energy threshold (GeV) for gamma pair production (< 0.0 : resets to default, = 0.0 : ignored)
+ AliceInp << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(1);
+ AliceInp << setw(10) << 3.0; // lower bound of the material indices in which the respective thresholds apply
+ AliceInp << setprecision(2);
+ AliceInp << setw(10) << fLastMaterial; // upper bound of the material indices in which the respective thresholds apply
+ AliceInp << setprecision(1);
+ AliceInp << setw(10) << 1.0; // step length in assigning indices
+ AliceInp << setw(8) << "PHOT-THR";
+ AliceInp << endl;
+ goto BOTH;
+ } // end of if for BREM
+ } // end of loop for BREM
+
+ // only pair production by muons and charged hadrons is activated
+ AliceInp << "*";
+ AliceInp << endl;
+ AliceInp << "*Pair production by muons and charged hadrons is activated";
+ AliceInp << endl;
+ AliceInp << "*Generated from call: SetProcess('PAIR',1) or SetProcess('PAIR',2)";