BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSFieldQueryRaw.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 BDSFIELDQUERYRAW_H
20#define BDSFIELDQUERYRAW_H
21
22#include "BDSFieldQuery.hh"
23
24#include "G4ThreeVector.hh"
25#include "G4Types.hh"
26
28class G4Field;
29
39{
40public:
42 virtual ~BDSFieldQueryRaw();
43
45 void QueryFieldRaw(G4Field* field,
46 const BDSFieldQueryInfo* query);
47
48protected:
52 virtual void GetFieldValue(const G4ThreeVector& globalXYZ,
53 const G4ThreeVector& globalDirection,
54 G4double tGlobal,
55 G4double fieldValue[6]);
56
59 virtual void CheckIfFieldObjectSpecified(const BDSFieldQueryInfo* query) const;
60
61private:
66
67 G4Field* field;
68};
69
70#endif
Holder class for all information required for a field query.
Class for querying the a raw field object.
G4Field * field
The field object to query.
virtual void CheckIfFieldObjectSpecified(const BDSFieldQueryInfo *query) const
void QueryFieldRaw(G4Field *field, const BDSFieldQueryInfo *query)
Query the field in the Geant4 model according to information in query.
virtual void GetFieldValue(const G4ThreeVector &globalXYZ, const G4ThreeVector &globalDirection, G4double tGlobal, G4double fieldValue[6])
Class for querying the Geant4 model for field at any point.
void QueryFields(const std::vector< BDSFieldQueryInfo * > &fieldQueries)
Vector version of above function. Unique output files for each query.
virtual void QueryField(const BDSFieldQueryInfo *query)
Query the field in the Geant4 model according to information in query.