21 std::vector<float>
const& dEdxVector,
27 bool interpolate_dEdx =
false;
29 interpolate_dEdx =
true;
31 interpolate_dEdx =
false;
33 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with track size.";
41 0.5 * (dEdxVector[
pt] + dEdxVector[
pt - 1]),
60 std::vector<float>
const& dEdxVector,
66 bool interpolate_dEdx =
false;
67 if (mctrack.size() == dEdxVector.size())
68 interpolate_dEdx =
true;
69 else if (mctrack.size() == dEdxVector.size() + 1)
70 interpolate_dEdx =
false;
72 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with mctrack size.";
76 for (
size_t pt = 1;
pt < mctrack.size();
pt++) {
79 mctrack[
pt].Position().Vect(),
80 0.5 * (dEdxVector[
pt] + dEdxVector[
pt - 1]),
87 mctrack[
pt].Position().Vect(),
98 std::vector<TVector3>
const& trajVector,
99 std::vector<float>
const& dEdxVector,
105 bool interpolate_dEdx =
false;
106 if (trajVector.size() == dEdxVector.size())
107 interpolate_dEdx =
true;
108 else if (trajVector.size() == dEdxVector.size() + 1)
109 interpolate_dEdx =
false;
111 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with trajVector size.";
115 for (
size_t pt = 1;
pt < trajVector.size();
pt++) {
116 if (interpolate_dEdx)
119 0.5 * (dEdxVector[pt] + dEdxVector[pt - 1]),
128 trajVector[pt - 1], trajVector[pt], dEdxVector[pt - 1], providers, pvs, opdigip, XOffset);
156 auto const nOpDets = geom->NOpDets();
167 if (!PointVisibility)
return fhc;
170 std::vector<float> qe_vector(nOpDets, opdigip.
QE());
void FillFlashHypothesis(const float &yield, const float &dEdx, const TVector3 &pt1, const TVector3 &pt2, const std::vector< float > &qe_vector, phot::MappedCounts_t const &vis_vector, FlashHypothesis &hyp)
FlashHypothesisCollection GetFlashHypothesisCollection(recob::Track const &track, std::vector< float > const &dEdxVector, Providers_t providers, phot::PhotonVisibilityService const &pvs, opdet::OpDigiProperties const &opdigip, float XOffset=0)
Point_t const & LocationAtPoint(size_t i) const
Access to track position at different points.
FlashHypothesisCalculator _calc
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Provider const * get() const
Returns the provider with the specified type.
double QE() const noexcept
Returns quantum efficiency.
Provides recob::Track data product.
Description of geometry of one entire detector.
Class def header for mctrack data container.
MappedCounts_t GetAllVisibilities(Point const &p, bool wantReflected=false) const
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
void SetPromptHypAndPromptFraction(const FlashHypothesis &prompt, float frac)
std::vector< double > SegmentMidpoint(const TVector3 &pt1, const TVector3 &pt2, float XOffset=0)
Container for a list of pointers to providers.
FlashHypothesisCollection CreateFlashHypothesesFromSegment(TVector3 const &pt1, TVector3 const &pt2, float const &dEdx, Providers_t providers, phot::PhotonVisibilityService const &pvs, opdet::OpDigiProperties const &opdigip, float XOffset)
art framework interface to geometry description
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track: