public class GTPClusterer extends AbstractClusterer
GTPClusterer
is an implementation of the abstract class AbstractClusterer
that is
responsible for producing clusters using the GTP algorithm employed by the hardware.Cluster
object.GTPClusterer
automatically defines the inclusion window in terms of the verification
window.GTPClusterer
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 is designed to be run on Monte Carlo events where each event represents a 2 ns beam bunch. If the input data is
formatted in the style of hardware readout, the sister class GTPOnlineClusterer
should be used instead.Cluster
,
CalorimeterHit
,
AbstractClusterer
,
GTPOnlineClusterer
Modifier and Type | Field and Description |
---|---|
private int |
clusterWindow
Indicates the number of FADC clock cycles (each cycle is 4 ns) before and after a given cycle that should be
considered when checking if a cluster is a local maximum in space-time.
|
private LinkedList<Map<Long,org.lcsim.event.CalorimeterHit>> |
hitBuffer
Stores a set of all the hits occurring in each clock cycle for the number of clock cycles that should be
considered for clustering.
|
private boolean |
limitClusterRange
Whether an asymmetric or symmetric window should be used for adding hits to a cluster.
|
private double |
seedEnergyThreshold
The minimum energy required for a hit to be considered as a cluster center.
|
private boolean |
verbose
Sets whether debug text should be written.
|
private boolean |
writeHitCollection
Sets whether the clusterer should store the collection of hits that are part of clusters.
|
cuts, ecal, neighborMap
Constructor and Description |
---|
GTPClusterer()
Instantiates a new instance of a Monte Carlo 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> hits)
Processes the argument
CalorimeterHit collection and forms a collection of Cluster
objects according to the GTP clustering algorithm. |
private List<org.lcsim.event.Cluster> |
getClusters()
Generates a list of clusters from the current hit buffer.
|
ClusterType |
getClusterType()
Indicates the type of cluster that is generated by this algorithm.
|
void |
initialize()
Sets the clustering algorithm parameters.
|
(package private) void |
setAsymmetricWindow(boolean limitClusterRange)
Sets the behavior of the hit inclusion and verification temporal windows.
|
(package private) void |
setClusterWindow(int clusterWindow)
Sets the number of clock cycles before and after a given cycle that will be used when checking whether a given
hit is a local maximum in both time and space.
|
(package private) void |
setSeedEnergyThreshold(double seedEnergyThreshold)
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 |
setWriteHitCollection(boolean state)
Sets whether the set of hits associated with an event's clusters should be written to the data stream and
persisted in LCIO.
|
conditionsChanged, createBasicCluster, getClusterTypeEncoding, getCuts, getIdentifierHelper
private double seedEnergyThreshold
private int clusterWindow
private LinkedList<Map<Long,org.lcsim.event.CalorimeterHit>> hitBuffer
private boolean limitClusterRange
private boolean verbose
private boolean writeHitCollection
GTPClusterer()
public List<org.lcsim.event.Cluster> createClusters(org.lcsim.event.EventHeader event, List<org.lcsim.event.CalorimeterHit> hits)
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.hits
- - A list of CalorimeterHit
objects from which clusters should be formed.public ClusterType getClusterType()
getClusterType
in interface Clusterer
getClusterType
in class AbstractClusterer
ClusterType
object; specifically, returns
ClusterType.GTP
.public void initialize()
initialize
in interface Clusterer
initialize
in class AbstractClusterer
void setClusterWindow(int clusterWindow)
N
indicates that N
clock cycles before and N
clock cycles after will be considered. Thusly, a total of
2N + 1
clock cycles will be used. This defines the size of the hit verification window. The
inclusion window is defined as a function of this, as discussed in the method setLimitClusterRange
.clusterWindow
- - The number of additional clock cycles to include in the clustering checks. A negative
value will be treated as zero.void setAsymmetricWindow(boolean limitClusterRange)
true
, the hit
inclusion window will be defined as one clock-cycle before the seed hit and the regular length of the
verification window after the seed hit. If false
, the inclusion window and the verification window
are set to be identical.limitClusterRange
- - true
indicates that the asymmetric clustering window should be used and
false
that the symmetric window should be used.void setSeedEnergyThreshold(double seedEnergyThreshold)
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 setWriteHitCollection(boolean state)
state
- - true
indicates that the hits will be persisted and false
that they will
not.private List<org.lcsim.event.Cluster> getClusters()
clusterWindow
, which is the middle of the buffer.List
of HPSEcalCluster
objects generated from the current event.Copyright © 2019. All rights reserved.