BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSComptonScatteringEngine.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSCOMPTONSCATTERINGENGINE_H
19#define BDSCOMPTONSCATTERINGENGINE_H
20
21#include "globals.hh" // geant4 types / globals
22#include "G4ThreeVector.hh"
23#include "G4DynamicParticle.hh"
24
25#include "CLHEP/Units/PhysicalConstants.h"
26#include "G4INCLRandom.hh"
27#include "G4RotationMatrix.hh"
28#include "G4StokesVector.hh"
29#include "CLHEP/Units/PhysicalConstants.h"
30#include "G4INCLRandom.hh"
31
33{
34public:
37
38 G4double CrossSection(G4double photonEnergy, G4int partIn);
39 void PerformCompton(const G4ThreeVector& boost, G4int partIn);
40 void SetParticle(G4int partIDIn);
41
42 inline void setIncomingGamma(G4LorentzVector incomingGammaIn) {incomingGamma=incomingGammaIn;}
43 inline void setIncomingElectron(G4LorentzVector incomingElectronIn) {incomingElectron=incomingElectronIn;}
44 inline G4LorentzVector GetScatteredGamma() {return scatteredGamma;};
45 inline G4LorentzVector GetScatteredElectron() {return scatteredElectron;};
46 G4double KleinNishinaDifferential(G4double theta);
47 G4double MCMCTheta();
48 G4RotationMatrix* CalculateRotation();
49 inline void SetIncomingGammaPolarization(G4StokesVector incomingGammaPolarizationIn) {incomingGammaPolarization=incomingGammaPolarizationIn;}
50 inline void SetIncomingElectronPolarization(G4StokesVector incomingElectronPolarizationIn) {incomingElectronPolarization=incomingElectronPolarizationIn;}
51 G4double MCPhi(G4double theta, G4double scatteredEnergy);
52 G4double PolarizationCrossSectionPhi(G4double theta, G4double phi, G4double scatteredEnergy);
53 G4double ScatteredEnergy(G4double theta);
54 G4double PolarizationCrossSectionMaxPhi(G4double theta,G4double EP);
55private:
56 G4LorentzVector incomingGamma;
57 G4LorentzVector scatteredGamma;
58 G4LorentzVector incomingElectron;
59 G4LorentzVector scatteredElectron;
60 G4StokesVector incomingGammaPolarization;
61 G4StokesVector incomingElectronPolarization;
62 G4StokesVector outgoingGammaPolarization;
63 G4StokesVector outgoingElectronPolarization;
64 G4double particleMass;
65 G4double particleRadius;
66
67 G4int partID;
68};
69
70#endif