BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSModulatorTopHatT.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 BDSMODULATORTOPHATT_H
19#define BDSMODULATORTOPHATT_H
20
21#include "BDSModulator.hh"
22
23#include "G4Types.hh"
24
34{
35public:
36 BDSModulatorTopHatT() = delete;
37 explicit BDSModulatorTopHatT(G4double T0,
38 G4double T1,
39 G4double amplitudeScaleIn = 1.0);
40 virtual ~BDSModulatorTopHatT() = default;
41
43 virtual G4double Factor(const G4ThreeVector& xyz,
44 G4double T) const;
45
46 virtual G4bool VariesWithTime() const {return true;}
47
49 virtual G4double RecommendedMaxStepLength() const;
50
51private:
52 G4double T0;
53 G4double T1;
54 G4double scale;
55};
56
57#endif
Top-hat modulator as a function of T.
virtual G4double RecommendedMaxStepLength() const
Return difference in T0, T1 / 20.
virtual G4bool VariesWithTime() const
Each derived class should override this.
virtual G4double Factor(const G4ThreeVector &xyz, G4double T) const
Returns value of equation in brief at the top of this file.
Base class for a modulator.