Jpp
Classes | Namespaces | Functions | Variables
JEvt.hh File Reference
#include <istream>
#include <ostream>
#include <iomanip>
#include <vector>
#include <limits>
#include <TROOT.h>
#include <TObject.h>
#include "JLang/JType.hh"
#include "JROOT/JRoot.hh"
#include "JROOT/JTreeParameters.hh"
#include "JFit/JHistory.hh"

Go to the source code of this file.

Classes

class  JFIT::JFit
 Data structure for track fit results. More...
 
class  JFIT::JEvt
 Data structure for set of track fit results. More...
 

Namespaces

 JFIT
 Auxiliary classes and methods for linear and iterative data regression.
 
 JPP
 This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 

Functions

std::ostream & operator<< (std::ostream &out, const JFIT::JFit &fit)
 Write fit results to output. More...
 

Variables

JROOT::JTreeParameters getTreeParameters (JLANG::JType< JFIT::JEvt >)
 Get TTree parameters for given data type. More...
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  out,
const JFIT::JFit fit 
)

Write fit results to output.

Parameters
outoutput stream
fitfit results
Returns
output stream

Definition at line 12 of file JEvt.cc.

13 {
14  using namespace std;
15  using namespace JPP;
16 
17  const JHistory& history = fit.getHistory();
18 
19  out << "history:";
20 
21  for (JHistory::const_reverse_iterator i = history.rbegin(); i != history.rend(); ++i) {
22  out << ' ' << i->type;
23  }
24 
25  out << endl;
26 
27  out << "x " << FIXED(7,2) << fit.getX() << endl;
28  out << "y " << FIXED(7,2) << fit.getY() << endl;
29  out << "z " << FIXED(7,2) << fit.getZ() << endl;
30  out << "dx " << FIXED(7,3) << fit.getDX() << endl;
31  out << "dy " << FIXED(7,3) << fit.getDY() << endl;
32  out << "dz " << FIXED(7,3) << fit.getDZ() << endl;
33 
34  out << "Q " << FIXED(12,5) << fit.getQ() << endl;
35  out << "NDF " << setw(5) << fit.getNDF() << endl;
36 
37  out << "status " << fit.getStatus() << endl;
38 
39  for (int i = 0; i != fit.getN(); ++i) {
40  out << "W[" << i << "] = " << FIXED(10,5) << fit.getW(i) << endl;
41  }
42 
43  return out;
44 }

Variable Documentation

◆ getTreeParameters

JROOT::JTreeParameters getTreeParameters(JLANG::JType< JFIT::JEvt >)
inline

Get TTree parameters for given data type.

Returns
TTree parameters

Definition at line 358 of file JEvt.hh.

359 {
360  return JROOT::JTreeParameters("EVT", "evt", "", 0);
361 }
JFIT::JFit::getZ
double getZ() const
Get Z-position.
Definition: JEvt.hh:146
JFIT::JFit::getDX
double getDX() const
Get X-slope.
Definition: JEvt.hh:147
FIXED
Auxiliary data structure for floating point format specification.
Definition: JPrint.hh:481
JFIT::JFit::getN
int getN() const
Get number of values.
Definition: JEvt.hh:210
JFIT::JFit::getDZ
double getDZ() const
Get Z-slope.
Definition: JEvt.hh:149
JFIT::JFit::getW
const std::vector< double > & getW() const
Get values.
Definition: JEvt.hh:188
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JFIT::JFit::getQ
double getQ() const
Get quality.
Definition: JEvt.hh:151
JFIT::JFit::getNDF
int getNDF() const
Get number of degrees of freedom.
Definition: JEvt.hh:152
JFIT::JFit::getStatus
int getStatus() const
Get status of the fit; negative values should refer to a bad fit.
Definition: JEvt.hh:154
JFIT::JFit::getX
double getX() const
Get X-position.
Definition: JEvt.hh:144
std
Definition: jaanetDictionary.h:36
JFIT::JFit::getDY
double getDY() const
Get Y-slope.
Definition: JEvt.hh:148
JFIT::JFit::getY
double getY() const
Get Y-position.
Definition: JEvt.hh:145
JFIT::JHistory::getHistory
const JHistory & getHistory() const
Get history.
Definition: JHistory.hh:225
JROOT::JTreeParameters
Data structure for TTree parameters.
Definition: JTreeParameters.hh:26