28 return DUNEAnaHitUtils::GetAssocProductVector<recob::SpacePoint>(pHit,
evt,hitLabel,hitToSpacePointLabel);
34 std::vector<art::Ptr<recob::Hit>> hitsOnPlane;
39 hitsOnPlane.emplace_back(*(hitIt++));
54 const double timeInTicks,
const double t0InMicroS)
59 const double timeCorrectedForT0((timeInTicks - tpcTriggerOffsetInTicks)*tpcSamplingRateInMicroS - t0InMicroS);
62 return std::exp(timeCorrectedForT0/tauLifetime);
69 double totalHitCharge(0);
70 for (
unsigned int iHit = 0; iHit < hits.size(); iHit++)
73 return totalHitCharge;
Utility containing helpful functions for end users to access information about Hits.
static std::vector< art::Ptr< recob::SpacePoint > > GetSpacePoints(const art::Ptr< recob::Hit > &pHit, const art::Event &evt, const std::string &hitLabel, const std::string &hitToSpacePointLabel)
Get the space points associated with the hit.
unsigned int PlaneID_t
Type for the ID number.
double ElectronLifetime() const
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
static double LifetimeCorrection(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::Ptr< recob::Hit > &pHit)
get the lifetime correction for a hit, assumes the detector properties GetTriggerOffset is T0 ...
ElecClock const & TPCClock() const noexcept
Borrow a const TPC clock with time set to Trigger time [us].
static double LifetimeCorrectedTotalHitCharge(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit > > &hits)
get the total hit charge, corrected for lifetime
double TriggerTime() const
Trigger electronics clock time in [us].
Detector simulation of raw signals on wires.
float PeakTime() const
Time of the signal peak, in tick units.
Declaration of signal hit object.
Contains all timing reference information for the detector.
int trigger_offset(DetectorClocksData const &data)
static std::vector< art::Ptr< recob::Hit > > GetHitsOnPlane(const std::vector< art::Ptr< recob::Hit >> &hits, const geo::PlaneID::PlaneID_t planeID)
Get all hits on a specific plane.