28.9.2011 Kamil Sedlak

1) implemented a new command /gun/turtleMomentumScalingFactor in the musrSim
   (see the manual)
2) some small changes in the musrSimAna
This commit is contained in:
2011-09-28 10:01:31 +00:00
parent c10cb1791c
commit 0c995ad9d8
9 changed files with 54 additions and 7 deletions

View File

@@ -71,7 +71,7 @@ musrPrimaryGeneratorAction::musrPrimaryGeneratorAction(
muonDecayTimeMin(-1), muonDecayTimeMax(-1), muonMeanLife(2197.03*ns),
takeMuonsFromTurtleFile(false), z0_InitialTurtle(0),
numberOfGeneratedEvents(0),
turtleMomentumBite(false), turtleMomentumP0(0.), turtleSmearingFactor(0.)
turtleMomentumBite(false), turtleMomentumP0(0.), turtleSmearingFactor(0.), turtleMomentumScalingFactor(1.)
//, firstCall(true)
{
//create a messenger for this class
@@ -175,7 +175,7 @@ void musrPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
yangle = yAngleTmp*mrad;
x = xTmp*cm + (z0-z0_InitialTurtle)*tan(xangle) ; // usually z0 is negative
y = yTmp*cm + (z0-z0_InitialTurtle)*tan(yangle) ; // z0_InitialTurtle is the z0 at whith the turtle file was generated.
p = pTmp*GeV;
p = pTmp*GeV*turtleMomentumScalingFactor;
// add some offset, if requested:
x = x + x0;
y = y + y0;