Public Member Functions | Private Member Functions | Private Attributes | List of all members
novaddt::HoughPoint Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-05-06/DDTBaseDataProducts/HoughPoint.h"

Public Member Functions

 HoughPoint ()
 
 HoughPoint (DAQHit const &p1, TVector2 const &coord1, DAQHit const &p2, TVector2 const &coord2)
 
void reset (DAQHit const &p1, TVector2 const &coord1, DAQHit const &p2, TVector2 const &coord2)
 Initialization of Data members. More...
 
void reset ()
 
void print () const
 
 ~HoughPoint ()
 
float const & getCosv () const
 
float const & getDoca () const
 
float const & getDist () const
 
float const & getVpro () const
 
DAQHit const & getCh1 () const
 
DAQHit const & getCh2 () const
 

Private Member Functions

void calc ()
 

Private Attributes

DAQHit const * _p1
 
TVector2 const * _coord1
 
DAQHit const * _p2
 
TVector2 const * _coord2
 
float _cosv
 
float _doca
 
float _dist
 
float _vpro
 

Detailed Description

Definition at line 55 of file HoughPoint.h.

Constructor & Destructor Documentation

novaddt::HoughPoint::HoughPoint ( )

Definition at line 13 of file HoughPoint.cxx.

Referenced by ~HoughPoint().

13  :
14  _p1(nullptr),
15  _coord1(nullptr),
16  _p2(nullptr),
17  _coord2(nullptr),
18  _cosv(0.0f),
19  _doca(0.0f),
20  _vpro(0.0f)
21  {
22  }
TVector2 const * _coord1
Definition: HoughPoint.h:83
DAQHit const * _p1
Definition: HoughPoint.h:82
DAQHit const * _p2
Definition: HoughPoint.h:84
TVector2 const * _coord2
Definition: HoughPoint.h:85
novaddt::HoughPoint::HoughPoint ( DAQHit const &  p1,
TVector2 const &  coord1,
DAQHit const &  p2,
TVector2 const &  coord2 
)
novaddt::HoughPoint::~HoughPoint ( )

Member Function Documentation

void novaddt::HoughPoint::calc ( )
private

Definition at line 72 of file HoughPoint.cxx.

References _coord1, _coord2, _cosv, _dist, _doca, _p1, _p2, _vpro, getGoodRuns4SAM::t1, t2, novaddt::DAQHit::TDC(), and novaddt::TDC::val.

Referenced by getCh2(), and ~HoughPoint().

72  {
73 
74  // As efficient as possible: no unnecessary copies.
75  /*
76  float x1(3.359*(_p1->Plane().val-480));
77  float x2(3.359*(_p2->Plane().val-480));
78  float y1(_p1->Cell().val-191.5);
79  float y2(_p2->Cell().val-191.5);
80  */
81  uint64_t t1(_p1->TDC().val);
82  uint64_t t2(_p2->TDC().val);
83  /*
84  //If same chits are provided: assert false
85  if (coord1.X()==x2 && y1==y2)
86  {
87  std::cerr<<"Same cells have been provided!"<<std::endl;
88  assert(false);
89  }
90  */
91 
92  _dist = (*_coord1-*_coord2).Mod();
93 
94  _cosv = (_coord2->Y()-_coord1->Y())/_dist;
95  _doca = (_coord2->X()*_coord1->Y() - _coord1->X()*_coord2->Y())/_dist;
96 
97  if (t1>t2) _vpro = (t1-t2)/_dist;
98  else _vpro = (t2-t1)/_dist;
99 
100  if (_coord1->X()>_coord2->X()) {
101  _cosv = -_cosv;
102  _doca = -_doca;
103  _vpro = -_vpro;
104  }
105 
106  }
value_type val
Definition: BaseProducts.h:34
novaddt::TDC const & TDC() const
Definition: DAQHit.h:74
TVector2 const * _coord1
Definition: HoughPoint.h:83
DAQHit const * _p1
Definition: HoughPoint.h:82
DAQHit const * _p2
Definition: HoughPoint.h:84
double t2
TVector2 const * _coord2
Definition: HoughPoint.h:85
DAQHit const& novaddt::HoughPoint::getCh1 ( ) const
inline

Definition at line 76 of file HoughPoint.h.

References _p1.

Referenced by novaddt::HoughTrackMaker::do_like_zukai().

76 { return *_p1; };
DAQHit const * _p1
Definition: HoughPoint.h:82
DAQHit const& novaddt::HoughPoint::getCh2 ( ) const
inline

Definition at line 77 of file HoughPoint.h.

References _p2, and calc().

Referenced by novaddt::HoughTrackMaker::do_like_zukai().

77 { return *_p2; };
DAQHit const * _p2
Definition: HoughPoint.h:84
float const& novaddt::HoughPoint::getCosv ( ) const
inline

Definition at line 70 of file HoughPoint.h.

References _cosv.

Referenced by novaddt::HoughTrackMaker::do_like_zukai().

70 { return _cosv; };
float const& novaddt::HoughPoint::getDist ( ) const
inline

Definition at line 73 of file HoughPoint.h.

References _dist.

73 { return _dist; };
float const& novaddt::HoughPoint::getDoca ( ) const
inline

Definition at line 71 of file HoughPoint.h.

References _doca.

Referenced by novaddt::HoughTrackMaker::do_like_zukai().

71 { return _doca; };
float const& novaddt::HoughPoint::getVpro ( ) const
inline

Definition at line 74 of file HoughPoint.h.

References _vpro.

Referenced by novaddt::HoughTrackMaker::do_like_zukai().

74 { return _vpro; };
void novaddt::HoughPoint::print ( ) const

Definition at line 62 of file HoughPoint.cxx.

References _cosv, _doca, _p1, _p2, novaddt::DAQHit::print(), and printf().

62  {
63  // Print the transform's record
64  printf("Cosv: %2.4f\tDoca: %2.4f\t\nHits:\n",
65  _cosv,
66  _doca
67  );
68  _p1->print();
69  _p2->print();
70  }
DAQHit const * _p1
Definition: HoughPoint.h:82
printf("%d Experimental points found\n", nlines)
DAQHit const * _p2
Definition: HoughPoint.h:84
void print() const
Definition: DAQHit.cxx:148
void novaddt::HoughPoint::reset ( DAQHit const &  p1,
TVector2 const &  coord1,
DAQHit const &  p2,
TVector2 const &  coord2 
)

Initialization of Data members.

void novaddt::HoughPoint::reset ( )

Definition at line 52 of file HoughPoint.cxx.

References _coord1, _coord2, _cosv, _doca, _p1, _p2, and _vpro.

Referenced by ~HoughPoint().

52  {
53  _p1 = nullptr;
54  _coord1 = nullptr;
55  _p2 = nullptr;
56  _coord2 = nullptr;
57  _cosv = 0.0f;
58  _doca = 0.0f;
59  _vpro = 0.0f;
60  }
TVector2 const * _coord1
Definition: HoughPoint.h:83
DAQHit const * _p1
Definition: HoughPoint.h:82
DAQHit const * _p2
Definition: HoughPoint.h:84
TVector2 const * _coord2
Definition: HoughPoint.h:85

Member Data Documentation

TVector2 const* novaddt::HoughPoint::_coord1
private

Definition at line 83 of file HoughPoint.h.

Referenced by calc(), reset(), and ~HoughPoint().

TVector2 const* novaddt::HoughPoint::_coord2
private

Definition at line 85 of file HoughPoint.h.

Referenced by calc(), reset(), and ~HoughPoint().

float novaddt::HoughPoint::_cosv
private

Definition at line 88 of file HoughPoint.h.

Referenced by calc(), getCosv(), print(), reset(), and ~HoughPoint().

float novaddt::HoughPoint::_dist
private

Definition at line 91 of file HoughPoint.h.

Referenced by calc(), and getDist().

float novaddt::HoughPoint::_doca
private

Definition at line 89 of file HoughPoint.h.

Referenced by calc(), getDoca(), print(), reset(), and ~HoughPoint().

DAQHit const* novaddt::HoughPoint::_p1
private

Definition at line 82 of file HoughPoint.h.

Referenced by calc(), getCh1(), print(), reset(), and ~HoughPoint().

DAQHit const* novaddt::HoughPoint::_p2
private

Definition at line 84 of file HoughPoint.h.

Referenced by calc(), getCh2(), print(), reset(), and ~HoughPoint().

float novaddt::HoughPoint::_vpro
private

Definition at line 92 of file HoughPoint.h.

Referenced by calc(), getVpro(), reset(), and ~HoughPoint().


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