Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 32 of file JEvt.hh.

Constructor & Destructor Documentation

JFIT::JFit::JFit ( )
inline

Default constructor.

Parameters are initialized with non physical values

Definition at line 41 of file JEvt.hh.

41  :
42  __x( -std::numeric_limits<double>::max() ),
43  __y( -std::numeric_limits<double>::max() ),
44  __z( -std::numeric_limits<double>::max() ),
45  __dx(0.0),
46  __dy(0.0),
47  __dz(0.0),
48  __t( -std::numeric_limits<double>::max() ),
49  __Q( -std::numeric_limits<double>::max() ),
50  __NDF(-1),
51  __E(0.0),
52  __status(-1)
53  {}
double __dy
Definition: JEvt.hh:280
int __NDF
Definition: JEvt.hh:284
double __z
Definition: JEvt.hh:278
int __status
Definition: JEvt.hh:287
double __y
Definition: JEvt.hh:277
double __E
Definition: JEvt.hh:286
double __t
Definition: JEvt.hh:282
double __dx
Definition: JEvt.hh:279
double __dz
Definition: JEvt.hh:281
double __Q
Definition: JEvt.hh:283
double __x
Definition: JEvt.hh:276
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 72 of file JEvt.hh.

83  :
84  JHistory(history)
85  {
86  __x = x;
87  __y = y;
88  __z = z;
89  __dx = dx;
90  __dy = dy;
91  __dz = dz;
92  __t = t;
93  __Q = Q;
94  __NDF = NDF;
95  __E = E;
96  __status = status;
97  }
double __dy
Definition: JEvt.hh:280
int __NDF
Definition: JEvt.hh:284
double __z
Definition: JEvt.hh:278
int __status
Definition: JEvt.hh:287
double __y
Definition: JEvt.hh:277
double __E
Definition: JEvt.hh:286
JHistory()
Default constructor.
Definition: JHistory.hh:185
double __t
Definition: JEvt.hh:282
double __dx
Definition: JEvt.hh:279
double __dz
Definition: JEvt.hh:281
double __Q
Definition: JEvt.hh:283
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37
double __x
Definition: JEvt.hh:276
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 110 of file JEvt.hh.

114  :
115  JHistory(history)
116  {
117  __x = x;
118  __y = y;
119  __z = z;
120  __dx = 0.0;
121  __dy = 0.0;
122  __dz = 0.0;
123  __t = 0.0;
124  __Q = 0.0;
125  __NDF = -1;
126  __E = 0.0;
127  __status = status;
128  }
double __dy
Definition: JEvt.hh:280
int __NDF
Definition: JEvt.hh:284
double __z
Definition: JEvt.hh:278
int __status
Definition: JEvt.hh:287
double __y
Definition: JEvt.hh:277
double __E
Definition: JEvt.hh:286
JHistory()
Default constructor.
Definition: JHistory.hh:185
double __t
Definition: JEvt.hh:282
double __dx
Definition: JEvt.hh:279
double __dz
Definition: JEvt.hh:281
double __Q
Definition: JEvt.hh:283
double __x
Definition: JEvt.hh:276

Member Function Documentation

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

Add event to history.

Parameters
typeapplication type
Returns
this fit

Definition at line 137 of file JEvt.hh.

138  {
139  getHistory().add(type);
140 
141  return *this;
142  }
JHistory & add(const int type)
Add event to history.
Definition: JHistory.hh:251
const JHistory & getHistory() const
Get history.
Definition: JHistory.hh:228
double JFIT::JFit::getX ( ) const
inline

Get X-position.

Definition at line 145 of file JEvt.hh.

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

Get Y-position.

Definition at line 146 of file JEvt.hh.

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

Get Z-position.

Definition at line 147 of file JEvt.hh.

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

Get X-slope.

Definition at line 148 of file JEvt.hh.

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

Get Y-slope.

Definition at line 149 of file JEvt.hh.

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

Get Z-slope.

Definition at line 150 of file JEvt.hh.

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

Get time.

Definition at line 151 of file JEvt.hh.

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

Get quality.

Definition at line 152 of file JEvt.hh.

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

Get number of degrees of freedom.

Definition at line 153 of file JEvt.hh.

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

Get energy.

Definition at line 154 of file JEvt.hh.

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

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

Definition at line 155 of file JEvt.hh.

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

165  {
166  __x += step * __dx;
167  __y += step * __dy;
168  __z += step * __dz;
169  __t += step / velocity;
170  }
double __dy
Definition: JEvt.hh:280
double __z
Definition: JEvt.hh:278
double __y
Definition: JEvt.hh:277
double __t
Definition: JEvt.hh:282
double __dx
Definition: JEvt.hh:279
double __dz
Definition: JEvt.hh:281
double __x
Definition: JEvt.hh:276
void JFIT::JFit::setE ( const double  E)
inline

Set energy.

Parameters
Eenergy

Definition at line 178 of file JEvt.hh.

179  {
180  __E = E;
181  }
double __E
Definition: JEvt.hh:286
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37
const std::vector<double>& JFIT::JFit::getW ( ) const
inline

Get values.

Returns
values

Definition at line 189 of file JEvt.hh.

190  {
191  return this->W;
192  }
std::vector< double > W
Definition: JEvt.hh:285
void JFIT::JFit::setW ( const std::vector< double > &  W)
inline

Set values.

Parameters
Wvalues

Definition at line 200 of file JEvt.hh.

201  {
202  this->W = W;
203  }
std::vector< double > W
Definition: JEvt.hh:285
int JFIT::JFit::getN ( ) const
inline

Get number of values.

Returns
number of values

Definition at line 211 of file JEvt.hh.

212  {
213  return W.size();
214  }
std::vector< double > W
Definition: JEvt.hh:285
bool JFIT::JFit::hasW ( const int  i) const
inline

Check availability of value.

Parameters
iindex
Returns
true if available; else false

Definition at line 223 of file JEvt.hh.

224  {
225  return (i >= 0 && i < (int) W.size());
226  }
std::vector< double > W
Definition: JEvt.hh:285
double JFIT::JFit::getW ( const int  i) const
inline

Get value.

Parameters
iindex
Returns
value

Definition at line 235 of file JEvt.hh.

236  {
237  return W.at(i);
238  }
std::vector< double > W
Definition: JEvt.hh:285
double JFIT::JFit::getW ( const int  i,
const double  value 
) const
inline

Get value.

Parameters
iindex
valuedefault value
Returns
value

Definition at line 248 of file JEvt.hh.

249  {
250  if (hasW(i))
251  return W.at(i);
252  else
253  return value;
254  }
std::vector< double > W
Definition: JEvt.hh:285
bool hasW(const int i) const
Check availability of value.
Definition: JEvt.hh:223
void JFIT::JFit::setW ( const int  i,
const double  value 
)
inline

Set value.

Parameters
iindex
valuevalue

Definition at line 263 of file JEvt.hh.

264  {
265  if (i >= (int) W.size()) {
266  W.resize(i + 1, 0.0);
267  }
268 
269  W[i] = value;
270  }
std::vector< double > W
Definition: JEvt.hh:285
JFIT::JFit::ClassDef ( JFit  ,
 
)
const JHistory& JFIT::JHistory::getHistory ( ) const
inlineinherited

Get history.

Returns
histtory

Definition at line 228 of file JHistory.hh.

229  {
230  return static_cast<const JHistory&>(*this);
231  }
Container for historical events.
Definition: JHistory.hh:98
JHistory& JFIT::JHistory::getHistory ( )
inlineinherited

Get history.

Returns
histtory

Definition at line 239 of file JHistory.hh.

240  {
241  return static_cast<JHistory&>(*this);
242  }
Container for historical events.
Definition: JHistory.hh:98
JFIT::JHistory::ClassDef ( JHistory  ,
 
)
inherited

Member Data Documentation

double JFIT::JFit::__x
protected

Definition at line 276 of file JEvt.hh.

double JFIT::JFit::__y
protected

Definition at line 277 of file JEvt.hh.

double JFIT::JFit::__z
protected

Definition at line 278 of file JEvt.hh.

double JFIT::JFit::__dx
protected

Definition at line 279 of file JEvt.hh.

double JFIT::JFit::__dy
protected

Definition at line 280 of file JEvt.hh.

double JFIT::JFit::__dz
protected

Definition at line 281 of file JEvt.hh.

double JFIT::JFit::__t
protected

Definition at line 282 of file JEvt.hh.

double JFIT::JFit::__Q
protected

Definition at line 283 of file JEvt.hh.

int JFIT::JFit::__NDF
protected

Definition at line 284 of file JEvt.hh.

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

Definition at line 285 of file JEvt.hh.

double JFIT::JFit::__E
protected

Definition at line 286 of file JEvt.hh.

int JFIT::JFit::__status
protected

Definition at line 287 of file JEvt.hh.


The documentation for this class was generated from the following file: