11 double max,
double binWidth,
bool singlemode)
13 , binWidth_m(binWidth)
19 , singlemode_m(singlemode)
33 double radius = std::hypot(
R(0),
R(1));
52 bool globFinished =
false;
105 double globPeakRadius = 0.0;
106 int globRegister = 0;
118 if ( globRegister > 0 )
119 peaks_m.push_back(globPeakRadius /
double(globRegister));
133 int bin =
static_cast<int>(
std::abs(*it -
min_m ) * invBinWidth);
134 if (bin < 0 || (
unsigned int)bin >=
nBins_m)
continue;
142 reduce(&(locHist[0]), &(locHist[0]) + locHist.size(),
153 os_m.open(
fn_m.c_str(), std::ios::out);
159 os_m.open(
fn_m.c_str(), std::ios::app);
175 hos_m <<
"# Histogram bin counts (min, max, nbins, binsize) "
std::list< double > peaks_m
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
std::string hist_m
histogram filename with extension (.hist)
std::vector< double > container_t
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
double min_m
histogram size
PETE_TUTree< FnCeil, typename T::PETE_Expr_t > ceil(const PETE_Expr< T > &l)
void addParticle(const Vector_t &R)
std::ofstream hos_m
used to write out the histrogram
void evaluate(const int &turn)
unsigned int nBins_m
Number of bins.
bool reduce(Communicate &, InputIterator, InputIterator, OutputIterator, const ReduceOp &, bool *IncludeVal=0)
static OpalData * getInstance()
void saveASCII_m()
Write to output file.
Find peaks of radial profile.
void allreduce(const T *input, T *output, int count, Op op)
std::ofstream os_m
used to write out the data
container_t globHist_m
global histogram values
double binWidth_m
Bin width in mm.
void open_m()
Open output file.
void close_m()
Close output file.
std::string fn_m
filename with extension (.peaks)
std::string::iterator iterator
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
Inform & endl(Inform &inf)
void append_m()
Open output file in append mode.
std::string element_m
Element/probe name, for name output file.