Skip to content

Conversation

@niwgit
Copy link

@niwgit niwgit commented Oct 29, 2025

This PR includes the geometry and reconstruction for RGH recoil TOF detector.
The reconstruction follows a similar approach as in ATOF.
Running recon-util with engine org.jlab.service.recoiltof.RECOILTOFEngine produces new hipo banks RECOILTOF::hits and RECOILTOF::clusters.

Copy link
Member

@c-dilks c-dilks left a comment

Choose a reason for hiding this comment

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

POM fixes, to be consistent with the current development branch:

c-dilks and others added 2 commits October 29, 2025 12:49
@c-dilks
Copy link
Member

c-dilks commented Oct 29, 2025

Great, now it builds and passes most CI tests, except for dependency analysis. We require POMs to specify exactly what dependencies are needed, no more no less. See errors here: https://github.com/JeffersonLab/coatjava/actions/runs/18916433992/job/54001572954?pr=921#step:7:1699

Usually this is straightforward to fix; see other reconstruction modules' POM files for example dependency XML nodes.

@niwgit
Copy link
Author

niwgit commented Oct 30, 2025

Thanks. Should I just add "Used undeclared dependencies" to the pom.xml and remove "Unused declared dependencies"?

@c-dilks
Copy link
Member

c-dilks commented Oct 30, 2025

Thanks. Should I just add "Used undeclared dependencies" to the pom.xml and remove "Unused declared dependencies"?

Yes, that's usually enough.

@c-dilks
Copy link
Member

c-dilks commented Oct 30, 2025

Sometimes certain dependencies come through transitively too, so you may need to be a bit more precise with specifying what your code really needs. For example, if A depends on B which depends on C, and your code depends on C, you need to specify C as a dependency, not B (even if both cases lead to successful compilation).

@niwgit
Copy link
Author

niwgit commented Oct 30, 2025

What files should I consider when including dependencies? Is that for import statements in reconstruction/recoiltof/src/main/java/org/jlab/service/recoiltof/RECOILTOFEngine.java?

@c-dilks
Copy link
Member

c-dilks commented Oct 30, 2025

What files should I consider when including dependencies? Is that for import statements in reconstruction/recoiltof/src/main/java/org/jlab/service/recoiltof/RECOILTOFEngine.java?

The POM file reconstruction/recoiltof/pom.xml applies to all files within reconstruction/recoiltof/, that is, consider all the imports in all the Java files within that directory.

@niwgit
Copy link
Author

niwgit commented Oct 30, 2025

The java files use "import org.jlab.geom" and "import org.jlab.detector". I used "org.jlab.clas:clas-geometry" and "org.jlab.clas:clas-detector" as dependencies in pom.xml. The compiler says those are unused. What should I change those dependencies to?

Co-authored-by: Christopher Dilks <c-dilks@users.noreply.github.com>
Copy link
Collaborator

@raffaelladevita raffaelladevita left a comment

Choose a reason for hiding this comment

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

To avoid conflicts, the suggested changes should be done after #504 is merged and this fork updated

AHDC (24, "AHDC"),
ATOF (25, "ATOF"),
RECOIL (26, "RECOIL"),
RECOILTOF (27, "RECOILTOF"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

it may be better to use an acronim such as RTOF and, similarly, RTRK for the RECOIL

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest reorganizing these classes under the following directory structure:
.../v2/recoil/tof/RecoilTOFConstants.java
.../v2/recoil/trk/...

Also, if constants are the same in the two detectors, a single class could be used

Copy link
Collaborator

Choose a reason for hiding this comment

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

see the comment above about the directory structure

},
},
{
"name" : "RECOILTOF::tdc",
Copy link
Collaborator

Choose a reason for hiding this comment

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

following the suggested change to DetectorType, this should become RTOF

@@ -0,0 +1,91 @@
[
{
"name": "RECOILTOF::hits",
Copy link
Collaborator

Choose a reason for hiding this comment

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

see the comment above about the name


DataBank hitbank = this.fillRECOILTOFHitBank(event, barHits);
if (hitbank != null) {
event.appendBank(hitbank);
Copy link
Collaborator

Choose a reason for hiding this comment

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

it is more efficient to append both banks at once

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest renaming to RTOFCluster

Copy link
Collaborator

Choose a reason for hiding this comment

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

these constants are already defined in the geometry package and should not be duplicated
units should be cm

Copy link
Collaborator

Choose a reason for hiding this comment

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

To follow preexisting naming conventions, RECOILTOFHit could become RTOFRawHit and BarHit RTOFHit

return true;
}

DataBank bank = event.getBank("RUN::config");
Copy link
Collaborator

Choose a reason for hiding this comment

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

line 41 to 51 are not necessary

@baltzell baltzell added the gemc label Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants