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 int 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.


Note that the type of fit can be obtained via the history information.

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

Definition at line 109 of file JEvt.hh.

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

Member Function Documentation

◆ add()

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

Add event to history.

Parameters
typeapplication type
Returns
this fit

Definition at line 136 of file JEvt.hh.

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

◆ getX()

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

Get X-position.

Definition at line 144 of file JEvt.hh.

◆ getY()

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

Get Y-position.

Definition at line 145 of file JEvt.hh.

◆ getZ()

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

Get Z-position.

Definition at line 146 of file JEvt.hh.

◆ getDX()

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

Get X-slope.

Definition at line 147 of file JEvt.hh.

◆ getDY()

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

Get Y-slope.

Definition at line 148 of file JEvt.hh.

◆ getDZ()

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

Get Z-slope.

Definition at line 149 of file JEvt.hh.

◆ getT()

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

Get time.

Definition at line 150 of file JEvt.hh.

◆ getQ()

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

Get quality.

Definition at line 151 of file JEvt.hh.

◆ getNDF()

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

Get number of degrees of freedom.

Definition at line 152 of file JEvt.hh.

◆ getE()

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

Get energy.

Definition at line 153 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 154 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 163 of file JEvt.hh.

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

◆ setE()

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

Set energy.

Parameters
Eenergy

Definition at line 177 of file JEvt.hh.

178  {
179  __E = E;
180  }

◆ getW() [1/3]

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

Get values.

Returns
values

Definition at line 188 of file JEvt.hh.

189  {
190  return this->W;
191  }

◆ setW() [1/2]

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

Set values.

Parameters
Wvalues

Definition at line 199 of file JEvt.hh.

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

◆ getN()

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

Get number of values.

Returns
number of values

Definition at line 210 of file JEvt.hh.

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

◆ 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 222 of file JEvt.hh.

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

◆ getW() [2/3]

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

Get value.

Parameters
iindex
Returns
value

Definition at line 234 of file JEvt.hh.

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

◆ 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 247 of file JEvt.hh.

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

◆ setW() [2/2]

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

Set value.

Parameters
iindex
valuevalue

Definition at line 262 of file JEvt.hh.

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

◆ 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 275 of file JEvt.hh.

◆ __y

double JFIT::JFit::__y
protected

Definition at line 276 of file JEvt.hh.

◆ __z

double JFIT::JFit::__z
protected

Definition at line 277 of file JEvt.hh.

◆ __dx

double JFIT::JFit::__dx
protected

Definition at line 278 of file JEvt.hh.

◆ __dy

double JFIT::JFit::__dy
protected

Definition at line 279 of file JEvt.hh.

◆ __dz

double JFIT::JFit::__dz
protected

Definition at line 280 of file JEvt.hh.

◆ __t

double JFIT::JFit::__t
protected

Definition at line 281 of file JEvt.hh.

◆ __Q

double JFIT::JFit::__Q
protected

Definition at line 282 of file JEvt.hh.

◆ __NDF

int JFIT::JFit::__NDF
protected

Definition at line 283 of file JEvt.hh.

◆ W

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

Definition at line 284 of file JEvt.hh.

◆ __E

double JFIT::JFit::__E
protected

Definition at line 285 of file JEvt.hh.

◆ __status

int JFIT::JFit::__status
protected

Definition at line 286 of file JEvt.hh.


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