36 #include "DetectorConstruction.hh"
80 std::vector<G4DynamicParticle*>* fvect,
114 epsilon = sqrt(epsilonsq);
117 onecost = (1.-
epsilon)/(epsilon*E0_m);
118 sint2 = onecost*(2.-onecost);
119 greject = 1. - epsilon*sint2/(1.+ epsilonsq);
130 G4double dirx = sinTeta*cos(Phi), diry = sinTeta*sin(Phi), dirz = cosTeta;
138 gamDirection1.
rotateUz(gamDirection0);
139 G4double gamEnergy1 = epsilon*gamEnergy0;
147 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
151 = gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
152 eDirection = eDirection.
unit();
157 fvect->push_back(dp);
MyKleinNishinaMessenger * fMessenger
const G4ThreeVector & GetMomentumDirection() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
Hep3Vector & rotateUz(const Hep3Vector &)
MyKleinNishinaCompton(DetectorConstruction *, const G4ParticleDefinition *p=0, const G4String &nam="myKlein-Nishina")
G4double fCrossSectionFactor
static constexpr double electron_mass_c2
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
static constexpr double twopi
G4ParticleDefinition * theElectron
Definition of the MyKleinNishinaMessenger class.
Definition of the MyKleinNishinaCompton class.
G4ParticleChangeForGamma * fParticleChange
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kinEnergy, G4double cut, G4double emax)
double epsilon(double density, double temperature)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4double GetKineticEnergy() const
Simple detector construction with a box volume placed in a world.