ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/staticProps/GofRAngle.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/staticProps/GofRAngle.cpp (file contents):
Revision 1995 by tim, Thu Feb 10 22:37:21 2005 UTC vs.
Revision 2037 by tim, Wed Feb 16 19:36:30 2005 UTC

# Line 68 | Line 68 | void GofRAngle::processHistogram() {
68  
69   void GofRAngle::processHistogram() {
70  
71 +    int nPairs = getNPairs();
72      double volume = info_->getSnapshotManager()->getCurrentSnapshot()->getVolume();
73 <    double pairDensity = npairs_ /volume;
73 >    double pairDensity = nPairs /volume;
74      double pairConstant = ( 4.0 * NumericConstant::PI * pairDensity ) / 3.0;
75  
76      for(int i = 0 ; i < histogram_.size(); ++i){
# Line 100 | Line 101 | void GofRAngle::collectHistogram(StuntDouble* sd1, Stu
101      double distance = r12.length();
102      int whichRBin = distance / deltaR_;
103  
104 <    
105 <    double cosAngle = evaluateAngle(sd1, sd2);
106 <    double halfBin = (nAngleBins_ - 1) * 0.5;
107 <    int whichThetaBin = halfBin * (cosAngle + 1.0);
108 <    ++histogram_[whichRBin][whichThetaBin];
109 <    
110 <    ++npairs_;
104 >    if (distance <= len_) {
105 >        double cosAngle = evaluateAngle(sd1, sd2);
106 >        double halfBin = (nAngleBins_ - 1) * 0.5;
107 >        int whichThetaBin = halfBin * (cosAngle + 1.0);
108 >        ++histogram_[whichRBin][whichThetaBin];
109 >        
110 >        ++npairs_;
111 >    }
112   }
113  
114   void GofRAngle::writeRdf() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines