CbmRoot
Loading...
Searching...
No Matches
CbmMuchModuleGemRectangular.h
Go to the documentation of this file.
1/* Copyright (C) 2012-2020 Petersburg Nuclear Physics Institute named by B.P.Konstantinov of National Research Centre "Kurchatov Institute", Gatchina
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Evgeny Kryshen [committer], Florian Uhlig */
4
10#ifndef CBMMUCHMODULEGEMRECTANGULAR_H
11#define CBMMUCHMODULEGEMRECTANGULAR_H 1
12
13#include "CbmMuchModuleGem.h" // for CbmMuchModuleGem
14
15#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
16#include <RtypesCore.h> // for Int_t, Double_t, Bool_t
17#include <TVector3.h> // for TVector3
18
19#include <vector> // for vector
20
23
25public:
27 CbmMuchModuleGemRectangular(Int_t iStation, Int_t iLayer, Bool_t iSide, Int_t iModule, TVector3 position,
28 TVector3 size, Double_t cutRadius);
30 virtual Bool_t InitModule();
31 CbmMuchSectorRectangular* GetSector(Double_t x, Double_t y);
32 CbmMuchSectorRectangular* GetSector(Int_t ix, Int_t iy);
33 CbmMuchPadRectangular* GetPad(Double_t x, Double_t y);
34 std::vector<std::vector<Int_t>> GetGrid() { return fGrid; }
35 Int_t GetGridNx() { return fGridNx; }
36 Int_t GetGridNy() { return fGridNy; }
37 Double_t GetGridDx() { return fGridDx; }
38 Double_t GetGridDy() { return fGridDy; }
39
40protected:
42 Int_t fGridNx; // Number of grid values in X direction
43 Int_t fGridNy; // Number of grid values in Y direction
44 Double_t fGridDx; // X-width of the grid cell
45 Double_t fGridDy; // Y-width of the grid cell
46 std::vector<std::vector<Int_t>> fGrid; // 2D-vector of sector indices on the grid
47
48 // Grid related private functions
50 void InitNeighbourPads();
51 Int_t GetGridIndexX(Double_t x);
52 Int_t GetGridIndexY(Double_t y);
53 Bool_t InitGrid(Bool_t useModuleDesign);
54
56};
57#endif
static constexpr size_t size()
Definition KfSimdPseudo.h:2
Bool_t InitGrid(Bool_t useModuleDesign)
ClassDef(CbmMuchModuleGemRectangular, 1)
std::vector< std::vector< Int_t > > GetGrid()
CbmMuchSectorRectangular * GetSector(Double_t x, Double_t y)
std::vector< std::vector< Int_t > > fGrid
CbmMuchPadRectangular * GetPad(Double_t x, Double_t y)