fi.jyu.phys.grain.sort
Class GrainDSSDTagger

java.lang.Object
  extended by fi.jyu.phys.grain.sort.GrainDSSDTagger

public class GrainDSSDTagger
extends java.lang.Object

N-generation correlation system for DSSD detectors.

Author:
pajura

Field Summary
static int STRATEGY_SINGLE
          Strategy flag for searhing on the exact pixel.
static int STRATEGY_SQUARE
          Strategy flag for searhing all neighbours and the exact pixel.
static int STRATEGY_STAR
          Strategy flag for searching 4 nearest neighbours and the exact pixel.
 
Constructor Summary
GrainDSSDTagger(int xstrips, int ystrips, long depth)
          Creates a new instance of GrainDSSDTagger
 
Method Summary
 GrainGreatEvent get(GrainGreatEvent event, int strategy)
          Finds from the tagger the first event which is correlated to the input event using given strategy.
 java.util.ArrayList getAll(GrainGreatEvent event, int strategy)
          Finds from the tagger all events which are spatially correlated to the input event using given strategy.
 void put(GrainGreatEvent event)
          Stores an event in to the tagger.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRATEGY_SINGLE

public static final int STRATEGY_SINGLE
Strategy flag for searhing on the exact pixel.

See Also:
Constant Field Values

STRATEGY_SQUARE

public static final int STRATEGY_SQUARE
Strategy flag for searhing all neighbours and the exact pixel.

See Also:
Constant Field Values

STRATEGY_STAR

public static final int STRATEGY_STAR
Strategy flag for searching 4 nearest neighbours and the exact pixel. Not implemented yet.

See Also:
Constant Field Values
Constructor Detail

GrainDSSDTagger

public GrainDSSDTagger(int xstrips,
                       int ystrips,
                       long depth)
Creates a new instance of GrainDSSDTagger

Parameters:
depth - Depth (in time) for the tagger storage, in ticks (10ns).
xstrips - Number of x-strips in the detector.
ystrips - Number of y-strips in the detector.
Method Detail

put

public void put(GrainGreatEvent event)
Stores an event in to the tagger. Uses cloning so all changes made into the passed event after this call will not be reflected in the stored event.

Parameters:
event - The GrainGreatEvent to be stored.

get

public GrainGreatEvent get(GrainGreatEvent event,
                           int strategy)
Finds from the tagger the first event which is correlated to the input event using given strategy. Always returns the event for which the time difference is smallest regardless of the strategy.

Parameters:
event - The GrainGreatEvent to correlate with.
strategy - The correlation strategy to use.
Returns:
The first correlated event.

getAll

public java.util.ArrayList getAll(GrainGreatEvent event,
                                  int strategy)
Finds from the tagger all events which are spatially correlated to the input event using given strategy. Always returns the events in time order regardless of the strategy.

Parameters:
event - The GrainGreatEvent to correlate with.
strategy - The correlation strategy to use.
Returns:
ArrayList of correlated events.