19#ifndef BDSFIELDQUERYFORVIS_H
20#define BDSFIELDQUERYFORVIS_H
22#include "BDSFieldQuery.hh"
24#include "G4ThreeVector.hh"
43 inline const std::vector<std::array<G4double, 9>> Values()
const {
return values;}
44 inline G4double MaxFieldE()
const {
return maxFieldE;}
45 inline G4double MaxFieldB()
const {
return maxFieldB;}
54 static G4double
SimpleMag(G4double x, G4double y, G4double z);
62 const G4double[6]) {;}
69 const G4ThreeVector& globalDirection,
71 G4double fieldValue[6]);
74 std::vector<std::array<G4double, 9>> values;
77 G4bool drawZeroValuePoints;
Wrapper class of BDSFieldQuery that accumulates values for visualisation.
virtual void GetFieldValue(const G4ThreeVector &globalXYZ, const G4ThreeVector &globalDirection, G4double tGlobal, G4double fieldValue[6])
Call base class method but make a copy of the global position and fields in this class.
virtual void QueryField(const BDSFieldQueryInfo *query)
Reserve the vector size we need first, then proceed as normal. Avoids big copies.
virtual void CloseFiles()
Replace with empty implementation so no file handling is done for visualisation.
virtual void WriteFieldValue(const G4ThreeVector &, G4double, const G4double[6])
Replace with empty implementation so no file handling is done for visualisation.
virtual void CleanUp()
Call the base class method and also clear the vector of values in this class.
virtual void WriteHeader(std::ofstream &, const BDSFieldQueryInfo *) const
Replace with empty implementation so no file handling is done for visualisation.
virtual void PrintBAndEInfo(const BDSFieldQueryInfo *) const
Replace with empty implementation so no file handling is done for visualisation.
virtual void OpenFiles(const BDSFieldQueryInfo *)
Replace with empty implementation so no file handling is done for visualisation.
static G4double SimpleMag(G4double x, G4double y, G4double z)
Calculate magnitude of 3-vector without having to construct one.
Holder class for all information required for a field query.
Class for querying the Geant4 model for field at any point.