BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSComptonEngine.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
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 BDSCOMPTONENGINE_H
20#define BDSCOMPTONENGINE_H
21
22#include "globals.hh"
23
24#include "G4LorentzVector.hh"
25#include "CLHEP/Units/PhysicalConstants.h"
26
34{
35public:
37
38 BDSComptonEngine(G4LorentzVector InGam_FourVec,
39 G4LorentzVector InEl_FourVec );
40
42
43 void PerformCompton();
44 void SetIncomingPhoton4Vec(G4LorentzVector inGam);
45 inline void SetIncomingElectron4Vec(G4LorentzVector inEl) {itsIncomingEl=inEl;}
46
47 G4LorentzVector GetScatteredElectron() const {return itsScatteredEl;}
48 G4LorentzVector GetScatteredGamma() const {return itsScatteredGam;}
49
50private:
51 G4LorentzVector itsScatteredEl;
52 G4LorentzVector itsScatteredGam;
53 G4LorentzVector itsIncomingEl;
54 G4LorentzVector itsIncomingGam;
55
56 static const G4int ntryMax = 10000000;
57};
58
59inline void BDSComptonEngine::SetIncomingPhoton4Vec(G4LorentzVector inGam)
60{itsIncomingGam=inGam;
61 if(itsIncomingEl.e()<CLHEP::electron_mass_c2)
62 {G4Exception("BDSComptonEngine: Invalid Electron Energy", "-1", FatalException, "");}
63
64}
65#endif
Engine to calculate product of compton scattering process.