Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The API for the analysis should be as high-level as possible. I would therefore very much appreciate if classes for the vectors and shapes and track parameters could be added. No, they don't need Draw(), Rotate(), Pt() and Streamer components (wink)

The Track

...

I have some nitpicks with this class:

...

Interface

getTrackParameters() should return a small class that contains accessors by name.
getReferencePoint() should return a SpacePoint.

I could actually not find a class that implements the Track interface. event.getTracks clearly returns a List<Track> however. Which Track class is one supposed to use ?
Same thing goes for the Particles. I had a hard time so far finding an implementation.

...

Status codes

The Java language was awarded such a nice enum class. Is there really a performance issue in using ints for status bits or types ?

No Format
/** Type of hit. Mapping of integer types to type names
  * through collection parameters "TrackerHitTypeNames"
  * and "TrackerHitTypeValues".
  */

Examples:

  • the FitStatus class
  • in FtfTrack.java: if ( getPara().szFitFlag == 1 )
    especially the latter class would benefit from using enums or at least symbolic constants, if the author ever wants to hand over maintenance to someone else.

This does not help me at all when I am coding, and I don't want to have a web browser open all the time to see what the type, status, flag, whatever, actually stands for. This is where I would like to take advantage of Code Completion.

...

I disagree with the use of names that have no meaning outside of SLAC.

JavaDoc

The class TrackVector shouldn't have te, tv, td in the Javadoc. This is cryptic. It is actually clearer to browse the source code.

"Overloaded Operators"

It is very confusing to have members like add(Object o1, Object o2) as members of the classes. This is counter-intuitive. Either there ought to be a supporter class with static members only, or the member of the type class expects only one argument.
So:
vec1.add(vec1, vec2) #BAD
vec1.add(vec2) #GOOD
import static x.y.add; add(vec1, vec2); #GOOD

Thank you for your consideration
Jan