Public Member Functions | List of all members
rb::HitList Class Reference

Just the essential information required for track fitting. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/RecoBase/HitList.h"

Inheritance diagram for rb::HitList:

Public Member Functions

 HitList ()
 
 HitList (unsigned int n)
 
 HitList (const rb::Cluster &clust, bool wbyq=false)
 Construct a hit list from a cluster. More...
 
void SetHit (unsigned int i, geo::View_t, double xy, double z, double t, double cxy, double cz, double w=1.0)
 
void AddHit (geo::View_t, double xy, double z, double t, double cxy, double cz, double w=1.0)
 

Detailed Description

Just the essential information required for track fitting.

Definition at line 40 of file HitList.h.

Constructor & Destructor Documentation

rb::HitList::HitList ( )

Definition at line 20 of file HitList.cxx.

20 { }
rb::HitList::HitList ( unsigned int  n)

Definition at line 24 of file HitList.cxx.

References stan::math::resize().

24 { this->resize(n); }
void resize(T &x, std::vector< int > dims)
Definition: resize.hpp:41
rb::HitList::HitList ( const rb::Cluster clust,
bool  wbyq = false 
)

Construct a hit list from a cluster.

Parameters
clust- The cluster of hits
wbyq- Assign weights by charge, else all weights are 1

Definition at line 28 of file HitList.cxx.

References plot_validation_datamc::c, rb::CellHit::Cell(), rb::Cluster::Cell(), geom(), art::Ptr< T >::get(), geo::CellGeo::GetCenter(), make_syst_table_plots::h, geo::CellGeo::HalfD(), geo::CellGeo::HalfW(), MECModelEnuComparisons::i, ip, geo::kX, geo::kY, getGoodRuns4SAM::n, rb::Cluster::NCell(), rb::CellHit::PE(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), stan::math::resize(), SetHit(), rb::CellHit::TNS(), geo::PlaneGeo::View(), and w.

29  {
31 
32  unsigned int n = clust.NCell();
33  this->resize(n);
34 
35  unsigned int i;
36  for (i=0; i<n; ++i) {
37  const rb::CellHit* h = clust.Cell(i).get();
38 
39  unsigned int ip = h->Plane();
40  unsigned int ic = h->Cell();
41 
42  const geo::PlaneGeo* p = geom->Plane(ip);
43  const geo::CellGeo* c = p-> Cell(ic);
44 
45  double xyz[3];
46  c->GetCenter(xyz);
47 
48  double cz = c->HalfD();
49  double cxy = c->HalfW();
50 
51  double xy = 0.0;
52  if (p->View()==geo::kX) xy = xyz[0];
53  if (p->View()==geo::kY) xy = xyz[1];
54 
55  double w = 1.0;
56  if (wbyq) w = h->PE();
57 
58  this->SetHit(i, p->View(), xy, xyz[2], h->TNS(), cxy, cz, w);
59  }
60  }
float TNS() const
Definition: CellHit.h:46
double HalfD() const
Definition: CellGeo.cxx:205
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
void SetHit(unsigned int i, geo::View_t, double xy, double z, double t, double cxy, double cz, double w=1.0)
Definition: HitList.cxx:77
unsigned short Plane() const
Definition: CellHit.h:39
const char * p
Definition: xmltok.h:285
Vertical planes which measure X.
Definition: PlaneGeo.h:28
double HalfW() const
Definition: CellGeo.cxx:191
TString ip
Definition: loadincs.C:5
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned short Cell() const
Definition: CellHit.h:40
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
void resize(T &x, std::vector< int > dims)
Definition: resize.hpp:41
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
float PE() const
Definition: CellHit.h:42
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
T const * get() const
Definition: Ptr.h:321
void geom(int which=0)
Definition: geom.C:163
Encapsulate the cell geometry.
Definition: CellGeo.h:25
Float_t w
Definition: plot.C:20

Member Function Documentation

void rb::HitList::AddHit ( geo::View_t  v,
double  xy,
double  z,
double  t,
double  cxy,
double  cz,
double  w = 1.0 
)

Definition at line 64 of file HitList.cxx.

References push_back().

71  {
72  this->push_back(Hit2D(v,xy,z,t,cxy,cz,w));
73  }
base_types push_back(int_type())
z
Definition: test.py:28
Float_t w
Definition: plot.C:20
void rb::HitList::SetHit ( unsigned int  i,
geo::View_t  v,
double  xy,
double  z,
double  t,
double  cxy,
double  cz,
double  w = 1.0 
)

Definition at line 77 of file HitList.cxx.

References rb::Hit2D::fCXY, rb::Hit2D::fCZ, rb::Hit2D::fT, rb::Hit2D::fView, rb::Hit2D::fW, rb::Hit2D::fXY, rb::Hit2D::fZ, make_syst_table_plots::h, MECModelEnuComparisons::i, confusionMatrixTree::t, registry_explorer::v, w, and test::z.

Referenced by HitList().

85  {
86  Hit2D& h = (*this)[i];
87  h.fView = v;
88  h.fXY = xy;
89  h.fZ = z;
90  h.fT = t;
91  h.fCXY = cxy;
92  h.fCZ = cz;
93  h.fW = w;
94  }
z
Definition: test.py:28
Float_t w
Definition: plot.C:20

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