CbmRoot
CbmStsAlgoFindHitsOrtho Class Reference

Algorithm for hit finding in sensors with orthogonal strips. More...

#include <CbmStsAlgoFindHitsOrtho.h>

Public Member Functions

 CbmStsAlgoFindHitsOrtho ()
 Constructor. More...
 
 CbmStsAlgoFindHitsOrtho (const CbmStsAlgoFindHitsOrtho &)=delete
 Copy constructor (disabled) More...
 
CbmStsAlgoFindHitsOrthooperator= (const CbmStsAlgoFindHitsOrtho &)=delete
 Assignment operator (disabled) More...
 
virtual ~CbmStsAlgoFindHitsOrtho ()
 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, UInt_t nStripsF, UInt_t nStripsB, Double_t pitchF, Double_t pitchB, 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...
 
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 (CbmStsAlgoFindHitsOrtho, 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 fNofStripsF = 0
 Number of strips front side. More...
 
UInt_t fNofStripsB = 0
 Number of strips backs side. More...
 
Double_t fDx = 0.
 Active size in x [cm]. More...
 
Double_t fDy = 0.
 Active size in y [cm]. More...
 
Double_t fPitchF = 0.
 Strip pitch front side [cm]. More...
 
Double_t fPitchB = 0.
 Strip pitch back side [cm]. 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
 
std::vector< CbmStsHit > * fHits = nullptr
 ///< Transformation matrix to global C.S. More...
 

Detailed Description

Algorithm for hit finding in sensors with orthogonal strips.

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 35 of file CbmStsAlgoFindHitsOrtho.h.

Constructor & Destructor Documentation

◆ CbmStsAlgoFindHitsOrtho() [1/2]

CbmStsAlgoFindHitsOrtho::CbmStsAlgoFindHitsOrtho ( )

Constructor.

Definition at line 24 of file CbmStsAlgoFindHitsOrtho.cxx.

◆ CbmStsAlgoFindHitsOrtho() [2/2]

CbmStsAlgoFindHitsOrtho::CbmStsAlgoFindHitsOrtho ( const CbmStsAlgoFindHitsOrtho )
delete

Copy constructor (disabled)

◆ ~CbmStsAlgoFindHitsOrtho()

virtual CbmStsAlgoFindHitsOrtho::~CbmStsAlgoFindHitsOrtho ( )
inlinevirtual

Destructor

Definition at line 51 of file CbmStsAlgoFindHitsOrtho.h.

Member Function Documentation

◆ ClassDef()

CbmStsAlgoFindHitsOrtho::ClassDef ( CbmStsAlgoFindHitsOrtho  ,
 
)
private

◆ CreateHit()

void CbmStsAlgoFindHitsOrtho::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 CbmStsAlgoFindHitsOrtho.cxx.

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

Referenced by IntersectClusters().

◆ Exec()

Long64_t CbmStsAlgoFindHitsOrtho::Exec ( const std::vector< CbmStsCluster > &  clustersF,
const std::vector< CbmStsCluster > &  clustersB,
std::vector< CbmStsHit > &  hits,
UInt_t  address,
Double_t  timeCutSig,
Double_t  timeCutAbs,
UInt_t  nStripsF,
UInt_t  nStripsB,
Double_t  pitchF,
Double_t  pitchB,
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]
nStripsFNumber of strips on front side
nStripsBNumber of strips on back side
pitchFStrip pitch on front side [cm]
pitchBStrip pitch on back side [cm]
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 CbmStsAlgoFindHitsOrtho.cxx.

References fabs(), fAddress, fDx, fDy, fHits, fLorentzB, fLorentzF, fMatrix, fNofStripsB, fNofStripsF, fPitchB, fPitchF, CbmStsCluster::GetTime(), CbmStsCluster::GetTimeError(), hits, and IntersectClusters().

◆ GetClusterPosition()

void CbmStsAlgoFindHitsOrtho::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 182 of file CbmStsAlgoFindHitsOrtho.cxx.

References fLorentzB, fLorentzF, fPitchB, fPitchF, and GetStrip().

Referenced by IntersectClusters().

◆ GetSide()

Int_t CbmStsAlgoFindHitsOrtho::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 CbmStsAlgoFindHitsOrtho.h.

References fNofStripsB, and fNofStripsF.

◆ GetStrip()

pair< Int_t, Int_t > CbmStsAlgoFindHitsOrtho::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 221 of file CbmStsAlgoFindHitsOrtho.cxx.

References fNofStripsF.

Referenced by GetClusterPosition().

◆ IntersectClusters()

Int_t CbmStsAlgoFindHitsOrtho::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 241 of file CbmStsAlgoFindHitsOrtho.cxx.

References CreateHit(), fDx, fDy, fPitchB, fPitchF, GetClusterPosition(), CbmStsCluster::GetPosition(), and CbmStsCluster::GetPositionError().

Referenced by Exec().

◆ IsInside()

Bool_t CbmStsAlgoFindHitsOrtho::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 294 of file CbmStsAlgoFindHitsOrtho.cxx.

References fDx, fDy, x, and y.

◆ operator=()

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

Assignment operator (disabled)

Member Data Documentation

◆ fAddress

UInt_t CbmStsAlgoFindHitsOrtho::fAddress = 0
private

Unique address for hits (sensor)

Definition at line 174 of file CbmStsAlgoFindHitsOrtho.h.

Referenced by CreateHit(), and Exec().

◆ fDx

Double_t CbmStsAlgoFindHitsOrtho::fDx = 0.
private

Active size in x [cm].

Definition at line 179 of file CbmStsAlgoFindHitsOrtho.h.

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

◆ fDy

Double_t CbmStsAlgoFindHitsOrtho::fDy = 0.
private

Active size in y [cm].

Definition at line 180 of file CbmStsAlgoFindHitsOrtho.h.

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

◆ fHits

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

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

Output vector of hits

Definition at line 188 of file CbmStsAlgoFindHitsOrtho.h.

Referenced by CreateHit(), and Exec().

◆ fLorentzB

Double_t CbmStsAlgoFindHitsOrtho::fLorentzB = 0.
private

Lorentz shift correction back side [cm].

Definition at line 184 of file CbmStsAlgoFindHitsOrtho.h.

Referenced by Exec(), and GetClusterPosition().

◆ fLorentzF

Double_t CbmStsAlgoFindHitsOrtho::fLorentzF = 0.
private

Lorentz shift correction front side [cm].

Definition at line 183 of file CbmStsAlgoFindHitsOrtho.h.

Referenced by Exec(), and GetClusterPosition().

◆ fMatrix

TGeoHMatrix* CbmStsAlgoFindHitsOrtho::fMatrix = nullptr
private

Definition at line 185 of file CbmStsAlgoFindHitsOrtho.h.

Referenced by CreateHit(), and Exec().

◆ fNofStripsB

UInt_t CbmStsAlgoFindHitsOrtho::fNofStripsB = 0
private

Number of strips backs side.

Definition at line 178 of file CbmStsAlgoFindHitsOrtho.h.

Referenced by Exec(), and GetSide().

◆ fNofStripsF

UInt_t CbmStsAlgoFindHitsOrtho::fNofStripsF = 0
private

Number of strips front side.

Definition at line 177 of file CbmStsAlgoFindHitsOrtho.h.

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

◆ fPitchB

Double_t CbmStsAlgoFindHitsOrtho::fPitchB = 0.
private

Strip pitch back side [cm].

Definition at line 182 of file CbmStsAlgoFindHitsOrtho.h.

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

◆ fPitchF

Double_t CbmStsAlgoFindHitsOrtho::fPitchF = 0.
private

Strip pitch front side [cm].

Definition at line 181 of file CbmStsAlgoFindHitsOrtho.h.

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

◆ fTimeCutAbs

Double_t CbmStsAlgoFindHitsOrtho::fTimeCutAbs = 0.
private

Time cut on clusters in ns.

Definition at line 176 of file CbmStsAlgoFindHitsOrtho.h.

◆ fTimeCutSig

Double_t CbmStsAlgoFindHitsOrtho::fTimeCutSig = 0.
private

Time cut on clusters in error units.

Definition at line 175 of file CbmStsAlgoFindHitsOrtho.h.


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