6.9.2010 - Kamil Sedlak
1) bug found and corrected in the field-map extrapolation of the electric and magnetic fields for the spin-rotator (3DEOpera and 3D and symmetryType=1 or 2). The documentation was updated. 2) Some new variables added to the musrSimAna - the documentation has not been updated yet.
This commit is contained in:
@ -366,9 +366,13 @@ void musrPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// G4double decaytime = -muonMeanLife*log(1-randomVal);
|
||||
//
|
||||
// The following code is numerically more stable compared to the commented lines above:
|
||||
G4double expMin = exp(-muonDecayTimeMin/muonMeanLife);
|
||||
G4double expMax = exp(-muonDecayTimeMax/muonMeanLife);
|
||||
G4double decaytime = -muonMeanLife * log(G4UniformRand()*(expMax-expMin)+expMin);
|
||||
G4double decaytime;
|
||||
if (muonDecayTimeMin==muonDecayTimeMax) {decaytime=muonDecayTimeMin;}
|
||||
else {
|
||||
G4double expMin = exp(-muonDecayTimeMin/muonMeanLife);
|
||||
G4double expMax = exp(-muonDecayTimeMax/muonMeanLife);
|
||||
decaytime = -muonMeanLife * log(G4UniformRand()*(expMax-expMin)+expMin);
|
||||
}
|
||||
// G4cout<<"decaytime="<<decaytime/ns<<"ns."<< G4endl;
|
||||
generatedMuon->SetProperTime(decaytime);
|
||||
}
|
||||
|
@ -570,10 +570,12 @@ void musrTabulatedElementField::addFieldValue3D(const G4double point[4],
|
||||
if (symmetryType!=0) {
|
||||
switch(symmetryType) {
|
||||
case (1):
|
||||
B[1]*=y_sign; B[2]*=z_sign;
|
||||
// B[1]*=y_sign; B[2]*=z_sign;
|
||||
B[1]*=y_sign*x_sign; B[2]*=z_sign*x_sign;
|
||||
break;
|
||||
case (2):
|
||||
B[0]*=x_sign; B[2]*=z_sign;
|
||||
// B[0]*=x_sign; B[2]*=z_sign;
|
||||
B[0]*=x_sign*y_sign; B[2]*=z_sign*y_sign;
|
||||
break;
|
||||
case (101):
|
||||
if (xySwap) {
|
||||
|
Reference in New Issue
Block a user