Skip to content

Vertex Reconstruction Update#385

Open
flemmons wants to merge 21 commits into
ANNIEsoft:Applicationfrom
flemmons:Application
Open

Vertex Reconstruction Update#385
flemmons wants to merge 21 commits into
ANNIEsoft:Applicationfrom
flemmons:Application

Conversation

@flemmons
Copy link
Copy Markdown
Contributor

Describe your changes

-Removed some experimental functions from FoMCalculator, which are no longer needed.
-Simplified the flow slightly of FoMCalculator's vtxtime handling
-fixed a typo in Position class, which returned a double-cosine, rather than the angle as intended
-Added parent-particle handling in RecoDigit class and corresponding tools, for when parent information is available
-Added ClassicalEnergyReco tool
-expanded hit collection in DigitBuilder for use with a variable window.
-Added waveform simulation handling in DigitBuilder tool
-Added second-run handling in EventSelector, so different cuts can be made at different points in the toolchain when needed
-Added ClusterSingleRing and LAPPDMult cuts to EventSelector tool
-fixed RecoMRDCut in EventSelectorTool
-Added ability to change LikelihoodFitterCheck between position- and direction- sweep modes to check different vertexing variable behaviors
-Updated NeutronCheck tool with more cluster parameters, along with true neutron capture information
-allowed handling of inactive PMTs in PMTWaveformsim. Currently ignores them, and records the number of active detectors
-Added some event selection and RecoCluster handling in VtxSeedFineGrid tool
-Removed redundant finegrid creation in VtxSeedGenerator tool
-Added energy reconstruction to MC neutron multiplicity toolchain using ClassicalEnergyReco tool
-Added PMT waveform simulator to MC neutron multiplicity toolchain

Checklist before submitting your PR

  • This PR implements a single change (one new/modified Tool, or a set of changes to implement one new/modified feature)
  • This PR alters the minimum number of files to affect this change
  • If this PR includes a new Tool, a README and minimal demonstration ToolChain is provided
  • If a new Tool/ToolChain requires model or configuration files, their paths are not hard-coded, and means of generating those files is described in the readme, with examples provided on /pnfs/annie/persistent
  • For every new usage, there is a reason the data must be on the heap
  • For every new there is a delete, unless I explicitly know why (e.g. ROOT or a BoostStore takes ownership)

Additional Material

Attach any validation or demonstration files here. You may also link to relavant docdb articles.

flemmons and others added 21 commits October 27, 2025 15:49
…ClusterFinder's corresponding functions

--Added some extra features, such as hit LAPPD count and strip-by-strip LAPPD hits.
-Added ClusterSearcher to replace ClusterFinder using RecoDigit and RecoCluster classes
-Updated RecoDigit and RecoCluster classes for corresponding use and new features, such as various cluster parameters
-Added NeutronCheck tool as output for RecoCluster information
-Added sample toolchain configfolder for using the new tools
-Changed RecoCluster and RecoDigit lists in several tools to be vectors of objects, rather than vectors of pointers, to avoid memory complications
-removed unused convex hull function from RecoCluster class
-simplified CalcAS function in RecoCluster class by consolidating for loops
-removed several instances of commented-out code from older versions
-removed several debug outputs
-altered hard-coded time window values in several instances to rely on configuration input
-added use of the true Q2 value from the GenieInfo store to NeutronCheck's output.
-removed several uncontrolled cout lines, and replaced useful ones with Log.
-Tidied the Instance() function of ClusterSearcher
-Added vertex information to NeutronCheck
… nor memory-safe with recent changes to RecoDigit storage.
…ctorConfig

-removed unhelpful forced loop end from single-pe gains extraction in ClusterSearcher::Initialize()
-changed Genie version in ClusterSearcher/LoadGenieEventConfig to 1
-replaced all instances of fClusterList with fRecoClusters in ClusterSearcher
-changed ClusterSearcher::RecoClusters() to a void function, since it was returning a member pointer to itself
-removed ClusterSearcher::SelectByClusters(), which is not used
…stimation based on reconstructed vertex and MRD track. Also highlights the reconstructed transverse momentum.
Copy link
Copy Markdown
Collaborator

@marc1uk marc1uk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not bad overall, a few things to fix. Please do double check those two PRs aren't being clobbered accidentally.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a data file that should be stored externally and referenced by path



bool ClassicalEnergyReco::Execute(){
cout<<"ClassicCheck"<<endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbosity

for (int i = 0; i < fClusterList->size(); i++) {
if (fClusterList->at(i).GetClusterMode() == 1 && fClusterList->at(i).GetTime() < 10000 && fClusterList->at(i).GetNDigits() > 0) { //Todo: Set Time Window in config
max_pe=fClusterList->at(i).GetCharge();
muonClusterIndex = i;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these variables neeed to be reset before this loop? How do you prevent values from a previous Execute getting carried over if no clusters in this event pass this criteria?

return false;
}

recoVtxX=recoVertex->GetPosition().X()/152;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is 152? can we define a named constant rather than use magic number? i'm guessing its tank radius - in which case it ought to be retrieved from the geomtery.



double a=pow(recoDirX,2)+pow(recoDirZ,2);
cout<<"Classica: "<<a<<endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbosities

cout<<"check1"<<fClusterList->at(i).GetNDigits()<<", "<<fClusterList->at(i).GetDigitList().size() << endl;
fClusterList->at(i).Print();
if(fClusterList->at(i).GetClusterMode()==1 && fClusterList->at(i).GetTime()<10000 && fClusterList->at(i).GetNDigits()>0) { //Todo: Set Time Window in config
cout<<"check2 "<<fClusterList->at(i).GetDigitList().size()<<endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbosity

}
vector<RecoDigit> tempDigitList;
for (int i = 0; i < fClusterList->size(); i++) {
cout << "check1" << fClusterList->at(i).GetNDigits() << ", " << fClusterList->at(i).GetDigitList().size() << endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbosity

int currentLAPPD = 0;

int iStripHit = 0;
std::cout << "VGCheck entering for loop\n";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbosity

Log("VGCheck: Digit's time, delta, ltrack, lphoton: "+to_string(digitT)+", "+to_string(myvtxgeo->GetDelta(n))+", "+to_string(myvtxgeo->GetDistTrack(n))+", "+to_string(myvtxgeo->GetDistPhoton(n)),v_debug,verbosity);
if (myvtxgeo->GetDigitType(n) == RecoDigit::lappd_v0) flappdtimesmear->Fill(Parameters::TimeResolution(RecoDigit::lappd_v0, myvtxgeo->GetDigitQ(n)));
if (myvtxgeo->GetDigitType(n) == RecoDigit::PMT8inch) fpmttimesmear->Fill(Parameters::TimeResolution(RecoDigit::PMT8inch, myvtxgeo->GetDigitQ(n)));
std::cout << "VGCheck " << n << endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbosity

}
StripHits1->Fill(fDigitList->at(n).GetPosition().X(), fDigitList->at(n).GetCalTime() * 1000/*, fDigitList->at(n).GetCalCharge()*/);
iStripHit++;
std::cout << "VGCheck striphit";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbosity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants