36 #include "DetectorConstruction.hh"
80 std::vector<G4DynamicParticle*>* fvect,
100 G4double epsilon, epsilonsq, onecost, sint2, greject ;
110 epsilonsq = epsilon*epsilon;
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);
G4ParticleChangeForGamma * fParticleChange
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4double GetKineticEnergy() const
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kinEnergy, G4double cut, G4double emax)
MyKleinNishinaCompton(DetectorConstruction *, const G4ParticleDefinition *p=0, const G4String &nam="myKlein-Nishina")
Definition of the MyKleinNishinaCompton class.
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
const G4ThreeVector & GetMomentumDirection() const
Hep3Vector & rotateUz(const Hep3Vector &)
Definition of the MyKleinNishinaMessenger class.
G4double fCrossSectionFactor
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4ParticleDefinition * theElectron
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
MyKleinNishinaMessenger * fMessenger