| 46 |  |  | 
| 47 |  | namespace oopse { | 
| 48 |  |  | 
| 49 | < | GofRAngle::GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) | 
| 50 | < | : RadialDistrFunc(info, filename, sele1, sele2){ | 
| 49 | > | GofRAngle::GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, | 
| 50 | > | const std::string& sele2, double len, int nrbins, int nangleBins) | 
| 51 | > | : RadialDistrFunc(info, filename, sele1, sele2), len_(len), nRBins_(nrbins), nAngleBins_(nangleBins){ | 
| 52 |  |  | 
| 53 | + | deltaR_ = len_ /nRBins_; | 
| 54 | + | deltaCosAngle_ = 2.0 / nAngleBins_; | 
| 55 | + |  | 
| 56 | + | histogram_.resize(nRBins_); | 
| 57 | + | avgGofr_.resize(nRBins_); | 
| 58 | + | for (int i = 0 ; i < nRBins_; ++i) { | 
| 59 | + | histogram_[i].resize(nAngleBins_); | 
| 60 | + | avgGofr_[i].resize(nAngleBins_); | 
| 61 | + | } | 
| 62 |  | } | 
| 63 |  |  | 
| 64 |  |  | 
| 132 |  | double r = deltaR_ * (i + 0.5); | 
| 133 |  |  | 
| 134 |  | for(int j = 0; j < avgGofr_[i].size(); ++j) { | 
| 135 | < | double cosAngle = -1.0 + (i + 0.5)*deltaCosAngle_; | 
| 135 | > | double cosAngle = -1.0 + (j + 0.5)*deltaCosAngle_; | 
| 136 |  | rdfStream << r << "\t" << cosAngle << "\t" << avgGofr_[i][j]/nProcessed_ << "\n"; | 
| 137 |  | } | 
| 138 |  | } |