21 #include "GFRaveTrackParameters.h"
22 #include "GFRaveConverters.h"
23 #include "Exception.h"
31 GFRaveTrackParameters::GFRaveTrackParameters() :
32 originalTrack_(nullptr),
36 hasSmoothedData_(false)
42 GFRaveTrackParameters::GFRaveTrackParameters(
const Track* track, MeasuredStateOnPlane* ,
double weight,
const TVectorD & state6,
const TMatrixDSym & cov6x6,
bool isSmoothed) :
43 originalTrack_(const_cast<Track*>(track)),
47 hasSmoothedData_(isSmoothed)
49 if (state_.GetNrows() != 6) {
50 Exception exc(
"GFRaveTrackParameters ==> State is not 6D!",__LINE__,__FILE__);
53 if (cov_.GetNrows()!=6) {
54 Exception exc(
"GFRaveTrackParameters ==> Covariance is not 6D!",__LINE__,__FILE__);
61 GFRaveTrackParameters::GFRaveTrackParameters(
const Track* track, MeasuredStateOnPlane* ,
double weight) :
62 originalTrack_(const_cast<Track*>(track)),
66 hasSmoothedData_(false)
73 GFRaveTrackParameters::getPos()
const {
74 return TVector3(state_[0], state_[1], state_[2]);
79 GFRaveTrackParameters::getMom()
const {
80 return TVector3(state_[3], state_[4], state_[5]);
85 GFRaveTrackParameters::getCharge()
const {
86 return getTrack()->getFitStatus()->getCharge();
91 GFRaveTrackParameters::getPdg()
const{
93 return getTrack()->getCardinalRep()->getPDG();
95 Exception exc(
"GFRaveTrackParameters::getPdg() ==> no genfit::Track available!",__LINE__,__FILE__);
102 GFRaveTrackParameters::Print(
const Option_t*)
const {
103 std::cout <<
"weight: " << getWeight() <<
"\n";
104 if (!hasSmoothedData_) std::cout <<
"state and cov are NOT smoothed! \n";
105 std::cout <<
"state: "; getState().Print();
106 std::cout <<
"cov: "; getCov().Print();
107 if (hasTrack()) {std::cout <<
"genfit::Track: "; getTrack()->Print();}
108 else std::cout <<
"NO genfit::Track pointer \n";
Defines for I/O streams used for error and debug printing.