ATLAS Offline Software
BFieldVectorZR.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //
6 // BFieldVectorZR.h
7 //
8 // Magnetic field value (Bz,Br) stored in 2d map.
9 //
10 // Masahiro Morii, Harvard University
11 //
12 // Athena MT RD Schaffer , C Anastopoulos
13 //
14 #ifndef BFIELDVECTORZR_H
15 #define BFIELDVECTORZR_H
16 #include <array>
17 #include <cstdlib>
19 {
20 public:
21  // no default constructor
22  BFieldVectorZR() = delete;
23 
24  //constructor
25  BFieldVectorZR(double Bz, double Br)
26  : m_B{ Bz, Br }
27  {}
28  // setter
29  void set(double Bz, double Br) { m_B = { Bz, Br }; }
30  // accessors
31  double z() const { return m_B[0]; }
32  double r() const { return m_B[1]; }
33  // array-like accessor
34  double operator[](size_t i) const { return m_B[i]; }
35 
36 private:
37  std::array<double, 2> m_B;
38 };
39 
40 #endif
BFieldVectorZR::set
void set(double Bz, double Br)
Definition: BFieldVectorZR.h:29
BFieldVectorZR::operator[]
double operator[](size_t i) const
Definition: BFieldVectorZR.h:34
BFieldVectorZR::BFieldVectorZR
BFieldVectorZR()=delete
BFieldVectorZR::m_B
std::array< double, 2 > m_B
Definition: BFieldVectorZR.h:37
Br
Definition: VP1BPhysConvertor.h:14
lumiFormat.i
int i
Definition: lumiFormat.py:85
BFieldVectorZR::BFieldVectorZR
BFieldVectorZR(double Bz, double Br)
Definition: BFieldVectorZR.h:25
BFieldVectorZR
Definition: BFieldVectorZR.h:19
BFieldVectorZR::z
double z() const
Definition: BFieldVectorZR.h:31
BFieldVectorZR::r
double r() const
Definition: BFieldVectorZR.h:32