slaclab / lcsim

LCSim Java Library
Other
1 stars 5 forks source link

Add extra constructor to BaseTrackState #9

Closed mdiamon closed 5 years ago

mdiamon commented 7 years ago

I'd like to add an extra constructor to BaseTrackState.java , which takes only one parameter: public BaseTrackState(int location) { _location = location; } This would allow me to create "dummy" TrackStates with location -1, to represent unhit sensors in List. Setting the location to -1 is OK everywhere except in BaseTrackState.SetLocation(), which is called by the BaseTrackState constructors and requires the location to be 0 to 5; the extra constructor bypasses this check.

JeremyMcCormick commented 7 years ago

Resolved by PR #10.

mdiamon commented 7 years ago

Unfortunately we do need to change the SetLocation() to allow -1, because it gets called when recreating TrackStates from lcio files being read back in by certain hps-java tools.