CbmRoot
CbmTrdTrianglePRF Class Reference

Utility for converting energy to signal over the triangular pad geometry (Bucharest prototype) More...

#include <CbmTrdTrianglePRF.h>

Inheritance diagram for CbmTrdTrianglePRF:
[legend]
Collaboration diagram for CbmTrdTrianglePRF:
[legend]

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)
 
CbmTrdTrianglePRFoperator= (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...
 

Detailed Description

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:

  • bin in the upper triangle [1]
  • bin in the lower triangle [-1]
  • bin on the slit between pads [0]
    A list of functions is provided to navigate the map with self explanatory names NextBinX(), NextBinY(), PrevBinX(), PrevBinY(), GoToOriginX() and GoToOriginY()
    A link to PRF is also provided via 2 TF1 fPRFx and fPRFy which should be initialized to the corresponding model.

Usage

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.

Author
A.Bercuci aberc.nosp@m.uci@.nosp@m.niham.nosp@m..nip.nosp@m.ne.ro

Definition at line 26 of file CbmTrdTrianglePRF.h.

Member Enumeration Documentation

◆ CbmTrdTrianglePRFDef

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.

Constructor & Destructor Documentation

◆ CbmTrdTrianglePRF() [1/2]

CbmTrdTrianglePRF::CbmTrdTrianglePRF ( Float_t  W,
Float_t  H,
Int_t  n = 20 
)

Build map.

Parameters
Wcolumn width in cm
Hrow height in cm
nno 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.

◆ ~CbmTrdTrianglePRF()

CbmTrdTrianglePRF::~CbmTrdTrianglePRF ( )
virtual

Definition at line 83 of file CbmTrdTrianglePRF.cxx.

References fPRFx, and fPRFy.

◆ CbmTrdTrianglePRF() [2/2]

CbmTrdTrianglePRF::CbmTrdTrianglePRF ( const CbmTrdTrianglePRF ref)
private

Member Function Documentation

◆ GetBin()

Bool_t CbmTrdTrianglePRF::GetBin ( Double_t  x,
Double_t  y,
Int_t &  binx,
Int_t &  biny 
) const

Find bin for point (x,y)

Parameters
xcoordinate along wires in pad coordinates
ycoordinate across wires in pad coordinates
binxreturn bin index along wires in pad coordinates
binyreturn bin index across wires in pad coordinates
Returns
true if point is in the map

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().

◆ GetChargeFraction()

Double_t CbmTrdTrianglePRF::GetChargeFraction ( ) const

Compute charge fraction on the current bin.

Returns
value of charge fraction according to PRF parametrization times the bin area

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().

◆ GetCurrentBin()

void CbmTrdTrianglePRF::GetCurrentBin ( Int_t &  bx,
Int_t &  by 
) const
inline

Enquire the current status of the map iterator.

Parameters
bxon return contains x index of the current bin
byon return contains y index of the current bin

Definition at line 62 of file CbmTrdTrianglePRF.h.

References fBinx, and fBiny.

◆ GetCurrentPad()

void CbmTrdTrianglePRF::GetCurrentPad ( Int_t &  col,
Int_t &  row,
Int_t &  u 
) const

Compute the pad corresponding to current bin.

Parameters
colon return contains column offset wrt origin (0)
rowon return contains row offset wrt origin (0)
upthe 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().

◆ GetSide()

Int_t CbmTrdTrianglePRF::GetSide ( const Float_t  x,
const Float_t  y 
) const
private

Define triangular pad type.

Parameters
xposition along wires in column coordinates
yposition across wires in column coordinates
Returns
1 for upper pad and -1 for bottom

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().

◆ GoToOriginX()

void CbmTrdTrianglePRF::GoToOriginX ( )
inline

Move current binx to the origin binx0.

Definition at line 76 of file CbmTrdTrianglePRF.h.

References fBinx, and fBinx0.

Referenced by CbmTrdModuleSimT::ScanPadPlane().

◆ GoToOriginY()

void CbmTrdTrianglePRF::GoToOriginY ( )
inline

Move current biny to the origin biny0.

Definition at line 80 of file CbmTrdTrianglePRF.h.

References fBiny, and fBiny0.

Referenced by CbmTrdModuleSimT::ScanPadPlane().

◆ NextBinX()

Bool_t CbmTrdTrianglePRF::NextBinX ( )

Move current bin to the right.

Returns
true if still in map

Move current bin to the right. Check we are still in the allocated map

Definition at line 198 of file CbmTrdTrianglePRF.cxx.

References fBinx, fN, and fX.

Referenced by CbmTrdModuleSimT::ScanPadPlane().

◆ NextBinY()

Bool_t CbmTrdTrianglePRF::NextBinY ( )

Move current bin up.

Returns
true if still in map

Move current bin upwards. Check we are still in the allocated map

Definition at line 208 of file CbmTrdTrianglePRF.cxx.

References fBiny, and fN.

Referenced by CbmTrdModuleSimT::ScanPadPlane().

◆ Norm()

Double_t CbmTrdTrianglePRF::Norm ( ) const
inline

Definition at line 91 of file CbmTrdTrianglePRF.h.

References fNorm.

Referenced by CbmTrdModuleSimT::ScanPadPlane().

◆ operator=()

CbmTrdTrianglePRF& CbmTrdTrianglePRF::operator= ( const CbmTrdTrianglePRF ref)
private

◆ PrevBinX()

Bool_t CbmTrdTrianglePRF::PrevBinX ( )

Move current bin to the left.

Returns
true if still in map

Move current bin to the left. Check we are still in the allocated map

Definition at line 229 of file CbmTrdTrianglePRF.cxx.

References fBinx, and fN.

Referenced by CbmTrdModuleSimT::ScanPadPlane().

◆ PrevBinY()

Bool_t CbmTrdTrianglePRF::PrevBinY ( )

Move current bin down.

Returns
true if still in map

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().

◆ Print()

void CbmTrdTrianglePRF::Print ( Option_t *  opt = "") const

Definition at line 218 of file CbmTrdTrianglePRF.cxx.

References fdH, fdW, fN, fSlope, fUp, fX, fY, and i.

◆ SetOrigin()

Bool_t CbmTrdTrianglePRF::SetOrigin ( Double_t  x,
Double_t  y 
)

Set map offset @ point (x,y)

Parameters
xcoordinate along wires in pad coordinates
ycoordinate across wires in pad coordinates
Returns
true if point is in the map

Definition at line 249 of file CbmTrdTrianglePRF.cxx.

References fBinx, fBinx0, fBiny, fBiny0, fX0, fY0, GetBin(), x, and y.

Referenced by CbmTrdModuleSimT::ScanPadPlane().

Member Data Documentation

◆ fBinx

Int_t CbmTrdTrianglePRF::fBinx
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().

◆ fBinx0

Int_t CbmTrdTrianglePRF::fBinx0
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().

◆ fBiny

Int_t CbmTrdTrianglePRF::fBiny
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().

◆ fBiny0

Int_t CbmTrdTrianglePRF::fBiny0
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().

◆ fdH

Double_t CbmTrdTrianglePRF::fdH
private

bin half height

Definition at line 138 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), and Print().

◆ fdW

Double_t CbmTrdTrianglePRF::fdW
private

bin half width

Definition at line 137 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), and Print().

◆ fH

Double_t CbmTrdTrianglePRF::fH
private

pad height

Definition at line 136 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and GetSide().

◆ fN

Int_t CbmTrdTrianglePRF::fN
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().

◆ fNorm

Double_t CbmTrdTrianglePRF::fNorm
private

normalization factor for the 2D Gauss distribution

Definition at line 140 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), and Norm().

◆ fPRFx

TF1* CbmTrdTrianglePRF::fPRFx
private

PRF model along wires.

Definition at line 145 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetChargeFraction(), and ~CbmTrdTrianglePRF().

◆ fPRFy

TF1* CbmTrdTrianglePRF::fPRFy
private

PRF model across wires.

Definition at line 146 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetChargeFraction(), and ~CbmTrdTrianglePRF().

◆ fSlope

Double_t CbmTrdTrianglePRF::fSlope
private

slope of triangle H/W

Definition at line 139 of file CbmTrdTrianglePRF.h.

Referenced by GetSide(), and Print().

◆ fUp

std::vector<Char_t> CbmTrdTrianglePRF::fUp
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().

◆ fW

Double_t CbmTrdTrianglePRF::fW
private

pad width

Definition at line 135 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetCurrentPad(), and GetSide().

◆ fX

std::vector<Double_t> CbmTrdTrianglePRF::fX
private

position of bin center along wires

Definition at line 143 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), GetCurrentPad(), NextBinX(), and Print().

◆ fX0

Double_t CbmTrdTrianglePRF::fX0
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().

◆ fY

std::vector<Double_t> CbmTrdTrianglePRF::fY
private

position of bin center across wires

Definition at line 144 of file CbmTrdTrianglePRF.h.

Referenced by CbmTrdTrianglePRF(), GetBin(), GetChargeFraction(), GetCurrentPad(), and Print().

◆ fY0

Double_t CbmTrdTrianglePRF::fY0
private

y coordinate of cluster

Definition at line 134 of file CbmTrdTrianglePRF.h.

Referenced by GetChargeFraction(), and SetOrigin().


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