ATLAS Offline Software
BFieldCacheZR.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 inline void
6 BFieldCacheZR::invalidate()
7 {
8  m_rmin = 0.0;
9  m_rmax = -1.0;
10 }
11 inline void
12 BFieldCacheZR::setRange(double zmin, double zmax, double rmin, double rmax)
13 {
14  m_zmin = zmin;
15  m_zmax = zmax;
16  m_rmin = rmin;
17  m_rmax = rmax;
18  m_invz = 1.0 / (zmax - zmin);
19  m_invr = 1.0 / (rmax - rmin);
20 }
21 // set the field values at each corner (rescale for current scale factor)
22 inline void
23 BFieldCacheZR::setField(int i, const BFieldVectorZR& field, double scaleFactor)
24 {
25  m_field[0][i] = scaleFactor * field[0];
26  m_field[1][i] = scaleFactor * field[1];
27 }
28 inline bool
29 BFieldCacheZR::inside(double z, double r) const
30 {
31  return (z >= m_zmin && z <= m_zmax && r >= m_rmin && r <= m_rmax);
32 }
33