// ------------------------------------------------------------------------- // ----- PndFieldMapData source file ----- // ----- V. Friese 14/02/06 ----- // ------------------------------------------------------------------------- #include "TArrayF.h" #include "PndFieldMap.h" #include "PndFieldMapData.h" // ------------- Default constructor ---------------------------------- PndFieldMapData::PndFieldMapData() { fType = 1; fXmin = fYmin = fZmin = 0.; fXmax = fYmax = fZmax = 0.; fNx = fNy = fNz = 0; fBx = fBy = fBz = NULL; } // ------------------------------------------------------------------------ // ------------- Standard constructor --------------------------------- PndFieldMapData::PndFieldMapData(const char* mapName) : TNamed(mapName, "PND Field Map Data") { fType = 1; fXmin = fYmin = fZmin = 0.; fXmax = fYmax = fZmax = 0.; fNx = fNy = fNz = 0; fBx = fBy = fBz = NULL; } // ------------------------------------------------------------------------ // ----- Constructor from PndFieldMap ------------------------------ PndFieldMapData::PndFieldMapData(const char* name, const PndFieldMap& map) : TNamed(name, "PND Field Map Data") { fType = map.GetType(); fXmin = map.GetXmin(); fYmin = map.GetYmin(); fZmin = map.GetZmin(); fXmax = map.GetXmax(); fYmax = map.GetYmax(); fZmax = map.GetZmax(); fNx = map.GetNx(); fNy = map.GetNy(); fNz = map.GetNz(); fBx = new TArrayF(*(map.GetBx())); fBy = new TArrayF(*(map.GetBy())); fBz = new TArrayF(*(map.GetBz())); fUnit = map.GetUnit(); // Take out scaling factor and convert from kG to T Double_t factor = map.GetScale() * 10.; Int_t index = 0; for (Int_t ix=0; ix