14#include <pxd/dbobjects/PXDClusterShapeClassifierPar.h>
15#include <pxd/dbobjects/PXDClusterOffsetPar.h>
33 ~ PXDClusterPositionEstimatorPar() {}
36 void addGrid(
int clusterkind,
const TH2F& grid)
41 for (
auto uBin = 1; uBin <=
m_gridmap[clusterkind].GetXaxis()->GetNbins(); uBin++) {
42 for (
auto vBin = 1; vBin <=
m_gridmap[clusterkind].GetYaxis()->GetNbins(); vBin++) {
44 m_gridmap[clusterkind].SetBinContent(uBin, vBin, size);
59 int key =
m_gridmap[clusterkind].GetBinContent(uBin, vBin);
66 int key =
m_gridmap.at(clusterkind).GetBinContent(uBin, vBin);
75 int uBin = grid.GetXaxis()->FindBin(thetaU);
76 int vBin = grid.GetYaxis()->FindBin(thetaV);
77 int key = grid.GetBinContent(uBin, vBin);
91 int uBin = grid.GetXaxis()->FindBin(thetaU);
92 int vBin = grid.GetYaxis()->FindBin(thetaV);
93 int uBins = grid.GetXaxis()->GetNbins();
94 int vBins = grid.GetYaxis()->GetNbins();
95 if ((uBin < 1) || (uBin > uBins) || (vBin < 1) || (vBin > vBins))
109 return classifier.getOffset(shape_index, eta);
122 auto it = likelyhoodMap.find(shape_index);
123 if (it == likelyhoodMap.end())
The class for PXD cluster position offset payload.
The class for PXD cluster position lookup table payload.
void setShapeClassifier(const PXDClusterShapeClassifierPar &classifier, int uBin, int vBin, int clusterkind)
Set shape classifier.
ClassDef(PXDClusterPositionEstimatorPar, 2)
ClassDef, must be the last term before the closing {}.
const PXDClusterShapeClassifierPar & getShapeClassifier(double thetaU, double thetaV, int clusterkind) const
Returns shape classifier for incidence angles and clusterkind.
const PXDClusterOffsetPar * getOffset(int shape_index, float eta, double thetaU, double thetaV, int clusterkind) const
Returns correction (offset) for cluster shape relative to center of pixel (startU/startV) if availabl...
float getShapeLikelyhood(int shape_index, double thetaU, double thetaV, int clusterkind) const
Returns shape likelyhood.
std::map< int, TH2F > m_gridmap
Map of angular grids for different clusterkinds
const PXDClusterShapeClassifierPar & getShapeClassifier(int uBin, int vBin, int clusterkind) const
Returns shape classifier.
bool hasClassifier(double thetaU, double thetaV, int clusterkind) const
Returns True if there is a classifier available.
void addGrid(int clusterkind, const TH2F &grid)
Add grid for clusterkind.
const std::map< int, TH2F > & getGridMap() const
Return grid map.
PXDClusterPositionEstimatorPar()
Default constructor.
std::map< int, std::vector< PXDClusterShapeClassifierPar > > m_shapeClassifiers
Map of cluster shape classifiers for different clusterkinds.
The class for PXD cluster shape classifier payload.
const std::map< int, float > & getShapeLikelyhoodMap() const
Return shape likelyhood map
Abstract base class for different kinds of events.