public abstract class AbstractClusterer extends Object implements Clusterer
Clusterer
classes should implement
to perform a clustering algorithm on a CalorimeterHit
collection.
The sub-class should implement createClusters(EventHeader, List)
which is
the method that should perform the clustering algorithm.Clusterer
,
Cluster
Modifier and Type | Field and Description |
---|---|
protected NumericalCuts |
cuts |
protected HPSEcal3 |
ecal |
private static Logger |
LOGGER |
protected HPSEcal3.NeighborMap |
neighborMap |
Constructor and Description |
---|
AbstractClusterer()
Default no-arg constructor.
|
AbstractClusterer(NumericalCuts cuts)
Constructor with cuts set.
|
AbstractClusterer(String[] cutNames,
double[] defaultCuts)
Default constructor which takes names of cuts and their default values.
|
Modifier and Type | Method and Description |
---|---|
void |
conditionsChanged(org.lcsim.conditions.ConditionsEvent event)
Detector setup performed here to get reference to ECAL subdetector and neighbor mapping.
|
org.lcsim.event.base.BaseCluster |
createBasicCluster()
Create a basic
Cluster with the correct type. |
abstract List<org.lcsim.event.Cluster> |
createClusters(org.lcsim.event.EventHeader event,
List<org.lcsim.event.CalorimeterHit> hits)
This is the primary method for sub-classes to implement their clustering algorithm.
|
abstract ClusterType |
getClusterType()
Get the type code for the clusters produced by this algorithm.
|
int |
getClusterTypeEncoding()
Get the integer encoding of the
Cluster type. |
NumericalCuts |
getCuts()
Get the numerical cut settings.
|
protected org.lcsim.detector.identifier.IIdentifierHelper |
getIdentifierHelper()
Convenience method to get the identifier helper from the ECAL subdetector.
|
void |
initialize()
By default nothing is done in this method, but start of job initialization can happen here like reading
cut settings into instance variables for convenience.
|
private static Logger LOGGER
protected HPSEcal3 ecal
protected HPSEcal3.NeighborMap neighborMap
protected NumericalCuts cuts
AbstractClusterer(String[] cutNames, double[] defaultCuts)
cutNames
- The names of the cuts for this clustering algorithm.defaultCuts
- The default cut values for the algorithm matching the cutNames ordering.AbstractClusterer(NumericalCuts cuts)
cuts
- The numerical cuts.AbstractClusterer()
public abstract List<org.lcsim.event.Cluster> createClusters(org.lcsim.event.EventHeader event, List<org.lcsim.event.CalorimeterHit> hits)
createClusters
in interface Clusterer
hits
- the list of hitsevent
- The current LCSim event.public abstract ClusterType getClusterType()
getClusterType
in interface Clusterer
public final int getClusterTypeEncoding()
Cluster
type.getClusterTypeEncoding
in interface Clusterer
public void conditionsChanged(org.lcsim.conditions.ConditionsEvent event)
conditionsChanged
in interface org.lcsim.conditions.ConditionsListener
public void initialize()
startOfData
method of ClusterDriver
.initialize
in interface Clusterer
public final NumericalCuts getCuts()
protected final org.lcsim.detector.identifier.IIdentifierHelper getIdentifierHelper()
public org.lcsim.event.base.BaseCluster createBasicCluster()
Cluster
with the correct type.createBasicCluster
in interface Clusterer
Copyright © 2019. All rights reserved.