- // bremsstrahlung and pair production are both activated
- // G3 default value: 1
- // G4 processes: G4eBremsstrahlung/G4IeBremsstrahlung,
- // G4MuBremsstrahlung/G4IMuBremsstrahlung,
- // G4LowEnergyBremstrahlung
- // Particles: e-/e+; mu+/mu-
- // Physics: EM
- // flag = 0 no bremsstrahlung
- // flag = 1 bremsstrahlung, photon processed
- // flag = 2 bremsstrahlung, no photon stored
- // gMC ->SetProcess("BREM",1); // PAIRBREM 2. 0. 0. 3. lastmat
- // EMFCUT -1. 0. 0. 3. lastmat 0. ELPO-THR
- // 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)";
- 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) << 1.0; // pair production by muons and charged hadrons is 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
- AliceInp << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(1);
- AliceInp << setw(10) << 0.0; // e+, e- kinetic energy threshold (in GeV) for explicit pair production.
- AliceInp << setw(10) << 0.0; // no explicit bremsstrahlung production is simulated
- 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 << endl;
-
- // for e+ and e-
- AliceInp << "*";
- AliceInp << endl;
- AliceInp << "*Pair production by electrons is activated";
- AliceInp << endl;
- AliceInp << "*Generated from call: SetProcess('PAIR',1) or SetProcess('PAIR',2)";
- 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;
-
-BOTH:
- k = 0;
- } // end of if for PAIR
-
-
-
- // bremsstrahlung
- // G3 default value: 1
- // G4 processes: G4eBremsstrahlung/G4IeBremsstrahlung,
- // G4MuBremsstrahlung/G4IMuBremsstrahlung,
- // G4LowEnergyBremstrahlung
- // Particles: e-/e+; mu+/mu-
- // Physics: EM
- // flag = 0 no bremsstrahlung
- // flag = 1 bremsstrahlung, photon processed
- // flag = 2 bremsstrahlung, no photon stored
- // gMC ->SetProcess("BREM",1); // PAIRBREM 2. 0. 0. 3. lastmat
- // EMFCUT -1. 0. 0. 3. lastmat 0. ELPO-THR
- else if (strncmp(&sProcessFlag[i][0],"BREM",4) == 0) {
- for (j=0; j<iNbOfProc; j++) {
- if ((strncmp(&sProcessFlag[j][0],"PAIR",4) == 0) && iProcessValue[j] == 1) goto NOBREM;
- }
- if (iProcessValue[i] == 1 || iProcessValue[i] == 2) {
- AliceInp << "*";
- AliceInp << endl;
- AliceInp << "*Bremsstrahlung by muons and charged hadrons is activated";
- AliceInp << endl;
- AliceInp << "*Generated from call: SetProcess('BREM',1) or SetProcess('BREM',2)";
- AliceInp << endl;
- AliceInp << "*Energy threshold set by call SetCut('BCUTM',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) << 2.0; // bremsstrahlung by muons and charged hadrons is activated
- AliceInp << setw(10) << 0.0; // no meaning
- // 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 (j=0; j<iNbOfCut; j++) {
- if (strncmp(&sCutFlag[j][0],"BCUTM",5) == 0) fCut = fCutValue[j];
- }
- AliceInp << setw(10) << fCut; // photon energy threshold (GeV) for explicit bremsstrahlung production
- 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 ";
- AliceInp << setiosflags(ios::scientific) << setprecision(5);
- AliceInp << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(1);
- AliceInp << setw(10) << -1.0; // kinetic energy threshold (GeV) for e+/e- bremsstrahlung (resets to default=0)
- 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;
- }
- else if (iProcessValue[i] == 0) {
- AliceInp << "*";
- AliceInp << endl;
- AliceInp << "*No bremsstrahlung - no FLUKA card generated";
- AliceInp << endl;
- AliceInp << "*Generated from call: SetProcess('BREM',0)";
- AliceInp << endl;
- }
- else {
- AliceInp << "*";
- AliceInp << endl;
- AliceInp << "*Illegal flag value in SetProcess('BREM',?) call.";
- AliceInp << endl;
- AliceInp << "*No FLUKA card generated";
- AliceInp << endl;
- }
-NOBREM:
- j = 0;
- } // end of else if (strncmp(&sProcessFlag[i][0],"BREM",4) == 0)