14 namespace detinfo {
class DetectorClocksData; }
15 namespace geo {
class GeometryCore; }
24 std::vector<recob::OpFlash>&,
33 unsigned int GetAccumIndex(
double PeakTime,
double MinTime,
double BinWidth,
double BinOffset);
36 unsigned int const& HitIndex,
39 std::vector<double>& Binned,
41 std::vector<int>& FlashesInAccumulator);
44 std::vector<int>
const&,
45 std::vector<double>
const&,
46 std::vector<double>
const&,
49 std::vector<recob::OpHit>
const&,
54 std::vector<int>
const& FlashesInAccumulator,
55 std::vector<double>
const& BinnedPE,
56 int const& Accumulator,
57 std::map<
double, std::map<
int, std::vector<int>>, std::greater<double>>& FlashesBySize);
61 std::vector<int>
const& HitClaimedByFlash,
62 std::vector<int>& HitsThisFlash);
65 std::vector<int>
const& HitsThisFlash,
68 std::vector<int>& HitClaimedByFlash);
71 std::vector<recob::OpHit>
const&
HitVector,
76 void FindSeedHit(std::map<
double, std::vector<int>, std::greater<double>>
const& HitsBySize,
77 std::vector<bool>& HitsUsed,
78 std::vector<recob::OpHit>
const&
HitVector,
79 std::vector<int>& HitsThisRefinedFlash,
80 double& PEAccumulated,
82 double& FlashMinTime);
85 std::vector<bool>& HitsUsed,
88 std::vector<int>& HitsThisRefinedFlash,
89 double& PEAccumulated,
91 double& FlashMinTime);
94 std::vector<int>
const& HitsThisRefinedFlash,
97 std::vector<bool>& HitsUsed);
100 std::vector<recob::OpHit>
const&
HitVector,
101 std::vector<recob::OpFlash>& FlashVector,
113 std::vector<double>& PEs);
117 std::vector<double>& sumw,
118 std::vector<double>& sumw2,
135 std::vector<bool>& MarkedForRemoval);
138 std::vector<recob::OpFlash>& FlashVector,
140 std::vector<std::vector<int>>& RefinedHitsPerFlash);
142 template <
typename T,
typename Compare>
145 template <
typename T>
void FillHitsThisFlash(std::vector< std::vector< int >> const &Contributors, int const &Bin, std::vector< int > const &HitClaimedByFlash, std::vector< int > &HitsThisFlash)
BEGIN_PROLOG TPC Trig offset(g4 rise time) ProjectToHeight
void CheckAndStoreFlash(std::vector< std::vector< int >> &RefinedHitsPerFlash, std::vector< int > const &HitsThisRefinedFlash, double const PEAccumulated, float const FlashThreshold, std::vector< bool > &HitsUsed)
void RunFlashFinder(std::vector< recob::OpHit > const &HitVector, std::vector< recob::OpFlash > &FlashVector, std::vector< std::vector< int >> &AssocList, double const BinWidth, geo::GeometryCore const &geom, float const FlashThreshold, float const WidthTolerance, detinfo::DetectorClocksData const &ClocksData, float const TrigCoinc)
void ConstructFlash(std::vector< int > const &HitsPerFlashVec, std::vector< recob::OpHit > const &HitVector, std::vector< recob::OpFlash > &FlashVector, geo::GeometryCore const &geom, detinfo::DetectorClocksData const &ClocksData, float const TrigCoinc)
void AddHitContribution(recob::OpHit const ¤tHit, double &MaxTime, double &MinTime, double &AveTime, double &FastToTotal, double &AveAbsTime, double &TotalPE, std::vector< double > &PEs)
void apply_permutation(std::vector< T > &vec, std::vector< int > const &p)
void AssignHitsToFlash(std::vector< int > const &FlashesInAccumulator1, std::vector< int > const &FlashesInAccumulator2, std::vector< double > const &Binned1, std::vector< double > const &Binned2, std::vector< std::vector< int >> const &Contributors1, std::vector< std::vector< int >> const &Contributors2, std::vector< recob::OpHit > const &HitVector, std::vector< std::vector< int >> &HitsPerFlash, float const FlashThreshold)
std::array< float, 2 > HitVector(const recob::Hit &hit, const geo::GeometryCore *geo, const detinfo::DetectorPropertiesData &dprop)
bool Compare(const T &a, const T &b, const std::string &key)
void FindSeedHit(std::map< double, std::vector< int >, std::greater< double >> const &HitsBySize, std::vector< bool > &HitsUsed, std::vector< recob::OpHit > const &HitVector, std::vector< int > &HitsThisRefinedFlash, double &PEAccumulated, double &FlashMaxTime, double &FlashMinTime)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void MarkFlashesForRemoval(std::vector< recob::OpFlash > const &FlashVector, size_t const BeginFlash, std::vector< bool > &MarkedForRemoval)
void ClaimHits(std::vector< recob::OpHit > const &HitVector, std::vector< int > const &HitsThisFlash, float const FlashThreshold, std::vector< std::vector< int >> &HitsPerFlash, std::vector< int > &HitClaimedByFlash)
constexpr float FlashThreshold
std::vector< int > sort_permutation(std::vector< T > const &vec, int offset, Compare compare)
void FillFlashesBySizeMap(std::vector< int > const &FlashesInAccumulator, std::vector< double > const &BinnedPE, int const &Accumulator, std::map< double, std::map< int, std::vector< int >>, std::greater< double >> &FlashesBySize)
void RemoveLateLight(std::vector< recob::OpFlash > &FlashVector, std::vector< std::vector< int >> &RefinedHitsPerFlash)
Description of geometry of one entire detector.
void AddHitToFlash(int const &HitID, std::vector< bool > &HitsUsed, recob::OpHit const ¤tHit, double const WidthTolerance, std::vector< int > &HitsThisRefinedFlash, double &PEAccumulated, double &FlashMaxTime, double &FlashMinTime)
void RefineHitsInFlash(std::vector< int > const &HitsThisFlash, std::vector< recob::OpHit > const &HitVector, std::vector< std::vector< int >> &RefinedHitsPerFlash, float const WidthTolerance, float const FlashThreshold)
Contains all timing reference information for the detector.
unsigned int GetAccumIndex(double const PeakTime, double const MinTime, double const BinWidth, double const BinOffset)
constexpr double WidthTolerance
void GetHitGeometryInfo(recob::OpHit const ¤tHit, geo::GeometryCore const &geom, std::vector< double > &sumw, std::vector< double > &sumw2, double &sumy, double &sumy2, double &sumz, double &sumz2)
void RemoveFlashesFromVectors(std::vector< bool > const &MarkedForRemoval, std::vector< recob::OpFlash > &FlashVector, size_t const BeginFlash, std::vector< std::vector< int >> &RefinedHitsPerFlash)
void FillAccumulator(unsigned int const &AccumIndex, unsigned int const &HitIndex, double const PE, float const FlashThreshold, std::vector< double > &Binned, std::vector< std::vector< int >> &Contributors, std::vector< int > &FlashesInAccumulator)
double GetLikelihoodLateLight(double const iPE, double const iTime, double const iWidth, double const jPE, double const jTime, double const jWidth)