--- trunk/src/applications/staticProps/GofRAngle.cpp 2005/02/15 17:24:12 348 +++ trunk/src/applications/staticProps/GofRAngle.cpp 2005/02/16 20:30:50 354 @@ -46,9 +46,19 @@ namespace oopse { namespace oopse { -GofRAngle::GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) - : RadialDistrFunc(info, filename, sele1, sele2){ +GofRAngle::GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, + const std::string& sele2, double len, int nrbins, int nangleBins) + : RadialDistrFunc(info, filename, sele1, sele2), len_(len), nRBins_(nrbins), nAngleBins_(nangleBins){ + deltaR_ = len_ /nRBins_; + deltaCosAngle_ = 2.0 / nAngleBins_; + + histogram_.resize(nRBins_); + avgGofr_.resize(nRBins_); + for (int i = 0 ; i < nRBins_; ++i) { + histogram_[i].resize(nAngleBins_); + avgGofr_[i].resize(nAngleBins_); + } } @@ -67,9 +77,10 @@ void GofRAngle::processHistogram() { void GofRAngle::processHistogram() { - int nRealPairs = getNRealPairs(); + + int nPairs = getNPairs(); double volume = info_->getSnapshotManager()->getCurrentSnapshot()->getVolume(); - double pairDensity = nRealPairs /volume; + double pairDensity = nPairs /volume; double pairConstant = ( 4.0 * NumericConstant::PI * pairDensity ) / 3.0; for(int i = 0 ; i < histogram_.size(); ++i){