10#ifndef CBMSTSALGOFINDCLUSTERS_H
11#define CBMSTSALGOFINDCLUSTERS_H 1
63 typedef std::pair<const CbmStsDigi*, Long64_t>
InputData;
90 Long64_t
Exec(
const std::vector<InputData>& input, std::vector<CbmStsCluster>& output, UInt_t address,
91 UShort_t nChannels, UShort_t channelOffset, Double_t timeCutSigma, Double_t timeCutAbs,
154 if (channel < 0 || channel >=
fNofChannels)
return kFALSE;
155 return fStatus[channel].first > -1;
168 Bool_t
ProcessDigi(UShort_t channel, Double_t time, Int_t index);
177 std::vector<std::pair<Long64_t, Double_t>>
fStatus{1024, {-1, 0.}};
180 std::vector<CbmStsCluster>*
fOutput =
nullptr;
Algorithm for cluster finding in a linear array of channels.
UShort_t fChannelOffset
Number of first channel.
Double_t fTimeCutSig
Time cut in multiples of error.
Short_t ChanRight(UShort_t channel)
Number of right neighbour channel.
Double_t fTimeCutAbs
Absolute time cut [ns].
UShort_t fNofChannels
Number of channels.
std::vector< std::pair< Long64_t, Double_t > > fStatus
Status buffer.
Bool_t IsActive(Short_t channel)
Check for a channel being active.
CbmStsAlgoFindClusters()
Default constructor.
UInt_t fAddress
Unique module address for clusters.
std::vector< CbmStsCluster > * fOutput
Pointer to output vector.
Bool_t ProcessDigi(UShort_t channel, Double_t time, Int_t index)
Process one input digi.
Short_t ChanLeft(UShort_t channel)
Number of left neighbour channel.
Long64_t Exec(const std::vector< InputData > &input, std::vector< CbmStsCluster > &output, UInt_t address, UShort_t nChannels, UShort_t channelOffset, Double_t timeCutSigma, Double_t timeCutAbs, Bool_t connectEdge, const CbmStsParModule *modPar)
Algorithm execution.
std::pair< const CbmStsDigi *, Long64_t > InputData
Typedef for input data.
Bool_t fConnectEdge
Connect last and first channel.
const CbmStsParModule * fModPar
virtual ~CbmStsAlgoFindClusters()
Destructor.
void CreateCluster(UShort_t channel)
Create a cluster from an active channel.
Bool_t CheckChannel(Short_t channel, Double_t time)
Check for a matching digi in a given channel.
Data class for STS clusters.
Data class for a single-channel message in the STS.
Parameters for one STS module.