All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stub.h
Go to the documentation of this file.
1 #ifndef sbncode_Stub_HH
2 #define sbncode_Stub_HH
3 
4 #include <vector>
7 
8 namespace sbn {
9  class StubHit {
10  public:
11  float charge; //!< Calibrated and corrected for electron lifetime [#elec]
12  short wire; //!< The wire this hit is on
13  bool ontrack; //!< Whether the hit is also on a track
14  };
15 
16  class Stub {
17  public:
18  geo::Point_t vtx; //!< Interaction Vertex / Start of Stub. Space charge corrected. [cm]
19  geo::Point_t end; //!< End of Stub. Space charge corrected. [cm]
20 
21  float efield_end; //!< The E-Field at the stub end point
22  float efield_vtx; //!< The E-Field at the reconstructed vertex
23 
24  // Per-plane information: sorted so that the "best" plane is the first index
25  std::vector<geo::PlaneID> plane; //!< The plane ID
26 
27  std::vector<float> pitch; //!< Pitch of stub on each wire [cm]
28  std::vector<float> trkpitch; //!< Pitch of the matched track on each wire [cm]
29  std::vector<float> vtx_w; //!< Wire coordinate of the vertex on this plane
30  std::vector<short> hit_w; //!< Wire of the end point hit on this plane
31 
32  std::vector<std::vector<StubHit>> hits; //!< Hits on each plane. Ordered vtx->end
33 
34  /// Helper functions
35  float CoreCharge(unsigned plane_index=0) const; //!< Returns the charge along the core of the stub on the given plane index
36  int CoreNHit(unsigned plane_index=0) const; //!< Returns the number of hits along the core of the stub on the given plane index
37  float CoreCharge(const geo::PlaneID &p) const;
38  int CoreNHit(const geo::PlaneID &p) const;
39 
40  int PlaneIndex(const geo::PlaneID &p) const;
41 
42  bool OnCore(const geo::WireID &w) const; //!< Returns whether the input wire-ID is on the core of the stub
43 
44  };
45 } // end namespace sbn
46 
47 #endif
std::vector< geo::PlaneID > plane
The plane ID.
Definition: Stub.h:25
float charge
Calibrated and corrected for electron lifetime [#elec].
Definition: Stub.h:11
pdgs p
Definition: selectors.fcl:22
std::vector< std::vector< StubHit > > hits
Hits on each plane. Ordered vtx-&gt;end.
Definition: Stub.h:32
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
geo::Point_t end
End of Stub. Space charge corrected. [cm].
Definition: Stub.h:19
bool OnCore(const geo::WireID &w) const
Returns whether the input wire-ID is on the core of the stub.
Definition: Stub.cxx:57
float CoreCharge(unsigned plane_index=0) const
Helper functions.
Definition: Stub.cxx:25
geo::Point_t vtx
Interaction Vertex / Start of Stub. Space charge corrected. [cm].
Definition: Stub.h:18
std::vector< float > vtx_w
Wire coordinate of the vertex on this plane.
Definition: Stub.h:29
short wire
The wire this hit is on.
Definition: Stub.h:12
Definitions of geometry vector data types.
std::vector< short > hit_w
Wire of the end point hit on this plane.
Definition: Stub.h:30
Definition of data types for geometry description.
float efield_end
The E-Field at the stub end point.
Definition: Stub.h:21
float efield_vtx
The E-Field at the reconstructed vertex.
Definition: Stub.h:22
int PlaneIndex(const geo::PlaneID &p) const
Definition: Stub.cxx:3
std::vector< float > trkpitch
Pitch of the matched track on each wire [cm].
Definition: Stub.h:28
int CoreNHit(unsigned plane_index=0) const
Returns the number of hits along the core of the stub on the given plane index.
Definition: Stub.cxx:41
Definition: Stub.h:16
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
std::vector< float > pitch
Pitch of stub on each wire [cm].
Definition: Stub.h:27
bool ontrack
Whether the hit is also on a track.
Definition: Stub.h:13