The class for PXD cluster position lookup table payload.
More...
#include <PXDClusterPositionEstimatorPar.h>
|
| PXDClusterPositionEstimatorPar () |
| Default constructor.
|
|
| ~PXDClusterPositionEstimatorPar () |
| Destructor.
|
|
void | addGrid (int clusterkind, const TH2F &grid) |
| Add grid for clusterkind.
|
|
const std::map< int, TH2F > & | getGridMap () const |
| Return grid map.
|
|
void | setShapeClassifier (const PXDClusterShapeClassifierPar &classifier, int uBin, int vBin, int clusterkind) |
| Set shape classifier.
|
|
const PXDClusterShapeClassifierPar & | getShapeClassifier (int uBin, int vBin, int clusterkind) const |
| Returns shape classifier.
|
|
const PXDClusterShapeClassifierPar & | getShapeClassifier (double thetaU, double thetaV, int clusterkind) const |
| Returns shape classifier for incidence angles and clusterkind.
|
|
bool | hasClassifier (double thetaU, double thetaV, int clusterkind) const |
| Returns True if there is a classifier available.
|
|
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 available, otherwise returns nullptr.
|
|
float | getShapeLikelyhood (int shape_index, double thetaU, double thetaV, int clusterkind) const |
| Returns shape likelyhood.
|
|
The class for PXD cluster position lookup table payload.
Definition at line 27 of file PXDClusterPositionEstimatorPar.h.
◆ PXDClusterPositionEstimatorPar()
◆ ~PXDClusterPositionEstimatorPar()
◆ addGrid()
void addGrid |
( |
int |
clusterkind, |
|
|
const TH2F & |
grid |
|
) |
| |
|
inline |
Add grid for clusterkind.
Definition at line 36 of file PXDClusterPositionEstimatorPar.h.
37 {
40
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);
46 }
47 }
48 }
std::map< int, TH2F > m_gridmap
Map of angular grids for different clusterkinds
std::map< int, std::vector< PXDClusterShapeClassifierPar > > m_shapeClassifiers
Map of cluster shape classifiers for different clusterkinds.
◆ getGridMap()
const std::map< int, TH2F > & getGridMap |
( |
| ) |
const |
|
inline |
◆ getOffset()
const PXDClusterOffsetPar * getOffset |
( |
int |
shape_index, |
|
|
float |
eta, |
|
|
double |
thetaU, |
|
|
double |
thetaV, |
|
|
int |
clusterkind |
|
) |
| const |
|
inline |
Returns correction (offset) for cluster shape relative to center of pixel (startU/startV) if available, otherwise returns nullptr.
Definition at line 102 of file PXDClusterPositionEstimatorPar.h.
103 {
104
106 return nullptr;
107 }
108 const PXDClusterShapeClassifierPar& classifier =
getShapeClassifier(thetaU, thetaV, clusterkind);
109 return classifier.getOffset(shape_index, eta);
110 }
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.
◆ getShapeClassifier() [1/2]
Returns shape classifier for incidence angles and clusterkind.
Definition at line 72 of file PXDClusterPositionEstimatorPar.h.
73 {
75 int uBin = grid.GetXaxis()->FindBin(thetaU);
76 int vBin = grid.GetYaxis()->FindBin(thetaV);
77 int key = grid.GetBinContent(uBin, vBin);
79 }
◆ getShapeClassifier() [2/2]
◆ getShapeLikelyhood()
float getShapeLikelyhood |
( |
int |
shape_index, |
|
|
double |
thetaU, |
|
|
double |
thetaV, |
|
|
int |
clusterkind |
|
) |
| const |
|
inline |
Returns shape likelyhood.
Returns zero if shape not known, otherwise positive float
Definition at line 113 of file PXDClusterPositionEstimatorPar.h.
114 {
115
117 return 0;
118 }
120
121
122 auto it = likelyhoodMap.find(shape_index);
123 if (it == likelyhoodMap.end())
124 return 0;
125
126 return it->second;
127 }
const std::map< int, float > & getShapeLikelyhoodMap() const
Return shape likelyhood map
◆ hasClassifier()
bool hasClassifier |
( |
double |
thetaU, |
|
|
double |
thetaV, |
|
|
int |
clusterkind |
|
) |
| const |
|
inline |
Returns True if there is a classifier available.
Definition at line 82 of file PXDClusterPositionEstimatorPar.h.
83 {
84
86 return false;
87 }
88
89
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))
96 return false;
97
98 return true;
99 }
◆ setShapeClassifier()
◆ m_gridmap
std::map<int, TH2F> m_gridmap |
|
private |
◆ m_shapeClassifiers
The documentation for this class was generated from the following file: