9 #ifndef TRAJCLUSTERALGSHOWERS_H 10 #define TRAJCLUSTERALGSHOWERS_H 36 void ConfigureMVA(TjStuff& tjs, std::string fMVAShowerParentWeights);
41 bool Reconcile3D(std::string inFcnLabel, TjStuff& tjs,
const geo::TPCID& tpcid,
bool parentSearchDone,
bool prt);
42 bool Reconcile3D(std::string inFcnLabel, TjStuff& tjs, ShowerStruct3D& ss3,
bool prt);
45 int GetCotID(TjStuff& tjs,
int ShowerTjID);
49 bool UpdateShower(std::string inFcnLabel, TjStuff& tjs, ShowerStruct&
ss,
bool prt);
50 bool UpdateShower(std::string inFcnLabel, TjStuff& tjs, ShowerStruct3D& ss3,
bool prt);
51 float Match3DFOM(std::string inFcnLabel, TjStuff& tjs,
int icotID,
int jcotID,
bool prt);
52 float Match3DFOM(std::string inFcnLabel, TjStuff& tjs,
int icotID,
int jcotID,
int kcotID,
bool prt);
53 float Match3DFOM(std::string inFcnLabel, TjStuff& tjs, ShowerStruct3D& ss3,
bool prt);
54 void MakeShowerObsolete(std::string inFcnLabel, TjStuff& tjs, ShowerStruct3D& ss3,
bool prt);
56 bool DontCluster(
const TjStuff& tjs,
const std::vector<int>& tjlist1,
const std::vector<int>& tjlist2);
58 bool RemovePFP(std::string inFcnLabel, TjStuff& tjs, PFPStruct& pfp, ShowerStruct3D& ss3,
bool doUpdate,
bool prt);
59 bool AddPFP(std::string inFcnLabel, TjStuff& tjs,
int pID, ShowerStruct3D& ss3,
bool doUpdate,
bool prt);
60 bool RemovePFP(std::string inFcnLabel, TjStuff& tjs,
int pID, ShowerStruct3D& ss3,
bool doUpdate,
bool prt);
61 bool AddTj(std::string inFcnLabel, TjStuff& tjs,
int TjID, ShowerStruct&
ss,
bool doUpdate,
bool prt);
62 bool RemoveTj(std::string inFcnLabel, TjStuff& tjs,
int TjID, ShowerStruct&
ss,
bool doUpdate,
bool prt);
63 bool AnalyzeRotPos(std::string inFcnLabel, TjStuff& tjs, ShowerStruct&
ss,
bool prt);
64 void ReverseShower(std::string inFcnLabel, TjStuff& tjs, ShowerStruct&
ss,
bool prt);
65 void ReverseShower(std::string inFcnLabel, TjStuff& tjs,
int cotID,
bool prt);
66 bool FindParent(std::string inFcnLabel, TjStuff& tjs, ShowerStruct3D& ss3,
bool prt);
67 bool SetParent(std::string inFcnLabel, TjStuff& tjs, PFPStruct& pfp, ShowerStruct3D& ss3,
bool prt);
68 bool WrongSplitTj(std::string inFcnLabel, TjStuff& tjs, Trajectory& tj,
unsigned short tjEnd, ShowerStruct&
ss,
bool prt);
69 bool IsShowerLike(
const TjStuff& tjs,
const std::vector<int> TjIDs);
70 float InShowerProb(
const TjStuff& tjs,
const ShowerStruct3D& ss3,
const PFPStruct& pfp);
71 float InShowerProb(
const TjStuff& tjs,
const ShowerStruct&
ss,
const Trajectory& tj);
72 void ShowerParams(
double showerEnergy,
double& shMaxAlong,
double& shE95Along);
76 double InShowerProb(
double showerEnergy,
double along,
double trans);
77 float ParentFOM(std::string inFcnLabel, TjStuff& tjs, PFPStruct& pfp,
unsigned short pend, ShowerStruct3D& ss3,
bool prt);
78 float ParentFOM(std::string inFcnLabel, TjStuff& tjs, Trajectory& tj,
unsigned short& tjEnd, ShowerStruct&
ss,
float& tp1Sep,
float& vx3Score,
bool prt);
79 void DefineEnvelope(std::string inFcnLabel, TjStuff& tjs, ShowerStruct&
ss,
bool prt);
81 bool AddLooseHits(std::string inFcnLabel, TjStuff& tjs,
int cotID,
bool prt);
82 void FindStartChg(std::string inFcnLabel, TjStuff& tjs,
int cotID,
bool prt);
83 std::vector<float>
StartChgVec(TjStuff& tjs,
int cotID,
bool prt);
84 void DumpShowerPts(std::string inFcnLabel, TjStuff& tjs,
int cotID);
87 void FindCots(std::string inFcnLabel, TjStuff& tjs,
const CTP_t& inCTP,
std::vector<std::vector<int>>& tjLists,
bool prt);
89 void FindNearbyTjs(std::string inFcnLabel, TjStuff& tjs, ShowerStruct&
ss,
bool prt);
90 void AddCloseTjsToList(std::string inFcnLabel, TjStuff& tjs,
unsigned short itj, std::vector<int> list);
94 void MergeOverlap(std::string inFcnLabel, TjStuff& tjs,
const CTP_t& inCTP,
bool prt);
98 int MergeShowers(std::string inFcnLabel, TjStuff& tjs, std::vector<int> showerIDs,
bool prt);
99 bool MergeShowersAndStore(std::string inFcnLabel, TjStuff& tjs,
int icotID,
int jcotID,
bool prt);
101 float ShowerEnergy(
const TjStuff& tjs,
const std::vector<int> tjIDs);
103 PFPStruct
CreateFakePFP(
const TjStuff& tjs,
const ShowerStruct3D& ss3);
104 bool StoreShower(std::string inFcnLabel, TjStuff& tjs, ShowerStruct3D& ss3);
105 bool StoreShower(std::string inFcnLabel, TjStuff& tjs, ShowerStruct&
ss);
107 ShowerStruct
CreateSS(TjStuff& tjs,
CTP_t inCTP,
const std::vector<int>& tjl);
108 bool ChkAssns(std::string inFcnLabel, TjStuff& tjs);
110 void Print2DShowers(std::string someText,
const TjStuff& tjs,
CTP_t inCTP,
bool printKilledShowers);
111 void PrintShower(std::string someText,
const TjStuff& tjs,
const ShowerStruct&
ss,
bool printHeader,
bool printExtras);
116 #endif // ifndef TRAJCLUSTERALGSHOWERS_H bool TransferTjHits(TjStuff &tjs, bool prt)
bool FindParent(std::string inFcnLabel, TjStuff &tjs, ShowerStruct3D &ss3, bool prt)
void MakeShowerObsolete(std::string inFcnLabel, TjStuff &tjs, ShowerStruct3D &ss3, bool prt)
bool AddPFP(std::string inFcnLabel, TjStuff &tjs, int pID, ShowerStruct3D &ss3, bool doUpdate, bool prt)
void MergeShowerChain(std::string inFcnLabel, TjStuff &tjs, const CTP_t &inCTP, bool prt)
bool AddTjsInsideEnvelope(std::string inFcnLabel, TjStuff &tjs, ShowerStruct &ss, bool prt)
void MergeOverlap(std::string inFcnLabel, TjStuff &tjs, const CTP_t &inCTP, bool prt)
bool AddTj(std::string inFcnLabel, TjStuff &tjs, int tjID, ShowerStruct &ss, bool doUpdate, bool prt)
void MergeNearby2DShowers(std::string inFcnLabel, TjStuff &tjs, const CTP_t &inCTP, bool prt)
bool MergeShowersAndStore(std::string inFcnLabel, TjStuff &tjs, int icotID, int jcotID, bool prt)
void Print2DShowers(std::string someText, const TjStuff &tjs, CTP_t inCTP, bool printKilledShowers)
double InShowerProbLong(double showerEnergy, double along)
std::vector< float > StartChgVec(TjStuff &tjs, int cotID, bool prt)
bool RemovePFP(std::string inFcnLabel, TjStuff &tjs, PFPStruct &pfp, ShowerStruct3D &ss3, bool doUpdate, bool prt)
bool ChkAssns(std::string inFcnLabel, TjStuff &tjs)
void ConfigureMVA(TjStuff &tjs, std::string fMVAShowerParentWeights)
bool Reconcile3D(std::string inFcnLabel, TjStuff &tjs, const geo::TPCID &tpcid, bool parentSearchDone, bool prt)
double ShowerEnergy(const ShowerStruct3D &ss3)
bool SetParent(std::string inFcnLabel, TjStuff &tjs, PFPStruct &pfp, ShowerStruct3D &ss3, bool prt)
void KillVerticesInShower(std::string inFcnLabel, TjStuff &tjs, ShowerStruct &ss, bool prt)
bool FindShowerStart(TjStuff &tjs, ShowerStruct3D &ss3, bool prt)
double InShowerProbTrans(double showerEnergy, double along, double trans)
float Match3DFOM(std::string inFcnLabel, TjStuff &tjs, ShowerStruct3D &ss3, bool prt)
void MergeTjList(std::vector< std::vector< int >> &tjList)
double ShowerParamTransRMS(double showerEnergy, double along)
bool IsShowerLike(const TjStuff &tjs, const std::vector< int > TjIDs)
bool WrongSplitTj(std::string inFcnLabel, TjStuff &tjs, Trajectory &tj, unsigned short tjEnd, ShowerStruct &ss, bool prt)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void DefineEnvelope(std::string inFcnLabel, TjStuff &tjs, ShowerStruct &ss, bool prt)
bool RemoveTj(std::string inFcnLabel, TjStuff &tjs, int TjID, ShowerStruct &ss, bool doUpdate, bool prt)
void FindCots(std::string inFcnLabel, TjStuff &tjs, const CTP_t &inCTP, std::vector< std::vector< int >> &tjLists, bool prt)
bool UpdateShower(std::string inFcnLabel, TjStuff &tjs, ShowerStruct &ss, bool prt)
void MergeSubShowers(std::string inFcnLabel, TjStuff &tjs, const CTP_t &inCTP, bool prt)
PFPStruct CreateFakePFP(const TjStuff &tjs, const ShowerStruct3D &ss3)
void ReverseShower(std::string inFcnLabel, TjStuff &tjs, ShowerStruct &ss, bool prt)
bool StoreShower(std::string inFcnLabel, TjStuff &tjs, ShowerStruct3D &ss3)
float ParentFOM(std::string inFcnLabel, TjStuff &tjs, PFPStruct &pfp, unsigned short pend, ShowerStruct3D &ss3, bool prt)
void DefineDontCluster(TjStuff &tjs, const geo::TPCID &tpcid, bool prt)
int GetCotID(TjStuff &tjs, int ShowerTjID)
void PrintShower(std::string someText, const TjStuff &tjs, const ShowerStruct &ss, bool printHeader, bool printExtras)
The data type to uniquely identify a TPC.
bool DontCluster(const TjStuff &tjs, const std::vector< int > &tjlist1, const std::vector< int > &tjlist2)
Definition of data types for geometry description.
void MergeTjList2(std::string inFcnLabel, TjStuff &tjs, std::vector< std::vector< int >> &tjList, bool prt)
bool MergeShowerTjsAndStore(TjStuff &tjs, unsigned short istj, unsigned short jstj, bool prt)
ShowerStruct3D CreateSS3(TjStuff &tjs, const geo::TPCID &tpcid)
void FindNearbyTjs(std::string inFcnLabel, TjStuff &tjs, ShowerStruct &ss, bool prt)
void ShowerParams(double showerEnergy, double &shMaxAlong, double &along95)
void PrintShowers(std::string fcnLabel, TjStuff &tjs)
void DumpShowerPts(TjStuff &tjs, int cotID)
bool AddLooseHits(TjStuff &tjs, int cotID, bool prt)
void Finish3DShowers(TjStuff &tjs)
ShowerStruct CreateSS(TjStuff &tjs, CTP_t inCTP, const std::vector< int > &tjl)
bool CompleteIncompleteShower(std::string inFcnLabel, TjStuff &tjs, ShowerStruct3D &ss3, bool prt)
float ChgToMeV(float chg)
void Match2DShowers(std::string inFcnLabel, TjStuff &tjs, const geo::TPCID &tpcid, bool prt)
int MergeShowers(std::string inFcnLabel, TjStuff &tjs, std::vector< int > ssIDs, bool prt)
void MergeSubShowersTj(std::string inFcnLabel, TjStuff &tjs, const CTP_t &inCTP, bool prt)
bool AnalyzeRotPos(std::string inFcnLabel, TjStuff &tjs, ShowerStruct &ss, bool prt)
void FindStartChg(std::string inFcnLabel, TjStuff &tjs, int cotID, bool prt)
bool FindShowers3D(TjStuff &tjs, const geo::TPCID &tpcid)
float InShowerProb(const TjStuff &tjs, const ShowerStruct3D &ss3, const PFPStruct &pfp)
void TagShowerLike(std::string inFcnLabel, TjStuff &tjs, const CTP_t &inCTP)
void AddCloseTjsToList(TjStuff &tjs, unsigned short itj, std::vector< int > list)