Jpp
Public Member Functions | Protected Attributes | List of all members
JFIT::JFit Class Reference

Data structure for track fit results. More...

#include <JEvt.hh>

Inheritance diagram for JFIT::JFit:
TObject JFIT::JHistory std::vector< JEvent >

Public Member Functions

 JFit ()
 Default constructor. More...
 
 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. More...
 
 JFit (const JHistory &history, const double x, const double y, const double z, const int status=-1)
 Constructor for storing position only. More...
 
JFitadd (const JFitApplication_t &type)
 Add event to history. More...
 
double getX () const
 Get X-position. More...
 
double getY () const
 Get Y-position. More...
 
double getZ () const
 Get Z-position. More...
 
double getDX () const
 Get X-slope. More...
 
double getDY () const
 Get Y-slope. More...
 
double getDZ () const
 Get Z-slope. More...
 
double getT () const
 Get time. More...
 
double getQ () const
 Get quality. More...
 
int getNDF () const
 Get number of degrees of freedom. More...
 
double getE () const
 Get energy. More...
 
int getStatus () const
 Get status of the fit; negative values should refer to a bad fit. More...
 
void move (const double step, const double velocity)
 Move vertex along this track with given velocity. More...
 
void setE (const double E)
 Set energy. More...
 
const std::vector< double > & getW () const
 Get values. More...
 
void setW (const std::vector< double > &W)
 Set values. More...
 
int getN () const
 Get number of values. More...
 
bool hasW (const int i) const
 Check availability of value. More...
 
double getW (const int i) const
 Get value. More...
 
double getW (const int i, const double value) const
 Get value. More...
 
void setW (const int i, const double value)
 Set value. More...
 
 ClassDef (JFit, 5)
 
const JHistorygetHistory () const
 Get history. More...
 
JHistorygetHistory ()
 Get history. More...
 
 ClassDef (JHistory, 1)
 

Protected Attributes

double __x
 
double __y
 
double __z
 
double __dx
 
double __dy
 
double __dz
 
double __t
 
double __Q
 
int __NDF
 
std::vector< double > W
 
double __E
 
int __status
 

Detailed Description

Data structure for track fit results.

Definition at line 31 of file JEvt.hh.

Constructor & Destructor Documentation

◆ JFit() [1/3]

JFIT::JFit::JFit ( )
inline

Default constructor.

Parameters are initialized with non physical values

Definition at line 40 of file JEvt.hh.

40  :
41  __x( -std::numeric_limits<double>::max() ),
42  __y( -std::numeric_limits<double>::max() ),
43  __z( -std::numeric_limits<double>::max() ),
44  __dx(0.0),
45  __dy(0.0),
46  __dz(0.0),
47  __t( -std::numeric_limits<double>::max() ),
48  __Q( -std::numeric_limits<double>::max() ),
49  __NDF(-1),
50  __E(0.0),
51  __status(-1)
52  {}

◆ JFit() [2/3]

JFIT::JFit::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 
)
inline

Constructor.

Parameters
historyhistory
xX-position
yY-position
zZ-position
dxX-slope
dyY-slope
dzZ-slope
ttime
Qquality
NDFnumber of degrees of freedom
Eenergy
statusstatus

Definition at line 71 of file JEvt.hh.

82  :
83  JHistory(history)
84  {
85  __x = x;
86  __y = y;
87  __z = z;
88  __dx = dx;
89  __dy = dy;
90  __dz = dz;
91  __t = t;
92  __Q = Q;
93  __NDF = NDF;
94  __E = E;
95  __status = status;
96  }

◆ JFit() [3/3]

JFIT::JFit::JFit ( const JHistory history,
const double  x,
const double  y,
const double  z,
const int  status = -1 
)
inline

Constructor for storing position only.

We keep it inside of JFit in order to restrict the ROOT-TObject participation in the software Whether this is related to a Position or a real fit can be obtained via JFitApplication_t

Parameters
historyhistory
xX-position
yY-position
zZ-position
statusstatus

Definition at line 108 of file JEvt.hh.

112  :
113  JHistory(history)
114  {
115  __x = x;
116  __y = y;
117  __z = z;
118  __dx = 0.0;
119  __dy = 0.0;
120  __dz = 0.0;
121  __t = 0.0;
122  __Q = 0.0;
123  __NDF = -1;
124  __E = 0.0;
125  __status = status;
126  }

Member Function Documentation

◆ add()

JFit& JFIT::JFit::add ( const JFitApplication_t type)
inline

Add event to history.

Parameters
typeapplication type
Returns
this fit

Definition at line 135 of file JEvt.hh.

136  {
137  getHistory().add(type);
138 
139  return *this;
140  }

◆ getX()

double JFIT::JFit::getX ( ) const
inline

Get X-position.

Definition at line 143 of file JEvt.hh.

◆ getY()

double JFIT::JFit::getY ( ) const
inline

Get Y-position.

Definition at line 144 of file JEvt.hh.

◆ getZ()

double JFIT::JFit::getZ ( ) const
inline

Get Z-position.

Definition at line 145 of file JEvt.hh.

◆ getDX()

double JFIT::JFit::getDX ( ) const
inline

Get X-slope.

Definition at line 146 of file JEvt.hh.

◆ getDY()

double JFIT::JFit::getDY ( ) const
inline

Get Y-slope.

Definition at line 147 of file JEvt.hh.

◆ getDZ()

double JFIT::JFit::getDZ ( ) const
inline

Get Z-slope.

Definition at line 148 of file JEvt.hh.

◆ getT()

double JFIT::JFit::getT ( ) const
inline

Get time.

Definition at line 149 of file JEvt.hh.

◆ getQ()

double JFIT::JFit::getQ ( ) const
inline

Get quality.

Definition at line 150 of file JEvt.hh.

◆ getNDF()

int JFIT::JFit::getNDF ( ) const
inline

Get number of degrees of freedom.

Definition at line 151 of file JEvt.hh.

◆ getE()

double JFIT::JFit::getE ( ) const
inline

Get energy.

Definition at line 152 of file JEvt.hh.

◆ getStatus()

int JFIT::JFit::getStatus ( ) const
inline

Get status of the fit; negative values should refer to a bad fit.

Definition at line 153 of file JEvt.hh.

◆ move()

void JFIT::JFit::move ( const double  step,
const double  velocity 
)
inline

Move vertex along this track with given velocity.

Parameters
stepstep
velocityvelocity

Definition at line 162 of file JEvt.hh.

163  {
164  __x += step * __dx;
165  __y += step * __dy;
166  __z += step * __dz;
167  __t += step / velocity;
168  }

◆ setE()

void JFIT::JFit::setE ( const double  E)
inline

Set energy.

Parameters
Eenergy

Definition at line 176 of file JEvt.hh.

177  {
178  __E = E;
179  }

◆ getW() [1/3]

const std::vector<double>& JFIT::JFit::getW ( ) const
inline

Get values.

Returns
values

Definition at line 187 of file JEvt.hh.

188  {
189  return this->W;
190  }

◆ setW() [1/2]

void JFIT::JFit::setW ( const std::vector< double > &  W)
inline

Set values.

Parameters
Wvalues

Definition at line 198 of file JEvt.hh.

199  {
200  this->W = W;
201  }

◆ getN()

int JFIT::JFit::getN ( ) const
inline

Get number of values.

Returns
number of values

Definition at line 209 of file JEvt.hh.

210  {
211  return W.size();
212  }

◆ hasW()

bool JFIT::JFit::hasW ( const int  i) const
inline

Check availability of value.

Parameters
iindex
Returns
true if available; else false

Definition at line 221 of file JEvt.hh.

222  {
223  return (i >= 0 && i < (int) W.size());
224  }

◆ getW() [2/3]

double JFIT::JFit::getW ( const int  i) const
inline

Get value.

Parameters
iindex
Returns
value

Definition at line 233 of file JEvt.hh.

234  {
235  return W.at(i);
236  }

◆ getW() [3/3]

double JFIT::JFit::getW ( const int  i,
const double  value 
) const
inline

Get value.

Parameters
iindex
valuedefault value
Returns
value

Definition at line 246 of file JEvt.hh.

247  {
248  if (hasW(i))
249  return W.at(i);
250  else
251  return value;
252  }

◆ setW() [2/2]

void JFIT::JFit::setW ( const int  i,
const double  value 
)
inline

Set value.

Parameters
iindex
valuevalue

Definition at line 261 of file JEvt.hh.

262  {
263  if (i >= (int) W.size()) {
264  W.resize(i + 1, 0.0);
265  }
266 
267  W[i] = value;
268  }

◆ ClassDef() [1/2]

JFIT::JFit::ClassDef ( JFit  ,
 
)

◆ getHistory() [1/2]

const JHistory& JFIT::JHistory::getHistory ( ) const
inlineinherited

Get history.

Returns
histtory

Definition at line 225 of file JHistory.hh.

226  {
227  return static_cast<const JHistory&>(*this);
228  }

◆ getHistory() [2/2]

JHistory& JFIT::JHistory::getHistory ( )
inlineinherited

Get history.

Returns
histtory

Definition at line 236 of file JHistory.hh.

237  {
238  return static_cast<JHistory&>(*this);
239  }

◆ ClassDef() [2/2]

JFIT::JHistory::ClassDef ( JHistory  ,
 
)
inherited

Member Data Documentation

◆ __x

double JFIT::JFit::__x
protected

Definition at line 274 of file JEvt.hh.

◆ __y

double JFIT::JFit::__y
protected

Definition at line 275 of file JEvt.hh.

◆ __z

double JFIT::JFit::__z
protected

Definition at line 276 of file JEvt.hh.

◆ __dx

double JFIT::JFit::__dx
protected

Definition at line 277 of file JEvt.hh.

◆ __dy

double JFIT::JFit::__dy
protected

Definition at line 278 of file JEvt.hh.

◆ __dz

double JFIT::JFit::__dz
protected

Definition at line 279 of file JEvt.hh.

◆ __t

double JFIT::JFit::__t
protected

Definition at line 280 of file JEvt.hh.

◆ __Q

double JFIT::JFit::__Q
protected

Definition at line 281 of file JEvt.hh.

◆ __NDF

int JFIT::JFit::__NDF
protected

Definition at line 282 of file JEvt.hh.

◆ W

std::vector<double> JFIT::JFit::W
protected

Definition at line 283 of file JEvt.hh.

◆ __E

double JFIT::JFit::__E
protected

Definition at line 284 of file JEvt.hh.

◆ __status

int JFIT::JFit::__status
protected

Definition at line 285 of file JEvt.hh.


The documentation for this class was generated from the following file:
JFIT::JFit::__t
double __t
Definition: JEvt.hh:280
JFIT::JFit::hasW
bool hasW(const int i) const
Check availability of value.
Definition: JEvt.hh:221
JFIT::JFit::__dz
double __dz
Definition: JEvt.hh:279
JFIT::JFit::__z
double __z
Definition: JEvt.hh:276
JFIT::JFit::__Q
double __Q
Definition: JEvt.hh:281
JFIT::JFit::__y
double __y
Definition: JEvt.hh:275
JFIT::JFit::W
std::vector< double > W
Definition: JEvt.hh:283
JFIT::JHistory::JHistory
JHistory()
Default constructor.
Definition: JHistory.hh:182
JFIT::JFit::__NDF
int __NDF
Definition: JEvt.hh:282
JFIT::JFit::__E
double __E
Definition: JEvt.hh:284
JFIT::JFit::__dx
double __dx
Definition: JEvt.hh:277
JFIT::JFit::__status
int __status
Definition: JEvt.hh:285
JFIT::JFit::__x
double __x
Definition: JEvt.hh:274
JFIT::JFit::__dy
double __dy
Definition: JEvt.hh:278
JFIT::JHistory::getHistory
const JHistory & getHistory() const
Get history.
Definition: JHistory.hh:225
JFIT::JHistory::add
JHistory & add(const JFitApplication_t &type)
Add event to history.
Definition: JHistory.hh:248