CbmRoot
|
Utility for converting energy to signal over the triangular pad geometry (Bucharest prototype) More...
#include <CbmTrdTrianglePRF.h>
Public Types | |
enum | CbmTrdTrianglePRFDef { NC, NR } |
Public Member Functions | |
CbmTrdTrianglePRF (Float_t W, Float_t H, Int_t n=20) | |
Build map. More... | |
virtual | ~CbmTrdTrianglePRF () |
Bool_t | GetBin (Double_t x, Double_t y, Int_t &binx, Int_t &biny) const |
Find bin for point (x,y) More... | |
Double_t | GetChargeFraction () const |
Compute charge fraction on the current bin. More... | |
void | GetCurrentBin (Int_t &bx, Int_t &by) const |
Enquire the current status of the map iterator. More... | |
void | GetCurrentPad (Int_t &col, Int_t &row, Int_t &u) const |
Compute the pad corresponding to current bin. More... | |
void | GoToOriginX () |
Move current binx to the origin binx0. More... | |
void | GoToOriginY () |
Move current biny to the origin biny0. More... | |
Bool_t | NextBinX () |
Move current bin to the right. More... | |
Bool_t | NextBinY () |
Move current bin up. More... | |
Double_t | Norm () const |
void | Print (Option_t *opt="") const |
Bool_t | PrevBinX () |
Move current bin to the left. More... | |
Bool_t | PrevBinY () |
Move current bin down. More... | |
Bool_t | SetOrigin (Double_t x, Double_t y) |
Set map offset @ point (x,y) More... | |
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. More... | |
Private Attributes | |
Int_t | fN |
Int_t | fBinx |
Current bin in the map - x direction. More... | |
Int_t | fBinx0 |
Offset bin in the map - x direction. More... | |
Int_t | fBiny |
Current bin in the map - y direction. More... | |
Int_t | fBiny0 |
Offset bin in the map - y direction. More... | |
Double_t | fX0 |
Index of bin in the map corresponding to cluster center - y direction. More... | |
Double_t | fY0 |
y coordinate of cluster More... | |
Double_t | fW |
pad width More... | |
Double_t | fH |
pad height More... | |
Double_t | fdW |
bin half width More... | |
Double_t | fdH |
bin half height More... | |
Double_t | fSlope |
slope of triangle H/W More... | |
Double_t | fNorm |
normalization factor for the 2D Gauss distribution More... | |
std::vector< Char_t > | fUp |
1 for the upper pad, -1 for the bottom pad and 0 on the boundary More... | |
std::vector< Double_t > | fX |
position of bin center along wires More... | |
std::vector< Double_t > | fY |
position of bin center across wires More... | |
TF1 * | fPRFx |
PRF model along wires. More... | |
TF1 * | fPRFy |
PRF model across wires. More... | |
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 26 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 28 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 18 of file CbmTrdTrianglePRF.cxx.
References fdH, fdW, fH, fN, fNorm, fPRFx, fPRFy, fUp, fW, fX, fY, GetSide(), NC, and NR.
|
virtual |
Definition at line 83 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 89 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 CbmTrdModuleSimT::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 62 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 CbmTrdModuleSimT::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 177 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 76 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdModuleSimT::ScanPadPlane().
|
inline |
Move current biny to the origin biny0.
Definition at line 80 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdModuleSimT::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 198 of file CbmTrdTrianglePRF.cxx.
Referenced by CbmTrdModuleSimT::ScanPadPlane().
Bool_t CbmTrdTrianglePRF::NextBinY | ( | ) |
Move current bin up.
Move current bin upwards. Check we are still in the allocated map
Definition at line 208 of file CbmTrdTrianglePRF.cxx.
Referenced by CbmTrdModuleSimT::ScanPadPlane().
|
inline |
Definition at line 91 of file CbmTrdTrianglePRF.h.
References fNorm.
Referenced by CbmTrdModuleSimT::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 229 of file CbmTrdTrianglePRF.cxx.
Referenced by CbmTrdModuleSimT::ScanPadPlane().
Bool_t CbmTrdTrianglePRF::PrevBinY | ( | ) |
Move current bin down.
Move current bin downwards. Check we are still in the allocated map
Definition at line 239 of file CbmTrdTrianglePRF.cxx.
References fBiny.
Referenced by CbmTrdModuleSimT::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 249 of file CbmTrdTrianglePRF.cxx.
References fBinx, fBinx0, fBiny, fBiny0, fX0, fY0, GetBin(), x, and y.
Referenced by CbmTrdModuleSimT::ScanPadPlane().
|
private |
Current bin in the map - x direction.
Definition at line 124 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 127 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 129 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 132 of file CbmTrdTrianglePRF.h.
Referenced by GoToOriginY(), and SetOrigin().
|
private |
bin half height
Definition at line 138 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), and Print().
|
private |
bin half width
Definition at line 137 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), and Print().
|
private |
pad height
Definition at line 136 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and GetSide().
|
private |
no of bins across wires
Definition at line 122 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 140 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), and Norm().
|
private |
PRF model along wires.
Definition at line 145 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetChargeFraction(), and ~CbmTrdTrianglePRF().
|
private |
PRF model across wires.
Definition at line 146 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetChargeFraction(), and ~CbmTrdTrianglePRF().
|
private |
slope of triangle H/W
Definition at line 139 of file CbmTrdTrianglePRF.h.
|
private |
1 for the upper pad, -1 for the bottom pad and 0 on the boundary
Definition at line 142 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and Print().
|
private |
pad width
Definition at line 135 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and GetSide().
|
private |
position of bin center along wires
Definition at line 143 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 133 of file CbmTrdTrianglePRF.h.
Referenced by GetChargeFraction(), and SetOrigin().
|
private |
position of bin center across wires
Definition at line 144 of file CbmTrdTrianglePRF.h.
Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), GetCurrentPad(), and Print().
|
private |
y coordinate of cluster
Definition at line 134 of file CbmTrdTrianglePRF.h.
Referenced by GetChargeFraction(), and SetOrigin().