CbmRoot
CbmTofDigiPar.h
Go to the documentation of this file.
1 #ifndef CBMTOFDIGIPAR_H
2 #define CBMTOFDIGIPAR_H
3 
4 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
5 #include <RtypesCore.h> // for Int_t, Bool_t
6 #include <TArrayD.h> // for TArrayD
7 #include <TArrayI.h> // for TArrayI
8 
9 #include <map> // for map
10 
11 #include <FairParGenericSet.h> // for FairParGenericSet
12 #include <TGeoManager.h>
13 #include <TNode.h>
14 
15 class CbmTofCell;
16 class FairParamList;
17 
18 class CbmTofDigiPar : public FairParGenericSet {
19 public:
21  const char* name = "CbmTofDigiPar",
22  const char* title = "Digitization parameters for the TOF detector",
23  const char* context = "TestDefaultContext");
24 
25  CbmTofDigiPar(const CbmTofDigiPar&) = delete;
27 
28  ~CbmTofDigiPar(void);
29 
30  void clear(void);
31  void putParams(FairParamList*);
32  Bool_t getParams(FairParamList*);
33 
34  void SetNrOfCells(Int_t i) { fNrOfCells = i; }
35  void SetCellIdArray(TArrayI array) { fCellIdArray = array; }
36  void SetCellXArray(TArrayD array) { fCellXArray = array; }
37  void SetCellYArray(TArrayD array) { fCellYArray = array; }
38  void SetCellZArray(TArrayD array) { fCellZArray = array; }
39  void SetCellDxArray(TArrayD array) { fCellDxArray = array; }
40  void SetCellDyArray(TArrayD array) { fCellDyArray = array; }
41 
42  void SetCellMap(std::map<Int_t, CbmTofCell*> map) { fCellMap = map; }
43 
44  Int_t GetNrOfModules() { return fNrOfCells; }
45  Int_t GetCellId(Int_t i) { return fCellIdArray[i]; }
46 
47 
48  CbmTofCell* GetCell(Int_t i) { return fCellMap[i]; }
49 
50  TGeoNode* GetNode(Int_t iCell) { return fCellNode[iCell]; }
51  void SetNode(Int_t iCell, TGeoNode* tGeoNode) {
52  fCellNode.insert(std::pair<Int_t, TGeoNode*>(iCell, tGeoNode));
53  }
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
CbmTofDigiPar::fCellIdArray
TArrayI fCellIdArray
Definition: CbmTofDigiPar.h:60
CbmTofDigiPar::SetCellMap
void SetCellMap(std::map< Int_t, CbmTofCell * > map)
Definition: CbmTofDigiPar.h:42
CbmTofDigiPar::GetNrOfModules
Int_t GetNrOfModules()
Definition: CbmTofDigiPar.h:44
CbmTofDigiPar::fCellXArray
TArrayD fCellXArray
Definition: CbmTofDigiPar.h:61
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmTofDigiPar::SetNodeMap
void SetNodeMap(std::map< Int_t, TGeoNode * > map)
Definition: CbmTofDigiPar.h:54
CbmTofDigiPar::fCellNode
std::map< Int_t, TGeoNode * > fCellNode
Definition: CbmTofDigiPar.h:67
CbmTofDigiPar::SetNrOfCells
void SetNrOfCells(Int_t i)
Definition: CbmTofDigiPar.h:34
CbmTofDigiPar::SetCellDyArray
void SetCellDyArray(TArrayD array)
Definition: CbmTofDigiPar.h:40
CbmTofDigiPar::fCellYArray
TArrayD fCellYArray
Definition: CbmTofDigiPar.h:62
CbmTofDigiPar::GetCell
CbmTofCell * GetCell(Int_t i)
Definition: CbmTofDigiPar.h:48
CbmTofDigiPar::~CbmTofDigiPar
~CbmTofDigiPar(void)
Definition: CbmTofDigiPar.cxx:32
CbmTofDigiPar::putParams
void putParams(FairParamList *)
Definition: CbmTofDigiPar.cxx:49
CbmTofDigiPar::SetCellYArray
void SetCellYArray(TArrayD array)
Definition: CbmTofDigiPar.h:37
CbmTofDigiPar::fCellDxArray
TArrayD fCellDxArray
Definition: CbmTofDigiPar.h:64
CbmTofDigiPar::CbmTofDigiPar
CbmTofDigiPar(const char *name="CbmTofDigiPar", const char *title="Digitization parameters for the TOF detector", const char *context="TestDefaultContext")
CbmTofDigiPar::SetCellZArray
void SetCellZArray(TArrayD array)
Definition: CbmTofDigiPar.h:38
CbmTofDigiPar::fCellZArray
TArrayD fCellZArray
Definition: CbmTofDigiPar.h:63
CbmTofDigiPar::getParams
Bool_t getParams(FairParamList *)
Definition: CbmTofDigiPar.cxx:61
CbmTofDigiPar::CbmTofDigiPar
CbmTofDigiPar(const CbmTofDigiPar &)=delete
CbmTofCell
Definition: CbmTofCell.h:8
CbmTofDigiPar::fCellDyArray
TArrayD fCellDyArray
Definition: CbmTofDigiPar.h:65
CbmTofDigiPar::fCellMap
std::map< Int_t, CbmTofCell * > fCellMap
Definition: CbmTofDigiPar.h:58
CbmTofDigiPar::GetNode
TGeoNode * GetNode(Int_t iCell)
Definition: CbmTofDigiPar.h:50
CbmTofDigiPar::SetNode
void SetNode(Int_t iCell, TGeoNode *tGeoNode)
Definition: CbmTofDigiPar.h:51
CbmTofDigiPar
Definition: CbmTofDigiPar.h:18
CbmTofDigiPar::SetCellDxArray
void SetCellDxArray(TArrayD array)
Definition: CbmTofDigiPar.h:39
CbmTofDigiPar::GetCellId
Int_t GetCellId(Int_t i)
Definition: CbmTofDigiPar.h:45
CbmTofDigiPar::operator=
CbmTofDigiPar & operator=(const CbmTofDigiPar &)=delete
CbmTofDigiPar::clear
void clear(void)
Definition: CbmTofDigiPar.cxx:44
CbmTofDigiPar::SetCellIdArray
void SetCellIdArray(TArrayI array)
Definition: CbmTofDigiPar.h:35
CbmTofDigiPar::fNrOfCells
Int_t fNrOfCells
Definition: CbmTofDigiPar.h:66
CbmTofDigiPar::SetCellXArray
void SetCellXArray(TArrayD array)
Definition: CbmTofDigiPar.h:36