12 #include "DensityEstimator.hh"
13 #include "ProbabilityContour.hh"
35 Stream(
const std::map<size_t, Bunch>& samples,
36 const std::vector<size_t> reaches = std::vector<size_t>());
51 const std::map<size_t, Bunch>::const_iterator
begin()
const {
return _bunches.begin(); }
54 const std::map<size_t, Bunch>::const_iterator
end()
const {
return _bunches.end(); }
119 bool Contains(
const size_t plane_id)
const;
const std::vector< size_t > & GetReaches() const
Returns the reaches of all the particles that compose the stream.
Definition: Stream.hh:72
const Bunch & Back() const
Returns the most downstream bunch in the stream.
Definition: Stream.cc:53
const size_t Size() const
Returns the number of bunches.
Definition: Stream.hh:48
const Bunch & Front() const
Returns the most upstream bunch in the stream.
Definition: Stream.cc:40
double _fraction
Fraction of the first bunch in the core.
Definition: Stream.hh:124
std::vector< size_t > _plane_ids
List of plane ids that compose the stream.
Definition: Stream.hh:122
Set of functions that compose the Statistics package.
SumStat
Enumerates the types of summary statistics of a beam bunch.
Definition: Definitions.hh:44
void SetCoreSize(const size_t size)
Sets the number of particles contained in the core of all the bunches in the stream.
Definition: Stream.cc:266
std::map< size_t, Bunch > _bunches
Map of beam bunches that compose the stream.
Definition: Stream.hh:121
double Transmission(const size_t plane_id) const
Returns an the transmission in the requested plane id.
Definition: Stream.cc:66
Holds a bunch of particles at a specific position along the beam line.
Definition: Bunch.hh:39
const std::map< size_t, Bunch >::const_iterator end() const
Returns the last iterator of the list of bunches.
Definition: Stream.hh:54
Stream & operator=(const Stream &stream)
Equality operator.
Definition: Stream.cc:26
void SetCoreFraction(const double frac)
Sets the core fraction of all the bunches in the stream.
Definition: Stream.cc:75
Bunch & operator[](const size_t plane_id)
Overload the subscript operator, return a bunch, allows mods.
Definition: Stream.hh:66
TGraphErrors * EvolutionGraph(const SumStat &stat) const
Returns an evolution graph of the requested statistic.
Definition: Stream.cc:85
~Stream()
Destructor.
Definition: Stream.cc:38
const Bunch & operator[](const size_t plane_id) const
Overload the subscript operator, return a bunch.
Definition: Stream.hh:63
Holds a set of particle bunches.
Definition: Stream.hh:25
TF1 * FractionalFunction(const SumStat &stat) const
Returns a function that expresses the fractional quantify as a function of emittance.
Definition: Stream.cc:229
const std::vector< size_t > & GetPlaneIds() const
Returns the list of plane ids that compose the stream.
Definition: Stream.hh:69
std::vector< size_t > _reaches
Reach of each particle in the beam.
Definition: Stream.hh:123
TGraphErrors * TransmissionGraph() const
Returns an evolution graph of the beam transmission.
Definition: Stream.cc:125
const size_t & GetReach(const size_t id) const
Returns the reach of the particle of requested id.
Definition: Stream.hh:75
std::map< SumStat, TGraphErrors * > FractionalGraphs(const size_t idu, const size_t idd)
Returns the relative change in a fractional quantities as a function of the fraction.
Definition: Stream.cc:159
Stream()
Default constructor, initilizes everything to 0.
Definition: Stream.cc:5
void Initialize()
Normal initializer, sets the list global variables.
Definition: Stream.cc:259
const std::map< size_t, Bunch >::const_iterator begin() const
Returns the first iterator of the list of bunches.
Definition: Stream.hh:51
bool Contains(const size_t plane_id) const
Returns true if the stream contains the requested plane id.
Definition: Stream.cc:282