Randomized energy fix
This commit is contained in:
parent
94169fed70
commit
18cb077fe2
|
|
@ -99,13 +99,13 @@ int main(int argc, char **argv){
|
||||||
|
|
||||||
//To set beam energy loss, use energy loss app, and create table with target isotope, set Initial beam energy as max energy
|
//To set beam energy loss, use energy loss app, and create table with target isotope, set Initial beam energy as max energy
|
||||||
transfer.SetA(18, 9, 0); // 18Ne projectile
|
transfer.SetA(18, 9, 0); // 18Ne projectile
|
||||||
TGraph* elossBeam = LoadELoss("../ELoss/HeLoss/E_vs_x_Na-21.dat");
|
//TGraph* elossBeam = LoadELoss("../ELoss/HeLoss/E_vs_x_Na-21.dat");
|
||||||
transfer.Seta(4, 2); // 4He target
|
transfer.Seta(4, 2); // 4He target
|
||||||
transfer.Setb(1, 1); // outgoing proton from the primary transfer
|
transfer.Setb(1, 1); // outgoing proton from the primary transfer
|
||||||
transfer.SetB(21, 11); // 21Na* heavy product
|
transfer.SetB(21, 11); // 21Na* heavy product
|
||||||
const ReactionConfig reactionConfig = transfer.GetRectionConfig();
|
const ReactionConfig reactionConfig = transfer.GetRectionConfig();
|
||||||
const double beamA = reactionConfig.beamA; // mass number of 14N beam
|
const double beamA = reactionConfig.beamA; // mass number of 14N beam
|
||||||
const double beamE = 42.82 / beamA; // beam energy in MeV
|
const double beamE = 3; // maximum beam energy in MeV/u
|
||||||
|
|
||||||
const int kMBeam = reactionConfig.beamA; // mass number of beam
|
const int kMBeam = reactionConfig.beamA; // mass number of beam
|
||||||
const int kMTarget = reactionConfig.targetA; // mass number of target
|
const int kMTarget = reactionConfig.targetA; // mass number of target
|
||||||
|
|
@ -388,10 +388,12 @@ int main(int argc, char **argv){
|
||||||
// compute beam energy at the event vertex from the gas path length
|
// compute beam energy at the event vertex from the gas path length
|
||||||
beamPath_cm = TVector3(vertexZ - beamEntranceZ, vertexX, vertexY).Mag() * 0.1;
|
beamPath_cm = TVector3(vertexZ - beamEntranceZ, vertexX, vertexY).Mag() * 0.1;
|
||||||
if( beamPath_cm < 0 ) beamPath_cm = 0;
|
if( beamPath_cm < 0 ) beamPath_cm = 0;
|
||||||
beamEnergy = elossBeam->Eval(beamPath_cm); // MeV
|
//beamEnergy = elossBeam->Eval(beamPath_cm); // MeV
|
||||||
beamEnergyLoss = elossBeam->Eval(0.0) - beamEnergy;
|
//beamEnergyLoss = elossBeam->Eval(0.0) - beamEnergy;
|
||||||
KEA = beamEnergy / beamA;
|
//KEA = beamEnergy / beamA;
|
||||||
//KEA = gRandom->Uniform(0, beamE);
|
KEA = gRandom->Uniform(0, beamE);
|
||||||
|
beamEnergy = KEA * beamA;
|
||||||
|
beamEnergyLoss = 0;
|
||||||
transfer.SetIncidentEnergyAngle(KEA, 0, 0);
|
transfer.SetIncidentEnergyAngle(KEA, 0, 0);
|
||||||
transfer.CalReactionConstant();
|
transfer.CalReactionConstant();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user