1 #ifndef __JRECONSTRUCTION__JEVT__
2 #define __JRECONSTRUCTION__JEVT__
24 namespace JRECONSTRUCTION {}
25 namespace JPP {
using namespace JRECONSTRUCTION; }
42 __x( -std::numeric_limits<double>::max() ),
43 __y( -std::numeric_limits<double>::max() ),
44 __z( -std::numeric_limits<double>::max() ),
48 __t( -std::numeric_limits<double>::max() ),
49 __Q( -std::numeric_limits<double>::max() ),
83 const int status = -1) :
114 const int status = -1):
164 void move(
const double step,
const double velocity)
169 __t += step / velocity;
225 return (i >= 0 && i < (
int)
W.size());
248 double getW(
const int i,
const double value)
const
263 void setW(
const int i,
const double value)
265 if (i >= (
int)
W.size()) {
266 W.resize(i + 1, 0.0);
313 template<
class JSelector_t>
320 iterator __end = partition(this->begin(), this->end(), selector);
322 this->erase(__end, this->end());
333 template<
class JComparator_t>
335 const JComparator_t& comparator)
343 if (number_of_fits > 0 && number_of_fits < this->size()) {
345 advance(__end = this->begin(), number_of_fits);
347 partial_sort(this->begin(), __end, this->end(), comparator);
351 sort(this->begin(), __end, comparator);
354 this->erase(__end, this->end());
370 out <<
"Event: " << endl;
372 for (JEvt::const_iterator fit = event.begin(); fit !=
event.end(); ++fit) {
385 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.
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 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 value.
int getN() const
Get number of values.
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.
JFit & add(const int type)
Add event to history.
Data structure for track fit results.
bool hasW(const int i) const
Check availability of value.
double getT() const
Get time.
double getX() const
Get X-position.
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.
JROOT::JTreeParameters getTreeParameters(JLANG::JType< JRECONSTRUCTION::JEvt >)
Get TTree parameters for given data type.
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.
double getQ() const
Get quality.
Data structure for set of track fit results.
double getZ() const
Get Z-position.
double getW(const int i) const
Get value.
double getW(const int i, const double value) const
Get 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 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.
then usage $script[input file[working directory[option]]] nWhere option can be E
JFit()
Default constructor.