FEDRA emulsion software from the OPERA Collaboration
VERTEX Namespace Reference

Namespaces

namespace  ROOTDict
 

Classes

class  ConstRelationIterator
 
class  ConstReverseRelationIterator
 
class  Kalman
 
class  MassC
 
class  Relation
 
class  RelationIterator
 
class  RelationList
 
class  ReverseRelationIterator
 
class  Track
 
class  Vertex
 
class  VtIni
 

Typedefs

typedef ConstRelationIterator const_iterator
 
typedef ConstReverseRelationIterator const_reverse_iterator
 
typedef RelationIterator iterator
 
typedef std::list< MassC * >::const_iterator MassC_cit
 
typedef std::list< MassC * >::iterator MassC_it
 
typedef std::list< MassC * > MassC_v
 
typedef std::vector< Relation * >::const_iterator Rel_cit
 
typedef std::vector< Relation * >::iterator Rel_it
 
typedef std::vector< Relation * > Rel_v
 
typedef std::list< Relation * >::const_iterator Relation_cit
 
typedef std::list< Relation * >::iterator Relation_it
 
typedef std::list< Relation * >::const_reverse_iterator Relation_rcit
 
typedef std::list< Relation * >::reverse_iterator Relation_rit
 
typedef std::list< Relation * > Relation_v
 
typedef ReverseRelationIterator reverse_iterator
 
typedef std::vector< Track * >::const_iterator Track_cit
 
typedef std::vector< Track * >::iterator Track_it
 
typedef std::vector< Track * > Track_v
 
typedef std::vector< double > Vector_d
 

Functions

bool createRelation (Track &t, Vertex &v)
 
std::ostream & operator<< (std::ostream &os, const Kalman &k)
 
std::ostream & operator<< (std::ostream &os, const Relation &r)
 
std::ostream & operator<< (std::ostream &os, const Track &t)
 
std::ostream & operator<< (std::ostream &os, const VtIni &t)
 
std::ostream & operator<< (std::ostream &s, const MassC &a)
 
std::ostream & operator<< (std::ostream &s, const RelationList &a)
 
std::ostream & operator<< (std::ostream &s, const Vertex &a)
 
— Distance functions —
double distanceChi2 (Track &t1, Track &t2)
 $\chi^2$ distance track - track, $ndf = 1$ More...
 
double distance (const Track &t, const Vertex &v)
 spatial distance track - vertex More...
 
double distance (const Vertex &v, const Track &t)
 
double SGNdistance (const Track &t, const Vertex &v)
 signed spatial distance track - vertex More...
 
double SGNdistance (const Vertex &v, const Track &t)
 
double SGNdistance (const Track &t, double xv, double yv, double zv)
 signed spatial distance track - space point More...
 
double distanceChi2 (const Vertex &v1, const Vertex &v2)
 $\chi^2$ distance between two vertices, $ndf = 3$ More...
 
double distanceChi2 (const Vertex &v, double x, double y, double z)
 $\chi2$ distance vertex - space point, $ndf = 3$ More...
 
— Global utility functions —
template<class T >
const T sqr (const T &x)
 compute the square of a number: $x*x$ More...
 
template<class T >
const short int sgn (const T &x)
 compute the sign of a number More...
 
template<class T >
const T max (const T &rhs, const T &lhs)
 
template<class T >
const T min (const T &rhs, const T &lhs)
 

Typedef Documentation

◆ const_iterator

◆ const_reverse_iterator

◆ iterator

◆ MassC_cit

◆ MassC_it

typedef std::list<MassC*>::iterator VERTEX::MassC_it

◆ MassC_v

typedef std::list<MassC*> VERTEX::MassC_v

◆ Rel_cit

◆ Rel_it

typedef std::vector<Relation*>::iterator VERTEX::Rel_it

◆ Rel_v

typedef std::vector<Relation*> VERTEX::Rel_v

◆ Relation_cit

◆ Relation_it

◆ Relation_rcit

◆ Relation_rit

◆ Relation_v

typedef std::list<Relation*> VERTEX::Relation_v

◆ reverse_iterator

◆ Track_cit

◆ Track_it

typedef std::vector<Track*>::iterator VERTEX::Track_it

◆ Track_v

typedef std::vector<Track*> VERTEX::Track_v

◆ Vector_d

typedef std::vector<double> VERTEX::Vector_d

Function Documentation

◆ createRelation()

bool VERTEX::createRelation ( Track t,
Vertex v 
)
39 {
40 // cout << " Create Relation called!! " << &t << " " << &v << endl;
41 Relation* rel = new Relation(t,v);
42 t.push__back(rel);
43 v.push__back(rel);
44 return true;
45 }
void push__back(Relation *rel)
add a relation
Definition: VtRelationList.hh:244
Definition: VtRelation.hh:51
TTree * t
Definition: check_shower.C:4

◆ distance() [1/2]

double VERTEX::distance ( const Track t,
const Vertex v 
)

spatial distance track - vertex

49 {
50 double dx = v.vx() - t.x();
51 double dy = v.vy() - t.y();
52 double dz = v.vz() - t.z();
53 double tx = t.tx();
54 double ty = t.ty();
55 double nom = sqr(dx*ty - dy*tx) + sqr(dy - dz*ty) + sqr(dz*tx - dx);
56 double denom = sqr(tx) + sqr(ty) + 1.;
57 return sqrt(nom/denom);
58 }
brick dz
Definition: RecDispMC.C:107
float sqr(float x)
Definition: bitview.cxx:25
float vz() const
$z$ of vertex
Definition: VtVertex.C:235
float vy() const
$y$ of vertex
Definition: VtVertex.C:234
float vx() const
$x$ of vertex
Definition: VtVertex.C:233

◆ distance() [2/2]

double VERTEX::distance ( const Vertex v,
const Track t 
)
inline
42{ return distance(t,v); }
double distance(const Vertex &v, const Track &t)
Definition: VtDistance.hh:42

◆ distanceChi2() [1/3]

double VERTEX::distanceChi2 ( const Vertex v,
double  x,
double  y,
double  z 
)

$\chi2$ distance vertex - space point, $ndf = 3$

107 {
108 return v.distance(x,y,z);
109 }
double distance(double x, double y, double z) const
$\chi^2$ distance to space point, $ndf = 3$
Definition: VtVertex.C:803

◆ distanceChi2() [2/3]

double VERTEX::distanceChi2 ( const Vertex v1,
const Vertex v2 
)

$\chi^2$ distance between two vertices, $ndf = 3$

100 {
101 return v1.distance(v2);
102 }

◆ distanceChi2() [3/3]

double VERTEX::distanceChi2 ( Track t1,
Track t2 
)

$\chi^2$ distance track - track, $ndf = 1$

40 {
41 Vertex tmp(t1,t2);
42 tmp.findVertexVt();
43 return tmp.chi2();
44 }
Definition: VtVertex.hh:88

◆ max()

template<class T >
const T VERTEX::max ( const T &  rhs,
const T &  lhs 
)
inline
51 {
52 return (rhs > lhs) ? rhs : lhs;
53 }

◆ min()

template<class T >
const T VERTEX::min ( const T &  rhs,
const T &  lhs 
)
inline
60 {
61 return (rhs < lhs) ? rhs : lhs;
62 }

◆ operator<<() [1/7]

std::ostream & VERTEX::operator<< ( std::ostream &  os,
const Kalman k 
)

◆ operator<<() [2/7]

std::ostream & VERTEX::operator<< ( std::ostream &  os,
const Relation r 
)
inline
86 {
87 r.print(os);
88 return os;
89 }
void r(int rid=2)
Definition: test.C:201

◆ operator<<() [3/7]

std::ostream & VERTEX::operator<< ( std::ostream &  os,
const Track t 
)
inline
242 {
243 return t.print(os);
244 }

◆ operator<<() [4/7]

std::ostream & VERTEX::operator<< ( std::ostream &  os,
const VtIni t 
)
inline
83 {
84 t.print(os);
85 return os;
86 }

◆ operator<<() [5/7]

std::ostream & VERTEX::operator<< ( std::ostream &  s,
const MassC a 
)
inline
97 {
98 a.print(s);
99 return s;
100 }
void a()
Definition: check_aligned.C:59
s
Definition: check_shower.C:55

◆ operator<<() [6/7]

std::ostream & VERTEX::operator<< ( std::ostream &  s,
const RelationList a 
)
inline
298 {
299 a.print(s);
300 return s;
301 }

◆ operator<<() [7/7]

std::ostream & VERTEX::operator<< ( std::ostream &  s,
const Vertex a 
)
inline
315 {
316 return a.print(s);
317 }

◆ sgn()

template<class T >
const short int VERTEX::sgn ( const T &  x)
inline

compute the sign of a number

44{ return (x==0)? 0 : (x<0)? -1 : 1; }

◆ SGNdistance() [1/3]

double VERTEX::SGNdistance ( const Track t,
const Vertex v 
)

signed spatial distance track - vertex

63 {
64 return SGNdistance(t, v.vx(), v.vy(), v.vz());
65 }
double SGNdistance(const Track &t, const Vertex &v)
Definition: SDistance.hh:169

◆ SGNdistance() [2/3]

double VERTEX::SGNdistance ( const Track t,
double  xv,
double  yv,
double  zv 
)

signed spatial distance track - space point

70 {
71
72 double A = t.tx();
73 double B = t.ty();
74 double C = 1.;
75 double xt = t.x();
76 double yt = t.y();
77 double zt = t.z();
78
79 double denom = A*A + B*B + C*C;
80 double nom = A*(xt-xv) + B*(yt-yv) + C*(zt-zv);
81 double rho = nom / denom;
82
83 // point of track closest to Vertex
84 double x = xt - A*rho;
85 double y = yt - B*rho;
86 double z = zt - C*rho;
87
88 double dx = x - xv;
89 double dy = y - yv;
90 double dz = z - zv;
91
92 // The sign tells if the point of track closest to
93 // vertex is upstream or downstream the vertex
94 return sgn(dz) * sqrt(dx*dx + dy*dy + dz*dz);
95 }
const short int sgn(const T &x)
compute the sign of a number
Definition: VtUtil.hh:44

◆ SGNdistance() [3/3]

double VERTEX::SGNdistance ( const Vertex v,
const Track t 
)
inline
47 {
48 return SGNdistance(t,v);
49 }

◆ sqr()

template<class T >
const T VERTEX::sqr ( const T &  x)
inline

compute the square of a number: $x*x$

37{ return x*x; }