Public Member Functions | Private Attributes | List of all members
ems::Hit2D Class Reference

#include <DirOfGamma.h>

Public Member Functions

 Hit2D (detinfo::DetectorPropertiesData const &detProp, art::Ptr< recob::Hit > src)
 
TVector2 const & GetPointCm () const
 
double GetCharge () const
 
art::Ptr< recob::Hit > const & GetHitPtr () const
 

Private Attributes

double fCharge
 
TVector2 fPoint
 
art::Ptr< recob::HitfHit
 

Detailed Description

Definition at line 29 of file DirOfGamma.h.

Constructor & Destructor Documentation

ems::Hit2D::Hit2D ( detinfo::DetectorPropertiesData const &  detProp,
art::Ptr< recob::Hit src 
)

Definition at line 14 of file DirOfGamma.cxx.

15  : fHit(src)
16 {
17  geo::GeometryCore const* geom = lar::providerFrom<geo::Geometry>();
18 
19  unsigned int plane = src->WireID().Plane;
20  unsigned int tpc = src->WireID().TPC;
21  unsigned int cryo = src->WireID().Cryostat;
22 
23  double wireCentre[3];
24  geom->WireIDToWireGeo(src->WireID()).GetCenter(wireCentre);
25  double x = detProp.ConvertTicksToX(src->PeakTime(), plane, tpc, cryo);
26  double globalWire;
27 
28  if (tpc % 2 == 0) {
29  globalWire = geom->WireCoordinate(wireCentre[1], wireCentre[2], plane, 0, cryo);
30  fPoint.Set(globalWire, x);
31  }
32  else {
33  globalWire = geom->WireCoordinate(wireCentre[1], wireCentre[2], plane, 1, cryo);
34  fPoint.Set(globalWire, x);
35  }
36  fCharge = src->SummedADC();
37 }
geo::Length_t WireCoordinate(double YPos, double ZPos, geo::PlaneID const &planeid) const
Returns the index of the nearest wire to the specified position.
TVector2 fPoint
Definition: DirOfGamma.h:53
geo::WireID WireID() const
Definition: Hit.h:233
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:212
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:493
Description of geometry of one entire detector.
double fCharge
Definition: DirOfGamma.h:51
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:218
art::Ptr< recob::Hit > fHit
Definition: DirOfGamma.h:55
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
Definition: Hit.h:223
list x
Definition: train.py:276
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const

Member Function Documentation

double ems::Hit2D::GetCharge ( ) const
inline

Definition at line 39 of file DirOfGamma.h.

40  {
41  return fCharge;
42  }
double fCharge
Definition: DirOfGamma.h:51
art::Ptr<recob::Hit> const& ems::Hit2D::GetHitPtr ( ) const
inline

Definition at line 45 of file DirOfGamma.h.

46  {
47  return fHit;
48  }
art::Ptr< recob::Hit > fHit
Definition: DirOfGamma.h:55
TVector2 const& ems::Hit2D::GetPointCm ( void  ) const
inline

Definition at line 34 of file DirOfGamma.h.

35  {
36  return fPoint;
37  }
TVector2 fPoint
Definition: DirOfGamma.h:53

Member Data Documentation

double ems::Hit2D::fCharge
private

Definition at line 51 of file DirOfGamma.h.

art::Ptr<recob::Hit> ems::Hit2D::fHit
private

Definition at line 55 of file DirOfGamma.h.

TVector2 ems::Hit2D::fPoint
private

Definition at line 53 of file DirOfGamma.h.


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