ATLAS Offline Software
BFieldSolenoid.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //
6 // BFieldSolenoid.h
7 //
8 // Magnetic field map for the ATLAS solenoid
9 //
10 // Masahiro Morii, Harvard University
11 //
12 #ifndef BFIELDSOLENOID_H
13 #define BFIELDSOLENOID_H
14 
15 #include <vector>
16 #include <iostream>
17 #include "TFile.h"
19 
20 
22 public:
23  // constructor
24  BFieldSolenoid() : m_orig(nullptr), m_tilt(nullptr) {;}
25  // destructor
26  ~BFieldSolenoid() { delete m_orig; if (m_orig!=m_tilt) delete m_tilt; }
27  // read/write map from/to file
28  int readMap( std::istream& input );
29  int readMap( TFile* rootfile );
30  void writeMap( TFile* rootfile, bool tilted = false );
31  // move and tilt the map
32  void moveMap( double dx, double dy, double dz, double ax, double ay );
33  // compute magnetic field
34  void getB( const double *xyz, double *B, double *deriv=nullptr ) const;
35  // accessor
36  const BFieldMesh<double> *tiltedMap() const { return m_tilt; }
37 private:
38  // data members
39  BFieldMesh<double> *m_orig; // original map as it was read from file
40  BFieldMesh<double> *m_tilt; // tilted and moved map
41 };
42 
43 #endif
BFieldSolenoid::getB
void getB(const double *xyz, double *B, double *deriv=nullptr) const
Definition: BFieldSolenoid.cxx:287
fitman.ax
ax
Definition: fitman.py:522
BFieldSolenoid::moveMap
void moveMap(double dx, double dy, double dz, double ax, double ay)
Definition: BFieldSolenoid.cxx:305
BFieldSolenoid::~BFieldSolenoid
~BFieldSolenoid()
Definition: BFieldSolenoid.h:26
BFieldSolenoid::tiltedMap
const BFieldMesh< double > * tiltedMap() const
Definition: BFieldSolenoid.h:36
xyz
#define xyz
BFieldSolenoid::readMap
int readMap(std::istream &input)
Definition: BFieldSolenoid.cxx:20
LArCalib_HVScale2NtupleConfig.rootfile
string rootfile
Definition: LArCalib_HVScale2NtupleConfig.py:74
BFieldSolenoid::writeMap
void writeMap(TFile *rootfile, bool tilted=false)
Definition: BFieldSolenoid.cxx:104
BFieldMesh< double >
BFieldSolenoid::m_tilt
BFieldMesh< double > * m_tilt
Definition: BFieldSolenoid.h:40
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
BFieldZone.h
BFieldSolenoid
Definition: BFieldSolenoid.h:21
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
BFieldSolenoid::BFieldSolenoid
BFieldSolenoid()
Definition: BFieldSolenoid.h:24
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
BFieldSolenoid::m_orig
BFieldMesh< double > * m_orig
Definition: BFieldSolenoid.h:39
fitman.ay
ay
Definition: fitman.py:525