Message: Re: Forced Compton interaction with Penelope model Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Forced Compton interaction with Penelope model 

Keywords: Forced Compton interaction with Penelope model
Forum: Fast Simulation, Transportation & Others
Re: Question Forced Compton interaction with Penelope model (Chibueze Zimuzo)
Re: None Re: Forced Compton interaction with Penelope model (Luciano Pandola)
Date: 18 Apr, 2008
From: michel maire <michel maire>

User Luciano wrote:

>> Right. The G4PenelopeCompton() has not the same interface as 
>> G4ComptonScattering().

 In your physicsList, replace G4PenelopeCompton by MyPenelopeCompton below.
 Play with factor and myMaterial.
                                    Michel

  #ifndef MyPenelopeCompton_HH
  #define MyPenelopeCompton_HH 1

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

  #include "globals.hh"
  #include "G4PenelopeCompton.hh"

  class G4Track;

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

  class MyPenelopeCompton : public G4PenelopeCompton {

  public:

    MyPenelopeCompton(const G4String& processName ="PenCompton");

   ~MyPenelopeCompton();

    G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);

  };

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

  #endif

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

  #include "MyPenelopeCompton.hh"
  #include "G4Track.hh"

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

  MyPenelopeCompton::MyPenelopeCompton(const G4String& processName)
    : G4PenelopeCompton(processName)
  { }

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

  MyPenelopeCompton::~MyPenelopeCompton()
  { }

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

  G4double MyPenelopeCompton::GetMeanFreePath(const G4Track& track, 
	  				     G4double previousStepSize,
					     G4ForceCondition* condition)
  {
    const G4double factor = 10.;
    G4Material* material  = track.GetMaterial();  
    G4double meanFreePath = G4PenelopeCompton::GetMeanFreePath(track,
                                                previousStepSize, condition);
    if (material->GetName() == "myMaterial") meanFreePath /= factor;
    return meanFreePath;
  }

  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

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

 Add Message Add Message
to: "Re: Forced Compton interaction with Penelope model"

 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 ]