public class GTPOnlineClusterer extends AbstractClusterer
GTPOnlineClusterer
is an implementation of the
abstract class AbstractClusterer
that is responsible
for producing clusters using the GTP algorithm employed by the
hardware.Cluster
object.GTPOnlineClusterer
automatically selects the larger of
the two inclusion window parts as the verification window length.GTPOnlineClusterer
requires as input a collection of
CalorimeterHit
objects representing the event hits. It
will then produce a collection of Cluster
objects
representing the GTP algorithm output. It also produces a series of
distribution plots under the “GTP(O) Cluster Plots” header. It is
designed to be run on readout events, either from the hardware or
Monte Carlo that has been processed through the readout simulation.
If the input data is formatted into constant-time beam bunches, the
sister class GTPClusterer
should be used instead.Cluster
,
CalorimeterHit
,
AbstractClusterer
,
GTPClusterer
Modifier and Type | Field and Description |
---|---|
private org.lcsim.util.aida.AIDA |
aida |
private hep.aida.IHistogram2D |
clusterDistribution |
private hep.aida.IHistogram1D |
clusterHitCount |
private hep.aida.IHistogram1D |
clusterSeedEnergy |
private hep.aida.IHistogram1D |
clusterTotalEnergy |
private hep.aida.IHistogram2D |
hitDistribution |
private hep.aida.IHistogram1D |
hitEnergy |
private double |
seedThreshold
The minimum energy a hit must have to be considered for cluster
seed formation.
|
private double |
timeAfter
The length of the temporal window for including clusters that
occur after the seed hit.
|
private double |
timeBefore
The length of the temporal window for inclusing clusters that
occur before the seed hit.
|
private double |
timeWindow
The length of the temporal window for verifying that a hit is
a local maximum in energy.
|
private boolean |
verbose
Controls whether or not verbose diagnostic information is output.
|
cuts, ecal, neighborMap
Constructor and Description |
---|
GTPOnlineClusterer()
Instantiates a new instance of a readout GTP clustering algorithm.
|
Modifier and Type | Method and Description |
---|---|
List<org.lcsim.event.Cluster> |
createClusters(org.lcsim.event.EventHeader event,
List<org.lcsim.event.CalorimeterHit> hitList)
Processes the argument
CalorimeterHit collection and
forms a collection of Cluster objects according to
the GTP clustering algorithm. |
ClusterType |
getClusterType()
Gets the type of cluster produced by this clusterer.
|
private static double |
getHitEnergy(org.lcsim.event.CalorimeterHit hit) |
private static String |
getHitText(org.lcsim.event.CalorimeterHit hit) |
private static double |
getHitTime(org.lcsim.event.CalorimeterHit hit) |
private static int |
getHitX(org.lcsim.event.CalorimeterHit hit) |
private static int |
getHitY(org.lcsim.event.CalorimeterHit hit) |
double |
getSeedLowThreshold()
Gets the seed energy lower bound threshold in units of GeV.
|
double |
getWindowAfter()
Gets the number of nanoseconds after the seed hit time that
the clusterer will look to include hits when a cluster is formed.
|
double |
getWindowBefore()
Gets the number of nanoseconds before the seed hit time that
the clusterer will look to include hits when a cluster is formed.
|
void |
initialize()
Sets up the clusterer parameters so that it is ready to be used.
|
private boolean |
isValidSeed(org.lcsim.event.CalorimeterHit seed,
org.lcsim.event.CalorimeterHit hit)
Compares the argument
CalorimeterHit hit
against the CalorimeterHit seed to see
if seed meets the criteria for a seed hit given the
presence of hit , which is assumed to be located in
the appropriate spatiotemporal window.Note that it is the responsibility of the calling method to ascertain whether the two CalorimeterHit objects
are actually within the proper spatial and temporal windows of
one another. |
(package private) boolean |
isVerbose()
Returns whether the clusterer will output verbose diagnostic
information.
|
(package private) void |
setSeedLowThreshold(double seedThreshold)
Sets the minimum energy a hit must have before it will be
considered for cluster formation.
|
(package private) void |
setVerbose(boolean verbose)
Sets whether the clusterer should output diagnostic text or not.
|
(package private) void |
setWindowAfter(int cyclesAfter)
Sets the number of clock-cycles to include in the clustering
window after the seed hit.
|
(package private) void |
setWindowBefore(int cyclesBefore)
Sets the number of clock-cycles to include in the clustering
window before the seed hit.
|
private boolean |
withinSpatialWindow(org.lcsim.event.CalorimeterHit seed,
org.lcsim.event.CalorimeterHit hit)
Checks whether the
CalorimeterHit hit
is within the 3x3 spatial window of CalorimeterHit
seed . |
private boolean |
withinTimeClusteringWindow(org.lcsim.event.CalorimeterHit seed,
org.lcsim.event.CalorimeterHit hit)
Checks whether
CalorimeterHit hit is
within the inclusion temporal window for potential seed hit
seed . |
private boolean |
withinTimeVerificationWindow(org.lcsim.event.CalorimeterHit seed,
org.lcsim.event.CalorimeterHit hit)
Checks whether
CalorimeterHit hit is
within the verification temporal window for potential seed hit
seed . |
conditionsChanged, createBasicCluster, getClusterTypeEncoding, getCuts, getIdentifierHelper
private double timeBefore
private double timeAfter
private double timeWindow
timeWindow * 2 + 4
ns.private double seedThreshold
private boolean verbose
private org.lcsim.util.aida.AIDA aida
private hep.aida.IHistogram1D hitEnergy
private hep.aida.IHistogram1D clusterSeedEnergy
private hep.aida.IHistogram1D clusterHitCount
private hep.aida.IHistogram1D clusterTotalEnergy
private hep.aida.IHistogram2D hitDistribution
private hep.aida.IHistogram2D clusterDistribution
GTPOnlineClusterer()
public List<org.lcsim.event.Cluster> createClusters(org.lcsim.event.EventHeader event, List<org.lcsim.event.CalorimeterHit> hitList)
CalorimeterHit
collection and
forms a collection of Cluster
objects according to
the GTP clustering algorithm.createClusters
in interface Clusterer
createClusters
in class AbstractClusterer
event
- - The object containing event data.hitList
- - A list of CalorimeterHit
objects
from which clusters should be formed.public ClusterType getClusterType()
getClusterType
in interface Clusterer
getClusterType
in class AbstractClusterer
ClusterType
enumerable.public double getSeedLowThreshold()
double
.public double getWindowBefore()
double
.public double getWindowAfter()
double
.public void initialize()
initialize
in interface Clusterer
initialize
in class AbstractClusterer
boolean isVerbose()
true
if the clusterer will output
diagnostic information and false
otherwise.void setSeedLowThreshold(double seedThreshold)
seedThreshold
- - The seed threshold in GeV.void setVerbose(boolean verbose)
verbose
- - true
indicates that the clusterer
should output diagnostic text and false
that it
should not.void setWindowBefore(int cyclesBefore)
setWindowAfter
will be the verification window size.cyclesBefore
- - The length of the clustering window before
the seed hit in clock cycles.void setWindowAfter(int cyclesAfter)
setWindowBefore
will be the verification window size.cyclesAfter
- - The length of the clustering window after
the seed hit in clock cycles.private static final String getHitText(org.lcsim.event.CalorimeterHit hit)
private static final double getHitEnergy(org.lcsim.event.CalorimeterHit hit)
private static final int getHitX(org.lcsim.event.CalorimeterHit hit)
private static final int getHitY(org.lcsim.event.CalorimeterHit hit)
private static final double getHitTime(org.lcsim.event.CalorimeterHit hit)
private boolean isValidSeed(org.lcsim.event.CalorimeterHit seed, org.lcsim.event.CalorimeterHit hit)
CalorimeterHit
hit
against the CalorimeterHit
seed
to see
if seed
meets the criteria for a seed hit given the
presence of hit
, which is assumed to be located in
the appropriate spatiotemporal window.CalorimeterHit
objects
are actually within the proper spatial and temporal windows of
one another.seed
- - The potential seed hit.hit
- - The hit with which to compare the seed.true
if either the two hits are the
same hit or if the hit does not invalidate the potential seed.
Returns false
otherwise.private boolean withinSpatialWindow(org.lcsim.event.CalorimeterHit seed, org.lcsim.event.CalorimeterHit hit)
CalorimeterHit
hit
is within the 3x3 spatial window of CalorimeterHit
seed
. This is defined as seed
having
an x-index within +/-1 of the x-index of hit
and
similarly for the y-index. Allowance is made for the fact that
the x-indices go from -1 to 1 and skip zero.seed
- - The seed hit.hit
- - The comparison hit.true
if either both hits are the
the same hit or if the comparison hit is within 1 index of the
seed's x-index and within 1 index of the seed's y-index. Returns
false
otherwise.private boolean withinTimeVerificationWindow(org.lcsim.event.CalorimeterHit seed, org.lcsim.event.CalorimeterHit hit)
CalorimeterHit
hit
is
within the verification temporal window for potential seed hit
seed
.seed
- - The seed hit.hit
- - The comparison hit.true
if the comparison hit is within
the temporal window of the seed hit and false
otherwise.private boolean withinTimeClusteringWindow(org.lcsim.event.CalorimeterHit seed, org.lcsim.event.CalorimeterHit hit)
CalorimeterHit
hit
is
within the inclusion temporal window for potential seed hit
seed
.seed
- - The seed hit.hit
- - The comparison hit.true
if the comparison hit is within
the temporal window of the seed hit and false
otherwise.Copyright © 2019. All rights reserved.