67 crossSectionCalculator(nullptr),
69 gParticleChange(nullptr)
99 if (polzz!=0 || poltt!=0) {
102 xs*=(1.+polzz*lasym+poltt*tasym);
133 if ( (valueA < -1) || (1 < valueA)) {
134 G4cout<<
" ERROR PolarizedAnnihilationPS::ComputeAsymmetries \n";
135 G4cout<<
" something wrong in total cross section calculation (valueA)\n";
136 G4cout<<
" LONG: "<<valueX<<
"\t"<<valueA<<
"\t"<<valueT<<
" energy = "<<gam<<
G4endl;
138 if ( (valueT < -1) || (1 < valueT)) {
139 G4cout<<
" ERROR PolarizedAnnihilationPS::ComputeAsymmetries \n";
140 G4cout<<
" something wrong in total cross section calculation (valueT)\n";
141 G4cout<<
" TRAN: "<<valueX<<
"\t"<<valueA<<
"\t"<<valueT<<
" energy = "<<gam<<
G4endl;
159 if(PositKinEnergy == 0.0) {
162 G4double sinTeta = std::sqrt((1.0 - cosTeta)*(1.0 + cosTeta));
183 G4cout <<
"G4PolarizedComptonModel::SampleSecondaries in "
188 if (targetIsPolarized)
197 G4double gama = gamam1+1. , gamap1 = gamam1+2.;
198 G4double sqgrate = std::sqrt(gamam1/gamap1)/2. , sqg2m1 = std::sqrt(gamam1*gamap1);
201 G4double epsilmin = 0.5 - sqgrate , epsilmax = 0.5 + sqgrate;
202 G4double epsilqot = epsilmax/epsilmin;
210 G4double gmax=1. + std::fabs(polarization);
216 G4cout<<
"ERROR in PolarizedAnnihilationPS::PostStepDoIt\n"
223 G4cout<<
"ERROR in PolarizedAnnihilationPS::PostStepDoIt\n"
242 if (treject>gmax || treject<0.)
243 G4cout<<
"ERROR in PolarizedAnnihilationPS::PostStepDoIt\n"
244 <<
" eps ("<<epsil<<
") rejection does not work properly: "<<treject<<
G4endl;
246 if (treject>trejectmax) trejectmax=treject;
248 G4cout<<
"WARNING in PolarizedAnnihilationPS::PostStepDoIt\n"
249 <<
"eps dicing very inefficient ="<<trejectmax/gmax
250 <<
", "<<treject/gmax<<
". For secondary energy = "<<epsil<<
" "<<ncount<<
G4endl;
261 G4double cost = (epsil*gamap1-1.)/(epsil*sqg2m1);
262 G4double sint = std::sqrt((1.+cost)*(1.-cost));
295 treject = gdist/gdiced;
297 if (treject>1.+1.
e-10 || treject<0){
298 G4cout<<
"!!!ERROR in PolarizedAnnihilationPS::PostStepDoIt\n"
299 <<
" phi rejection does not work properly: "<<treject<<
G4endl;
306 G4cout<<
"!!!ERROR in PolarizedAnnihilationPS::PostStepDoIt\n"
307 <<
" phi rejection does not work properly: "<<treject<<
"\n";
308 G4cout<<
" gdiced="<<gdiced<<
" gdist="<<gdist<<
"\n";
316 G4double dirx = sint*std::cos(phi) , diry = sint*std::sin(phi) , dirz = cost;
322 G4double Phot1Energy = epsil*TotalAvailableEnergy;
323 G4double Phot2Energy =(1.-epsil)*TotalAvailableEnergy;
342 Phot1Direction.
rotateUz(PositDirection);
345 Phot1Direction, Phot1Energy);
349 G4cout<<
"ERROR: PolarizedAnnihilation Polarization Vector at epsil = "
350 <<epsil<<
" is too large!!! \n"
362 fvect->push_back(aParticle1);
367 G4double Eratio= Phot1Energy/Phot2Energy;
368 G4double PositP= std::sqrt(PositKinEnergy*(PositKinEnergy+2.*electron_mass_c2));
370 (PositP-dirz*Phot1Energy)/Phot2Energy);
371 Phot2Direction.
rotateUz(PositDirection);
374 Phot2Direction, Phot2Energy);
380 G4cout<<
"ERROR: PolarizedAnnihilation Polarization Vector at epsil = "<<epsil<<
" is too large!!! \n";
391 fvect->push_back(aParticle2);
static G4ThreeVector GetFrame(const G4ThreeVector &, const G4ThreeVector &)
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4StokesVector theBeamPolarization
G4LogicalVolume * GetLogicalVolume() const
static const G4StokesVector P2
virtual void Initialize(G4double eps, G4double gamma, G4double phi, const G4StokesVector &p0, const G4StokesVector &p1, G4int flag=0) override
G4StokesVector finalGamma2Polarization
const G4ThreeVector & GetMomentumDirection() const
G4PolarizedAnnihilationModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="Polarized-Annihilation")
const G4ThreeVector & GetPolarization() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
Hep3Vector & rotateUz(const Hep3Vector &)
virtual G4double ComputeCrossSectionPerElectron(G4double kinEnergy)
virtual G4double ComputeCrossSectionPerElectron(G4double kinEnergy) final
G4StokesVector GetPol2() override
static constexpr double electron_mass_c2
static const G4StokesVector P3
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
static constexpr double twopi
void ComputeAsymmetriesPerElectron(G4double gammaEnergy, G4double &valueX, G4double &valueA, G4double &valueT)
void RotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
const G4Track * GetCurrentTrack() const
G4PolarizedAnnihilationCrossSection * crossSectionCalculator
G4StokesVector theTargetPolarization
G4StokesVector GetPol3() override
static const G4StokesVector ZERO
G4ParticleChangeForGamma * gParticleChange
virtual G4double TotalXSection(G4double xmin, G4double xmax, G4double y, const G4StokesVector &pol0, const G4StokesVector &pol1) override
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) final
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
static const G4StokesVector P1
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
virtual ~G4PolarizedAnnihilationModel()
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4StokesVector finalGamma1Polarization
static G4PolarizationManager * GetInstance()
void ProposeTrackStatus(G4TrackStatus status)
const G4String & GetName() const
G4VPhysicalVolume * GetVolume() const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
bool IsPolarized(G4LogicalVolume *lVol) const