ATLAS Offline Software
Loading...
Searching...
No Matches
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
22public:
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; }
37private:
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
#define xyz
A 3-d mesh (axes z,r,phi) representing a simple field map.
Definition BFieldMesh.h:43
BFieldMesh< double > * m_orig
void getB(const double *xyz, double *B, double *deriv=nullptr) const
int readMap(std::istream &input)
BFieldMesh< double > * m_tilt
void writeMap(TFile *rootfile, bool tilted=false)
void moveMap(double dx, double dy, double dz, double ax, double ay)
const BFieldMesh< double > * tiltedMap() const
static std::vector< std::string > rootfile
Definition iLumiCalc.h:30