9 #ifndef TRAJCLUSTERALGSHOWERS_H
10 #define TRAJCLUSTERALGSHOWERS_H
20 class DetectorPropertiesData;
33 bool Reconcile3D(std::string inFcnLabel, TCSlice& slc,
bool parentSearchDone,
bool prt);
34 bool Reconcile3D(std::string inFcnLabel, TCSlice& slc, ShowerStruct3D& ss3,
bool prt);
37 int GetCotID(TCSlice& slc,
int ShowerTjID);
43 void Match2DShowers(std::string inFcnLabel, TCSlice& slc,
bool prt);
44 bool UpdateShower(std::string inFcnLabel, TCSlice& slc, ShowerStruct& ss,
bool prt);
45 bool UpdateShower(std::string inFcnLabel, TCSlice& slc, ShowerStruct3D& ss3,
bool prt);
47 std::string inFcnLabel,
53 std::string inFcnLabel,
60 std::string inFcnLabel,
64 void MakeShowerObsolete(std::string inFcnLabel, TCSlice& slc, ShowerStruct3D& ss3,
bool prt);
65 void MakeShowerObsolete(std::string inFcnLabel, TCSlice& slc, ShowerStruct& ss,
bool prt);
66 bool DontCluster(TCSlice& slc,
const std::vector<int>& tjlist1,
const std::vector<int>& tjlist2);
74 bool AddPFP(std::string inFcnLabel,
86 bool AddTj(std::string inFcnLabel,
92 bool RemoveTj(std::string inFcnLabel,
98 bool AnalyzeRotPos(std::string inFcnLabel, TCSlice& slc, ShowerStruct& ss,
bool prt);
99 void ReverseShower(std::string inFcnLabel, TCSlice& slc, ShowerStruct& ss,
bool prt);
100 void ReverseShower(std::string inFcnLabel, TCSlice& slc,
int cotID,
bool prt);
102 std::string inFcnLabel,
107 std::string inFcnLabel,
115 unsigned short tjEnd,
118 bool IsShowerLike(TCSlice& slc,
const std::vector<int> TjIDs);
119 float InShowerProb(TCSlice& slc,
const ShowerStruct3D& ss3,
const PFPStruct& pfp);
120 float InShowerProb(TCSlice& slc,
const ShowerStruct& ss,
const Trajectory& tj);
121 void ShowerParams(
double showerEnergy,
double& shMaxAlong,
double& shE95Along);
125 double InShowerProb(
double showerEnergy,
double along,
double trans);
135 unsigned short& tjEnd,
140 void DefineEnvelope(std::string inFcnLabel, TCSlice& slc, ShowerStruct& ss,
bool prt);
142 bool AddLooseHits(std::string inFcnLabel, TCSlice& slc,
int cotID,
bool prt);
143 void FindStartChg(std::string inFcnLabel, TCSlice& slc,
int cotID,
bool prt);
144 std::vector<float>
StartChgVec(TCSlice& slc,
int cotID,
bool prt);
145 void DumpShowerPts(std::string inFcnLabel, TCSlice& slc,
int cotID);
147 void FindCots(std::string inFcnLabel,
153 void FindNearbyTjs(std::string inFcnLabel, TCSlice& slc, ShowerStruct& ss,
bool prt);
157 std::vector<int>
list);
164 void MergeOverlap(std::string inFcnLabel, TCSlice& slc,
const CTP_t& inCTP,
bool prt);
168 int MergeShowers(std::string inFcnLabel, TCSlice& slc, std::vector<int> showerIDs,
bool prt);
169 bool MergeShowersAndStore(std::string inFcnLabel, TCSlice& slc,
int icotID,
int jcotID,
bool prt);
171 float ShowerEnergy(TCSlice& slc,
const std::vector<int> tjIDs);
174 bool StoreShower(std::string inFcnLabel, TCSlice& slc, ShowerStruct3D& ss3);
175 bool StoreShower(std::string inFcnLabel, TCSlice& slc, ShowerStruct& ss);
177 ShowerStruct
CreateSS(TCSlice& slc,
const std::vector<int>& tjl);
178 bool ChkAssns(std::string inFcnLabel, TCSlice& slc);
180 std::string someText,
182 void Print2DShowers(std::string someText, TCSlice& slc,
CTP_t inCTP,
bool printKilledShowers);
185 const ShowerStruct& ss,
191 #endif // ifndef TRAJCLUSTERALGSHOWERS_H
bool AddTj(std::string inFcnLabel, TCSlice &slc, int tjID, ShowerStruct &ss, bool doUpdate, bool prt)
bool TransferTjHits(TCSlice &slc, bool prt)
void MergeNearby2DShowers(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP, bool prt)
void ConfigureMVA(TCConfig &tcc, std::string fMVAShowerParentWeights)
bool FindParent(detinfo::DetectorPropertiesData const &detProp, std::string inFcnLabel, TCSlice &slc, ShowerStruct3D &ss3, bool prt)
void ReverseShower(std::string inFcnLabel, TCSlice &slc, ShowerStruct &ss, bool prt)
void MergeShowerChain(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP, bool prt)
double InShowerProbLong(double showerEnergy, double along)
bool ChkAssns(std::string inFcnLabel, TCSlice &slc)
ShowerStruct3D CreateSS3(TCSlice &slc)
void PrintShowers(detinfo::DetectorPropertiesData const &detProp, std::string fcnLabel, TCSlice &slc)
int GetCotID(TCSlice &slc, int ShowerTjID)
void PrintShower(std::string someText, TCSlice &slc, const ShowerStruct &ss, bool printHeader, bool printExtras)
bool WrongSplitTj(std::string inFcnLabel, TCSlice &slc, Trajectory &tj, unsigned short tjEnd, ShowerStruct &ss, bool prt)
void KillVerticesInShower(std::string inFcnLabel, TCSlice &slc, ShowerStruct &ss, bool prt)
bool FindShowers3D(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc)
double ShowerEnergy(const ShowerStruct3D &ss3)
float ParentFOM(std::string inFcnLabel, TCSlice &slc, PFPStruct &pfp, unsigned short pend, ShowerStruct3D &ss3, bool prt)
bool IsShowerLike(TCSlice &slc, const std::vector< int > TjIDs)
double InShowerProbTrans(double showerEnergy, double along, double trans)
bool FindShowerStart(detinfo::DetectorPropertiesData const &detProp, TCSlice &slc, ShowerStruct3D &ss3, bool prt)
ShowerStruct CreateSS(TCSlice &slc, const std::vector< int > &tjl)
bool AddLooseHits(TCSlice &slc, int cotID, bool prt)
bool DontCluster(TCSlice &slc, const std::vector< int > &tjlist1, const std::vector< int > &tjlist2)
void MergeTjList(std::vector< std::vector< int >> &tjList)
double ShowerParamTransRMS(double showerEnergy, double along)
void AddCloseTjsToList(TCSlice &slc, unsigned short itj, std::vector< int > list)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void DefineEnvelope(std::string inFcnLabel, TCSlice &slc, ShowerStruct &ss, bool prt)
void FindCots(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP, std::vector< std::vector< int >> &tjLists, bool prt)
void MergeSubShowersTj(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP, bool prt)
void DumpShowerPts(TCSlice &slc, int cotID)
float InShowerProb(TCSlice &slc, const ShowerStruct3D &ss3, const PFPStruct &pfp)
bool MergeShowerTjsAndStore(TCSlice &slc, unsigned short istj, unsigned short jstj, bool prt)
void TagShowerLike(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP)
void FindNearbyTjs(std::string inFcnLabel, TCSlice &slc, ShowerStruct &ss, bool prt)
void MergeOverlap(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP, bool prt)
bool AddPFP(std::string inFcnLabel, TCSlice &slc, int pID, ShowerStruct3D &ss3, bool doUpdate, bool prt)
std::vector< float > StartChgVec(TCSlice &slc, int cotID, bool prt)
bool AddTjsInsideEnvelope(std::string inFcnLabel, TCSlice &slc, ShowerStruct &ss, bool prt)
bool MergeShowersAndStore(std::string inFcnLabel, TCSlice &slc, int icotID, int jcotID, bool prt)
bool RemoveTj(std::string inFcnLabel, TCSlice &slc, int TjID, ShowerStruct &ss, bool doUpdate, bool prt)
int MergeShowers(std::string inFcnLabel, TCSlice &slc, std::vector< int > ssIDs, bool prt)
void ShowerParams(double showerEnergy, double &shMaxAlong, double &along95)
void Match2DShowers(std::string inFcnLabel, TCSlice &slc, bool prt)
void DefineDontCluster(TCSlice &slc, bool prt)
void MergeTjList2(std::string inFcnLabel, TCSlice &slc, std::vector< std::vector< int >> &tjList, bool prt)
bool RemovePFP(std::string inFcnLabel, TCSlice &slc, PFPStruct &pfp, ShowerStruct3D &ss3, bool doUpdate, bool prt)
void MergeSubShowers(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP, bool prt)
void FindStartChg(std::string inFcnLabel, TCSlice &slc, int cotID, bool prt)
void Finish3DShowers(TCSlice &slc)
bool AnalyzeRotPos(std::string inFcnLabel, TCSlice &slc, ShowerStruct &ss, bool prt)
float Match3DFOM(detinfo::DetectorPropertiesData const &detProp, std::string inFcnLabel, TCSlice &slc, ShowerStruct3D &ss3, bool prt)
float ChgToMeV(float chg)
bool UpdateShower(std::string inFcnLabel, TCSlice &slc, ShowerStruct &ss, bool prt)
void Print2DShowers(std::string someText, TCSlice &slc, CTP_t inCTP, bool printKilledShowers)
bool CompleteIncompleteShower(std::string inFcnLabel, TCSlice &slc, ShowerStruct3D &ss3, bool prt)
bool SetParent(detinfo::DetectorPropertiesData const &detProp, std::string inFcnLabel, TCSlice &slc, PFPStruct &pfp, ShowerStruct3D &ss3, bool prt)
void MakeShowerObsolete(std::string inFcnLabel, TCSlice &slc, ShowerStruct3D &ss3, bool prt)
bool StoreShower(std::string inFcnLabel, TCSlice &slc, ShowerStruct3D &ss3)
bool Reconcile3D(std::string inFcnLabel, TCSlice &slc, bool parentSearchDone, bool prt)