LocatedChan.h
Go to the documentation of this file.
1 #ifndef TRK_CHANNEL_H
2 #define TRK_CHANNEL_H
3 
6 #include "TVector3.h"
7 
8 #include <vector>
9 
10 namespace rb{class CellHit;}
11 
12 namespace trk
13 {
14  /// Representation of a detector channel with positional information
16  {
17  public:
18  LocatedChan();
19  LocatedChan(int plane, int cell);
20  void SetHit(art::Ptr<rb::CellHit> chit);
21  art::Ptr<rb::CellHit> GetHit() const;
22  void SetCenter(double x, double y, double z);
23  void GetCenter(double* xyz);
24  void SetHalfWidths(double dx, double dy, double dz);
25  void GetHalfWidths(double* dxyz);
26 
27  protected:
28  art::Ptr<rb::CellHit> fHit; ///< cellhit in this channel
29  TVector3 fcenter; ///< cell center position
30  TVector3 fhalfwidths; ///< half widths of cell
31  };
32  bool CompareByPlane(const trk::LocatedChan & a, const trk::LocatedChan & b);
33  void SortByPlane(std::vector<trk::LocatedChan>& c);
34  bool CompareByCell(const trk::LocatedChan & a, const trk::LocatedChan & b);
35  void SortByCell(std::vector<trk::LocatedChan>& c);
36 } // namespace
37 
38 #endif
bool CompareByCell(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Helper for SortByCell. Is a on a lower cell number than b?
Definition: CellHit.cxx:106
Representation of a detector channel with positional information.
Definition: LocatedChan.h:15
bool CompareByPlane(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Helper for SortByPlane. Is a on a lower number plane than b?
Definition: CellHit.cxx:92
Track finder for cosmic rays.
art::Ptr< rb::CellHit > fHit
cellhit in this channel
Definition: LocatedChan.h:28
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
TVector3 fcenter
cell center position
Definition: LocatedChan.h:29
const double a
Perform a "2 point" Hough transform on a collection of hits.
z
Definition: test.py:28
TVector3 fhalfwidths
half widths of cell
Definition: LocatedChan.h:30
A (plane, cell) pair.
Definition: OfflineChan.h:17
void SortByCell(std::vector< art::Ptr< rb::CellHit > > &c)
Sort c in cell order (low to high)
Definition: CellHit.cxx:145
const hit & b
Definition: hits.cxx:21
Simple object representing a (plane, cell) pair.
void SortByPlane(std::vector< art::Ptr< rb::CellHit > > &c)
Sort c in plane order (low to high).
Definition: CellHit.cxx:124