BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSFieldManager.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 BDSFIELDMANAGER_H
20#define BDSFIELDMANAGER_H
21
22#include "globals.hh"
23#include "G4FieldManager.hh"
24
25class G4ChordFinder;
26class G4Field;
27class G4Track;
28
38class BDSFieldManager: public G4FieldManager
39{
40public:
41 BDSFieldManager(G4Field* field = nullptr,
42 G4ChordFinder* chordFinder = nullptr,
43 G4bool fieldChangesEnergy = true);
44
45 BDSFieldManager(G4MagneticField* field);
46
47 virtual ~BDSFieldManager(){;}
48
51 virtual void ConfigureForTrack(const G4Track* track);
52
53private:
55};
56
57#endif
Wrapper for Geant4's G4FieldManager to distinguish primaries.
virtual void ConfigureForTrack(const G4Track *track)
G4bool currentTrackIsPrimary
Whether current track is a primary.