next up previous contents
Next: Fiber Track level functions Up: SF Interface Functions Previous: Fiber level functions   Contents

Fiber Cluster level functions

The fiber cluster functions use the FIBER_CLUSTER common block to manipulate information about clusters of hit fibers.


int get_fiber_cluster(int clusterid); 
int get_nth_fiber_cluster(int n); 
int get_fiber_cluster_pos(float pos, int ixy, int isc); 
int get_nth_fiber_cluster_sheet(int n, int ixy, int isc, int ish); 
void put_fiber_cluster(void); 
void clear_fiber_clusters(void);

get_fiber_cluster() takes a cluster id number as an argument and fills the FIBER_CLUSTER common block with the corresponding cluster. If no cluster with the specified clusterid is found, -1, is returned, otherwise, the cluster weight is returned.

get_nth_fiber_cluster() takes an integer argument and fills the common block with the ``nth'' fiber cluster. If n is larger than the number of clusters, -1 is returned, otherwise, the cluster weight is returned.

get_fiber_cluster_pos() tries to find the fiber cluster closest to the position pos in the section isc in the dimension ixy. It is similar to get_fiber_pos().

get_nth_fiber_cluster_sheet() functions the same as get_nth_fiber_cluster() except that a single sheet is specified. With an argument of 1 it finds the first fiber cluster in that sheet. If the argument exceeds the number of clusters in that sheet, -1 is returned, otherwise the cluster weight is returned.

put_fiber_cluster() copies data from the common block into the main data structures. If a cluster with the same cluster id already exists, it is overwritten, otherwise, a new cluster is created.

clear_fiber_clusters() removes all fiber cluster information from memory.


next up previous contents
Next: Fiber Track level functions Up: SF Interface Functions Previous: Fiber level functions   Contents
K2K experimant account
2000-02-22