- // 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(&fProcessFlag[i][0],"PAIR",4) == 0) && (fProcessValue[i] == 1 || fProcessValue[i] == 2)) {
-
- for (j=0; j<fNbOfProc; j++) {
- if ((strncmp(&fProcessFlag[j][0],"BREM",4) == 0) &&
- (fProcessValue[j] == 1 || fProcessValue[j] == 2) &&
- (fProcessMaterial[j] == fProcessMaterial[i])) {
- fprintf(pAliceInp,"*\n*Bremsstrahlung and pair production by muons and charged hadrons both activated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('BREM',1) and SetProcess('PAIR',1)\n");
- fprintf(pAliceInp,"*Energy threshold set by call SetCut('BCUTM',cut) or set to 0.\n");
- fprintf(pAliceInp,"*Energy threshold set by call SetCut('PPCUTM',cut) or set to 0.\n");
- // three = bremsstrahlung and pair production by muons and charged hadrons both are activated
- fprintf(pAliceInp,"PAIRBREM %10.1f",three);
- // 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<fNbOfCut; k++) {
- if (strncmp(&fCutFlag[k][0],"PPCUTM",6) == 0 &&
- (fCutMaterial[k] == fProcessMaterial[i])) fCut = fCutValue[k];
- }
- fprintf(pAliceInp,"%10.4g",fCut);
- // 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<fNbOfCut; k++) {
- if (strncmp(&fCutFlag[k][0],"BCUTM",5) == 0 &&
- (fCutMaterial[k] == fProcessMaterial[i])) fCut = fCutValue[k];
- }
- fprintf(pAliceInp,"%10.4g%10.1f%10.1f\n",fCut,matMin,matMax);
- // fCut = photon energy threshold (GeV) for explicit bremsstrahlung production
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
-
- // for e+ and e-
- fprintf(pAliceInp,"*\n*Kinetic energy threshold (GeV) for e+/e- bremsstrahlung - resets to default=0.\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('BREM',1);\n");
- fCut = -1.0;
- for (k=0; k<fNbOfCut; k++) {
- if (strncmp(&fCutFlag[k][0],"BCUTE",5) == 0 &&
- (fCutMaterial[k] == fProcessMaterial[i])) fCut = fCutValue[k];
- }
- //fCut = kinetic energy threshold (GeV) for e+/e- bremsstrahlung (resets to default=0)
- // zero = not used
- // zero = not used
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- // "ELPO-THR";
- fprintf(pAliceInp,"EMFCUT %10.4g%10.1f%10.1f%10.1f%10.1f%10.1fELPO-THR\n",fCut,zero,zero,matMin,matMax,one);
-
- // for e+ and e-
- fprintf(pAliceInp,"*\n*Pair production by electrons is activated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PAIR',1);\n");
- fCut = -1.0;
- for (k=0; k<fNbOfCut; k++) {
- if (strncmp(&fCutFlag[k][0],"CUTGAM",6) == 0 &&
- (fCutMaterial[k] == fProcessMaterial[i])) fCut = fCutValue[k];
- }
- // fCut = energy threshold (GeV) for gamma pair production (< 0.0 : resets to default, = 0.0 : ignored)
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- fprintf(pAliceInp,"EMFCUT %10.1f%10.1f%10.4g%10.1f%10.1f%10.1fPHOT-THR\n",zero,zero,fCut,matMin,matMax,one);
- goto BOTH;
- } // end of if for BREM
- } // end of loop for BREM
-
- // only pair production by muons and charged hadrons is activated
- fprintf(pAliceInp,"*\n*Pair production by muons and charged hadrons is activated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PAIR',1) or SetProcess('PAIR',2)\n");
- fprintf(pAliceInp,"*Energy threshold set by call SetCut('PPCUTM',cut) or set to 0.\n");
- // 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
- // one = pair production by muons and charged hadrons is activated
- // zero = e+, e- kinetic energy threshold (in GeV) for explicit pair production.
- // zero = no explicit bremsstrahlung production is simulated
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"PAIRBREM %10.1f%10.1f%10.1f%10.1f%10.1f\n",one,zero,zero,matMin,matMax);
-
- // for e+ and e-
- fprintf(pAliceInp,"*\n*Pair production by electrons is activated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PAIR',1) or SetProcess('PAIR',2)\n");
- fCut = -1.0;
- for (j=0; j<fNbOfCut; j++) {
- if (strncmp(&fCutFlag[j][0],"CUTGAM",6) == 0 &&
- (fCutMaterial[j] == fProcessMaterial[i])) fCut = fCutValue[j];
- }
- // zero = energy threshold (GeV) for Compton scattering (= 0.0 : ignored)
- // zero = energy threshold (GeV) for Photoelectric (= 0.0 : ignored)
- // fCut = energy threshold (GeV) for gamma pair production (< 0.0 : resets to default, = 0.0 : ignored)
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- fprintf(pAliceInp,"EMFCUT %10.1f%10.1f%10.4g%10.1f%10.1f%10.1fPHOT-THR\n",zero,zero,fCut,matMin,matMax,one);
-
- 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(&fProcessFlag[i][0],"BREM",4) == 0) {
- for (j = 0; j < fNbOfProc; j++) {
- if ((strncmp(&fProcessFlag[j][0],"PAIR",4) == 0) &&
- fProcessValue[j] == 1 &&
- (fProcessMaterial[j] == fProcessMaterial[i])) goto NOBREM;
- }
- if (fProcessValue[i] == 1 || fProcessValue[i] == 2) {
- fprintf(pAliceInp,"*\n*Bremsstrahlung by muons and charged hadrons is activated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('BREM',1) or SetProcess('BREM',2)\n");
- fprintf(pAliceInp,"*Energy threshold set by call SetCut('BCUTM',cut) or set to 0.\n");
- // two = bremsstrahlung by muons and charged hadrons is activated
- // zero = 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<fNbOfCut; j++) {
- if (strncmp(&fCutFlag[j][0],"BCUTM",5) == 0 &&
- (fCutMaterial[j] == fProcessMaterial[i])) fCut = fCutValue[j];
- }
- // fCut = photon energy threshold (GeV) for explicit bremsstrahlung production
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"PAIRBREM %10.1f%10.1f%10.4g%10.1f%10.1f\n",two,zero,fCut,matMin,matMax);
-
- // for e+ and e-
- fprintf(pAliceInp,"*\n*Kinetic energy threshold (GeV) for e+/e- bremsstrahlung - resets to default=0.\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('BREM',1);");
- // - one = kinetic energy threshold (GeV) for e+/e- bremsstrahlung (resets to default=0)
- // zero = not used
- // zero = not used
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- //"ELPO-THR";
- fprintf(pAliceInp,"EMFCUT %10.1f%10.1f%10.1f%10.1f%10.1f%10.1fELPO-THR\n",-one,zero,zero,matMin,matMax,one);
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*No bremsstrahlung - no FLUKA card generated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('BREM',0)\n");
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('BREM',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- NOBREM:
- j = 0;
- } // end of else if (strncmp(&fProcessFlag[i][0],"BREM",4) == 0)
-
- // Cerenkov photon generation
- // G3 default value: 0
- // G4 process: G4Cerenkov
- //
- // Particles: charged
- // Physics: Optical
- // flag = 0 no Cerenkov photon generation
- // flag = 1 Cerenkov photon generation
- // flag = 2 Cerenkov photon generation with primary stopped at each step
- //xx gMC ->SetProcess("CKOV",1); // ??? Cerenkov photon generation
-
- else if (strncmp(&fProcessFlag[i][0],"CKOV",4) == 0) {
- if ((fProcessValue[i] == 1 || fProcessValue[i] == 2) && global) {
- // Write comments
- fprintf(pAliceInp, "* \n");
- fprintf(pAliceInp, "*Cerenkov photon generation\n");
- fprintf(pAliceInp, "*Generated from call: SetProcess('CKOV',1) or SetProcess('CKOV',2)\n");
- // Loop over media
- for (Int_t im = 0; im < nmaterial; im++)
- {
- TGeoMaterial* material = dynamic_cast<TGeoMaterial*> (matList->At(im));
- Int_t idmat = material->GetIndex();
-
- if (!global && idmat != fProcessMaterial[i]) continue;
-
- fMaterials[idmat] = im;
- // Skip media with no Cerenkov properties
- TFlukaCerenkov* cerenkovProp;
- if (!(cerenkovProp = dynamic_cast<TFlukaCerenkov*>(material->GetCerenkovProperties()))) continue;
- //
- // This medium has Cerenkov properties
- //
- //
- // Write OPT-PROD card for each medium
- Float_t emin = cerenkovProp->GetMinimumEnergy();
- Float_t emax = cerenkovProp->GetMaximumEnergy();
- fprintf(pAliceInp, "OPT-PROD %10.4g%10.4g%10.4g%10.4g%10.4g%10.4gCERENKOV\n", emin, emax, 0.,
- Float_t(idmat), Float_t(idmat), 0.);
- //
- // Write OPT-PROP card for each medium
- // Forcing FLUKA to call user routines (queffc.cxx, rflctv.cxx, rfrndx.cxx)
- //
- fprintf(pAliceInp, "OPT-PROP %10.4g%10.4g%10.4g%10.1f%10.1f%10.1fWV-LIMIT\n",
- cerenkovProp->GetMinimumWavelength(),
- cerenkovProp->GetMaximumWavelength(),
- cerenkovProp->GetMaximumWavelength(),
- Float_t(idmat), Float_t(idmat), 0.0);
-
- if (cerenkovProp->IsMetal()) {
- fprintf(pAliceInp, "OPT-PROP %10.1f%10.1f%10.1f%10.1f%10.1f%10.1fMETAL\n",
- -100., -100., -100.,
- Float_t(idmat), Float_t(idmat), 0.0);
- } else {
- fprintf(pAliceInp, "OPT-PROP %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n",
- -100., -100., -100.,
- Float_t(idmat), Float_t(idmat), 0.0);
- }
-
-
- for (Int_t j = 0; j < 3; j++) {
- fprintf(pAliceInp, "OPT-PROP %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f&\n",
- -100., -100., -100.,
- Float_t(idmat), Float_t(idmat), 0.0);
- }
- // Photon detection efficiency user defined
-
- if (cerenkovProp->IsSensitive())
- fprintf(pAliceInp, "OPT-PROP %10.1f%10.1f%10.1f%10.1f%10.1f%10.1fSENSITIV\n",
- -100., -100., -100.,
- Float_t(idmat), Float_t(idmat), 0.0);
-
- } // materials
- } else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*No Cerenkov photon generation\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('CKOV',0)\n");
- // zero = not used
- // zero = not used
- // zero = not used
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- //"CERE-OFF";
- fprintf(pAliceInp,"OPT-PROD %10.1f%10.1f%10.1f%10.1f%10.1f%10.1fCERE-OFF\n",zero,zero,zero,matMin,matMax,one);
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('CKOV',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"CKOV",4) == 0)
-
- // Compton scattering
- // G3 default value: 1
- // G4 processes: G4ComptonScattering,
- // G4LowEnergyCompton,
- // G4PolarizedComptonScattering
- // Particles: gamma
- // Physics: EM
- // flag = 0 no Compton scattering
- // flag = 1 Compton scattering, electron processed
- // flag = 2 Compton scattering, no electron stored
- // gMC ->SetProcess("COMP",1); // EMFCUT -1. 0. 0. 3. lastmat 0. PHOT-THR
- else if (strncmp(&fProcessFlag[i][0],"COMP",4) == 0) {
- if (fProcessValue[i] == 1 || fProcessValue[i] == 2) {
- fprintf(pAliceInp,"*\n*Energy threshold (GeV) for Compton scattering - resets to default=0.\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('COMP',1);\n");
- // - one = energy threshold (GeV) for Compton scattering - resets to default=0.
- // zero = not used
- // zero = not used
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- //"PHOT-THR";
- fprintf(pAliceInp,"EMFCUT %10.1f%10.1f%10.1f%10.1f%10.1f%10.1fPHOT-THR\n",-one,zero,zero,matMin,matMax,one);
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*No Compton scattering - no FLUKA card generated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('COMP',0)\n");
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('COMP',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"COMP",4) == 0)
-
- // decay
- // G3 default value: 1
- // G4 process: G4Decay
- //
- // Particles: all which decay is applicable for
- // Physics: General
- // flag = 0 no decays
- // flag = 1 decays, secondaries processed
- // flag = 2 decays, no secondaries stored
- //gMC ->SetProcess("DCAY",1); // not available
- else if ((strncmp(&fProcessFlag[i][0],"DCAY",4) == 0) && fProcessValue[i] == 1)
- cout << "SetProcess for flag=" << &fProcessFlag[i][0] << " value=" << fProcessValue[i] << " not avaliable!" << endl;
-
- // delta-ray
- // G3 default value: 2
- // !! G4 treats delta rays in different way
- // G4 processes: G4eIonisation/G4IeIonization,
- // G4MuIonisation/G4IMuIonization,
- // G4hIonisation/G4IhIonisation
- // Particles: charged
- // Physics: EM
- // flag = 0 no energy loss
- // flag = 1 restricted energy loss fluctuations
- // flag = 2 complete energy loss fluctuations
- // flag = 3 same as 1
- // flag = 4 no energy loss fluctuations
- // gMC ->SetProcess("DRAY",0); // DELTARAY 1.E+6 0. 0. 3. lastmat 0.
- else if (strncmp(&fProcessFlag[i][0],"DRAY",4) == 0) {
- if (fProcessValue[i] == 0 || fProcessValue[i] == 4) {
- fprintf(pAliceInp,"*\n*Kinetic energy threshold (GeV) for delta ray production\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('DRAY',0) or SetProcess('DRAY',4)\n");
- fprintf(pAliceInp,"*No delta ray production by muons - threshold set artificially high\n");
- Double_t emin = 1.0e+6; // kinetic energy threshold (GeV) for delta ray production (discrete energy transfer)
- // zero = ignored
- // zero = ignored
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- fprintf(pAliceInp,"DELTARAY %10.4g%10.1f%10.1f%10.1f%10.1f%10.1f\n",emin,zero,zero,matMin,matMax,one);
- }
- else if (fProcessValue[i] == 1 || fProcessValue[i] == 2 || fProcessValue[i] == 3) {
- fprintf(pAliceInp,"*\n*Kinetic energy threshold (GeV) for delta ray production\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('DRAY',flag), flag=1,2,3\n");
- fprintf(pAliceInp,"*Delta ray production by muons switched on\n");
- fprintf(pAliceInp,"*Energy threshold set by call SetCut('DCUTM',cut) or set to 1.0e+6.\n");
- fCut = 1.0e+6;
- for (j = 0; j < fNbOfCut; j++) {
- if (strncmp(&fCutFlag[j][0],"DCUTM",5) == 0 &&
- fCutMaterial[j] == fProcessMaterial[i]) fCut = fCutValue[j];
- }
- // fCut = kinetic energy threshold (GeV) for delta ray production (discrete energy transfer)
- // zero = ignored
- // zero = ignored
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- fprintf(pAliceInp,"DELTARAY %10.4g%10.1f%10.1f%10.1f%10.1f%10.1f\n",fCut,zero,zero,matMin,matMax,one);
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('DRAY',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"DRAY",4) == 0)
-
- // hadronic process
- // G3 default value: 1
- // G4 processes: all defined by TG4PhysicsConstructorHadron
- //
- // Particles: hadrons
- // Physics: Hadron
- // flag = 0 no multiple scattering
- // flag = 1 hadronic interactions, secondaries processed
- // flag = 2 hadronic interactions, no secondaries stored
- // gMC ->SetProcess("HADR",1); // ??? hadronic process
- //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) ?????
- else if (strncmp(&fProcessFlag[i][0],"HADR",4) == 0) {
- if (fProcessValue[i] == 1 || fProcessValue[i] == 2) {
- fprintf(pAliceInp,"*\n*Hadronic interaction is ON by default in FLUKA\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*Hadronic interaction is set OFF\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('HADR',0);\n");
- fprintf(pAliceInp,"*Switching off hadronic interactions not foreseen in FLUKA\n");
- // zero = ignored
- // three = multiple scattering for hadrons and muons is completely suppressed
- // zero = no spin-relativistic corrections
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('HADR',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"HADR",4) == 0)
-
-
- // energy loss
- // G3 default value: 2
- // G4 processes: G4eIonisation/G4IeIonization,
- // G4MuIonisation/G4IMuIonization,
- // G4hIonisation/G4IhIonisation
- //
- // Particles: charged
- // Physics: EM
- // flag=0 no energy loss
- // flag=1 restricted energy loss fluctuations
- // flag=2 complete energy loss fluctuations
- // flag=3 same as 1
- // flag=4 no energy loss fluctuations
- // If the value ILOSS is changed, then (in G3) cross-sections and energy
- // loss tables must be recomputed via the command 'PHYSI'
- // gMC ->SetProcess("LOSS",2); // ??? IONFLUCT ? energy loss
- else if (strncmp(&fProcessFlag[i][0],"LOSS",4) == 0) {
- if (fProcessValue[i] == 2) { // complete energy loss fluctuations
- fprintf(pAliceInp,"*\n*Complete energy loss fluctuations do not exist in FLUKA\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('LOSS',2);\n");
- fprintf(pAliceInp,"*flag=2=complete energy loss fluctuations\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- else if (fProcessValue[i] == 1 || fProcessValue[i] == 3) { // restricted energy loss fluctuations
- fprintf(pAliceInp,"*\n*Restricted energy loss fluctuations\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('LOSS',1) or SetProcess('LOSS',3)\n");
- // one = restricted energy loss fluctuations (for hadrons and muons) switched on
- // one = restricted energy loss fluctuations (for e+ and e-) switched on
- // one = minimal accuracy
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"IONFLUCT %10.1f%10.1f%10.1f%10.1f%10.1f\n",one,one,one,matMin,matMax);
- }
- else if (fProcessValue[i] == 4) { // no energy loss fluctuations
- fprintf(pAliceInp,"*\n*No energy loss fluctuations\n");
- fprintf(pAliceInp,"*\n*Generated from call: SetProcess('LOSS',4)\n");
- // - one = restricted energy loss fluctuations (for hadrons and muons) switched off
- // - one = restricted energy loss fluctuations (for e+ and e-) switched off
- // one = minimal accuracy
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"IONFLUCT %10.1f%10.1f%10.1f%10.1f%10.1f\n",-one,-one,one,matMin,matMax);
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('LOSS',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"LOSS",4) == 0)
-
-
- // multiple scattering
- // G3 default value: 1
- // G4 process: G4MultipleScattering/G4IMultipleScattering
- //
- // Particles: charged
- // Physics: EM
- // flag = 0 no multiple scattering
- // flag = 1 Moliere or Coulomb scattering
- // flag = 2 Moliere or Coulomb scattering
- // flag = 3 Gaussian scattering
- // gMC ->SetProcess("MULS",1); // MULSOPT multiple scattering
- else if (strncmp(&fProcessFlag[i][0],"MULS",4) == 0) {
- if (fProcessValue[i] == 1 || fProcessValue[i] == 2 || fProcessValue[i] == 3) {
- fprintf(pAliceInp,"*\n*Multiple scattering is ON by default for e+e- and for hadrons/muons\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*Multiple scattering is set OFF\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('MULS',0);\n");
- // zero = ignored
- // three = multiple scattering for hadrons and muons is completely suppressed
- // three = multiple scattering for e+ and e- is completely suppressed
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"MULSOPT %10.1f%10.1f%10.1f%10.1f%10.1f\n",zero,three,three,matMin,matMax);
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('MULS',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"MULS",4) == 0)
-
-
- // muon nuclear interaction
- // G3 default value: 0
- // G4 processes: G4MuNuclearInteraction,
- // G4MuonMinusCaptureAtRest
- //
- // Particles: mu
- // Physics: Not set
- // flag = 0 no muon-nuclear interaction
- // flag = 1 nuclear interaction, secondaries processed
- // flag = 2 nuclear interaction, secondaries not processed
- // gMC ->SetProcess("MUNU",1); // MUPHOTON 1. 0. 0. 3. lastmat
- else if (strncmp(&fProcessFlag[i][0],"MUNU",4) == 0) {
- if (fProcessValue[i] == 1) {
- fprintf(pAliceInp,"*\n*Muon nuclear interactions with production of secondary hadrons\n");
- fprintf(pAliceInp,"*\n*Generated from call: SetProcess('MUNU',1);\n");
- // one = full simulation of muon nuclear interactions and production of secondary hadrons
- // zero = ratio of longitudinal to transverse virtual photon cross-section - Default = 0.25.
- // zero = fraction of rho-like interactions ( must be < 1) - Default = 0.75.
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"MUPHOTON %10.1f%10.1f%10.1f%10.1f%10.1f\n",one,zero,zero,matMin,matMax);
- }
- else if (fProcessValue[i] == 2) {
- fprintf(pAliceInp,"*\n*Muon nuclear interactions without production of secondary hadrons\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('MUNU',2);\n");
- // two = full simulation of muon nuclear interactions and production of secondary hadrons
- // zero = ratio of longitudinal to transverse virtual photon cross-section - Default = 0.25.
- // zero = fraction of rho-like interactions ( must be < 1) - Default = 0.75.
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"MUPHOTON %10.1f%10.1f%10.1f%10.1f%10.1f\n",two,zero,zero,matMin,matMax);
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*No muon nuclear interaction - no FLUKA card generated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('MUNU',0)\n");
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('MUNU',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"MUNU",4) == 0)
-
-
- // photofission
- // G3 default value: 0
- // G4 process: ??
- //
- // Particles: gamma
- // Physics: ??
- // gMC ->SetProcess("PFIS",0); // PHOTONUC -1. 0. 0. 3. lastmat 0.
- // flag = 0 no photon fission
- // flag = 1 photon fission, secondaries processed
- // flag = 2 photon fission, no secondaries stored
- else if (strncmp(&fProcessFlag[i][0],"PFIS",4) == 0) {
- if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*No photonuclear interactions\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PFIS',0);\n");
- // - one = no photonuclear interactions
- // zero = not used
- // zero = not used
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"PHOTONUC %10.1f%10.1f%10.1f%10.1f%10.1f\n",-one,zero,zero,matMin,matMax);
- }
- else if (fProcessValue[i] == 1) {
- fprintf(pAliceInp,"*\n*Photon nuclear interactions are activated at all energies\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PFIS',1);\n");
- // one = photonuclear interactions are activated at all energies
- // zero = not used
- // zero = not used
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"PHOTONUC %10.1f%10.1f%10.1f%10.1f%10.1f\n",one,zero,zero,matMin,matMax);
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*No photofission - no FLUKA card generated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PFIS',0)\n");
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('PFIS',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- }
-
-
- // photo electric effect
- // G3 default value: 1
- // G4 processes: G4PhotoElectricEffect
- // G4LowEnergyPhotoElectric
- // Particles: gamma
- // Physics: EM
- // flag = 0 no photo electric effect
- // flag = 1 photo electric effect, electron processed
- // flag = 2 photo electric effect, no electron stored
- // gMC ->SetProcess("PHOT",1); // EMFCUT 0. -1. 0. 3. lastmat 0. PHOT-THR
- else if (strncmp(&fProcessFlag[i][0],"PHOT",4) == 0) {
- if (fProcessValue[i] == 1 || fProcessValue[i] == 2) {
- fprintf(pAliceInp,"*\n*Photo electric effect is activated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PHOT',1);\n");
- // zero = ignored
- // - one = resets to default=0.
- // zero = ignored
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- // one = step length in assigning indices
- //"PHOT-THR";
- fprintf(pAliceInp,"EMFCUT %10.1f%10.1f%10.1f%10.1f%10.1f%10.1fPHOT-THR\n",zero,-one,zero,matMin,matMax,one);
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*No photo electric effect - no FLUKA card generated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('PHOT',0)\n");
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('PHOT',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // else if (strncmp(&fProcessFlag[i][0],"PHOT",4) == 0)
-
-
- // Rayleigh scattering
- // G3 default value: 0
- // G4 process: G4OpRayleigh
- //
- // Particles: optical photon
- // Physics: Optical
- // flag = 0 Rayleigh scattering off
- // flag = 1 Rayleigh scattering on
- //xx gMC ->SetProcess("RAYL",1);
- else if (strncmp(&fProcessFlag[i][0],"RAYL",4) == 0) {
- if (fProcessValue[i] == 1) {
- fprintf(pAliceInp,"*\n*Rayleigh scattering is ON by default in FLUKA\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- else if (fProcessValue[i] == 0) {
- fprintf(pAliceInp,"*\n*Rayleigh scattering is set OFF\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('RAYL',0);\n");
- // - one = no Rayleigh scattering and no binding corrections for Compton
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"EMFRAY %10.1f%10.1f%10.1f%10.1f\n",-one,three,matMin,matMax);
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('RAYL',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // end of else if (strncmp(&fProcessFlag[i][0],"RAYL",4) == 0)
-
-
- // synchrotron radiation in magnetic field
- // G3 default value: 0
- // G4 process: G4SynchrotronRadiation
- //
- // Particles: ??
- // Physics: Not set
- // flag = 0 no synchrotron radiation
- // flag = 1 synchrotron radiation
- //xx gMC ->SetProcess("SYNC",1); // synchrotron radiation generation
- else if (strncmp(&fProcessFlag[i][0],"SYNC",4) == 0) {
- fprintf(pAliceInp,"*\n*Synchrotron radiation generation is NOT implemented in FLUKA\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
-
-
- // Automatic calculation of tracking medium parameters
- // flag = 0 no automatic calculation
- // flag = 1 automatic calculation
- //xx gMC ->SetProcess("AUTO",1); // ??? automatic computation of the tracking medium parameters
- else if (strncmp(&fProcessFlag[i][0],"AUTO",4) == 0) {
- fprintf(pAliceInp,"*\n*Automatic calculation of tracking medium parameters is always ON in FLUKA\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
-
-
- // To control energy loss fluctuation model
- // flag = 0 Urban model
- // flag = 1 PAI model
- // flag = 2 PAI+ASHO model (not active at the moment)
- //xx gMC ->SetProcess("STRA",1); // ??? energy fluctuation model
- else if (strncmp(&fProcessFlag[i][0],"STRA",4) == 0) {
- if (fProcessValue[i] == 0 || fProcessValue[i] == 2 || fProcessValue[i] == 3) {
- fprintf(pAliceInp,"*\n*Ionization energy losses calculation is activated\n");
- fprintf(pAliceInp,"*Generated from call: SetProcess('STRA',n);, n=0,1,2\n");
- // one = restricted energy loss fluctuations (for hadrons and muons) switched on
- // one = restricted energy loss fluctuations (for e+ and e-) switched on
- // one = minimal accuracy
- // matMin = lower bound of the material indices in which the respective thresholds apply
- // matMax = upper bound of the material indices in which the respective thresholds apply
- fprintf(pAliceInp,"IONFLUCT %10.1f%10.1f%10.1f%10.1f%10.1f\n",one,one,one,matMin,matMax);
- }
- else {
- fprintf(pAliceInp,"*\n*Illegal flag value in SetProcess('STRA',?) call.\n");
- fprintf(pAliceInp,"*No FLUKA card generated\n");
- }
- } // else if (strncmp(&fProcessFlag[i][0],"STRA",4) == 0)
-
-
-
-
- else { // processes not yet treated
-
- // light photon absorption (Cerenkov photons)
- // it is turned on when Cerenkov process is turned on
- // G3 default value: 0
- // G4 process: G4OpAbsorption, G4OpBoundaryProcess
- //
- // Particles: optical photon
- // Physics: Optical
- // flag = 0 no absorption of Cerenkov photons
- // flag = 1 absorption of Cerenkov photons
- // gMC ->SetProcess("LABS",2); // ??? Cerenkov light absorption
-
-
-
- cout << "SetProcess for flag=" << &fProcessFlag[i][0] << " value=" << fProcessValue[i] << " not yet implemented!" << endl;
- }
- } //end of loop number of SetProcess calls
-
-
-// Loop over number of SetCut calls
- for (Int_t i = 0; i < fNbOfCut; i++) {
- Float_t matMin = three;
- Float_t matMax = fLastMaterial;
- Bool_t global = kTRUE;
- if (fCutMaterial[i] != -1) {
- matMin = Float_t(fCutMaterial[i]);
- matMax = matMin;
- global = kFALSE;
- }