LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Functions | |
void | writeHistogram (std::vector< double > const &binned) |
void | checkOnBeamFlash (std::vector< recob::OpFlash > const &FlashVector) |
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) |
unsigned int | GetAccumIndex (double const PeakTime, double const MinTime, double const BinWidth, double const BinOffset) |
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) |
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 | FillHitsThisFlash (std::vector< std::vector< int >> const &Contributors, int const &Bin, std::vector< int > const &HitClaimedByFlash, std::vector< int > &HitsThisFlash) |
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) |
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) |
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) |
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 | CheckAndStoreFlash (std::vector< std::vector< int >> &RefinedHitsPerFlash, std::vector< int > const &HitsThisRefinedFlash, double const PEAccumulated, float const FlashThreshold, std::vector< bool > &HitsUsed) |
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) |
void | AddHitContribution (recob::OpHit const ¤tHit, double &MaxTime, double &MinTime, double &AveTime, double &FastToTotal, double &AveAbsTime, double &TotalPE, std::vector< double > &PEs) |
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) |
double | CalculateWidth (double const sum, double const sum_squared, double const weights_sum) |
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) |
double | GetLikelihoodLateLight (double const iPE, double const iTime, double const iWidth, double const jPE, double const jTime, double const jWidth) |
void | MarkFlashesForRemoval (std::vector< recob::OpFlash > const &FlashVector, size_t const BeginFlash, std::vector< bool > &MarkedForRemoval) |
void | RemoveFlashesFromVectors (std::vector< bool > const &MarkedForRemoval, std::vector< recob::OpFlash > &FlashVector, size_t const BeginFlash, std::vector< std::vector< int >> &RefinedHitsPerFlash) |
void | RemoveLateLight (std::vector< recob::OpFlash > &FlashVector, std::vector< std::vector< int >> &RefinedHitsPerFlash) |
template<typename T , typename Compare > | |
std::vector< int > | sort_permutation (std::vector< T > const &vec, int offset, Compare compare) |
template<typename T > | |
void | apply_permutation (std::vector< T > &vec, std::vector< int > const &p) |
void | RunHitFinder (std::vector< raw::OpDetWaveform > const &opDetWaveformVector, std::vector< recob::OpHit > &hitVector, pmtana::PulseRecoManager const &pulseRecoMgr, pmtana::PMTPulseRecoBase const &threshAlg, geo::GeometryCore const &geometry, float hitThreshold, detinfo::DetectorClocksData const &clocksData, calib::IPhotonCalibrator const &calibrator, bool use_start_time) |
void | ConstructHit (float hitThreshold, int channel, double timeStamp, pmtana::pulse_param const &pulse, std::vector< recob::OpHit > &hitVector, detinfo::DetectorClocksData const &clocksData, calib::IPhotonCalibrator const &calibrator, bool use_start_time) |
Title: FlashHypothesis Class Author: Wes Ketchum (wketc) hum@ lanl. gov
Description: Class that represents a flash hypothesis (PEs per opdet) and its error
Title: FlashUtilities Class Author: Wes Ketchum (wketc) hum@ lanl. gov
Description: Class that contains utility functions for flash and flash hypotheses: — compare a flash hypothesis to a truth or reco vector — get an extent of a flash (central point, width) These classes should operate using simple objects, and will need other classes/functions to fill those vectors properly.
Title: OpFlash Algorithims Authors, editors: Ben Jones, MIT Wes Ketchum wketc Gleb Sinev hum@ lanl. govgleb. Alex Himmel sine v@duk e.ed uahimm el@f nal.g ov
Description: These are the algorithms used by OpFlashFinder to produce flashes.
Title: OpHit Algorithims Authors, editors: Ben Jones, MIT Wes Ketchum wketc Gleb Sinev hum@ lanl. govgleb. Alex Himmel sine v@duk e.ed uahimm Kevin Wood el@f nal.g ovkevin .woo d@sto nybr ook.e du
Description: These are the algorithms used by OpHitFinder to produce optical hits.
void opdet::AddHitContribution | ( | recob::OpHit const & | currentHit, |
double & | MaxTime, | ||
double & | MinTime, | ||
double & | AveTime, | ||
double & | FastToTotal, | ||
double & | AveAbsTime, | ||
double & | TotalPE, | ||
std::vector< double > & | PEs | ||
) |
Definition at line 442 of file OpFlashAlg.cxx.
References recob::OpHit::FastToTotal(), recob::OpHit::OpChannel(), recob::OpHit::PE(), recob::OpHit::PeakTime(), and recob::OpHit::PeakTimeAbs().
Referenced by ConstructFlash().
void opdet::AddHitToFlash | ( | int const & | HitID, |
std::vector< bool > & | HitsUsed, | ||
recob::OpHit const & | currentHit, | ||
double const | WidthTolerance, | ||
std::vector< int > & | HitsThisRefinedFlash, | ||
double & | PEAccumulated, | ||
double & | FlashMaxTime, | ||
double & | FlashMinTime | ||
) |
Definition at line 320 of file OpFlashAlg.cxx.
References util::abs(), recob::OpHit::PE(), recob::OpHit::PeakTime(), and recob::OpHit::Width().
Referenced by RefineHitsInFlash().
void opdet::apply_permutation | ( | std::vector< T > & | vec, |
std::vector< int > const & | p | ||
) |
Definition at line 680 of file OpFlashAlg.cxx.
Referenced by RemoveLateLight().
void opdet::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 | ||
) |
Definition at line 241 of file OpFlashAlg.cxx.
References ClaimHits(), FillFlashesBySizeMap(), and FillHitsThisFlash().
Referenced by RunFlashFinder().
double opdet::CalculateWidth | ( | double const | sum, |
double const | sum_squared, | ||
double const | weights_sum | ||
) |
Definition at line 498 of file OpFlashAlg.cxx.
Referenced by ConstructFlash().
void opdet::CheckAndStoreFlash | ( | std::vector< std::vector< int >> & | RefinedHitsPerFlash, |
std::vector< int > const & | HitsThisRefinedFlash, | ||
double const | PEAccumulated, | ||
float const | FlashThreshold, | ||
std::vector< bool > & | HitsUsed | ||
) |
void opdet::checkOnBeamFlash | ( | std::vector< recob::OpFlash > const & | FlashVector | ) |
Definition at line 52 of file OpFlashAlg.cxx.
void opdet::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 | ||
) |
void opdet::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 | ||
) |
Definition at line 507 of file OpFlashAlg.cxx.
References util::abs(), AddHitContribution(), CalculateWidth(), detinfo::ElecClock::Frame(), GetHitGeometryInfo(), geo::GeometryCore::MaxOpChannel(), geo::GeometryCore::Nplanes(), detinfo::DetectorClocksData::OpticalClock(), and detinfo::DetectorClocksData::TriggerTime().
Referenced by RunFlashFinder().
void opdet::ConstructHit | ( | float | hitThreshold, |
int | channel, | ||
double | timeStamp, | ||
pmtana::pulse_param const & | pulse, | ||
std::vector< recob::OpHit > & | hitVector, | ||
detinfo::DetectorClocksData const & | clocksData, | ||
calib::IPhotonCalibrator const & | calibrator, | ||
bool | use_start_time | ||
) |
Definition at line 70 of file OpHitAlg.cxx.
References pmtana::pulse_param::area, detinfo::ElecClock::Frame(), detinfo::DetectorClocksData::OpticalClock(), calib::IPhotonCalibrator::PE(), pmtana::pulse_param::peak, pmtana::pulse_param::t_end, pmtana::pulse_param::t_max, pmtana::pulse_param::t_rise, pmtana::pulse_param::t_start, detinfo::ElecClock::TickPeriod(), detinfo::DetectorClocksData::TriggerTime(), and calib::IPhotonCalibrator::UseArea().
Referenced by RunHitFinder().
void opdet::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 | ||
) |
void opdet::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 | ||
) |
Definition at line 196 of file OpFlashAlg.cxx.
Referenced by AssignHitsToFlash().
void opdet::FillHitsThisFlash | ( | std::vector< std::vector< int >> const & | Contributors, |
int const & | Bin, | ||
std::vector< int > const & | HitClaimedByFlash, | ||
std::vector< int > & | HitsThisFlash | ||
) |
Definition at line 207 of file OpFlashAlg.cxx.
Referenced by AssignHitsToFlash().
void opdet::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 | ||
) |
unsigned int opdet::GetAccumIndex | ( | double const | PeakTime, |
double const | MinTime, | ||
double const | BinWidth, | ||
double const | BinOffset | ||
) |
Definition at line 168 of file OpFlashAlg.cxx.
Referenced by RunFlashFinder().
void opdet::GetHitGeometryInfo | ( | recob::OpHit const & | currentHit, |
geo::GeometryCore const & | geom, | ||
std::vector< double > & | sumw, | ||
std::vector< double > & | sumw2, | ||
double & | sumy, | ||
double & | sumy2, | ||
double & | sumz, | ||
double & | sumz2 | ||
) |
Definition at line 468 of file OpFlashAlg.cxx.
References geo::GeometryCore::FindTPCAtPosition(), geo::CryostatID::isValid, geo::GeometryCore::NearestWireID(), geo::GeometryCore::Nplanes(), recob::OpHit::OpChannel(), geo::GeometryCore::OpDetGeoFromOpChannel(), recob::OpHit::PE(), w, and geo::WireID::Wire.
Referenced by ConstructFlash().
double opdet::GetLikelihoodLateLight | ( | double const | iPE, |
double const | iTime, | ||
double const | iWidth, | ||
double const | jPE, | ||
double const | jTime, | ||
double const | jWidth | ||
) |
void opdet::MarkFlashesForRemoval | ( | std::vector< recob::OpFlash > const & | FlashVector, |
size_t const | BeginFlash, | ||
std::vector< bool > & | MarkedForRemoval | ||
) |
Definition at line 603 of file OpFlashAlg.cxx.
References GetLikelihoodLateLight().
Referenced by RemoveLateLight().
void opdet::RefineHitsInFlash | ( | std::vector< int > const & | HitsThisFlash, |
std::vector< recob::OpHit > const & | HitVector, | ||
std::vector< std::vector< int >> & | RefinedHitsPerFlash, | ||
float const | WidthTolerance, | ||
float const | FlashThreshold | ||
) |
Definition at line 371 of file OpFlashAlg.cxx.
References AddHitToFlash(), CheckAndStoreFlash(), and FindSeedHit().
Referenced by RunFlashFinder().
void opdet::RemoveFlashesFromVectors | ( | std::vector< bool > const & | MarkedForRemoval, |
std::vector< recob::OpFlash > & | FlashVector, | ||
size_t const | BeginFlash, | ||
std::vector< std::vector< int >> & | RefinedHitsPerFlash | ||
) |
Definition at line 630 of file OpFlashAlg.cxx.
Referenced by RemoveLateLight().
void opdet::RemoveLateLight | ( | std::vector< recob::OpFlash > & | FlashVector, |
std::vector< std::vector< int >> & | RefinedHitsPerFlash | ||
) |
Definition at line 643 of file OpFlashAlg.cxx.
References apply_permutation(), MarkFlashesForRemoval(), RemoveFlashesFromVectors(), and sort_permutation().
Referenced by RunFlashFinder().
void opdet::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 | ||
) |
Definition at line 60 of file OpFlashAlg.cxx.
References AssignHitsToFlash(), ConstructFlash(), FillAccumulator(), GetAccumIndex(), RefineHitsInFlash(), and RemoveLateLight().
Referenced by opdet::OpFlashFinder::produce().
void opdet::RunHitFinder | ( | std::vector< raw::OpDetWaveform > const & | opDetWaveformVector, |
std::vector< recob::OpHit > & | hitVector, | ||
pmtana::PulseRecoManager const & | pulseRecoMgr, | ||
pmtana::PMTPulseRecoBase const & | threshAlg, | ||
geo::GeometryCore const & | geometry, | ||
float | hitThreshold, | ||
detinfo::DetectorClocksData const & | clocksData, | ||
calib::IPhotonCalibrator const & | calibrator, | ||
bool | use_start_time | ||
) |
Definition at line 29 of file OpHitAlg.cxx.
References ConstructHit(), pmtana::PMTPulseRecoBase::GetPulses(), geo::GeometryCore::IsValidOpChannel(), and pmtana::PulseRecoManager::Reconstruct().
Referenced by opdet::OpHitFinder::produce().
std::vector< int > opdet::sort_permutation | ( | std::vector< T > const & | vec, |
int | offset, | ||
Compare | compare | ||
) |
Definition at line 668 of file OpFlashAlg.cxx.
Referenced by RemoveLateLight().
void opdet::writeHistogram | ( | std::vector< double > const & | binned | ) |
Definition at line 34 of file OpFlashAlg.cxx.