lcsim/src/org/lcsim/event/base
diff -u -r1.1 -r1.2
--- BaseReconstructedParticle.java 25 Mar 2006 00:37:03 -0000 1.1
+++ BaseReconstructedParticle.java 25 Mar 2006 20:45:56 -0000 1.2
@@ -3,7 +3,7 @@
*
* Created on March 24, 2006, 9:30 AM
*
- * $Id: BaseReconstructedParticle.java,v 1.1 2006/03/25 00:37:03 ngraf Exp $
+ * $Id: BaseReconstructedParticle.java,v 1.2 2006/03/25 20:45:56 ngraf Exp $
*/
package org.lcsim.event.base;
@@ -173,7 +173,7 @@
/**
* Add a ParticleID object.
* @see ParticleID
- * @param pid
+ * @param pid The ParticleID to associate with this ReconstructedParticle
*/
public void addParticleID(ParticleID pid)
{
@@ -183,7 +183,7 @@
/**
* Add a particle that has been used to create this particle.
- * @param particle
+ * @param particle A ReconstructedParticle which contributes to this ReconstructedParticle.
*/
// TODO make sure kinematics of this particle are also updated
public void addParticle(ReconstructedParticle particle)
@@ -193,7 +193,7 @@
/**
* Add a cluster that has been used to create this particle.
- * @param cluster
+ * @param cluster A Cluster which contributes to this ReconstructedParticle.
*/
// TODO make sure kinematics of this particle are also updated
public void addCluster(Cluster cluster)
@@ -203,7 +203,7 @@
/**
* Add a track that has been used to create this particle.
- * @param track
+ * @param track A Track which contributes to this ReconstructedParticle.
*/
// TODO make sure kinematics of this particle are also updated
public void addTrack(Track track)
@@ -211,8 +211,12 @@
_tracks.add(track);
}
- /**Returns this particle's momentum and energy as a four vector
+ /**
+ * Returns this particle's momentum and energy as a four vector
+ * @return The four vector representation of this ReconstructedParticle.
*/
+ // TODO fix this so that adding tracks or clusters or ReconstructedParticle
+ // either updates the four-vector, or it can be set independently.
public HepLorentzVector asFourVector()
{
return _fourVec;
lcsim/src/org/lcsim/event/base
diff -u -r1.1 -r1.2
--- BaseTrackerHit.java 25 Mar 2006 00:37:04 -0000 1.1
+++ BaseTrackerHit.java 25 Mar 2006 20:45:56 -0000 1.2
@@ -3,7 +3,7 @@
*
* Created on March 24, 2006, 9:22 AM
*
- * $Id: BaseTrackerHit.java,v 1.1 2006/03/25 00:37:04 ngraf Exp $
+ * $Id: BaseTrackerHit.java,v 1.2 2006/03/25 20:45:56 ngraf Exp $
*/
package org.lcsim.event.base;
@@ -114,8 +114,8 @@
//TrackerHit interface
/**
- * The hit position in [mm].
- * @return
+ * The (x,y,z) hit position in [mm].
+ * @return the cartesian position of this point.
*/
public double[] getPosition()
{
@@ -123,8 +123,8 @@
}
/**
- * Covariance of the position (x,y,z)
- * @return
+ * Covariance of the position (x,y,z) as a 6 element array.
+ * @return the packed covariance matrix
*/
public double[] getCovMatrix()
{
@@ -132,8 +132,8 @@
}
/**
- * The dE/dx of the hit in [GeV].
- * @return
+ * The energy deposited by this hit in [GeV].
+ * @return the energy deposit associated with this hit.
*/
public double getdEdx()
{
@@ -141,8 +141,9 @@
}
/**
- * The time of the hit in [ns].
- * @return
+ * The time of the hit in [ns]. By convention, the earliest time of
+ * energy deposition is used if this is a composite hit.
+ * @return the time of this hit.
*/
public double getTime()
{
@@ -153,8 +154,9 @@
* Type of hit. Mapping of integer types to type names
* through collection parameters "TrackerHitTypeNames"
* and "TrackerHitTypeValues".
- * @return
+ * @return the integer type of this hit.
*/
+ // TODO define what this type is.
public int getType()
{
return _type;
@@ -164,7 +166,7 @@
/**
* The raw data hits.
* Check getType() to get actual data type.
- * @return
+ * @return the list of raw hits which contribute to this hit.
*/
public List getRawHits()
{
lcsim/src/org/lcsim/event/base
diff -u -r1.1 -r1.2
--- BaseTrack.java 25 Mar 2006 06:22:41 -0000 1.1
+++ BaseTrack.java 25 Mar 2006 20:45:56 -0000 1.2
@@ -3,7 +3,7 @@
*
* Created on March 24, 2006, 9:18 PM
*
- * $Id: BaseTrack.java,v 1.1 2006/03/25 06:22:41 ngraf Exp $
+ * $Id: BaseTrack.java,v 1.2 2006/03/25 20:45:56 ngraf Exp $
*/
package org.lcsim.event.base;
@@ -43,57 +43,94 @@
// add following setters for subclasses.
- public void setCharge(int charge)
- {
- _charge = charge;
- }
-
// TODO replace this with a SpacePoint
+ /**
+ * Set the reference point for this track. By default it is (0,0,0).
+ * By definition, DCA, etc. is measured with respect to this point.
+ * @param point The (x,y,z) reference point for this track.
+ */
public void setReferencePoint(double[] point)
{
_refPoint = point;
}
+ /**
+ * Sets whether the reference point is the distance of closest
+ * approach to the origin.
+ * @param isDCA true if the reference point is the dca.
+ */
+ // TODO clarify this.
public void setRefPointIsDCA(boolean isDCA)
{
_refPointIsDCA = isDCA;
}
- public void setMomentum( double[] p)
- {
- _momentum = p;
- }
-
+ /**
+ * If the track has been successfully set, this should be set.
+ * Should only be set if the results of the fit are also set.
+ * Should encapsulate all this in a Fit object.
+ * False by default.
+ * @param success true if the track has successfully been set.
+ */
public void setFitSuccess( boolean success)
{
_fitSuccess = success;
}
+ /**
+ * Set the track parameters.
+ * @see Track.Parameters
+ * @param params The array of track parameters.
+ */
public void setTrackParameters(double[] params)
{
_parameters = params;
}
+ /**
+ * Set the covariance matrix for the track parameters.
+ * @param cov The covariance matrix as a double array.
+ */
+ // TODO replace this with Matrix
public void setCovarianceMatrix( double[][] cov)
{
_covMatrix = cov;
}
+ /**
+ * Set the chi-squared for the track fit.
+ * Not defined whether this is the full or reduced chi-squared.
+ * @param chisq The value of the track fit chi-squared.
+ */
+ // TODO verify if this is full or reduced chi-squared.
public void setChisq( double chisq)
{
_chi2 = chisq;
}
+ /**
+ * Set the number of degrees of freedom for this track fit.
+ * @param n The number of degrees of freedom for this track fit.
+ */
public void setNDF( int n)
{
_ndf = n;
}
+ /**
+ * Set the track type. Note that this is still undefined.
+ * @param type The track type
+ */
+ // TODO define this. replace int by enumeration.
public void setTrackType(int type)
{
_type = type;
}
+ /**
+ * Add a hit to this track.
+ * @param hit The TrackerHit to add to this track.
+ */
public void addHit(TrackerHit hit)
{
_hits.add(hit);
@@ -106,6 +143,10 @@
_dEdx += hit.getdEdx();
}
+ /**
+ * Add a list of hits to this track.
+ * @param hits The list of TrackerHits to add to this track.
+ */
public void addHits(List<TrackerHit> hits)
{
_hits.addAll(hits);
@@ -124,101 +165,209 @@
// TODO add convenience methods to replace clunky interface
// Track interface
+ /**
+ * The charge of the particle creating this track in units of the electron charge.
+ * @return The charge of the track.
+ */
public int getCharge()
{
return _charge;
}
+ /**
+ * Return the reference point of this track. Need to clarigy whether this is a point
+ * on the track or not.
+ * @return The reference point for this track.
+ */
+ // TODO augment this with a SpacePoint.
public double[] getReferencePoint()
{
return _refPoint;
}
+ /**
+ * Return the x position of the reference point for this track.
+ * @return The x position of the reference point for this track.
+ */
public double getReferencePointX()
{
return _refPoint[0];
}
+ /**
+ * Return the y position of the reference point for this track.
+ * @return The y position of the reference point for this track.
+ */
public double getReferencePointY()
{
return _refPoint[1];
}
+ /**
+ * Return the z position of the reference point for this track.
+ * @return The z position of the reference point for this track.
+ */
public double getReferencePointZ()
{
return _refPoint[2];
}
+ /**
+ * Is the reference point for this track the DCA? This needs clarification
+ * @return true if the reference point is the dca.
+ */
+ // TODO clarify what this means.
public boolean isReferencePointPCA()
{
return false;
}
+ /**
+ * The cartesian momentum for this track (px, py, pz)
+ * @return The momentum of this track.
+ */
public double[] getMomentum()
{
return _momentum;
}
+ /**
+ * The x component of the momentum of this track.
+ * @return The x component of the momentum of this track.
+ */
public double getPX()
{
return _momentum[0];
}
+ /**
+ * The y component of the momentum of this track.
+ * @return The y component of the momentum of this track.
+ */
public double getPY()
{
return _momentum[1];
}
+ /**
+ * The z component of the momentum of this track.
+ * @return The z component of the momentum of this track.
+ */
public double getPZ()
{
return _momentum[2];
}
+ /**
+ * Return whether the track was successfully fit.
+ * @return true if this track was successfully fir.
+ */
public boolean fitSuccess()
{
return _fitSuccess;
}
+ /**
+ * Return an individual track parameter
+ *@see Track.Parameter
+ * @param i the index of the track parameter desired
+ * @return The value of the ith track parameter
+ */
public double getTrackParameter(int i)
{
return _parameters[i];
}
+ /**
+ * Return the track parameters.
+ *@see Track.Parameter
+ * @return The track parameters.
+ */
public double[] getTrackParameters()
{
return _parameters;
}
+ /**
+ * Return an individual element of the track covariance matrix.
+ * @param i the ith element of the covariance matrix(i,j)
+ * @param j the jth element of the covariance matrix(i,j)
+ * @return The covariance matrix element at (i,j).
+ */
public double getErrorMatrixElement(int i, int j)
{
return _covMatrix[i][j];
}
+ /**
+ *Return the track covariance matrix.
+ * @return the track covariance matrix as an array.
+ */
public double[][] getErrorMatrix()
{
return _covMatrix;
}
+ /**
+ * The track fit chi-squared.
+ * @return The chi-squared of the track fit.
+ */
public double getChi2()
{
return _chi2;
}
+ /**
+ * The number of degrees of freedom in the track fit.
+ * @return The number of degrees of freedom in the track fit.
+ */
public int getNDF()
{
return _ndf;
}
+ /**
+ * The ionization associated with this track.
+ * @return the energy deposited along this track in GeV.
+ */
public double getdEdx()
{
return _dEdx;
}
+ /**
+ * The uncertainty on the ionization associated with this track.
+ * @return The uncertainty on the ionization associated with this track.
+ */
public double getdEdxError()
{
return _dEdxErr;
}
+ /**
+ * The innermost radius of a hit on this track. For values smaller than this
+ * the track must be, or has been, extrapolated.
+ * @return The innermost radius of a hit on this track.
+ */
+ // TODO verify that this is in global coordinates, not wrt reference point.
public double getRadiusOfInnermostHit()
{
return _innermostHitRadius;
}
+ /**
+ * The ids of the subdetectors hit by this track. Not yet defined.
+ * @return a list of integers representing the subdetector ids hit by this track.
+ */
+ // TODO establish what this means.
public int[] getSubdetectorHitNumbers()
{
return _subdetId;
}
+ /**
+ * If this is a composite track, return a list of constituent tracks.
+ * @return the list of individual tracks of which this track is composed.
+ */
public List<Track> getTracks()
{
return _tracks;
}
+ /**
+ * Return the list of tracker hits of which this track is composed.
+ * @return the list of hits on this track.
+ */
public List<TrackerHit> getTrackerHits()
{
return _hits;
}
+ /**
+ * Return the type of this track. Not yet defined.
+ * @return an integer representation of the type of this track.
+ */
+ // TODO define what this means.
public int getType()
{
return _type;