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