CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2018RichPar.h
Go to the documentation of this file.
1/* Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef CbmMcbm2018RichPar_H
6#define CbmMcbm2018RichPar_H
7
8#include "FairParGenericSet.h" // mother class
9
10// STD
11#include <map>
12#include <vector>
13
14// ROOT
15#include <TArrayD.h>
16#include <TArrayI.h>
17
18class CbmMcbm2018RichPar : public FairParGenericSet {
19public:
20 CbmMcbm2018RichPar(const char* name = "CbmMcbm2018RichPar", const char* title = "RICH unpacker parameters",
21 const char* context = "Default");
22
25 {
27 fToTshifts = other.fToTshifts;
29 return *this;
30 }
31
32 virtual ~CbmMcbm2018RichPar();
33
34 virtual void putParams(FairParamList*);
35
36 virtual Bool_t getParams(FairParamList*);
37
39
40public:
41 Int_t GetNaddresses(void) const { return fTRBaddresses.GetSize(); }
42
43 Int_t GetAddressIdx(Int_t addr, bool bVerbose = true) const;
44
45 Int_t GetAddress(Int_t ind) const;
46
51 Double_t GetToTshift(Int_t tdc, Int_t ch) const
52 {
53 Int_t tdcIdx = this->GetAddressIdx(tdc);
54 return this->GetToTshift2(tdcIdx, ch);
55 }
56
61 Double_t GetToTshift2(Int_t tdcIdx, Int_t ch) const;
62
63 void Print(Option_t* option = "") const;
64
65private: // Stored in the par file
71
80 TArrayD fToTshifts;
81
82private: // Recalculated
86 std::map<Int_t, Int_t> fTRBaddrMap;
87
91 std::vector<Double_t> fToTshiftMap;
92
94};
95
96#endif // CbmMcbm2018RichPar_H
Double_t GetToTshift2(Int_t tdcIdx, Int_t ch) const
Int_t GetNaddresses(void) const
CbmMcbm2018RichPar & operator=(const CbmMcbm2018RichPar &other)
Explicit copy assignment operator due to vector and map members!
Double_t GetToTshift(Int_t tdc, Int_t ch) const
Int_t GetAddress(Int_t ind) const
virtual void putParams(FairParamList *)
Int_t GetAddressIdx(Int_t addr, bool bVerbose=true) const
std::map< Int_t, Int_t > fTRBaddrMap
ClassDef(CbmMcbm2018RichPar, 2)
void Print(Option_t *option="") const
virtual Bool_t getParams(FairParamList *)
std::vector< Double_t > fToTshiftMap
CbmMcbm2018RichPar(const char *name="CbmMcbm2018RichPar", const char *title="RICH unpacker parameters", const char *context="Default")