LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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.

References detinfo::DetectorPropertiesData::ConvertTicksToX(), geo::CryostatID::Cryostat, fCharge, fPoint, geo::WireGeo::GetCenter(), recob::Hit::PeakTime(), recob::Hit::SummedADC(), geo::GeometryCore::WireCoordinate(), recob::Hit::WireID(), geo::GeometryCore::WireIDToWireGeo(), and x.

15  : fHit(src)
16 {
17  geo::GeometryCore const* geom = lar::providerFrom<geo::Geometry>();
18  auto const& wireID = src->WireID();
19 
20  auto const wireCenter = geom->WireIDToWireGeo(wireID).GetCenter();
21  double const x = detProp.ConvertTicksToX(src->PeakTime(), wireID);
22 
23  double const globalWire =
24  geom->WireCoordinate(wireCenter, geo::PlaneID{wireID.Cryostat, wireID.TPC % 2, wireID.Plane});
25  fPoint.Set(globalWire, x);
26  fCharge = src->SummedADC();
27 }
Float_t x
Definition: compare.C:6
TVector2 fPoint
Definition: DirOfGamma.h:43
Length_t WireCoordinate(Point_t const &pos, PlaneID const &planeid) const
Returns the index of the nearest wire to the specified position.
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Definition: WireGeo.h:221
WireGeo const & WireIDToWireGeo(WireID const &wireid) const
Returns the specified wire.
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:211
geo::WireID const & WireID() const
Initial tdc tick for hit.
Definition: Hit.h:280
Description of geometry of one entire detector.
Definition: GeometryCore.h:119
double fCharge
Definition: DirOfGamma.h:41
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:220
art::Ptr< recob::Hit > fHit
Definition: DirOfGamma.h:45
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
Definition: Hit.h:240

Member Function Documentation

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

Definition at line 36 of file DirOfGamma.h.

Referenced by ems::Bin2D::Add().

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

Definition at line 38 of file DirOfGamma.h.

Referenced by ems::EndPoint::EndPoint(), and ems::EndPoint::FillBins().

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

Member Data Documentation

double ems::Hit2D::fCharge
private

Definition at line 41 of file DirOfGamma.h.

Referenced by Hit2D().

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

Definition at line 45 of file DirOfGamma.h.

TVector2 ems::Hit2D::fPoint
private

Definition at line 43 of file DirOfGamma.h.

Referenced by Hit2D().


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