#include "WireCellRoot/MagnifySink.h"
#include "WireCellIface/ITrace.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TH2I.h"
#include "TFile.h"
#include "TTree.h"
#include "WireCellUtil/NamedFactory.h"
#include "WireCellIface/FrameTools.h"
#include <vector>
#include <string>
Go to the source code of this file.
Definition at line 143 of file MagnifySink.cxx.
146 std::vector<int> uvwt[4];
147 for (
auto trace : traces) {
148 const int chid =
trace->channel();
149 auto wpid = anode->resolve(chid);
150 const int iplane = wpid.index();
151 if (iplane<0 || iplane>=3) {
154 uvwt[iplane].push_back(chid);
155 byplane[iplane].push_back(
trace);
156 uvwt[3].push_back(
trace->tbin());
157 uvwt[3].push_back(
trace->tbin() +
trace->charge().size());
160 std::vector<Binning> binnings(4);
161 for (
int ind=0; ind<4; ++ind) {
162 auto const& one = uvwt[ind];
166 std::cerr <<
"[wgu] plane: " << ind <<
" has not traces. " <<
std::endl;
169 auto mme = std::minmax_element(one.begin(), one.end());
170 const int vmin = *mme.first;
171 const int vmax = *mme.second;
173 const int n = vmax - vmin;
175 binnings.at(ind) = Binning(n, vmin, vmax);
179 const double diff = vmax - vmin;
181 binnings.at(ind) = Binning(diff+1, vmin-0.5, vmax+0.5);
boost::error_info< struct tag_errmsg, std::string > errmsg
QTextStream & endl(QTextStream &s)
Definition at line 114 of file MagnifySink.cxx.
117 for (
auto jone :
cfg) {
118 ret.insert(jone.asString());
std::unordered_set< std::string > string_set_t