CbmRoot
Loading...
Searching...
No Matches
CbmPsdUnpackAlgo.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Goethe-University Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pascal Raisig [committer] */
4
21#ifndef CbmPsdUnpackAlgo_H
22#define CbmPsdUnpackAlgo_H
23
24#include "CbmMcbm2018PsdPar.h"
25#include "CbmPsdDigi.h"
26#include "CbmPsdDsp.h"
27#include "CbmRecoUnpackAlgo.tmpl"
28#include "Timeslice.hpp" // timeslice
29
30#include <Rtypes.h> // for types
31#include <RtypesCore.h>
32
33#include <cstddef>
34#include <cstdint>
35#include <memory>
36#include <utility>
37
38class CbmPsdUnpackAlgo : public CbmRecoUnpackAlgo<CbmPsdDigi, CbmPsdDsp> {
39 public:
42
44 virtual ~CbmPsdUnpackAlgo();
45
48
51
61 virtual std::vector<std::pair<std::string, std::shared_ptr<FairParGenericSet>>>*
62 GetParContainerRequest(std::string geoTag, std::uint32_t runId);
63
64
65 protected:
67 void finish()
68 {
70 // Finish the monitor if we have one
71 // if (fMonitor) fMonitor->Finish();
72 }
73
75 virtual void finishDerived() { return; }
76
81 Int_t getAddress(size_t channel);
82
87 double getMipCalibration(uint8_t channel);
88
94 virtual Bool_t init();
95
99 void makeDigi(CbmPsdDsp dsp);
100
107 Bool_t initParSet(FairParGenericSet* parset);
108
115 Bool_t initParSet(CbmMcbm2018PsdPar* parset);
116
128 bool unpack(const fles::Timeslice* ts, std::uint16_t icomp, UInt_t imslice);
129
130 // Settings from parameters
131 UInt_t fuRawDataVersion = 0;
133 std::map<UInt_t, UInt_t> fGdpbIdIndexMap = {};
134 std::vector<Bool_t> fvbMaskedComponents = {};
135
136
138 UInt_t fuNrOfGbtx = 0;
139 UInt_t fuNrOfModules = 0;
140 std::vector<Int_t> fviPsdChUId = {};
141
142
143 // Channel-to-address mapping
144 std::vector<Int_t> fChannelAddress = {};
145
146 // Mip calibration vector
147 std::vector<double> fMipCalibration = {}; // Calibration array
148
150 Double_t fdTimeOffsetNs = 0.0;
151
153 static const Int_t kiMaxNbFlibLinks = 32;
154 static const UInt_t kuBytesPerMessage = 8;
155 static const UInt_t kuDetMask = 0x0001FFFF;
156
157
158 private:
159 ClassDef(CbmPsdUnpackAlgo, 2)
160};
161
162#endif // CbmPsdUnpackAlgo_H
Data class for PSD digital signal processing (DSP)
Definition CbmPsdDsp.h:30
virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * GetParContainerRequest(std::string geoTag, std::uint32_t runId)
Get the requested parameter containers. To be defined in the derived classes! Return the required par...
void finish()
Finish function for this algorithm base clase.
Bool_t initParSet(FairParGenericSet *parset)
Handles the distribution of the hidden derived classes to their explicit functions.
std::map< UInt_t, UInt_t > fGdpbIdIndexMap
std::vector< double > fMipCalibration
static const Int_t kiMaxNbFlibLinks
Constants.
CbmPsdUnpackAlgo & operator=(const CbmPsdUnpackAlgo &)=delete
Assignment operator - not implemented.
bool unpack(const fles::Timeslice *ts, std::uint16_t icomp, UInt_t imslice)
Unpack a given microslice. To be implemented in the derived unpacker algos.
virtual Bool_t init()
Intialisation at begin of run. Special inits of the derived algos.
CbmPsdUnpackAlgo()
Create the Cbm Trd Unpack AlgoBase object.
double getMipCalibration(uint8_t channel)
Energy calibration constants.
static const UInt_t kuDetMask
virtual ~CbmPsdUnpackAlgo()
Destroy the Cbm Trd Unpack Task object.
void makeDigi(CbmPsdDsp dsp)
Create a digi object from the signal.
UInt_t fuNrOfGbtx
Detector Mapping.
std::vector< Bool_t > fvbMaskedComponents
gDPB ID to index map
std::vector< Int_t > fviPsdChUId
Int_t getAddress(size_t channel)
Get channel address.
std::vector< Int_t > fChannelAddress
Double_t fdTimeOffsetNs
User settings: Data correction parameters.
CbmPsdUnpackAlgo(const CbmPsdUnpackAlgo &)=delete
Copy constructor - not implemented.
virtual void finishDerived()
Function that allows special calls during Finish in the derived algos.
static const UInt_t kuBytesPerMessage