13 std::vector<double> times{10.,25.,50.,100.0,500.0, 1000.0};
14 std::vector<double> xes{100.0, 0.0, 50.0, 10.0, 75.0};
16 for (
auto t : times) {
20 auto depo = std::make_shared<SimpleDepo>(
t,
Point(
x,0.0,0.0));
21 auto newdepo = dpx.
add(depo);
22 std::cerr <<
"\tx=" <<
x/
units::cm <<
"cm, t=" << newdepo->time()/tunit <<
"us\n";
24 std::cerr <<
"^ t=" <<
t/tunit <<
"us, fot=" << dpx.
freezeout_time()/tunit <<
"us\n";
28 std::cerr << dpx.
frozen_queue().size() <<
" frozen with fot=" << fot/tunit <<
"us, " << dpx.
working_queue().size() <<
" working\n";
30 auto removed = dpx.
pop(fot/2.0);
31 std::cerr <<
"Popped " << removed.size() <<
" at " << fot/2.0/tunit <<
std::endl;
32 for (
auto depo : removed) {
33 std::cerr <<
"\tx=" << depo->pos().x()/
units::cm <<
"cm, t=" << depo->time()/tunit <<
"us";
34 std::cerr <<
" <--- ";
35 std::cerr <<
"x=" << depo->prior()->pos().x()/
units::cm <<
"cm, t=" << depo->prior()->time()/tunit <<
"us\n";
39 std::cerr <<
"\tx=" << depo->pos().x()/
units::cm <<
"cm, t=" << depo->time()/tunit <<
"us";
40 std::cerr <<
" <--- ";
41 std::cerr <<
"x=" << depo->prior()->pos().x()/
units::cm <<
"cm, t=" << depo->prior()->time()/tunit <<
"us\n";
45 std::cerr <<
"\tx=" << depo->pos().x()/
units::cm <<
"cm, t=" << depo->time()/tunit <<
"us";
46 std::cerr <<
" <--- ";
47 std::cerr <<
"x=" << depo->prior()->pos().x()/
units::cm <<
"cm, t=" << depo->prior()->time()/tunit <<
"us\n";
double freezeout_time() const
IDepo::pointer add(const IDepo::pointer &depo)
D3Vector< double > Point
A 3D Cartesian point in double precision.
const working_queue_t & working_queue() const
const frozen_queue_t & frozen_queue() const
IDepo::vector pop(double time)
void freezeout()
Force any remaining "thawed" depos in the queue to be frozen out.
QTextStream & endl(QTextStream &s)