ATLAS Offline Software
Loading...
Searching...
No Matches
BFieldZone.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
19
20#ifndef BFIELDZONE_H
21#define BFIELDZONE_H
22
23#include "CxxUtils/restrict.h"
26#include <vector>
27
28class BFieldZone : public BFieldMesh<short>
29{
30public:
31 // constructor
32 BFieldZone(int id,
33 double zmin,
34 double zmax,
35 double rmin,
36 double rmax,
37 double phimin,
38 double phimax,
39 double scale);
43 void addBiotSavart(const double* ATH_RESTRICT xyz,
44 double* ATH_RESTRICT B,
45 double* ATH_RESTRICT deriv = nullptr) const;
46 // accessors
47 int id() const;
48 unsigned ncond() const;
49 const BFieldCond& cond(int i) const;
50 const std::vector<BFieldCond>* condVector() const;
51 int memSize() const;
52 // adjust the min/max edges to a new value
53 void adjustMin(int i, double x);
54 void adjustMax(int i, double x);
55
56private:
57 int m_id; // zone ID number
58 std::vector<BFieldCond> m_cond; // list of current conductors
59};
60
61#include "BFieldZone.icc"
62
63#endif
#define xyz
#define x
double rmax() const
double zmax() const
double phimax() const
double zmin() const
double rmin() const
double phimin() const
void addBiotSavart(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT B, double *ATH_RESTRICT deriv=nullptr) const
compute Biot-Savart magnetic field and add to B[3]
void adjustMax(int i, double x)
const std::vector< BFieldCond > * condVector() const
void adjustMin(int i, double x)
unsigned ncond() const
const BFieldCond & cond(int i) const
int memSize() const
int id() const
std::vector< BFieldCond > m_cond
Definition BFieldZone.h:58
void appendCond(const BFieldCond &cond)
add elements to the current conductors vector
BFieldZone(int id, double zmin, double zmax, double rmin, double rmax, double phimin, double phimax, double scale)
Macro wrapping the nonstandard restrict keyword.
#define ATH_RESTRICT
Definition restrict.h:31