8#ifndef PANDORA_CLUSTER_H
9#define PANDORA_CLUSTER_H 1
22template<
typename T>
class AlgorithmObjectManager;
23template<
typename T,
typename S>
class PandoraObjectFactory;
277 void GetClusterSpanZ(
const float xmin,
const float xmax,
float &zmin,
float &zmax)
const;
472 return m_orderedCaloHitList;
Header file for the cluster fit helper class.
Header file for pandora object creation classes.
Header file for the ordered calo hit list class.
Header file defining status codes and relevant preprocessor macros.
AlgorithmObjectManager class.
double m_isolatedElectromagneticEnergy
Sum of electromagnetic energy measures of isolated calo hits, units GeV.
unsigned int m_nCaloHitsInOuterLayer
Keep track of the number of calo hits in the outermost layers.
StatusCode AddHitsFromSecondCluster(const Cluster *const pCluster)
Add the calo hits from a second cluster to this.
bool IsAvailable() const
Whether the cluster is available to be added to a particle flow object.
void UpdatePhotonIdCache(const Pandora &pandora) const
Update photon if flag.
double m_xyzPositionSums[3]
The sum of the x, y and z hit positions in the pseudo layer.
unsigned int m_nHits
The number of hits in the pseudo layer.
unsigned int GetOuterPseudoLayer() const
Get the outermost pseudo layer in the cluster.
InputFloat m_showerProfileStart
The cluster shower profile start, units radiation lengths.
const CartesianVector & GetInitialDirection() const
Get the initial direction of the cluster.
const Track * m_pTrackSeed
Address of the track with which the cluster is seeded.
float GetIsolatedHadronicEnergy() const
Get the sum of hadronic energy measures of isolated constituent calo hits, units GeV.
bool m_isFitUpToDate
Whether the fit to all calo hits is up to date.
InputUInt m_innerPseudoLayer
The innermost pseudo layer in the cluster.
void UpdateShowerProfileCache(const Pandora &pandora) const
Update shower profile and comparison with expectation for a photon.
float GetHadronicEnergy() const
Get the sum of hadronic energy measures of all constituent calo hits, units GeV.
bool m_isAvailable
Whether the cluster is available to be added to a particle flow object.
float GetCorrectedElectromagneticEnergy(const Pandora &pandora) const
Get the corrected electromagnetic estimate of the cluster energy, units GeV.
int m_particleId
The particle id flag.
InputFloat m_xMin
Cached cluster minimum in x.
bool m_isDirectionUpToDate
Whether the initial direction of the cluster is up to date.
unsigned int GetNCaloHits() const
Get the number of calo hits in the cluster.
std::map< unsigned int, SimplePoint > PointByPseudoLayerMap
The point by pseudo layer typedef.
double m_hadronicEnergy
The sum of hadronic energy measures of constituent calo hits, units GeV.
bool PassPhotonId(const Pandora &pandora) const
Whether the cluster passes the photon id.
CaloHitList m_isolatedCaloHitList
The list of isolated hits, which contribute only towards cluster energy.
std::map< HitType, float > HitTypeToEnergyMap
The hit type to energy map typedef.
void UpdateFitToAllHitsCache() const
Update result of linear fit to all calo hits in cluster.
unsigned int GetNIsolatedCaloHits() const
Get the number of isolated calo hits in the cluster.
unsigned int GetNHitsInOuterLayer() const
Get the number of hits in the outer sampling layers.
unsigned int GetNPossibleMipHits() const
Get the number of calo hits in the cluster that have been flagged as possible mip hits.
InputFloat m_correctedElectromagneticEnergy
The corrected electromagnetic estimate of the cluster energy, units GeV.
unsigned int GetInnerPseudoLayer() const
Get the innermost pseudo layer in the cluster.
bool IsTrackSeeded() const
Whether the cluster is track seeded.
virtual ~Cluster()
Destructor.
StatusCode AlterMetadata(const object_creation::Cluster::Metadata &metadata)
Alter the metadata information stored in a cluster.
void SetAvailability(bool isAvailable)
Set availability of cluster to be added to a particle flow object.
float GetShowerProfileStart(const Pandora &pandora) const
Get the cluster shower profile start, units radiation lengths.
const CartesianVector GetCentroid(const unsigned int pseudoLayer) const
Get unweighted centroid for cluster at a particular pseudo layer, calculated using cached values of h...
float GetElectromagneticEnergy() const
Get the sum of electromagnetic energy measures of all constituent calo hits, units GeV.
const OrderedCaloHitList & GetOrderedCaloHitList() const
Get the ordered calo hit list.
PointByPseudoLayerMap m_sumXYZByPseudoLayer
Construct to allow rapid calculation of centroid in each pseudolayer.
InputBool m_passPhotonId
Whether the cluster passes the photon id.
StatusCode AddTrackAssociation(const Track *const pTrack)
Add an association between the cluster and a track.
StatusCode RemoveIsolatedCaloHit(const CaloHit *const pCaloHit)
Remove an isolated calo hit from the cluster.
InputFloat m_correctedHadronicEnergy
The corrected hadronic estimate of the cluster energy, units GeV.
void UpdateShowerLayerCache(const Pandora &pandora) const
Update the pseudo layer at which shower commences.
HitType GetOuterLayerHitType() const
Get the typical outer layer hit type.
double m_electromagneticEnergy
The sum of electromagnetic energy measures of constituent calo hits, units GeV.
TrackList m_associatedTrackList
The list of tracks associated with the cluster.
StatusCode AddCaloHit(const CaloHit *const pCaloHit)
Add a calo hit to the cluster.
InputHitType m_outerLayerHitType
The typical outer layer hit type.
CartesianVector m_initialDirection
The initial direction of the cluster.
void RemoveTrackSeed()
Remove the track seed, changing the initial direction measurement.
InputHitType m_innerLayerHitType
The typical inner layer hit type.
float GetTrackComparisonEnergy(const Pandora &pandora) const
Get the best energy estimate to use when comparing cluster energy to associated track momentum,...
StatusCode RemoveTrackAssociation(const Track *const pTrack)
Remove an association between the cluster and a track.
HitType GetInnerLayerHitType() const
Get the typical inner layer hit type.
void UpdateEnergyCorrectionsCache(const Pandora &pandora) const
Update cluster corrected energy values.
float GetCorrectedHadronicEnergy(const Pandora &pandora) const
Get the corrected hadronic estimate of the cluster energy, units GeV.
const ClusterFitResult & GetFitToAllHitsResult() const
Get the result of a linear fit to all calo hits in the cluster.
const Track * GetTrackSeed() const
Get the address of the track with which the cluster is seeded.
const CaloHitList & GetIsolatedCaloHitList() const
Get the isolated calo hit list.
StatusCode AddIsolatedCaloHit(const CaloHit *const pCaloHit)
Add an isolated calo hit to the cluster.
StatusCode ResetProperties()
Reset all cluster properties.
int GetParticleId() const
Get the particle id flag.
void GetClusterSpanX(float &xmin, float &xmax) const
Get minimum and maximum X positions of the calo hits in this cluster.
unsigned int m_nCaloHits
The number of calo hits.
void GetClusterSpanZ(const float xmin, const float xmax, float &zmin, float &zmax) const
Get upper and lower Z positions of the calo hits in a cluster in range xmin to xmax.
float GetIsolatedElectromagneticEnergy() const
Get the sum of electromagnetic energy measures of isolated constituent calo hits, units GeV.
InputFloat m_trackComparisonEnergy
The appropriate corrected energy to use in comparisons with track momentum, units GeV.
float GetShowerProfileDiscrepancy(const Pandora &pandora) const
Get the cluster shower profile discrepancy.
InputUInt m_outerPseudoLayer
The outermost pseudo layer in the cluster.
float GetMipFraction() const
Get fraction of constituent calo hits that have been flagged as possible mip hits.
void ResetOutdatedProperties()
Reset those cluster properties that must be recalculated upon addition/removal of a calo hit.
InputFloat m_xMax
Cached cluster maximum in x.
unsigned int m_nPossibleMipHits
The number of calo hits that have been flagged as possible mip hits.
const TrackList & GetAssociatedTrackList() const
Get the list of tracks associated with the cluster.
double m_isolatedHadronicEnergy
Sum of hadronic energy measures of isolated calo hits, units GeV.
void UpdateInitialDirectionCache() const
Update cluster initial direction.
ClusterFitResult m_fitToAllHitsResult
The result of a linear fit to all calo hits in the cluster.
unsigned int GetShowerStartLayer(const Pandora &pandora) const
Get the pseudo layer at which shower commences.
void UpdateLayerHitTypeCache(const unsigned int pseudoLayer, InputHitType &layerHitType) const
Update typical hit type for specified layer.
InputFloat m_showerProfileDiscrepancy
The cluster shower profile discrepancy.
OrderedCaloHitList m_orderedCaloHitList
The ordered calo hit list.
StatusCode RemoveCaloHit(const CaloHit *const pCaloHit)
Remove a calo hit from the cluster.
InputUInt m_showerStartLayer
The pseudo layer at which shower commences.
Calo hit lists arranged by pseudo layer.
unsigned int size() const
Returns the number of elements in the container.
PandoraObjectFactory class.
HitType
Calorimeter hit type enum.
MANAGED_CONTAINER< const CaloHit * > CaloHitList
MANAGED_CONTAINER< const Track * > TrackList
StatusCode
The StatusCode enum.