//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class TpcPRLookupTable // see TpcPRLookupTable.h for details // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM (original author) // Cristoforo Simonetto TUM // // //----------------------------------------------------------- // This Class' Header ------------------ #include "TpcPRLookupTable.h" // C/C++ Headers ---------------------- // Collaborating Class Headers -------- #include "TpcAbsPadShape.h" #include "TpcGem.h" #include "TError.h" // Class Member definitions ----------- TpcPRLookupTable::TpcPRLookupTable() : isbuilt(false),range(0),step(0),nx(0),ny(0),table(0) {;} TpcPRLookupTable::~TpcPRLookupTable() { if(table!=0) { for(int i=0;i<2*nx;++i) delete [] table[i]; delete [] table; } } double TpcPRLookupTable::GetValue(const double dx, const double dy) const{ if(!isbuilt)return 0; int ilx=(int)floor(dx/step); int ily=(int)floor(dy/step); int iux=ilx+1; int iuy=ily+1; double lx=ilx*step; double ly=ily*step; double ux=iux*step; double uy=iuy*step; if(ilx<-nx || ilx>=nx){ //ErrMsg(warning)<<"ilx out of range"<=ny){ //ErrMsg(warning)<<"ily out of range"<=nx){ //ErrMsg(warning)<<"iux out of range"<=ny){ //ErrMsg(warning)<<"iuy out of range"<