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) 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 BDSCOMPTONENGINE_H
19#define BDSCOMPTONENGINE_H
20
21#include "globals.hh"
22
23#include "G4LorentzVector.hh"
24#include "CLHEP/Units/PhysicalConstants.h"
25
33{
34public:
36
37 BDSComptonEngine(G4LorentzVector InGam_FourVec,
38 G4LorentzVector InEl_FourVec );
39
41
42 void PerformCompton();
43 void SetIncomingPhoton4Vec(G4LorentzVector inGam);
44 inline void SetIncomingElectron4Vec(G4LorentzVector inEl) {itsIncomingEl=inEl;}
45
46 G4LorentzVector GetScatteredElectron() const {return itsScatteredEl;}
47 G4LorentzVector GetScatteredGamma() const {return itsScatteredGam;}
48
49private:
50 G4LorentzVector itsScatteredEl;
51 G4LorentzVector itsScatteredGam;
52 G4LorentzVector itsIncomingEl;
53 G4LorentzVector itsIncomingGam;
54
55 static const G4int ntryMax = 10000000;
56};
57
58inline void BDSComptonEngine::SetIncomingPhoton4Vec(G4LorentzVector inGam)
59{itsIncomingGam=inGam;
60 if(itsIncomingEl.e()<CLHEP::electron_mass_c2)
61 {G4Exception("BDSComptonEngine: Invalid Electron Energy", "-1", FatalException, "");}
62
63}
64#endif
Engine to calculate product of compton scattering process.