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) 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 BDSFIELDQUERYRAW_H
19#define BDSFIELDQUERYRAW_H
20
21#include "BDSFieldQuery.hh"
22
23#include "G4ThreeVector.hh"
24#include "G4Types.hh"
25
27class G4Field;
28
38{
39public:
41 virtual ~BDSFieldQueryRaw();
42
44 void QueryFieldRaw(G4Field* field,
45 const BDSFieldQueryInfo* query);
46
47protected:
51 virtual void GetFieldValue(const G4ThreeVector& globalXYZ,
52 const G4ThreeVector& globalDirection,
53 G4double tGlobal,
54 G4double fieldValue[6]);
55
58 virtual void CheckIfFieldObjectSpecified(const BDSFieldQueryInfo* query) const;
59
60private:
65
66 G4Field* field;
67};
68
69#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.