|
|
Go to the documentation of this file.
7 : caloGeometryToken_{sumes.esConsumes()} {}
51 for (
const auto &hnf : hitsAndFracs) {
52 DetId hitId = hnf.first;
53 float hitEfrac = hnf.second;
102 DetId hitId = hnf.first;
142 if (energyNorm <= 0.0) {
144 <<
"Encountered negative or zero energy for HGCal R-variable denominator: " << energyNorm << std::endl;
147 double cylinderR2 = cylinderR * cylinderR;
158 DetId hitId = hnf.first;
167 double r2 = distXYZ.x() * distXYZ.x() + distXYZ.y() * distXYZ.y();
176 else if (
r2 > cylinderR2) {
180 rVar += *hitEnergyIter;
193 double cylinderR2 = cylinderR * cylinderR;
195 TMatrixD covMat(3, 3);
215 DetId hitId = hnf.first;
224 double r2 = radXYZ.x() * radXYZ.x() + radXYZ.y() * radXYZ.y();
226 if (
r2 > cylinderR2) {
232 double weight = *hitEnergyIter;
235 dxdx +=
weight * dXYZ.x() * dXYZ.x();
236 dydy +=
weight * dXYZ.y() * dXYZ.y();
237 dzdz +=
weight * dXYZ.z() * dXYZ.z();
239 dxdy +=
weight * dXYZ.x() * dXYZ.y();
241 dzdx +=
weight * dXYZ.z() * dXYZ.x();
246 if (!totalW || nHit < 2) {
262 covMat(0, 1) = covMat(1, 0) = dxdy;
263 covMat(0, 2) = covMat(2, 0) = dzdx;
264 covMat(1, 2) = covMat(2, 1) =
dydz;
272 TMatrixD eigVecMat(3, 3);
274 eigVecMat = covMat.EigenVectors(eigVals);
void setFilteredHitsAndFractions(const std::vector< std::pair< DetId, float > > &hitsAndFracs)
constexpr Detector det() const
get the detector field from this detid
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
void initPerEvent(const edm::EventSetup &iSetup, const std::vector< reco::PFRecHit > &recHits)
ROOT::Math::XYZVector centroid_
Log< level::Warning, false > LogWarning
void setPFRecHitPtrMap(const std::vector< reco::PFRecHit > &recHits)
void initPerObject(const std::vector< std::pair< DetId, float > > &hitsAndFracs, double minHitE=0, double minHitET=0, int minLayer=1, int maxLayer=-1, DetId::Detector subDet=DetId::HGCalEE)
std::vector< double > hitEnergies_
std::vector< std::pair< DetId, float > > hitsAndFracs_
std::unordered_map< uint32_t, const reco::PFRecHit * > pfRecHitPtrMap_
hgcal::RecHitTools recHitTools_
HGCalShowerShapeHelper(edm::ConsumesCollector &&sumes)
std::vector< ROOT::Math::XYZVector > layerCentroids_
const double getRvar(double cylinderR, double energyNorm, bool useFractions=true, bool useCellSize=true)
bool getData(T &iHolder) const
constexpr uint32_t rawId() const
get the raw id
std::vector< double > layerEnergies_
const ShowerWidths getPCAWidths(double cylinderR, bool useFractions=false)
static const double kHDWaferCellSize_
std::vector< double > hitEnergiesWithFracs_
Transform3DPJ::Vector XYZVector
const double getCellSize(DetId detId)
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
static const double kLDWaferCellSize_