CbmRoot
Loading...
Searching...
No Matches
CbmTofDigiPar.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef CBMTOFDIGIPAR_H
6#define CBMTOFDIGIPAR_H
7
8#include <FairParGenericSet.h> // for FairParGenericSet
9
10#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
11#include <RtypesCore.h> // for Int_t, Bool_t
12#include <TArrayD.h> // for TArrayD
13#include <TArrayI.h> // for TArrayI
14#include <TGeoManager.h>
15#include <TNode.h>
16
17#include <map> // for map
18
19class CbmTofCell;
20class FairParamList;
21
22class CbmTofDigiPar : public FairParGenericSet {
23 public:
24 CbmTofDigiPar(const char* name = "CbmTofDigiPar", const char* title = "Digitization parameters for the TOF detector",
25 const char* context = "TestDefaultContext");
26
27 CbmTofDigiPar(const CbmTofDigiPar&) = delete;
29
30 ~CbmTofDigiPar(void);
31
32 void clear(void);
33 void putParams(FairParamList*);
34 Bool_t getParams(FairParamList*);
35
36 void SetNrOfCells(Int_t i) { fNrOfCells = i; }
37 void SetCellIdArray(TArrayI array) { fCellIdArray = array; }
38 void SetCellXArray(TArrayD array) { fCellXArray = array; }
39 void SetCellYArray(TArrayD array) { fCellYArray = array; }
40 void SetCellZArray(TArrayD array) { fCellZArray = array; }
41 void SetCellDxArray(TArrayD array) { fCellDxArray = array; }
42 void SetCellDyArray(TArrayD array) { fCellDyArray = array; }
43
44 void SetCellMap(std::map<Int_t, CbmTofCell*> map) { fCellMap = map; }
45
46 Int_t GetNrOfModules() { return fNrOfCells; }
47 Int_t GetCellId(Int_t i) { return fCellIdArray[i]; }
48
49
50 CbmTofCell* GetCell(Int_t i) { return fCellMap[i]; }
51
52 TGeoNode* GetNode(Int_t iCell) { return fCellNode[iCell]; }
53 void SetNode(Int_t iCell, TGeoNode* tGeoNode) { fCellNode.insert(std::pair<Int_t, TGeoNode*>(iCell, tGeoNode)); }
54 void SetNodeMap(std::map<Int_t, TGeoNode*> map) { fCellNode = map; }
55
56 private:
58 std::map<Int_t, CbmTofCell*> fCellMap;
59
60 TArrayI fCellIdArray; // Array to hold the unique IDs for all cells
61 TArrayD fCellXArray; // Array to hold the unique IDs for all cells
62 TArrayD fCellYArray; // Array to hold the unique IDs for all cells
63 TArrayD fCellZArray; // Array to hold the unique IDs for all cells
64 TArrayD fCellDxArray; // Array to hold the unique IDs for all cells
65 TArrayD fCellDyArray; // Array to hold the unique IDs for all cells
66 Int_t fNrOfCells; // Total number of cells
67 std::map<Int_t, TGeoNode*> fCellNode;
68
69 ClassDef(CbmTofDigiPar, 3)
70};
71
72#endif
CbmTofCell * GetCell(Int_t i)
std::map< Int_t, CbmTofCell * > fCellMap
void SetCellMap(std::map< Int_t, CbmTofCell * > map)
TArrayD fCellDyArray
TArrayD fCellXArray
TGeoNode * GetNode(Int_t iCell)
CbmTofDigiPar(const CbmTofDigiPar &)=delete
Int_t GetNrOfModules()
void SetCellDxArray(TArrayD array)
void putParams(FairParamList *)
void SetNodeMap(std::map< Int_t, TGeoNode * > map)
Int_t GetCellId(Int_t i)
std::map< Int_t, TGeoNode * > fCellNode
void SetCellZArray(TArrayD array)
TArrayD fCellDxArray
TArrayD fCellYArray
Bool_t getParams(FairParamList *)
void SetCellDyArray(TArrayD array)
void SetCellYArray(TArrayD array)
void SetCellIdArray(TArrayI array)
TArrayD fCellZArray
void SetNrOfCells(Int_t i)
void clear(void)
void SetCellXArray(TArrayD array)
TArrayI fCellIdArray
CbmTofDigiPar & operator=(const CbmTofDigiPar &)=delete
CbmTofDigiPar(const char *name="CbmTofDigiPar", const char *title="Digitization parameters for the TOF detector", const char *context="TestDefaultContext")
void SetNode(Int_t iCell, TGeoNode *tGeoNode)