14 std::vector<float>
const& dEdxVector,
20 bool interpolate_dEdx=
false;
22 interpolate_dEdx=
true;
24 interpolate_dEdx=
false;
26 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with track size.";
34 0.5*(dEdxVector[
pt]+dEdxVector[
pt-1]),
35 providers,pvs,opdigip,XOffset);
40 providers,pvs,opdigip,XOffset);
47 std::vector<float>
const& dEdxVector,
53 bool interpolate_dEdx=
false;
54 if(mctrack.size() == dEdxVector.size())
55 interpolate_dEdx=
true;
56 else if(mctrack.size() == dEdxVector.size()+1)
57 interpolate_dEdx=
false;
59 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with mctrack size.";
63 for(
size_t pt=1;
pt<mctrack.size();
pt++){
66 mctrack[
pt].Position().Vect(),
67 0.5*(dEdxVector[
pt]+dEdxVector[
pt-1]),
68 providers,pvs,opdigip,XOffset);
71 mctrack[
pt].Position().Vect(),
73 providers,pvs,opdigip,XOffset);
80 std::vector<float>
const& dEdxVector,
86 bool interpolate_dEdx=
false;
87 if(trajVector.size() == dEdxVector.size())
88 interpolate_dEdx=
true;
89 else if(trajVector.size() == dEdxVector.size()+1)
90 interpolate_dEdx=
false;
92 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with trajVector size.";
96 for(
size_t pt=1;
pt<trajVector.size();
pt++){
100 0.5*(dEdxVector[pt]+dEdxVector[pt-1]),
101 providers,pvs,opdigip,XOffset);
106 providers,pvs,opdigip,XOffset);
132 auto const nOpDets = geom->NOpDets();
143 if (!PointVisibility)
return fhc;
146 std::vector<float> qe_vector(nOpDets,opdigip.
QE());
TVector3 LocationAtPoint(unsigned int p) const
Covariance matrices are either set or not.
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)
FlashHypothesisCalculator _calc
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
void FillFlashHypothesis(const float &yield, const float &dEdx, const TVector3 &pt1, const TVector3 &pt2, const std::vector< float > &qe_vector, const float *vis_vector, FlashHypothesis &hyp)
Provider const * get() const
Returns the provider with the specified type.
float const * GetAllVisibilities(double const *xyz, bool wantReflected=false) const
Description of geometry of one entire detector.
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)
double QE() const
Returns quantum efficiency.
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track: