Remove ke_offset in PrimaryGeneratorAction since it causes confusion
and inconsistencies. Instead, add another homogeneous accelerating electric field in front of TD foil. Update TD and MCP2 positions.
This commit is contained in:
@ -79,10 +79,10 @@ void lem4PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// }
|
||||
|
||||
G4double x, y, z;
|
||||
G4double p, ke_offset;
|
||||
G4double p;// ke_offset;
|
||||
G4double xangle, yangle;
|
||||
|
||||
ke_offset = 3.73*keV; // Kin. energy offset due to a 3.73 kV acceleration at the Carbon foil
|
||||
//ke_offset = 3.73*keV; // Kin. energy offset due to a 3.73 kV acceleration at the Carbon foil
|
||||
|
||||
if (takeMuonsFromTurtleFile) {
|
||||
char line[501];
|
||||
@ -219,7 +219,8 @@ void lem4PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
particleGun->SetParticlePosition(G4ThreeVector(x,y,z));
|
||||
//particleGun->SetParticleMomentum(G4ThreeVector(px,py,pz));
|
||||
G4double particleEnergy = std::sqrt(p*p+mu_mass*mu_mass)-mu_mass;
|
||||
particleGun->SetParticleEnergy(particleEnergy + ke_offset);
|
||||
//particleGun->SetParticleEnergy(particleEnergy+ke_offset);
|
||||
particleGun->SetParticleEnergy(particleEnergy);
|
||||
particleGun->SetParticleMomentumDirection(G4ThreeVector(px,py,pz));
|
||||
particleGun->SetParticlePolarization(G4ThreeVector(xpolaris,ypolaris,zpolaris));
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
Reference in New Issue
Block a user