Belle II Software development
PXDClusterShape Class Reference

Class to correct estimation of cluster error and position base on its shape. More...

#include <PXDClusterShape.h>

Public Member Functions

 ~PXDClusterShape ()
 Delete the cache and free the memory.
 
pxdClusterShapeType setClsShape (const ClusterCandidate &cls, VxdID sensorID)
 Set cluster shape ID.
 

Static Public Attributes

static pxdClusterShapeDescr pxdClusterShapeDescription
 Create detail description of cluster shape.
 

Detailed Description

Class to correct estimation of cluster error and position base on its shape.

This class will set a shape ID of cluster in clusterization time. ID is describe on list "pxdClusterShapeType". Function "pxdClusterShapeDescription" give more detail desription of shape.

Function "setClsShape" set shape ID for cluster. Correction is apply for RecoHit if available direction of reco track

*   u → → → → → → → → → →
* v┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐v
* ↑│-│-│-│-│-│-│-│-│-│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑
* ↑│-│-│-│x│-│-│-│-│-│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑"L"
* ↑│-│-│-│x│x│-│-│-│x│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑"mirror_u_L"
* ↑│-│-│-│-│-│-│-│x│x│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑
* ↑│-│-│-│x│x│-│-│-│-│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑"mirror_v_L"
* ↑│-│-│-│x│-│-│-│x│x│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑"mirror_u+v_L"
* ↑│-│-│-│-│-│-│-│-│x│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑
* ↑│-│-│-│-│x│-│-│-│-│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑"2x2 diagonal"
* ↑│-│-│-│x│-│-│-│x│-│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑"2x2 anti-diagonal"
* ↑│-│-│-│-│-│-│-│-│x│-│-│↑
* ↑├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤↑
* ↑│-│-│-│-│-│-│-│-│-│-│-│↑
* v└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘v
* - u → → → → → → → → → →
* 

Definition at line 82 of file PXDClusterShape.h.

Constructor & Destructor Documentation

◆ ~PXDClusterShape()

Delete the cache and free the memory.

Definition at line 47 of file PXDClusterShape.cc.

47{}

Member Function Documentation

◆ setClsShape()

pxdClusterShapeType setClsShape ( const ClusterCandidate cls,
VxdID  sensorID 
)

Set cluster shape ID.

Set cluster shape ID

Parameters
clsClusterCandidate container of pixels creating cluster in PXD
sensorIDsensor details for PXD sensors
Returns
cluster shape ID

Definition at line 51 of file PXDClusterShape.cc.

52 {
53 const SensorInfo& info = dynamic_cast<const SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(sensorID));
54 pxdClusterShapeType clsShape;
55 clsShape = pxdClusterShapeType::no_shape_set;
56 ClusterProjection projU, projV;
57 float fCategU = 0.0;
58 float fCategV = 0.0;
59 float fDiagU = 0.0;
60 float fDiagV = 0.0;
61 int CSFull = 0;
62 for (const PXD::Pixel& px : cls.pixels()) {
63 if (CSFull == 0) {
64 fDiagU = px.getU();
65 fDiagV = px.getV();
66 }
67 if (CSFull < 3) {
68 fCategU += px.getU();
69 fCategV += px.getV();
70 }
71 CSFull++;
72 projU.add(px.getU(), info.getUCellPosition(px.getU()), px.getCharge());
73 projV.add(px.getV(), info.getVCellPosition(px.getV()), px.getCharge());
74
75
76 }
77 projU.finalize();
78 projV.finalize();
79
80 if (CSFull == 1) {
81 clsShape = pxdClusterShapeType::shape_1; // 1x1 pixels
82 } else if (CSFull == 2) {
83 if ((projU.getSize() == 2) && (projV.getSize() == 1)) {
84 clsShape = pxdClusterShapeType::shape_2_u; // 2x1 (u,v) pixels
85 } else if ((projU.getSize() == 1) && (projV.getSize() == 2)) {
86 clsShape = pxdClusterShapeType::shape_2_v; // 1x2 (u,v) pixels
87 } else if ((fDiagU < (fCategU / 2.0)) && (fDiagV < (fCategV / 2.0))) {
88 clsShape = pxdClusterShapeType::shape_2_uv_diag; // 2x2 diagonal (u,v) pixels
89 } else {
90 clsShape = pxdClusterShapeType::shape_2_uv_antidiag; // 2x2 anti-diagonal (u,v) pixels
91 }
92 } else if (CSFull == 3) {
93 if ((projU.getSize() == 2) && (projV.getSize() == 2)) {
94 int MisU = 0; // missing pixel in "L" cluster - u marker
95 int MisV = 0; // missing pixel in "L" cluster - v marker
96 fCategU /= 3.0;
97 fCategV /= 3.0;
98 if ((fCategU - (int)fCategU) < 0.5) {
99 MisU = 1;
100 }
101 if ((fCategV - (int)fCategV) < 0.5) {
102 MisV = 1;
103 }
104 if ((MisU == 1) && (MisV == 1)) {
105 clsShape = pxdClusterShapeType::shape_3_L; // 2x2 (u,v) three pixels: o* (L)
106 // oo
107 } else if ((MisU == 0) && (MisV == 1)) {
108 clsShape = pxdClusterShapeType::shape_3_L_mirr_u; // 2x2 (u,v) three pixels: *o (mirror_u_L)
109 // oo
110 } else if ((MisU == 1) && (MisV == 0)) {
111 clsShape = pxdClusterShapeType::shape_3_L_mirr_v; // 2x2 (u,v) three pixels: oo (mirror_v_L)
112 // o*
113 } else if ((MisU == 0) && (MisV == 0)) {
114 clsShape = pxdClusterShapeType::shape_3_L_mirr_uv; // 2x2 (u,v) three pixels: oo (mirror_u+v_L)
115 // *o
116 }
117 } else if (projV.getSize() == 1) {
118 clsShape = pxdClusterShapeType::shape_N1; // Nx1 (u,v) pixels, N > 2
119 } else if (projU.getSize() == 1) {
120 clsShape = pxdClusterShapeType::shape_1M; // 1xM (u,v) pixels, M > 2
121 } else if (projV.getSize() == 2) {
122 clsShape = pxdClusterShapeType::shape_N2; // Nx2 (u,v) pixels, N > 2
123 } else if (projU.getSize() == 2) {
124 clsShape = pxdClusterShapeType::shape_2M; // 2xM (u,v) pixels, M > 2
125 } else {
126 clsShape = pxdClusterShapeType::shape_large; // big cluster over 2x2 pixels
127 }
128 } else if (CSFull == 4) {
129 if ((projU.getSize() == 2) && (projV.getSize() == 2)) {
130 clsShape = pxdClusterShapeType::shape_4; // 2x2 (u,v) four pixels
131 } else if (projV.getSize() == 1) {
132 clsShape = pxdClusterShapeType::shape_N1; // Nx1 (u,v) pixels, N > 2
133 } else if (projU.getSize() == 1) {
134 clsShape = pxdClusterShapeType::shape_1M; // 1xM (u,v) pixels, M > 2
135 } else if (projV.getSize() == 2) {
136 clsShape = pxdClusterShapeType::shape_N2; // Nx2 (u,v) pixels, N > 2
137 } else if (projU.getSize() == 2) {
138 clsShape = pxdClusterShapeType::shape_2M; // 2xM (u,v) pixels, M > 2
139 } else {
140 clsShape = pxdClusterShapeType::shape_large; // big cluster over 2x2 pixels
141 }
142 } else if (CSFull >= 5) {
143 if (projV.getSize() == 1) {
144 clsShape = pxdClusterShapeType::shape_N1; // Nx1 (u,v) pixels, N > 2
145 } else if (projU.getSize() == 1) {
146 clsShape = pxdClusterShapeType::shape_1M; // 1xM (u,v) pixels, M > 2
147 } else if (projV.getSize() == 2) {
148 clsShape = pxdClusterShapeType::shape_N2; // Nx2 (u,v) pixels, N > 2
149 } else if (projU.getSize() == 2) {
150 clsShape = pxdClusterShapeType::shape_2M; // 2xM (u,v) pixels, M > 2
151 } else {
152 clsShape = pxdClusterShapeType::shape_large; // big cluster over 2x2 pixels
153 }
154 }
155
156 return clsShape;
157 } //setClsShape
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
pxdClusterShapeType
Type specifies cluster shape type.

Member Data Documentation

◆ pxdClusterShapeDescription

pxdClusterShapeDescr pxdClusterShapeDescription
static
Initial value:
= {
{pxdClusterShapeType::no_shape_set, "pxd cluster shape: no shape setting"},
{pxdClusterShapeType::shape_1, "pxd cluster shape: cluster 1x1 (single) pixel"},
{pxdClusterShapeType::shape_2_u, "pxd cluster shape: cluster 2x1 (u,v) pixels"},
{pxdClusterShapeType::shape_2_v, "pxd cluster shape: cluster 1x2 (u,v) pixels"},
{pxdClusterShapeType::shape_2_uv_diag, "pxd cluster shape: cluster 2x2 diagonal (u,v) pixels"},
{pxdClusterShapeType::shape_2_uv_antidiag, "pxd cluster shape: cluster 2x2 anti-diagonal (u,v) pixels"},
{pxdClusterShapeType::shape_N1, "pxd cluster shape: cluster Nx1 (u,v) pixels, N > 2"},
{pxdClusterShapeType::shape_1M, "pxd cluster shape: cluster 1xM (u,v) pixels, M > 2"},
{pxdClusterShapeType::shape_N2, "pxd cluster shape: cluster Nx2 (u,v) pixels, N > 2"},
{pxdClusterShapeType::shape_2M, "pxd cluster shape: cluster 2xM (u,v) pixels, M > 2"},
{pxdClusterShapeType::shape_4, "pxd cluster shape: cluster 2x2 (u,v) four pixels"},
{pxdClusterShapeType::shape_3_L, "pxd cluster shape: cluster 2x2 (u,v) three pixels: (L)"},
{pxdClusterShapeType::shape_3_L_mirr_u, "pxd cluster shape: cluster 2x2 (u,v) three pixels: (mirror_u_L)"},
{pxdClusterShapeType::shape_3_L_mirr_v, "pxd cluster shape: cluster 2x2 (u,v) three pixels: (mirror_v_L)"},
{pxdClusterShapeType::shape_3_L_mirr_uv, "pxd cluster shape: cluster 2x2 (u,v) three pixels: (mirror_u+v_L)"},
{pxdClusterShapeType::shape_large, "pxd cluster shape: larger cluster over 2 pixels in u and v"}
}

Create detail description of cluster shape.

Definition at line 89 of file PXDClusterShape.h.


The documentation for this class was generated from the following files: