FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PndFieldMapData Class Reference

#include <PndFieldMapData.h>

Inheritance diagram for PndFieldMapData:

Public Member Functions

 PndFieldMapData ()
 
 PndFieldMapData (const char *name)
 
 PndFieldMapData (const char *name, const PndFieldMap &map)
 
virtual ~PndFieldMapData ()
 
Int_t GetType () const
 
Double_t GetXmin () const
 
Double_t GetYmin () const
 
Double_t GetZmin () const
 
Double_t GetXmax () const
 
Double_t GetYmax () const
 
Double_t GetZmax () const
 
Int_t GetNx () const
 
Int_t GetNy () const
 
Int_t GetNz () const
 
TArrayF * GetBx () const
 
TArrayF * GetBy () const
 
TArrayF * GetBz () const
 

Private Member Functions

 PndFieldMapData (const PndFieldMapData &L)
 
PndFieldMapDataoperator= (const PndFieldMapData &)
 

Private Attributes

Int_t fType
 
Double_t fXmin
 
Double_t fXmax
 
Double_t fYmin
 
Double_t fYmax
 
Double_t fZmin
 
Double_t fZmax
 
Double_t fUnit
 
Int_t fNx
 
Int_t fNy
 
Int_t fNz
 
TArrayF * fBx
 
TArrayF * fBy
 
TArrayF * fBz
 

Detailed Description

Definition at line 32 of file PndFieldMapData.h.

Constructor & Destructor Documentation

PndFieldMapData::PndFieldMapData ( )

Default constructor

Definition at line 8 of file PndFieldMapData.cxx.

9  :fType(1),
10  fXmin(0),
11  fXmax(0),
12  fYmin(0),
13  fYmax(0),
14  fZmin(0),
15  fZmax(0),
16  fUnit(0),
17  fNx(0),
18  fNy(0),
19  fNz(0),
20  fBx(0),
21  fBy(0),
22  fBz(0)
23 {
24 
25 }
PndFieldMapData::PndFieldMapData ( const char *  name)

Standard constructor

Definition at line 31 of file PndFieldMapData.cxx.

32  :TNamed(mapName, "PND Field Map Data"),
33  fType(1),
34  fXmin(0),
35  fXmax(0),
36  fYmin(0),
37  fYmax(0),
38  fZmin(0),
39  fZmax(0),
40  fUnit(0),
41  fNx(0),
42  fNy(0),
43  fNz(0),
44  fBx(0),
45  fBy(0),
46  fBz(0)
47 {
48 }
PndFieldMapData::PndFieldMapData ( const char *  name,
const PndFieldMap map 
)

Constructor from an existing PndFieldMap

Definition at line 54 of file PndFieldMapData.cxx.

References Double_t, fBx, fBy, fBz, fNx, fNy, fNz, and PndFieldMap::GetScale().

56  :TNamed(name, "PND Field Map Data"),
57  fType( map.GetType()),
58  fXmin( map.GetXmin()),
59  fXmax( map.GetXmax()),
60  fYmin( map.GetYmin()),
61  fYmax( map.GetYmax()),
62  fZmin( map.GetZmin()),
63  fZmax( map.GetZmax()),
64  fUnit( map.GetUnit()),
65  fNx( map.GetNx()),
66  fNy( map.GetNy()),
67  fNz( map.GetNz()),
68  fBx( new TArrayF(*(map.GetBx()))),
69  fBy( new TArrayF(*(map.GetBy()))),
70  fBz( new TArrayF(*(map.GetBz())))
71 
72 {
73 
74  // Take out scaling factor and convert from kG to T
75  Double_t factor = map.GetScale() * 10.;
76  Int_t index = 0;
77  for (Int_t ix=0; ix<fNx; ix++) {
78  for (Int_t iy=0; iy<fNy; iy++) {
79  for (Int_t iz=0; iz<fNz; iz++) {
80  index = ix*fNy*fNz + iy*fNz + iz;
81  if ( fBx ) (*fBx)[index] = (*fBx)[index] / factor;
82  if ( fBy ) (*fBy)[index] = (*fBy)[index] / factor;
83  if ( fBz ) (*fBz)[index] = (*fBz)[index] / factor;
84  } // z loop
85  } // y loop
86  } // x loop
87 
88 }
Double_t GetZmin() const
Definition: PndFieldMap.h:90
virtual Double_t GetBy(Double_t x, Double_t y, Double_t z)
Double_t GetYmax() const
Definition: PndFieldMap.h:92
Double_t GetScale() const
Definition: PndFieldMap.h:110
Int_t GetNy() const
Definition: PndFieldMap.h:98
Double_t
Double_t GetYmin() const
Definition: PndFieldMap.h:89
Double_t GetXmin() const
Definition: PndFieldMap.h:88
Int_t GetNx() const
Definition: PndFieldMap.h:97
TString name
Double_t GetUnit() const
Definition: PndFieldMap.h:101
Double_t GetXmax() const
Definition: PndFieldMap.h:91
Int_t GetNz() const
Definition: PndFieldMap.h:99
virtual Double_t GetBx(Double_t x, Double_t y, Double_t z)
virtual Double_t GetBz(Double_t x, Double_t y, Double_t z)
Double_t GetZmax() const
Definition: PndFieldMap.h:93
PndFieldMapData::~PndFieldMapData ( )
virtual

Destructor

Definition at line 114 of file PndFieldMapData.cxx.

References fBx, fBy, and fBz.

114  {
115  if ( fBx ) delete fBx;
116  if ( fBy ) delete fBy;
117  if ( fBz ) delete fBz;
118 }
PndFieldMapData::PndFieldMapData ( const PndFieldMapData L)
private

Definition at line 92 of file PndFieldMapData.cxx.

93  :TNamed(L),
94  fType( L.GetType()),
95  fXmin( L.GetXmin()),
96  fXmax( L.GetXmax()),
97  fYmin( L.GetYmin()),
98  fYmax( L.GetYmax()),
99  fZmin( L.GetZmin()),
100  fZmax( L.GetZmax()),
101  fUnit( L.fUnit),
102  fNx( L.GetNx()),
103  fNy( L.GetNy()),
104  fNz( L.GetNz()),
105  fBx( new TArrayF(*(L.GetBx()))),
106  fBy( new TArrayF(*(L.GetBy()))),
107  fBz( new TArrayF(*(L.GetBz())))
108 
109 {
110 }
Double_t GetYmin() const
Double_t GetZmin() const
Double_t GetXmax() const
Int_t GetNy() const
Double_t GetZmax() const
TArrayF * GetBz() const
Double_t GetXmin() const
Int_t GetNx() const
Double_t GetYmax() const
Int_t GetNz() const
TArrayF * GetBy() const
TArrayF * GetBx() const
Int_t GetType() const

Member Function Documentation

TArrayF* PndFieldMapData::GetBx ( ) const
inline

Accessors to the field value arrays

Definition at line 67 of file PndFieldMapData.h.

References fBx.

Referenced by PndFieldMap::SetField().

67 { return fBx; }
TArrayF* PndFieldMapData::GetBy ( ) const
inline

Definition at line 68 of file PndFieldMapData.h.

References fBy.

Referenced by PndFieldMap::SetField().

68 { return fBy; }
TArrayF* PndFieldMapData::GetBz ( ) const
inline

Definition at line 69 of file PndFieldMapData.h.

References fBz.

Referenced by PndFieldMap::SetField().

69 { return fBz; }
Int_t PndFieldMapData::GetNx ( ) const
inline

Definition at line 61 of file PndFieldMapData.h.

References fNx.

Referenced by PndFieldMap::SetField().

61 { return fNx; }
Int_t PndFieldMapData::GetNy ( ) const
inline

Definition at line 62 of file PndFieldMapData.h.

References fNy.

Referenced by PndFieldMap::SetField().

62 { return fNy; }
Int_t PndFieldMapData::GetNz ( ) const
inline

Definition at line 63 of file PndFieldMapData.h.

References fNz.

Referenced by PndFieldMap::SetField().

63 { return fNz; }
Int_t PndFieldMapData::GetType ( ) const
inline

Accessors to field parameters in local coordinate system

Definition at line 54 of file PndFieldMapData.h.

References fType.

Referenced by PndFieldMap::SetField().

54 { return fType; }
Double_t PndFieldMapData::GetXmax ( ) const
inline

Definition at line 58 of file PndFieldMapData.h.

References fXmax.

Referenced by PndFieldMap::SetField().

58 { return fXmax; }
Double_t PndFieldMapData::GetXmin ( ) const
inline

Definition at line 55 of file PndFieldMapData.h.

References fXmin.

Referenced by PndFieldMap::SetField().

55 { return fXmin; }
Double_t PndFieldMapData::GetYmax ( ) const
inline

Definition at line 59 of file PndFieldMapData.h.

References fYmax.

Referenced by PndFieldMap::SetField().

59 { return fYmax; }
Double_t PndFieldMapData::GetYmin ( ) const
inline

Definition at line 56 of file PndFieldMapData.h.

References fYmin.

Referenced by PndFieldMap::SetField().

56 { return fYmin; }
Double_t PndFieldMapData::GetZmax ( ) const
inline

Definition at line 60 of file PndFieldMapData.h.

References fZmax.

Referenced by PndFieldMap::SetField().

60 { return fZmax; }
Double_t PndFieldMapData::GetZmin ( ) const
inline

Definition at line 57 of file PndFieldMapData.h.

References fZmin.

Referenced by PndFieldMap::SetField().

57 { return fZmin; }
PndFieldMapData& PndFieldMapData::operator= ( const PndFieldMapData )
inlineprivate

Definition at line 72 of file PndFieldMapData.h.

72 {return *this;};

Member Data Documentation

TArrayF* PndFieldMapData::fBx
private

Arrays with the field values in T

Definition at line 93 of file PndFieldMapData.h.

Referenced by GetBx(), PndFieldMapData(), and ~PndFieldMapData().

TArrayF* PndFieldMapData::fBy
private

Definition at line 94 of file PndFieldMapData.h.

Referenced by GetBy(), PndFieldMapData(), and ~PndFieldMapData().

TArrayF* PndFieldMapData::fBz
private

Definition at line 95 of file PndFieldMapData.h.

Referenced by GetBz(), PndFieldMapData(), and ~PndFieldMapData().

Int_t PndFieldMapData::fNx
private

Number of grid points

Definition at line 89 of file PndFieldMapData.h.

Referenced by GetNx(), and PndFieldMapData().

Int_t PndFieldMapData::fNy
private

Definition at line 89 of file PndFieldMapData.h.

Referenced by GetNy(), and PndFieldMapData().

Int_t PndFieldMapData::fNz
private

Definition at line 89 of file PndFieldMapData.h.

Referenced by GetNz(), and PndFieldMapData().

Int_t PndFieldMapData::fType
private

Type of map. 1 = PndFieldMap, 2 = Sym2, 3 = Sym3

Definition at line 72 of file PndFieldMapData.h.

Referenced by GetType().

Double_t PndFieldMapData::fUnit
private

Original units of the map

Definition at line 85 of file PndFieldMapData.h.

Double_t PndFieldMapData::fXmax
private

Definition at line 80 of file PndFieldMapData.h.

Referenced by GetXmax().

Double_t PndFieldMapData::fXmin
private

Field limits in local coordinate system

Definition at line 80 of file PndFieldMapData.h.

Referenced by GetXmin().

Double_t PndFieldMapData::fYmax
private

Definition at line 81 of file PndFieldMapData.h.

Referenced by GetYmax().

Double_t PndFieldMapData::fYmin
private

Definition at line 81 of file PndFieldMapData.h.

Referenced by GetYmin().

Double_t PndFieldMapData::fZmax
private

Definition at line 82 of file PndFieldMapData.h.

Referenced by GetZmax().

Double_t PndFieldMapData::fZmin
private

Definition at line 82 of file PndFieldMapData.h.

Referenced by GetZmin().


The documentation for this class was generated from the following files: