utils.cxx
Go to the documentation of this file.
1 #include "utils.h"
2 
7 
8 namespace VLN {
9 
10 std::pair<double, double> calcHitsChargeCalE(
11  const std::vector<art::Ptr<recob::Hit>> &hits,
12  const art::Event &evt,
13  calo::CalorimetryAlg &algCalorimetry,
14  unsigned int plane
15 )
16 {
17  const auto clockData =
19  ->DataFor(evt);
20 
21  const auto detProp =
23  ->DataFor(evt, clockData);
24 
25  const double charge =
27  clockData, detProp, hits
28  );
29 
30  const double calE = algCalorimetry.ElectronsFromADCArea(charge, plane);
31 
32  return std::make_pair(charge, calE);
33 }
34 
35 }
36 
Utility containing helpful functions for end users to access information about Hits.
std::pair< double, double > calcHitsChargeCalE(const std::vector< art::Ptr< recob::Hit >> &hits, const art::Event &evt, calo::CalorimetryAlg &algCalorimetry, unsigned int plane)
Definition: utils.cxx:10
struct vector vector
double ElectronsFromADCArea(double area, unsigned short plane) const
Definition: utils.cxx:6
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
TCEvent evt
Definition: DataStructs.cxx:7