LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ems::Hit2D Class Reference

#include "DirOfGamma.h"

Public Member Functions

 Hit2D (art::Ptr< recob::Hit > src)
 
TVector2 const & GetPointCm (void) const
 
double GetCharge (void) const
 
art::Ptr< recob::Hit > const & GetHitPtr (void) const
 

Private Attributes

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

Detailed Description

Definition at line 28 of file DirOfGamma.h.

Constructor & Destructor Documentation

ems::Hit2D::Hit2D ( art::Ptr< recob::Hit src)

Definition at line 19 of file DirOfGamma.cxx.

References geo::CryostatID::Cryostat, fCharge, fPoint, recob::Hit::PeakTime(), geo::PlaneID::Plane, recob::Hit::SummedADC(), geo::TPCID::TPC, geo::GeometryCore::WireCoordinate(), recob::Hit::WireID(), geo::GeometryCore::WireIDToWireGeo(), and x.

19  :
20 fHit(src)
21 {
22  geo::GeometryCore const* geom = lar::providerFrom<geo::Geometry>();
23  detinfo::DetectorProperties const* detprop
24  = lar::providerFrom<detinfo::DetectorPropertiesService>();
25 
26  unsigned int plane = src->WireID().Plane;
27  unsigned int tpc = src->WireID().TPC;
28  unsigned int cryo = src->WireID().Cryostat;
29 
30  double wireCentre[3];
31  geom->WireIDToWireGeo(src->WireID()).GetCenter(wireCentre);
32  double x = detprop->ConvertTicksToX(src->PeakTime(), plane, tpc, cryo);
33  double globalWire;
34 
35  if (tpc % 2 == 0)
36  {
37  globalWire = geom->WireCoordinate(wireCentre[1], wireCentre[2], plane, 0, cryo);
38  fPoint.Set(globalWire, x);
39  }
40  else
41  {
42  globalWire = geom->WireCoordinate(wireCentre[1], wireCentre[2], plane, 1, cryo);
43  fPoint.Set(globalWire, x);
44  }
45  fCharge = src->SummedADC();
46 }
Float_t x
Definition: compare.C:6
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:41
geo::WireID WireID() const
Initial tdc tick for hit.
Definition: Hit.h:234
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:130
art::Ptr< recob::Hit > fHit
Definition: DirOfGamma.h:43
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
Description of geometry of one entire detector.
double fCharge
Definition: DirOfGamma.h:39
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:219
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
Definition: Hit.h:224
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:203
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const
Returns the specified wire.

Member Function Documentation

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

Definition at line 34 of file DirOfGamma.h.

References fCharge.

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

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

Definition at line 36 of file DirOfGamma.h.

References fHit.

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

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

Member Data Documentation

double ems::Hit2D::fCharge
private

Definition at line 39 of file DirOfGamma.h.

Referenced by GetCharge(), and Hit2D().

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

Definition at line 43 of file DirOfGamma.h.

Referenced by GetHitPtr().

TVector2 ems::Hit2D::fPoint
private

Definition at line 41 of file DirOfGamma.h.

Referenced by GetPointCm(), and Hit2D().


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