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]),
42 providers,pvs,opdigip,XOffset);
47 providers,pvs,opdigip,XOffset);
54 std::vector<float>
const& dEdxVector,
60 bool interpolate_dEdx=
false;
61 if(mctrack.size() == dEdxVector.size())
62 interpolate_dEdx=
true;
63 else if(mctrack.size() == dEdxVector.size()+1)
64 interpolate_dEdx=
false;
66 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with mctrack size.";
70 for(
size_t pt=1; pt<mctrack.size(); pt++){
72 fhc = fhc + CreateFlashHypothesesFromSegment(mctrack[pt-1].Position().Vect(),
73 mctrack[pt].Position().Vect(),
74 0.5*(dEdxVector[pt]+dEdxVector[pt-1]),
75 providers,pvs,opdigip,XOffset);
77 fhc = fhc + CreateFlashHypothesesFromSegment(mctrack[pt-1].Position().Vect(),
78 mctrack[pt].Position().Vect(),
80 providers,pvs,opdigip,XOffset);
87 std::vector<float>
const& dEdxVector,
93 bool interpolate_dEdx=
false;
94 if(trajVector.size() == dEdxVector.size())
95 interpolate_dEdx=
true;
96 else if(trajVector.size() == dEdxVector.size()+1)
97 interpolate_dEdx=
false;
99 throw "ERROR in FlashHypothesisCreator: dEdx vector size not compatible with trajVector size.";
103 for(
size_t pt=1; pt<trajVector.size(); pt++){
105 fhc = fhc + CreateFlashHypothesesFromSegment(trajVector[pt-1],
107 0.5*(dEdxVector[pt]+dEdxVector[pt-1]),
108 providers,pvs,opdigip,XOffset);
110 fhc = fhc + CreateFlashHypothesesFromSegment(trajVector[pt-1],
113 providers,pvs,opdigip,XOffset);
126 return CreateFlashHypothesesFromSegment(pt1,pt2,dEdx,providers,pvs,opdigip,XOffset);
139 auto const nOpDets = geom->NOpDets();
144 std::vector<double> xyz_segment(_calc.SegmentMidpoint(pt1,pt2,XOffset));
150 if (!PointVisibility)
return fhc;
153 std::vector<float> qe_vector(nOpDets,opdigip.
QE());
154 _calc.FillFlashHypothesis(larp->ScintYield()*larp->ScintYieldRatio(),
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
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
double QE() const noexcept
Returns quantum efficiency.
Provider const * get() const
Returns the provider with the specified type.
process_name use argoneut_mc_hitfinder track
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)
Provides recob::Track data product.
void SetPromptHypAndPromptFraction(const FlashHypothesis &prompt, float frac)
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: