ATLAS Offline Software
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 
20 #ifndef BFIELDZONE_H
21 #define BFIELDZONE_H
22 
23 #include "CxxUtils/restrict.h"
26 #include <vector>
27 
28 class BFieldZone : public BFieldMesh<short>
29 {
30 public:
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);
41  void appendCond(const BFieldCond& cond);
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 
56 private:
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
BFieldZone::appendCond
void appendCond(const BFieldCond &cond)
add elements to the current conductors vector
BFieldMesh< short >::phimin
double phimin() const
minimun in phi
BFieldCond.h
xyz
#define xyz
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
x
#define x
BFieldZone::ncond
unsigned ncond() const
BFieldZone::m_id
int m_id
Definition: BFieldZone.h:57
BFieldZone::BFieldZone
BFieldZone(int id, double zmin, double zmax, double rmin, double rmax, double phimin, double phimax, double scale)
ATH_RESTRICT
#define ATH_RESTRICT
Definition: restrict.h:31
BFieldZone::id
int id() const
BFieldZone::memSize
int memSize() const
BFieldMesh< short >::phimax
double phimax() const
maximum in phi
lumiFormat.i
int i
Definition: lumiFormat.py:85
BFieldMesh
Definition: BFieldMesh.h:43
BFieldMesh< short >::zmax
double zmax() const
maximum in z
BFieldZone::addBiotSavart
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]
BFieldZone
Definition: BFieldZone.h:29
BFieldZone::condVector
const std::vector< BFieldCond > * condVector() const
BFieldCond
Definition: BFieldCond.h:22
restrict.h
Macro wrapping the nonstandard restrict keyword.
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
BFieldZone::cond
const BFieldCond & cond(int i) const
BFieldZone::adjustMin
void adjustMin(int i, double x)
BFieldMesh.h
BFieldMesh< short >::zmin
double zmin() const
minimum in z
BFieldZone::adjustMax
void adjustMax(int i, double x)
BFieldZone.icc
BFieldZone::m_cond
std::vector< BFieldCond > m_cond
Definition: BFieldZone.h:58
BFieldMesh< short >::rmax
double rmax() const
maximum in r
BFieldMesh< short >::rmin
double rmin() const
minimun in r