I have produced a diagram, which I think is close to what Gary proposes
although not quite identical, and which may (or may not) help to
visualize the relationship between the classes.
The diagram is at:
http://www-sldnt.slac.stanford.edu/jas/documentation/lcd/notes/trackclus
terassociation/
Tony
-----Original Message-----
From: Gary Bower [mailto:[log in to unmask]]
Sent: Monday, March 15, 1999 3:28 PM
To: [log in to unmask]
Subject: track cluster association - corrected version
A framework for track cluster association
3/15/99 - Gary Bower
PREAMBLE
What follows lays out a framework of classes for an OO implementation of
Tracks, Clusters and TrackClusterAssociations. The basic assumption is
that
there will be more than one way available to find tracks, build clusters
and
associate them together. Further it is assumed that one may want to run
more than one of the finders, builders or associators in the same pass
over
the data so the results of two different methods can be compared in
detail.
In fact, the track finders, cluster builders and track-cluster
associator methods
that are currently in the works or at least concretely envisioned are
actually
given preliminary names below. Note that different methods to do a
particular
task may use different kinds of inputs. This in embodied in the Java
abstract
classes with an abstract method for find, build and associate.
At the end is some simple sample syntax to illustrate the usage of the
classes.
The Classes a la Java:
(Caveat: since none of what follows has had the benefit of
a critic by a compiler it probably has many syntactical errors
so if it looks wrong it probably is.)
**********************************************************
TRACKING
public class TrackerHit
public class TrackerHitEnumeration
public class Track
// Track implements LorentzVector with mass initially set to pi
mass.
// Track has error matix to measure "fuzziness"
public class TrackEnumeration
public Interface ITrackFinder
void find()
Track[] getTracks()
public class AbstractTrackFinder implements ITrackFinder
abstract void find()
private Track[] m_track;
Track[] getTracks()
public class MCTrackFinder extends AbstractTrackFinder
// This is the FastMC guy
void find( MCParticleEnumeration e )
private Track[] m_track;
Track[] getTracks()
public class RonanTrackFinder extends AbstractTrackFinder
// This is the Ronan/BaBar version
void find( TrackerHitEnumeration e )
private Track[] m_track;
Track[] getTracks()
*******************************************************
CLUSTERING
public class CalHit
public class Cluster
// Cluster implements LorentzVectors so the 4-momentum can be both
read and set
// For example, you use an initial cluster builder and
assume all clusters are mass 0
// Then you do track-cluster assoc and set the
mass of the clusters with tracks to
pi mass
// Cluster also implements some kind of "fuzziness" descriptors
comparable to the
// Track error matrix. It could be the first few moments in
x-y and the r layer distribution
// of the cal hit energy distribution or both or more.
public class ClusterEnumeration
public Interface IClusterBuilder
void build()
Cluster[] getClusters()
public class AbstractClusterBuilder implements IClusterBuilder
abstract void build()
private Cluster[] m_cluster
public Cluster[] getClusters()
public class MCClusterBuilder extends AbstractClusterBuilder
// This is the FastMC version
private Cluster[] m_cluster
void build( mcParticleEnumeration e )
Cluster[] getClusters()
public class ContiguousClusterBuilder extends AbstractClusterBuilder
// This is the TonyJ version
private Cluster[] m_cluster
void build( calHitEnumeration e )
Cluster[] getClusters()
public class JRBClusterBuilder extends AbstractClusterBuilder
// This is the JRB version
private Cluster[] m_cluster
void build( calHitEnumeration e )
Cluster[] getCluster()
public class NeutralClusterBuilder extends AbstractClusterBuilder
// This guy starts with a previously determined cluster set and
// subtracts out the clusters due to charged tracks
private Cluster[] m_cluster
void build( Track-Cluster Associator tc )
Cluster[] getCluster()
***********************************************************
TRACK-CLUSTER ASSOCIATION
public class TrackClusterDescriptor
Track t
Cluster c
double quality() // overall measure of the association
double cosThNsig() // costheta difference error
double phiNSig() // phi difference error
double pInvNSig() // momentum difference error
public Interface ITrack-Cluster Associator
void associate( TrackEnumeration t, ClusterEnumeration c )
double quality( Track t, Cluster c )
double cosThNsig( Track t, Cluster c )
double phiNSig( Track t, Cluster c )
double pInvNSig( Track t, Cluster c )
Cluster[] assocClus( Track t ) // all clusters associated with t
Track[] assocTrack( Cluster c ) // all tracks associated with c
(question: can array be of length 0? ie how to handle tracks and
clusters that have no associations.)
public abstract class AbstractTrackClusterAssociator implements
ITrackClusterAssociation
abstract void associate( TrackEnumeration t, ClusterEnumeration
c )
private TrackClusterDescriptor[][] m_assoc
double quality( Track t, Cluster c )
double cosThNsig( Track t, Cluster c )
double phiNSig( Track t, Cluster c )
double pInvNSig( Track t, Cluster c )
Cluster[] assocClus( Track t )
Track[] assocTrack( Cluster c )
public class CheaterTrackClusterAssociator extends
AbstractTrackClusterAssociation
// This guy use the MC truth to determine the associations but note
that t and c
// can be from any trackfinder or clusterbuilder
void associate( TrackEnumeration t, ClusterEnumeration c )
etc
public class RonanTrackClusterAssociator extends
AbstractTrackClusterAssociation
// This guy uses the version Mike has written based on track
extrapolation
// and again probably t and c can be from any
trackfinder or clusterbuilder
void associate( TrackEnumeration t, ClusterEnumeration c )
etc
public class CompleteTrackClusterAssociator extends
AbstractTrackClusterAssociation
// This guy makes no cuts, he calculates the qualities and various
nsigs for every
// track and cluster pair. The user gets to make the cuts.
Again probably
// the result of any method of track finding and cluster
building can be used.
void associate( TrackEnumeration t, ClusterEnumeration c )
etc
*************************************************************
USAGE:
typical syntax:
c is a cluster
t is a track
tc is an xxxTrackClusterAssociator
tc.track(c) is an array of tracks associated by tc with cluster c
tc.track(c)[i]is the ith track associated with cluster c by tc
tc.track(c)[i].quality is the quality of the association between c and
the ith track associated with it.
tc.track(c)[i].cosThNSig is the error in CosTheta of the t-c association
tc.cluster(t).[j].phiNSig is the error in Phi between t and the jth
cluster associated with it.
sample crude psudeo-code for the neutral cluster builder:
cb is a cluster builder, tf is a track finder.
ca[] = cb.getCluster() //ca stands for cluster array
ta[] = tf.getTracks() // ta stands for track array
cnew[] = new Cluster[] // the new neutral cluster array
int j = 0 // the index for cnew
tc = new xxxTrackClusterAssociator //xxx = pick your favorite associator
tc.associate( ta, ca ) // do the association, array inherits from
enumeration so args are ok
for i = 1 to ca.#elements // loop over initial cluster set
if tc.track(ca[i]).#elements = 0 // if no track is associated
with the ith cluster
cnew[j] = ca[i] // then put it on the list of new
clusters as the jth element
j++
-----------------------------------
Gary Bower ([log in to unmask])
Stanford Linear Accelerator Center
Stanford University
650/926-2460
|