CbmRoot
Loading...
Searching...
No Matches
CbmStsAlgoFindHits Class Reference

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

#include <CbmStsAlgoFindHits.h>

Public Member Functions

 CbmStsAlgoFindHits ()
 Constructor.
 
 CbmStsAlgoFindHits (const CbmStsAlgoFindHits &)=delete
 Copy constructor (disabled)
 
CbmStsAlgoFindHitsoperator= (const CbmStsAlgoFindHits &)=delete
 Assignment operator (disabled)
 
virtual ~CbmStsAlgoFindHits ()
 Destructor

 
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.
 

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.
 
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.
 
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.
 
Int_t IntersectClusters (const CbmStsCluster &clusterF, const CbmStsCluster &clusterB, UInt_t indexF, UInt_t indexB)
 Find the intersection points of two clusters.
 
Bool_t IsInside (Double_t x, Double_t y)
 Check whether a point (x,y) is inside the active area.
 
 ClassDef (CbmStsAlgoFindHits, 1)
 

Private Attributes

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

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 38 of file CbmStsAlgoFindHits.h.

Constructor & Destructor Documentation

◆ CbmStsAlgoFindHits() [1/2]

CbmStsAlgoFindHits::CbmStsAlgoFindHits ( )

Constructor.

Definition at line 28 of file CbmStsAlgoFindHits.cxx.

◆ CbmStsAlgoFindHits() [2/2]

CbmStsAlgoFindHits::CbmStsAlgoFindHits ( const CbmStsAlgoFindHits & )
delete

Copy constructor (disabled)

◆ ~CbmStsAlgoFindHits()

virtual CbmStsAlgoFindHits::~CbmStsAlgoFindHits ( )
inlinevirtual

Destructor

Definition at line 54 of file CbmStsAlgoFindHits.h.

Member Function Documentation

◆ ClassDef()

CbmStsAlgoFindHits::ClassDef ( CbmStsAlgoFindHits ,
1  )
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 33 of file CbmStsAlgoFindHits.cxx.

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

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 72 of file CbmStsAlgoFindHits.cxx.

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

Referenced by CbmStsRecoModule::FindHits().

◆ 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 165 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 115 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 199 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 227 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 283 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 364 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 176 of file CbmStsAlgoFindHits.h.

Referenced by CreateHit(), and Exec().

◆ fDx

Double_t CbmStsAlgoFindHits::fDx = 0.
private

Active size in x [cm].

Definition at line 180 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 181 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 190 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), and Intersect().

◆ fHits

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

Output vector of hits.

Definition at line 193 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 186 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 185 of file CbmStsAlgoFindHits.h.

Referenced by Exec(), and GetClusterPosition().

◆ fMatrix

TGeoHMatrix* CbmStsAlgoFindHits::fMatrix = nullptr
private

Definition at line 187 of file CbmStsAlgoFindHits.h.

Referenced by CreateHit(), and Exec().

◆ fNofStrips

UInt_t CbmStsAlgoFindHits::fNofStrips = 0
private

Number of strips.

Definition at line 179 of file CbmStsAlgoFindHits.h.

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

◆ fPitch

Double_t CbmStsAlgoFindHits::fPitch = 0.
private

Strip pitch [cm].

Definition at line 182 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 184 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 183 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 189 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 188 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 178 of file CbmStsAlgoFindHits.h.

◆ fTimeCutSig

Double_t CbmStsAlgoFindHits::fTimeCutSig = 0.
private

Time cut on clusters in error units.

Definition at line 177 of file CbmStsAlgoFindHits.h.


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