33 {
36 return nullptr;
37 }
38
40
41 const bool isEC = cp0.
emaxEC >= cp0.emaxF;
42 const float eta = isEC ? cp0.etaEC : cp0.etaF;
43 const float phi = isEC ? cp0.phiEC : cp0.phiF;
44
46
47 if (!newCluster) {
48 return nullptr;
49 }
50
51 CaloClusterCellLink* newCellLinks = newCluster->getOwnCellLinks();
52 if (!
pars.recomputeMoments) {
53 copyMoments(cluster,
54 newCluster,
66 }
67
68 const CaloClusterCellLink* cellLinks = cluster.
getCellLinks();
69 CaloClusterCellLink::const_iterator cellItr = cellLinks->
begin();
70 CaloClusterCellLink::const_iterator cellEnd = cellLinks->
end();
71
72 for (; cellItr != cellEnd; ++cellItr) {
75
78
79 const bool excludeCell = isEC ?
82
83 if (!excludeCell) {
84 double w =
pars.fixCellWeights ? 1. : cellItr.
weight();
86 }
87 }
88
90
91 return newCluster;
92}
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
virtual double phi() const override final
get phi (through CaloDetDescrElement)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
unsigned index() const
Accessor for the index of the cell in the CaloCellContainer.
weight_t weight() const
Accessor for weight associated to this cell.
bool addCell(const unsigned cellIdx, const weight_t weight=1.0)
Method to add a cell to the cluster.
const_iterator end() const
const end method
const_iterator begin() const
const begin method
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
@ SECOND_ENG_DENS
Second Moment in E/V.
@ SECOND_LAMBDA
Second Moment in .
@ LATERAL
Normalized lateral moment.
@ LONGITUDINAL
Normalized longitudinal moment.
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
@ SECOND_R
Second Moment in .
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
@ SIGNIFICANCE
Cluster significance.
@ CENTER_Z
Cluster Centroid ( )
@ CENTER_X
Cluster Centroid ( )
@ CENTER_Y
Cluster Centroid ( )
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
@ deltaEta2
difference between the cluster eta (second sampling) and the eta of the track extrapolated to the sec...
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
Find the reference position (eta, phi) relative to which cells are restricted.