Message: Re: Problems with spectrum of multipeaks source Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Problems with spectrum of multipeaks source 

Forum: Physics List
Re: Question Problems with spectrum of multipeaks source (Nicolas Maurissen)
Re: None Re: Problems with spectrum of multipeaks source (michel maire)
Date: 24 Jan, 2011
From: Nicolas Maurissen <Nicolas Maurissen>

Hi,

The information I plot is the difference between the VertexKineticEnergy and the TotalEnergyDeposit with the following code :

void SteppingAction::UserSteppingAction(const G4Step* aStep)
{
  G4Track * aTrack = aStep->GetTrack();
  G4double InitialKinE = aTrack->GetVertexKineticEnergy();

  // check if it is alive
  if(aTrack->GetTrackStatus()!=fAlive) { return; } 

  G4StepPoint * aPrePoint = aStep->GetPreStepPoint();
  G4VPhysicalVolume * aPrePV = aPrePoint->GetPhysicalVolume();
  G4String aPrePVname = aPrePV->GetName();
  if(aPrePVname !="Cristal_phys") { return; }

  G4double Edep = aStep->GetTotalEnergyDeposit();
  G4double Weight = aPrePoint->GetWeight();
  G4double ESpectrum = InitialKinE-Edep;
  AnalysisManager::getInstance()->Fill(ESpectrum,Weight);
}

(The AnalysisManager is the one provided in the exGPS exemple).

And for the broadening, when I use the PGA it is done within the PrimaryGeneratorAction function with :

 Energy = 1173.2*keV;
 sigma = 22*keV;
 kinE = G4RandGauss::shoot(Energy, sigma); 
 particleGun->SetParticleEnergy(kinE);

When I use the GPS, the only way I know so far is to use the following command in the .in file:

 /gps/ene/type Gauss
 /gps/ene/mono 0. keV
 /gps/ene/sigma 22. keV

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Warning: Re: Problems with spectrum of multipeaks source   (Tom Roberts - 24 Jan, 2011)
2 Idea: Re: Problems with spectrum of multipeaks source   (Laurent Desorgher - 25 Jan, 2011)
3 None: Re: Problems with spectrum of multipeaks source   (michel maire - 25 Jan, 2011)
1 None: Re: Problems with spectrum of multipeaks source   (Nicolas Maurissen - 25 Jan, 2011)
4 None: Re: Problems with spectrum of multipeaks source   (michel maire - 26 Jan, 2011)
1 Ok: Re: Problems with spectrum of multipeaks source   (Nicolas Maurissen - 27 Jan, 2011)
 Add Message Add Message
to: "Re: Problems with spectrum of multipeaks source"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]