All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Enumerations | Functions
larreco/larreco/RecoAlg/TCAlg/Utils.h File Reference
#include <algorithm>
#include <array>
#include <string>
#include <utility>
#include <vector>
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "larreco/RecoAlg/TCAlg/DataStructs.h"

Go to the source code of this file.

Namespaces

 detinfo
 General LArSoft Utilities.
 
 geo
 Verifies that the geometry check information is available.
 
 recob
 Reconstruction base classes.
 
 tca
 
 tca::detail
 

Enumerations

enum  tca::HitStatus_t { tca::kAllHits, tca::kUsedHits, tca::kUnusedHits }
 

Functions

bool tca::detail::valsDecreasing (const SortEntry &c1, const SortEntry &c2)
 
bool tca::detail::valsIncreasing (const SortEntry &c1, const SortEntry &c2)
 
void tca::MakeHaloTj (TCSlice &slc, Trajectory &muTj, bool prt)
 
void tca::DefineTjParents (TCSlice &slc, bool prt)
 
float tca::MaxChargeAsymmetry (TCSlice &slc, std::vector< int > &tjIDs)
 
int tca::PDGCodeVote (const TCSlice &slc, const std::vector< int > &tjIDs)
 
int tca::NeutrinoPrimaryTjID (const TCSlice &slc, const Trajectory &tj)
 
int tca::PrimaryID (const TCSlice &slc, const Trajectory &tj)
 
int tca::PrimaryUID (const TCSlice &slc, const PFPStruct &pfp)
 
bool tca::MergeTjIntoPFP (TCSlice &slc, int mtjid, PFPStruct &pfp, bool prt)
 
float tca::PointPull (TCSlice &slc, Point2_t pos, float chg, const Trajectory &tj)
 
bool tca::CompatibleMerge (const TCSlice &slc, std::vector< int > &tjIDs, bool prt)
 
bool tca::CompatibleMerge (const TCSlice &slc, const Trajectory &tj1, const Trajectory &tj2, bool prt)
 
float tca::OverlapFraction (const TCSlice &slc, const Trajectory &tj1, const Trajectory &tj2)
 
unsigned short tca::AngleRange (TrajPoint const &tp)
 
void tca::SetAngleCode (TrajPoint &tp)
 
unsigned short tca::AngleRange (float angle)
 
void tca::FitTraj (TCSlice &slc, Trajectory &tj)
 
void tca::FitTraj (TCSlice &slc, Trajectory &tj, unsigned short originPt, unsigned short npts, short fitDir, TrajPoint &tpFit)
 
unsigned short tca::GetPFPIndex (const TCSlice &slc, int tjID)
 
void tca::ReleaseHits (TCSlice &slc, Trajectory &tj)
 
void tca::UnsetUsedHits (TCSlice &slc, TrajPoint &tp)
 
bool tca::StoreTraj (TCSlice &slc, Trajectory &tj)
 
void tca::FitPar (const TCSlice &slc, const Trajectory &tj, unsigned short originPt, unsigned short npts, short fitDir, ParFit &pFit, unsigned short usePar)
 
bool tca::InTrajOK (TCSlice &slc, std::string someText)
 
void tca::CheckTrajBeginChg (TCSlice &slc, unsigned short itj)
 
bool tca::BraggSplit (TCSlice &slc, unsigned short itj)
 
void tca::ChkEndKink (TCSlice &slc, Trajectory &tj, bool prt)
 
void tca::TrimHiChgEndPts (TCSlice &slc, Trajectory &tj, bool prt)
 
void tca::TrimEndPts (std::string fcnLabel, TCSlice &slc, Trajectory &tj, const std::vector< float > &fQualityCuts, bool prt)
 
void tca::ChkMissedKink (TCSlice &slc, Trajectory &tj, bool prt)
 
void tca::ChkChgAsymmetry (TCSlice &slc, Trajectory &tj, bool prt)
 
bool tca::SignalBetween (const TCSlice &slc, const TrajPoint &tp1, const TrajPoint &tp2, const float &MinWireSignalFraction)
 
bool tca::SignalBetween (const TCSlice &slc, TrajPoint tp, float toPos0, const float &MinWireSignalFraction)
 
float tca::ChgFracBetween (const TCSlice &slc, TrajPoint tp, float toPos0)
 
bool tca::TrajHitsOK (TCSlice &slc, const std::vector< unsigned int > &iHitsInMultiplet, const std::vector< unsigned int > &jHitsInMultiplet)
 
bool tca::TrajHitsOK (TCSlice &slc, const unsigned int iht, const unsigned int jht)
 
float tca::ExpectedHitsRMS (TCSlice &slc, const TrajPoint &tp)
 
bool tca::SignalAtTpInSlc (const TCSlice &slc, const TrajPoint &tp)
 
bool tca::SignalAtTp (TrajPoint &tp)
 
bool tca::NearbySrcHit (geo::PlaneID plnID, unsigned int wire, float loTick, float hiTick)
 
float tca::TpSumHitChg (const TCSlice &slc, TrajPoint const &tp)
 
unsigned short tca::NumPtsWithCharge (const TCSlice &slc, const Trajectory &tj, bool includeDeadWires)
 
unsigned short tca::NumPtsWithCharge (const TCSlice &slc, const Trajectory &tj, bool includeDeadWires, unsigned short firstPt, unsigned short lastPt)
 
float tca::DeadWireCount (const TCSlice &slc, const TrajPoint &tp1, const TrajPoint &tp2)
 
float tca::DeadWireCount (const TCSlice &slc, const float &inWirePos1, const float &inWirePos2, CTP_t tCTP)
 
unsigned short tca::PDGCodeIndex (int PDGCode)
 
void tca::MakeTrajectoryObsolete (TCSlice &slc, unsigned int itj)
 
void tca::RestoreObsoleteTrajectory (TCSlice &slc, unsigned int itj)
 
void tca::MergeGhostTjs (TCSlice &slc, CTP_t inCTP)
 
bool tca::SplitTraj (TCSlice &slc, unsigned short itj, unsigned short pos, unsigned short ivx, bool prt)
 
bool tca::SplitTraj (detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, unsigned short itj, float XPos, bool makeVx2, bool prt)
 
bool tca::TrajClosestApproach (Trajectory const &tj, float x, float y, unsigned short &closePt, float &DOCA)
 
float tca::PointTrajDOCA (const TCSlice &slc, unsigned int iht, TrajPoint const &tp)
 
float tca::PointTrajDOCA (const TCSlice &slc, float wire, float time, TrajPoint const &tp)
 
float tca::PointTrajDOCA2 (const TCSlice &slc, float wire, float time, TrajPoint const &tp)
 
bool tca::FindCloseHits (TCSlice &slc, TrajPoint &tp, float const &maxDelta, HitStatus_t hitRequest)
 
std::vector< unsigned int > tca::FindCloseHits (const TCSlice &slc, std::array< int, 2 > const &wireWindow, Point2_t const &timeWindow, const unsigned short plane, HitStatus_t hitRequest, bool usePeakTime, bool &hitsNear)
 
unsigned short tca::NearbyCleanPt (const TCSlice &slc, const Trajectory &tj, unsigned short end)
 
std::vector< int > tca::FindCloseTjs (const TCSlice &slc, const TrajPoint &fromTp, const TrajPoint &toTp, const float &maxDelta)
 
float tca::ElectronLikelihood (const TCSlice &slc, const Trajectory &tj)
 
float tca::KinkSignificance (TCSlice &slc, Trajectory &tj1, unsigned short end1, Trajectory &tj2, unsigned short end2, unsigned short nPtsFit, bool useChg, bool prt)
 
float tca::KinkSignificance (TCSlice &slc, Trajectory &tj, unsigned short kinkPt, unsigned short nPtsFit, bool useChg, bool prt)
 
float tca::ChgFracNearPos (const TCSlice &slc, const Point2_t &pos, const std::vector< int > &tjIDs)
 
float tca::MaxHitDelta (TCSlice &slc, Trajectory &tj)
 
void tca::ReverseTraj (TCSlice &slc, Trajectory &tj)
 
unsigned short tca::CloseEnd (const TCSlice &slc, const Trajectory &tj, const Point2_t &pos)
 
float tca::PointTrajSep2 (float wire, float time, TrajPoint const &tp)
 
float tca::PosSep (const Point2_t &pos1, const Point2_t &pos2)
 
float tca::PosSep2 (const Point2_t &pos1, const Point2_t &pos2)
 
void tca::TrajPointTrajDOCA (const TCSlice &slc, TrajPoint const &tp, Trajectory const &tj, unsigned short &closePt, float &minSep)
 
void tca::TrajIntersection (TrajPoint const &tp1, TrajPoint const &tp2, Point2_t &pos)
 
void tca::TrajIntersection (TrajPoint const &tp1, TrajPoint const &tp2, float &x, float &y)
 
float tca::MaxTjLen (const TCSlice &slc, std::vector< int > &tjIDs)
 
float tca::TrajPointSeparation (const TrajPoint &tp1, const TrajPoint &tp2)
 
float tca::TrajLength (const Trajectory &tj)
 
float tca::HitSep2 (const TCSlice &slc, unsigned int iht, unsigned int jht)
 
bool tca::TrajTrajDOCA (const TCSlice &slc, const Trajectory &tj1, const Trajectory &tj2, unsigned short &ipt1, unsigned short &ipt2, float &minSep)
 
bool tca::TrajTrajDOCA (const TCSlice &slc, const Trajectory &tj1, const Trajectory &tj2, unsigned short &ipt1, unsigned short &ipt2, float &minSep, bool considerDeadWires)
 
float tca::TwoTPAngle (const TrajPoint &tp1, const TrajPoint &tp2)
 
void tca::TagJunkTj (TCSlice &slc, Trajectory &tj, bool prt)
 
std::vector< unsigned int > tca::PutHitsInVector (const TCSlice &slc, PFPStruct const &pfp, HitStatus_t hitRequest)
 
std::vector< unsigned int > tca::PutTrajHitsInVector (const Trajectory &tj, HitStatus_t hitRequest)
 
bool tca::HasDuplicateHits (const TCSlice &slc, Trajectory const &tj, bool prt)
 
void tca::MoveTPToWire (TrajPoint &tp, float wire)
 
bool tca::PointInsideEnvelope (const Point2_t &Point, const std::vector< Point2_t > &Envelope)
 
bool tca::SetMag (Vector2_t &v1, double mag)
 
void tca::FindAlongTrans (Point2_t pos1, Vector2_t dir1, Point2_t pos2, Point2_t &alongTrans)
 
double tca::DotProd (const Vector2_t &v1, const Vector2_t &v2)
 
double tca::DeltaAngle (double Ang1, double Ang2)
 
double tca::DeltaAngle2 (double Ang1, double Ang2)
 
double tca::DeltaAngle (const Point2_t &p1, const Point2_t &p2)
 
void tca::SetEndPoints (Trajectory &tj)
 
float tca::TPHitsRMSTick (const TCSlice &slc, const TrajPoint &tp, HitStatus_t hitRequest)
 
float tca::TPHitsRMSTime (const TCSlice &slc, const TrajPoint &tp, HitStatus_t hitRequest)
 
float tca::HitsRMSTick (const TCSlice &slc, const std::vector< unsigned int > &hitsInMultiplet, HitStatus_t hitRequest)
 
float tca::HitsRMSTime (const TCSlice &slc, const std::vector< unsigned int > &hitsInMultiplet, HitStatus_t hitRequest)
 
float tca::HitsPosTick (const TCSlice &slc, const std::vector< unsigned int > &hitsInMultiplet, float &sum, HitStatus_t hitRequest)
 
float tca::HitsPosTime (const TCSlice &slc, const std::vector< unsigned int > &hitsInMultiplet, float &sum, HitStatus_t hitRequest)
 
unsigned short tca::NumHitsInTP (const TrajPoint &tp, HitStatus_t hitRequest)
 
unsigned short tca::NumUsedHitsInTj (const TCSlice &slc, const Trajectory &tj)
 
unsigned short tca::NearestPtWithChg (const TCSlice &slc, const Trajectory &tj, unsigned short thePt)
 
short tca::MCSMom (const TCSlice &slc, const std::vector< int > &tjIDs)
 
short tca::MCSMom (const TCSlice &slc, const Trajectory &tj)
 
short tca::MCSMom (const TCSlice &slc, const Trajectory &tj, unsigned short firstPt, unsigned short lastPt)
 
double tca::MCSThetaRMS (const TCSlice &slc, const Trajectory &tj, unsigned short firstPt, unsigned short lastPt)
 
float tca::MCSThetaRMS (const TCSlice &slc, const Trajectory &tj)
 
void tca::TjDeltaRMS (const TCSlice &slc, const Trajectory &tj, unsigned short firstPt, unsigned short lastPt, double &rms, unsigned short &cnt)
 
void tca::SetTPEnvironment (TCSlice &slc, CTP_t inCTP)
 
bool tca::TrajIsClean (TCSlice &slc, Trajectory &tj, bool prt)
 
void tca::UpdateTjChgProperties (std::string inFcnLabel, TCSlice &slc, Trajectory &tj, bool prt)
 
void tca::UpdateVxEnvironment (TCSlice &slc)
 
void tca::UpdateVxEnvironment (TCSlice &slc, VtxStore &vx2, bool prt)
 
TrajPoint tca::MakeBareTP (detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, const Point3_t &pos, CTP_t inCTP)
 
TrajPoint tca::MakeBareTP (detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, const Point3_t &pos, const Vector3_t &dir, CTP_t inCTP)
 
bool tca::MakeBareTrajPoint (const TCSlice &slc, unsigned int fromHit, unsigned int toHit, TrajPoint &tp)
 
bool tca::MakeBareTrajPoint (const TCSlice &slc, float fromWire, float fromTick, float toWire, float toTick, CTP_t tCTP, TrajPoint &tp)
 
bool tca::MakeBareTrajPoint (const Point2_t &fromPos, const Point2_t &toPos, TrajPoint &tpOut)
 
bool tca::MakeBareTrajPoint (const TCSlice &slc, const TrajPoint &tpIn1, const TrajPoint &tpIn2, TrajPoint &tpOut)
 
unsigned short tca::FarEnd (TCSlice &slc, const Trajectory &tj, const Point2_t &pos)
 
Vector2_t tca::PointDirection (const Point2_t p1, const Point2_t p2)
 
void tca::SetPDGCode (TCSlice &slc, Trajectory &tj)
 
void tca::SetPDGCode (TCSlice &slc, unsigned short itj)
 
bool tca::AnalyzeHits ()
 
bool tca::LongPulseHit (const recob::Hit &hit)
 
void tca::FillWireHitRange (geo::TPCID inTPCID)
 
bool tca::FillWireHitRange (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
 
bool tca::WireHitRangeOK (TCSlice &slc, const CTP_t &inCTP)
 
bool tca::MergeAndStore (TCSlice &slc, unsigned int itj1, unsigned int itj2, bool doPrt)
 
std::vector< int > tca::GetAssns (TCSlice &slc, std::string type1Name, int id, std::string type2Name)
 
bool tca::StartTraj (TCSlice &slc, Trajectory &tj, unsigned int fromhit, unsigned int tohit, unsigned short pass)
 
bool tca::StartTraj (TCSlice &slc, Trajectory &tj, float fromWire, float fromTick, float toWire, float toTick, CTP_t &tCTP, unsigned short pass)
 
bool tca::Fit2D (short mode, Point2_t inPt, float &inPtErr, Vector2_t &outVec, Vector2_t &outVecErr, float &chiDOF)
 
std::pair< unsigned short,
unsigned short > 
tca::GetSliceIndex (std::string typeName, int uID)
 
template<typename T >
std::vector< T > tca::SetIntersection (const std::vector< T > &set1, const std::vector< T > &set2)
 
template<typename T >
std::vector< T > tca::SetDifference (const std::vector< T > &set1, const std::vector< T > &set2)
 
bool tca::DecodeDebugString (std::string strng)
 
void tca::DumpTj ()
 
void tca::PrintDebugMode ()
 
void tca::PrintAll (detinfo::DetectorPropertiesData const &detProp, std::string someText)
 
void tca::PrintP (std::string someText, mf::LogVerbatim &myprt, PFPStruct &pfp, bool &printHeader)
 
void tca::Print3V (detinfo::DetectorPropertiesData const &detProp, std::string someText, mf::LogVerbatim &myprt, Vtx3Store &vx3, bool &printHeader)
 
void tca::Print2V (std::string someText, mf::LogVerbatim &myprt, VtxStore &vx2, bool &printHeader)
 
void tca::Print3S (detinfo::DetectorPropertiesData const &detProp, std::string someText, mf::LogVerbatim &myprt, ShowerStruct3D &ss3)
 
void tca::PrintT (std::string someText, mf::LogVerbatim &myprt, Trajectory &tj, bool &printHeader)
 
void tca::PrintTrajectory (std::string someText, const TCSlice &slc, const Trajectory &tj, unsigned short tPoint)
 
void tca::PrintAllTraj (detinfo::DetectorPropertiesData const &detProp, std::string someText, TCSlice &slc, unsigned short itj, unsigned short ipt, bool prtVtx)
 
void tca::PrintTPHeader (std::string someText)
 
void tca::PrintTP (std::string someText, const TCSlice &slc, unsigned short ipt, short dir, unsigned short pass, const TrajPoint &tp)
 
std::string tca::TPEnvString (const TrajPoint &tp)
 
void tca::PrintPFP (std::string someText, TCSlice &slc, const PFPStruct &pfp, bool printHeader)
 
void tca::PrintPFPs (std::string someText, TCSlice &slc)
 
void tca::PrintClusters ()
 
std::string tca::PrintHit (const TCHit &tch)
 
std::string tca::PrintHitShort (const TCHit &tch)
 
std::string tca::PrintPos (const TCSlice &slc, const TrajPoint &tp)
 
std::string tca::PrintPos (const TCSlice &slc, const Point2_t &pos)
 
std::string tca::PrintEndFlag (const Trajectory &tj, unsigned short end)
 
std::string tca::PrintEndFlag (const PFPStruct &pfp, unsigned short end)