CbmRoot
CbmStsAlgoFindHits Class Reference

Algorithm for hit finding in the sensors of the CBM-STS. More...

#include <CbmStsAlgoFindHits.h>

Public Member Functions

 CbmStsAlgoFindHits ()
 Constructor. More...
 
 CbmStsAlgoFindHits (const CbmStsAlgoFindHits &)=delete
 Copy constructor (disabled) More...
 
CbmStsAlgoFindHitsoperator= (const CbmStsAlgoFindHits &)=delete
 Assignment operator (disabled) More...
 
virtual ~CbmStsAlgoFindHits ()
 Destructor
More...
 
Long64_t Exec (const std::vector< CbmStsCluster > &clustersF, const std::vector< CbmStsCluster > &clustersB, std::vector< CbmStsHit > &hits, UInt_t address, Double_t timeCutSig, Double_t timeCutAbs, Double_t dY, UInt_t nStrips, Double_t pitch, Double_t stereoF, Double_t stereoB, Double_t lorentzF, Double_t lorentzB, TGeoHMatrix *matrix)
 Execute algorithm. More...
 

Private Member Functions

void CreateHit (Double_t xLocal, Double_t yLocal, Double_t varX, Double_t varY, Double_t varXY, const CbmStsCluster &clusterF, const CbmStsCluster &clusterB, UInt_t indexF, UInt_t indexB, Double_t du=0., Double_t dv=0.)
 Create a new hit in the output array. More...
 
void GetClusterPosition (Double_t ClusterCentre, Double_t &xCluster, Int_t &side)
 
Int_t GetSide (Double_t channel) const
 
std::pair< Int_t, Int_t > GetStrip (UInt_t channel) const
 Get strip and side from module channel. More...
 
Bool_t Intersect (Double_t xF, Double_t exF, Double_t xB, Double_t exB, Double_t &x, Double_t &y, Double_t &varX, Double_t &varY, Double_t &varXY)
 Intersection point of two strips / cluster centres. More...
 
Int_t IntersectClusters (const CbmStsCluster &clusterF, const CbmStsCluster &clusterB, UInt_t indexF, UInt_t indexB)
 Find the intersection points of two clusters. More...
 
Bool_t IsInside (Double_t x, Double_t y)
 Check whether a point (x,y) is inside the active area. More...
 
 ClassDef (CbmStsAlgoFindHits, 1)
 

Private Attributes

UInt_t fAddress = 0
 Unique address for hits (sensor) More...
 
Double_t fTimeCutSig = 0.
 Time cut on clusters in error units. More...
 
Double_t fTimeCutAbs = 0.
 Time cut on clusters in ns. More...
 
UInt_t fNofStrips = 0
 Number of strips. More...
 
Double_t fDx = 0.
 Active size in x [cm]. More...
 
Double_t fDy = 0.
 Active size in y [cm]. More...
 
Double_t fPitch = 0.
 Strip pitch [cm]. More...
 
Double_t fStereoF = 0.
 Stereo angle front side [deg]. More...
 
Double_t fStereoB = 0.
 Stereo angle back side [deg]. More...
 
Double_t fLorentzF = 0.
 Lorentz shift correction front side [cm]. More...
 
Double_t fLorentzB = 0.
 Lorentz shift correction back side [cm]. More...
 
TGeoHMatrix * fMatrix = nullptr
 
Double_t fTanStereoF = 0.
 ///< Transformation matrix to global C.S. More...
 
Double_t fTanStereoB = 0.
 Tangent of stereo angle back side. More...
 
Double_t fErrorFac = 0.
 For calculation of the hit error. More...
 
std::vector< CbmStsHit > * fHits = nullptr
 Output vector of hits. More...
 

Detailed Description

Algorithm for hit finding in the sensors of the CBM-STS.

Author
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
F. Boeck (FIAS)
Since
23.03.2020

A hit is constructed from two clusters, one from the front side, the other one from the back side of the sensor, if they two clusters have a geometrical intersection in the active sensor area, and if they are compatible in time. The algorithm combines front-side with back-side clusters and checks for these conditions. The hit coordinates are transformed into the global coordinate system.

The loop over the clusters was optimised by F. Boeck for application to free-streaming data (not sorted into events).

Definition at line 34 of file CbmStsAlgoFindHits.h.

Constructor & Destructor Documentation

◆ CbmStsAlgoFindHits() [1/2]

CbmStsAlgoFindHits::CbmStsAlgoFindHits ( )

Constructor.

Definition at line 24 of file CbmStsAlgoFindHits.cxx.

◆ CbmStsAlgoFindHits() [2/2]

CbmStsAlgoFindHits::CbmStsAlgoFindHits ( const CbmStsAlgoFindHits )
delete

Copy constructor (disabled)

◆ ~CbmStsAlgoFindHits()

virtual CbmStsAlgoFindHits::~CbmStsAlgoFindHits ( )
inlinevirtual

Destructor

Definition at line 50 of file CbmStsAlgoFindHits.h.

Member Function Documentation

◆ ClassDef()

CbmStsAlgoFindHits::ClassDef ( CbmStsAlgoFindHits  ,
 
)
private

◆ CreateHit()

void CbmStsAlgoFindHits::CreateHit ( Double_t  xLocal,
Double_t  yLocal,
Double_t  varX,
Double_t  varY,
Double_t  varXY,
const CbmStsCluster clusterF,
const CbmStsCluster clusterB,
UInt_t  indexF,
UInt_t  indexB,
Double_t  du = 0.,
Double_t  dv = 0. 
)
private

Create a new hit in the output array.

Parameters
xLocalhit x coordinate in sensor system [cm]
yLocalhit y coordinate in sensor system [cm]
varXVariance in x [cm^2]
varYVariance in y [cm^2]
varXYCovariance of x and y [cm^2]
clusterFFront-side cluster
clusterBBack-side cluster
indexFIndex of front-side cluster
indexBIndex of back-side cluster
duError in u coordinate (across strips front side) [cm]
dvError in v coordinate (across strips back side) [cm]

Definition at line 29 of file CbmStsAlgoFindHits.cxx.

References fAddress, fHits, fMatrix, CbmStsCluster::GetTime(), and CbmStsCluster::GetTimeError().

Referenced by IntersectClusters().

◆ Exec()

Long64_t CbmStsAlgoFindHits::Exec ( const std::vector< CbmStsCluster > &  clustersF,
const std::vector< CbmStsCluster > &  clustersB,
std::vector< CbmStsHit > &  hits,
UInt_t  address,
Double_t  timeCutSig,
Double_t  timeCutAbs,
Double_t  dY,
UInt_t  nStrips,
Double_t  pitch,
Double_t  stereoF,
Double_t  stereoB,
Double_t  lorentzF,
Double_t  lorentzB,
TGeoHMatrix *  matrix 
)

Execute algorithm.

Parameters
clustersFInput clusters front side
clusterBInput clusters back side
hitsOutput hits
Hitaddress ( = module address)
timeCutSigTime cut in units of cluster time error
timeCutAbsTime cut in ns
dYVertical size of the active sensor area [cm]
nStripsNumber of strips (same for both sensor sides)
pitchStrip ptch [cm] (same for both sensor sides)
stereoFStrip stereo angle sensor front side [deg]
stereoBStrip stereo angle sensor back side [deg]
lorentzFMean Lorentz shift front side (electrons) [cm]
lorentzBMean Lorentz shift back side (holes) [cm]
matrixTransformation matrix from local to global C.S.
Returns
Number of created hits

Definition at line 85 of file CbmStsAlgoFindHits.cxx.

References fabs(), fAddress, fDx, fDy, fErrorFac, fHits, fLorentzB, fLorentzF, fMatrix, fNofStrips, fPitch, fStereoB, fStereoF, fTanStereoB, fTanStereoF, CbmStsCluster::GetTime(), CbmStsCluster::GetTimeError(), hits, and IntersectClusters().

Referenced by CbmStsRecoModule::Reconstruct().

◆ GetClusterPosition()

void CbmStsAlgoFindHits::GetClusterPosition ( Double_t  ClusterCentre,
Double_t &  xCluster,
Int_t &  side 
)
private

Get the cluster position at the top edge of the sensor.

Parameters
[in]centreCluster centre in (module) channel units
[out]xClusterCluster position at readout edge
[out]sideSensor side [0 = front, 1 = back]

A correction for the Lorentz shift is applied.

Definition at line 185 of file CbmStsAlgoFindHits.cxx.

References fLorentzB, fLorentzF, fPitch, and GetStrip().

Referenced by IntersectClusters().

◆ GetSide()

Int_t CbmStsAlgoFindHits::GetSide ( Double_t  channel) const
inlineprivate

Get the side of the sensor from the module channel number The channel number can also be the cluster position, so it needs not be integer.

Parameters
channelChannel number
Returns
Sensor side ( 0 = front, 1 = back)

Definition at line 130 of file CbmStsAlgoFindHits.h.

References fNofStrips.

◆ GetStrip()

pair< Int_t, Int_t > CbmStsAlgoFindHits::GetStrip ( UInt_t  channel) const
private

Get strip and side from module channel.

Parameters
[in]channelChannel number in module
[in]sensorIdSensor index in module @value Pair of strip number and side

Note: This must be the inverse of GetModuleChannel.

Definition at line 220 of file CbmStsAlgoFindHits.cxx.

References fNofStrips.

Referenced by GetClusterPosition().

◆ Intersect()

Bool_t CbmStsAlgoFindHits::Intersect ( Double_t  xF,
Double_t  exF,
Double_t  xB,
Double_t  exB,
Double_t &  x,
Double_t &  y,
Double_t &  varX,
Double_t &  varY,
Double_t &  varXY 
)
private

Intersection point of two strips / cluster centres.

Parameters
[in]xFx coordinate on read-out edge, front side [cm]
[in]exFuncertainty on xF [cm]
[in]xBx coordinate on read-out edge, back side [cm]
[in]eBFuncertainty on xB [cm]
[out]xx coordinate of crossing [cm]
[out]yy coordinate of crossing [cm]
[out]varXVariance in x [cm^2]
[out]varYVariance in y [cm^2]
[out]varXYCovariance of x and y [cm^2]
Returns
kTRUE if intersection is inside active area.

This function calculates the intersection point of two lines starting at xF and xB at the top edge with slopes corresponding to the respective stereo angle.

All coordinates are in the sensor frame with the origin in the bottom left corner of the active area.

Definition at line 246 of file CbmStsAlgoFindHits.cxx.

References fDx, fDy, fErrorFac, fStereoB, fStereoF, fTanStereoB, fTanStereoF, IsInside(), x, and y.

Referenced by IntersectClusters().

◆ IntersectClusters()

Int_t CbmStsAlgoFindHits::IntersectClusters ( const CbmStsCluster clusterF,
const CbmStsCluster clusterB,
UInt_t  indexF,
UInt_t  indexB 
)
private

Find the intersection points of two clusters.

Parameters
clusterFCluster on front side
clusterBCluster on back side
indexFIndex of cluster on front side
indexBIndex of cluster on back side
Returns
Number of intersection points inside active area

For each intersection point, a hit is created.

Definition at line 310 of file CbmStsAlgoFindHits.cxx.

References CreateHit(), fDx, fDy, fPitch, fStereoB, fStereoF, fTanStereoB, fTanStereoF, GetClusterPosition(), CbmStsCluster::GetPosition(), CbmStsCluster::GetPositionError(), and Intersect().

Referenced by Exec().

◆ IsInside()

Bool_t CbmStsAlgoFindHits::IsInside ( Double_t  x,
Double_t  y 
)
private

Check whether a point (x,y) is inside the active area.

Parameters
xx coordinate in the local c.s. [cm]
yy coordinate in the local c.s. [cm]
Returns
kTRUE if inside active area.

The coordinates have to be given in the local coordinate system (origin in the sensor centre).

Definition at line 403 of file CbmStsAlgoFindHits.cxx.

References fDx, fDy, x, and y.

Referenced by Intersect().

◆ operator=()

CbmStsAlgoFindHits& CbmStsAlgoFindHits::operator= ( const CbmStsAlgoFindHits )
delete

Assignment operator (disabled)

Member Data Documentation

◆ fAddress

UInt_t CbmStsAlgoFindHits::fAddress = 0
private

Unique address for hits (sensor)

Definition at line 203 of file CbmStsAlgoFindHits.h.

Referenced by CreateHit(), and Exec().

◆ fDx

Double_t CbmStsAlgoFindHits::fDx = 0.
private

Active size in x [cm].

Definition at line 207 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), Intersect(), IntersectClusters(), and IsInside().

◆ fDy

Double_t CbmStsAlgoFindHits::fDy = 0.
private

Active size in y [cm].

Definition at line 208 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), Intersect(), IntersectClusters(), and IsInside().

◆ fErrorFac

Double_t CbmStsAlgoFindHits::fErrorFac = 0.
private

For calculation of the hit error.

Definition at line 217 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), and Intersect().

◆ fHits

std::vector<CbmStsHit>* CbmStsAlgoFindHits::fHits = nullptr
private

Output vector of hits.

Definition at line 220 of file CbmStsAlgoFindHits.h.

Referenced by CreateHit(), and Exec().

◆ fLorentzB

Double_t CbmStsAlgoFindHits::fLorentzB = 0.
private

Lorentz shift correction back side [cm].

Definition at line 213 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), and GetClusterPosition().

◆ fLorentzF

Double_t CbmStsAlgoFindHits::fLorentzF = 0.
private

Lorentz shift correction front side [cm].

Definition at line 212 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), and GetClusterPosition().

◆ fMatrix

TGeoHMatrix* CbmStsAlgoFindHits::fMatrix = nullptr
private

Definition at line 214 of file CbmStsAlgoFindHits.h.

Referenced by CreateHit(), and Exec().

◆ fNofStrips

UInt_t CbmStsAlgoFindHits::fNofStrips = 0
private

Number of strips.

Definition at line 206 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), GetSide(), and GetStrip().

◆ fPitch

Double_t CbmStsAlgoFindHits::fPitch = 0.
private

Strip pitch [cm].

Definition at line 209 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), GetClusterPosition(), and IntersectClusters().

◆ fStereoB

Double_t CbmStsAlgoFindHits::fStereoB = 0.
private

Stereo angle back side [deg].

Definition at line 211 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), Intersect(), and IntersectClusters().

◆ fStereoF

Double_t CbmStsAlgoFindHits::fStereoF = 0.
private

Stereo angle front side [deg].

Definition at line 210 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), Intersect(), and IntersectClusters().

◆ fTanStereoB

Double_t CbmStsAlgoFindHits::fTanStereoB = 0.
private

Tangent of stereo angle back side.

Definition at line 216 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), Intersect(), and IntersectClusters().

◆ fTanStereoF

Double_t CbmStsAlgoFindHits::fTanStereoF = 0.
private

///< Transformation matrix to global C.S.

Tangent of stereo angle front side

Definition at line 215 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), Intersect(), and IntersectClusters().

◆ fTimeCutAbs

Double_t CbmStsAlgoFindHits::fTimeCutAbs = 0.
private

Time cut on clusters in ns.

Definition at line 205 of file CbmStsAlgoFindHits.h.

◆ fTimeCutSig

Double_t CbmStsAlgoFindHits::fTimeCutSig = 0.
private

Time cut on clusters in error units.

Definition at line 204 of file CbmStsAlgoFindHits.h.


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