All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 31 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:55
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
process_name opflash particleana ie x
Description of geometry of one entire detector.
double fCharge
Definition: DirOfGamma.h:53
art::Ptr< recob::Hit > fHit
Definition: DirOfGamma.h:57
auto const detProp
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const

Member Function Documentation

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

Definition at line 41 of file DirOfGamma.h.

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

Definition at line 47 of file DirOfGamma.h.

48  {
49  return fHit;
50  }
art::Ptr< recob::Hit > fHit
Definition: DirOfGamma.h:57
TVector2 const& ems::Hit2D::GetPointCm ( ) const
inline

Definition at line 36 of file DirOfGamma.h.

37  {
38  return fPoint;
39  }
TVector2 fPoint
Definition: DirOfGamma.h:55

Member Data Documentation

double ems::Hit2D::fCharge
private

Definition at line 53 of file DirOfGamma.h.

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

Definition at line 57 of file DirOfGamma.h.

TVector2 ems::Hit2D::fPoint
private

Definition at line 55 of file DirOfGamma.h.


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