1 #ifndef __JRECONSTRUCTION__JEVT__
2 #define __JRECONSTRUCTION__JEVT__
25 namespace JRECONSTRUCTION {}
26 namespace JPP {
using namespace JRECONSTRUCTION; }
44 __x(std::numeric_limits<double>::lowest()),
45 __y(std::numeric_limits<double>::lowest()),
46 __z(std::numeric_limits<double>::lowest()),
50 __t(std::numeric_limits<double>::lowest()),
51 __Q(std::numeric_limits<double>::lowest()),
85 const int status = -1) :
117 const int status = -1):
167 void move(
const double step,
const double velocity)
172 __t += step / velocity;
194 return ((
size_t) sqrt(1.0 + 8.0*
V.size()) - 1) / 2;
218 double getV(
const size_t row,
const size_t col)
const
222 const size_t __row = max(row, col) + 1;
223 const size_t __col = min(row, col);
225 return V.at((__row * (__row + 1)) / 2 - __row + __col);
240 void setV(
const size_t size,
const T& data)
244 for (
size_t row = 0; row != size; ++row) {
245 for (
size_t col = 0; col <= row; ++col) {
246 V.push_back(data[row][col]);
293 return (i >= 0 && i < (
int)
W.size());
316 double getW(
const int i,
const double value)
const
331 void setW(
const int i,
const double value)
333 if (i >= (
int)
W.size()) {
334 W.resize(i + 1, 0.0);
380 template<
class JSelector_t>
387 iterator __end = partition(this->begin(), this->end(), selector);
389 this->erase(__end, this->end());
400 template<
class JComparator_t>
402 const JComparator_t& comparator)
410 if (number_of_fits > 0 && number_of_fits < this->size()) {
412 advance(__end = this->begin(), number_of_fits);
414 partial_sort(this->begin(), __end, this->end(), comparator);
418 sort(this->begin(), __end, comparator);
421 this->erase(__end, this->end());
437 out <<
"Event: " << endl;
439 for (JEvt::const_iterator fit = event.begin(); fit !=
event.end(); ++fit) {
452 namespace JRECONSTRUCTION {
JFit(const JHistory &history, const double x, const double y, const double z, const double dx, const double dy, const double dz, const double t, const double Q, const int NDF, const double E=0.0, const int status=-1)
Constructor.
Q(UTCMax_s-UTCMin_s)-livetime_s
JHistory & add(const int type)
Add event to history.
friend std::ostream & operator<<(std::ostream &out, const JEvt &event)
Write event to output.
void setW(const std::vector< double > &W)
Set associated values.
void setE(const double E)
Set energy.
void select(const size_t number_of_fits, const JComparator_t &comparator)
Select fits.
int getNDF() const
Get number of degrees of freedom.
void setW(const int i, const double value)
Set associated value.
int getN() const
Get number of associated values.
friend std::ostream & operator<<(std::ostream &out, const JHistory &history)
Write history to output stream.
Container for historical events.
This include file serves the purpose of hiding ROOT dependencies and circumphere namespace problems w...
Auxiliary class for a type holder.
void setV(const size_t size, const T &data)
Set error matrix.
JFit & add(const int type)
Add event to history.
size_t getDimensionOfErrorMatrix() const
Get dimension of error matrix.
Data structure for track fit results with history and optional associated values. ...
double getV(const size_t row, const size_t col) const
Get element of error matrix.
bool hasW(const int i) const
Check availability of value.
double getT() const
Get time.
double getX() const
Get X-position.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
double getY() const
Get Y-position.
int getStatus() const
Get status of the fit; negative values should refer to a bad fit.
Data structure for TTree parameters.
JEvt()
Default constructor.
double getDZ() const
Get Z-slope.
JROOT::JTreeParameters getTreeParameters(JLANG::JType< JRECONSTRUCTION::JEvt >)
Get TTree parameters for given data type.
double getQ() const
Get quality.
Data structure for set of track fit results.
double getZ() const
Get Z-position.
const std::vector< double > & getV() const
Get error matrix.
double getW(const int i) const
Get associated value.
double getW(const int i, const double value) const
Get associated value.
JFit(const JHistory &history, const double x, const double y, const double z, const int status=-1)
Constructor for storing position only.
double getDY() const
Get Y-slope.
void move(const double step, const double velocity)
Move vertex along this track with given velocity.
const std::vector< double > & getW() const
Get associated values.
const JHistory & getHistory() const
Get history.
void select(const JSelector_t &selector)
Select fits.
double getE() const
Get energy.
double getDX() const
Get X-slope.
JFit()
Default constructor.