MuNuclearSplittingProcessXSecBias.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file MuNuclearSplittingProcessXSecBias.h
3 /// \brief Check of Geant4 to run the LArSoft detector simulation
4 ///
5 /// \author brebel@fnal.gov
6 ////////////////////////////////////////////////////////////////////////
7 
8 #ifndef LARG4_MNXS_H
9 #define LARG4_MNXS_H
10 
11 #include <cmath>
12 #include "Geant4/G4ForceCondition.hh"
13 #include "Geant4/G4GPILSelection.hh"
14 #include "Geant4/G4Types.hh"
15 #include "Geant4/G4VParticleChange.hh"
16 #include "Geant4/G4VProcess.hh"
17 #include "Geant4/G4WrapperProcess.hh"
18 #include "Geant4/Randomize.hh"
19 class G4Step;
20 class G4Track;
21 
22 namespace larg4 {
23 
24 class MuNuclearSplittingProcessXSecBias : public G4WrapperProcess {
25 // Override PostStepDoIt method
26  public:
29 
30  void SetNSplit(G4int nTrx, G4int xB=0, G4double xFac=1) {fNSplit = nTrx, eFactor = (G4double) xFac, xBiasMode = xB;};
31  void SetIsActive(G4bool doIt) {fActive = doIt;};
32 
33  G4VParticleChange* PostStepDoIt(const G4Track& track, const G4Step& step);
34  G4VParticleChange* AlongStepDoIt(const G4Track& track, const G4Step& step);
35  //////////////////////////
36  // GPIL //////////////
37  /////////////////////////
39  const G4Track& track,
40  G4double previousStepSize,
41  G4double currentMinimumStep,
42  G4double& proposedSafety,
43  G4GPILSelection* selection
44  );
45  virtual G4double PostStepGetPhysicalInteractionLength(
46  const G4Track& track,
47  G4double previousStepSize,
48  G4ForceCondition* condition
49  );
50  protected:
51 
53  {
54  G4VProcess::theNumberOfInteractionLengthLeft = -std::log( G4UniformRand() );
55  theInitialNumberOfInteractionLength = G4VProcess::theNumberOfInteractionLengthLeft;
56  }
57 
58 
59  private:
60 // Data members
61  G4int fNSplit;
62  G4bool fActive;
63  G4int xBiasMode;
64  G4double eFactor; // enhancement factor to the cross-setion
65 
66  G4VParticleChange fParticleChange;
67  // weight change applied at AlongStepDoIt()
68  G4double wc;
70 
71  G4double XBiasSurvivalProbability();
72  G4double XBiasSecondaryWeight();
74 
75 
76 };
77 
78 
79 }// end namespace
80 
81 #endif // MNSP
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
void SetNSplit(G4int nTrx, G4int xB=0, G4double xFac=1)
Geant4 interface.
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &step)
G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)