CbmRoot
|
Utility for converting energy to signal over the triangular pad geometry (Bucharest prototype) More...
#include <CbmTrdTrianglePRF.h>
Public Types | |
enum | CbmTrdTrianglePRFDef { NC = 2 , NR = 1 } |
Public Member Functions | |
CbmTrdTrianglePRF (Float_t W, Float_t H, Int_t n=20) | |
Build map. | |
virtual | ~CbmTrdTrianglePRF () |
Bool_t | GetBin (Double_t x, Double_t y, Int_t &binx, Int_t &biny) const |
Find bin for point (x,y) | |
Double_t | GetChargeFraction () const |
Compute charge fraction on the current bin. | |
void | GetCurrentBin (Int_t &bx, Int_t &by) const |
Enquire the current status of the map iterator. | |
void | GetCurrentPad (Int_t &col, Int_t &row, Int_t &u) const |
Compute the pad corresponding to current bin. | |
void | GoToOriginX () |
Move current binx to the origin binx0. | |
void | GoToOriginY () |
Move current biny to the origin biny0. | |
Bool_t | NextBinX () |
Move current bin to the right. | |
Bool_t | NextBinY () |
Move current bin up. | |
Double_t | Norm () const |
void | Print (Option_t *opt="") const |
Bool_t | PrevBinX () |
Move current bin to the left. | |
Bool_t | PrevBinY () |
Move current bin down. | |
Bool_t | SetOrigin (Double_t x, Double_t y) |
Set map offset @ point (x,y) | |
Private Member Functions | |
CbmTrdTrianglePRF (const CbmTrdTrianglePRF &ref) | |
CbmTrdTrianglePRF & | operator= (const CbmTrdTrianglePRF &ref) |
Int_t | GetSide (const Float_t x, const Float_t y) const |
Define triangular pad type. | |
Private Attributes | |
Int_t | fN |
Int_t | fBinx |
Current bin in the map - x direction. | |
Int_t | fBinx0 |
Offset bin in the map - x direction. | |
Int_t | fBiny |
Current bin in the map - y direction. | |
Int_t | fBiny0 |
Offset bin in the map - y direction. | |
Double_t | fX0 |
Index of bin in the map corresponding to cluster center - y direction. | |
Double_t | fY0 |
y coordinate of cluster | |
Double_t | fW |
pad width | |
Double_t | fH |
pad height | |
Double_t | fdW |
bin half width | |
Double_t | fdH |
bin half height | |
Double_t | fSlope |
slope of triangle H/W | |
Double_t | fNorm |
normalization factor for the 2D Gauss distribution | |
std::vector< Char_t > | fUp |
1 for the upper pad, -1 for the bottom pad and 0 on the boundary | |
std::vector< Double_t > | fX |
position of bin center along wires | |
std::vector< Double_t > | fY |
position of bin center across wires | |
TF1 * | fPRFx |
PRF model along wires. | |
TF1 * | fPRFy |
PRF model across wires. | |
Utility for converting energy to signal over the triangular pad geometry (Bucharest prototype)
The class provides a binning which covers the pad plane area of NR x NC columns which might be activated by a particle. For each bin its center position in pad coordinates is stored in std vectors fX and fY. Three types of bins are known and saved in the fUp vector:
For each hit the class should be initialized with the position of the hit expresed in pad coordinates by calling SetOrigin(). The map is navigated and the current bin is tracked internally. User can access it via a call to GetCurrentBin() for the indexes or in terms of cols/rows with GetCurrentPad(). For the current hit one can interogate the PRF model via GetChargeFraction() function.
Definition at line 31 of file CbmTrdTrianglePRF.h.
Enumerator | |
---|---|
NC | no. of neighbor columns (except the hit) to be considered in cluster definition |
NR | no. of neighbor rows (except the hit) to be considered in cluster definition |
Definition at line 33 of file CbmTrdTrianglePRF.h.
CbmTrdTrianglePRF::CbmTrdTrianglePRF | ( | Float_t | W, |
Float_t | H, | ||
Int_t | n = 20 ) |
Build map.
W | column width in cm |
H | row height in cm |
n | no of bins requested for the map per column/row |
Build the map for triangular pad integration. The dimension of the map is given by the no of adjacent columns/rows considered in the map (default 5 columns and 3 rows)
Definition at line 22 of file CbmTrdTrianglePRF.cxx.
References fdH, fdW, fH, fN, fNorm, fPRFx, fPRFy, fUp, fW, fX, fY, GetSide(), NC, and NR.
|
virtual |
Definition at line 84 of file CbmTrdTrianglePRF.cxx.
|
private |
Bool_t CbmTrdTrianglePRF::GetBin | ( | Double_t | x, |
Double_t | y, | ||
Int_t & | binx, | ||
Int_t & | biny ) const |
Find bin for point (x,y)
x | coordinate along wires in pad coordinates |
y | coordinate across wires in pad coordinates |
binx | return bin index along wires in pad coordinates |
biny | return bin index across wires in pad coordinates |
Function looks for the bin containing the point (x,y). The function is optimized for points in the center column/pad of the map.
Definition at line 91 of file CbmTrdTrianglePRF.cxx.
References fdH, fdW, fN, fX, fY, x, and y.
Referenced by SetOrigin().
Double_t CbmTrdTrianglePRF::GetChargeFraction | ( | ) | const |
Compute charge fraction on the current bin.
Compute charge fraction on the current bin
Definition at line 151 of file CbmTrdTrianglePRF.cxx.
References fBinx, fBiny, fdH, fdW, fN, fPRFx, fPRFy, fX, fX0, fY, and fY0.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
|
inline |
Enquire the current status of the map iterator.
bx | on return contains x index of the current bin |
by | on return contains y index of the current bin |
Definition at line 66 of file CbmTrdTrianglePRF.h.
void CbmTrdTrianglePRF::GetCurrentPad | ( | Int_t & | col, |
Int_t & | row, | ||
Int_t & | u ) const |
Compute the pad corresponding to current bin.
col | on return contains column offset wrt origin (0) |
row | on return contains row offset wrt origin (0) |
up | the type of triangular pad housing the current bin |
Find the column/row for the current bin. The up parameter describe the pad holding the bin:
-1 bottom pad
0 on the split bin
1 up pad
Definition at line 162 of file CbmTrdTrianglePRF.cxx.
References fBinx, fBiny, fH, fN, fUp, fW, fX, fY, NC, and NR.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
|
private |
Define triangular pad type.
x | position along wires in column coordinates |
y | position across wires in column coordinates |
Define the type of triangular pad for the current bin defined by the position in the local column coordinates.
Return 1 for the upper pad and -1 for the bottom
Definition at line 178 of file CbmTrdTrianglePRF.cxx.
References fH, fSlope, fW, x, and y.
Referenced by CbmTrdTrianglePRF().
|
inline |
Move current binx to the origin binx0.
Definition at line 81 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
|
inline |
Move current biny to the origin biny0.
Definition at line 85 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
Bool_t CbmTrdTrianglePRF::NextBinX | ( | ) |
Move current bin to the right.
Move current bin to the right. Check we are still in the allocated map
Definition at line 200 of file CbmTrdTrianglePRF.cxx.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
Bool_t CbmTrdTrianglePRF::NextBinY | ( | ) |
Move current bin up.
Move current bin upwards. Check we are still in the allocated map
Definition at line 211 of file CbmTrdTrianglePRF.cxx.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
|
inline |
Definition at line 96 of file CbmTrdTrianglePRF.h.
References fNorm.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
|
private |
Bool_t CbmTrdTrianglePRF::PrevBinX | ( | ) |
Move current bin to the left.
Move current bin to the left. Check we are still in the allocated map
Definition at line 234 of file CbmTrdTrianglePRF.cxx.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
Bool_t CbmTrdTrianglePRF::PrevBinY | ( | ) |
Move current bin down.
Move current bin downwards. Check we are still in the allocated map
Definition at line 245 of file CbmTrdTrianglePRF.cxx.
References fBiny.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
void CbmTrdTrianglePRF::Print | ( | Option_t * | opt = "" | ) | const |
Bool_t CbmTrdTrianglePRF::SetOrigin | ( | Double_t | x, |
Double_t | y ) |
Set map offset @ point (x,y)
x | coordinate along wires in pad coordinates |
y | coordinate across wires in pad coordinates |
Definition at line 256 of file CbmTrdTrianglePRF.cxx.
References fBinx, fBinx0, fBiny, fBiny0, fX0, fY0, GetBin(), x, and y.
Referenced by CbmTrdModuleSim2D::ScanPadPlane().
|
private |
Current bin in the map - x direction.
Definition at line 129 of file CbmTrdTrianglePRF.h.
Referenced by GetChargeFraction(), GetCurrentBin(), GetCurrentPad(), GoToOriginX(), NextBinX(), PrevBinX(), and SetOrigin().
|
private |
Offset bin in the map - x direction.
Index of current bin in the map - x direction
Definition at line 131 of file CbmTrdTrianglePRF.h.
Referenced by GoToOriginX(), and SetOrigin().
|
private |
Current bin in the map - y direction.
Index of bin in the map corresponding to cluster center - x direction
Definition at line 133 of file CbmTrdTrianglePRF.h.
Referenced by GetChargeFraction(), GetCurrentBin(), GetCurrentPad(), GoToOriginY(), NextBinY(), PrevBinY(), and SetOrigin().
|
private |
Offset bin in the map - y direction.
Index of current bin in the map - y direction
Definition at line 135 of file CbmTrdTrianglePRF.h.
Referenced by GoToOriginY(), and SetOrigin().
|
private |
bin half height
Definition at line 141 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), and Print().
|
private |
bin half width
Definition at line 140 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), and Print().
|
private |
pad height
Definition at line 139 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and GetSide().
|
private |
no of bins across wires
Definition at line 127 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), GetCurrentPad(), NextBinX(), NextBinY(), PrevBinX(), and Print().
|
private |
normalization factor for the 2D Gauss distribution
Definition at line 143 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), and Norm().
|
private |
PRF model along wires.
Definition at line 147 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetChargeFraction(), and ~CbmTrdTrianglePRF().
|
private |
PRF model across wires.
Definition at line 148 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetChargeFraction(), and ~CbmTrdTrianglePRF().
|
private |
slope of triangle H/W
Definition at line 142 of file CbmTrdTrianglePRF.h.
|
private |
1 for the upper pad, -1 for the bottom pad and 0 on the boundary
Definition at line 144 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and Print().
|
private |
pad width
Definition at line 138 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and GetSide().
|
private |
position of bin center along wires
Definition at line 145 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), GetCurrentPad(), NextBinX(), and Print().
|
private |
Index of bin in the map corresponding to cluster center - y direction.
x coordinate of cluster
Definition at line 136 of file CbmTrdTrianglePRF.h.
Referenced by GetChargeFraction(), and SetOrigin().
|
private |
position of bin center across wires
Definition at line 146 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), GetCurrentPad(), and Print().
|
private |
y coordinate of cluster
Definition at line 137 of file CbmTrdTrianglePRF.h.
Referenced by GetChargeFraction(), and SetOrigin().