CbmRoot
Loading...
Searching...
No Matches
CbmMuchSectorRectangular.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
14#ifndef CBMMUCHSECTORRECTANGULAR_H
15#define CBMMUCHSECTORRECTANGULAR_H 1
16
17#include "CbmMuchSector.h" // for CbmMuchSector
18
19#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
20#include <RtypesCore.h> // for Double_t, Int_t, Bool_t, UInt_t, kFALSE
21#include <TPave.h> // for TPave
22#include <TVector3.h> // for TVector3
23
24#include <vector> // for vector
25
27
28class CbmMuchSectorRectangular : public CbmMuchSector, public TPave {
29public:
31 CbmMuchSectorRectangular(UInt_t modAddress, UInt_t index, TVector3 pos, TVector3 size, Int_t padNx, Int_t padNy);
33 // virtual void GetPadVertices(Int_t iChannel, Double_t* xPad, Double_t* yPad);
34 TVector3 GetPosition() const { return fPosition; }
35 TVector3 GetSize() const { return fSize; }
36 Int_t GetPadNx() const { return fPadNx; }
37 Int_t GetPadNy() const { return fPadNy; }
38 Double_t GetPadDx() const { return fPadDx; }
39 Double_t GetPadDy() const { return fPadDy; }
40 Double_t GetSigmaX() const { return fPadDx / 12; }
41 Double_t GetSigmaY() const { return fPadDy / 12; }
42 Double_t GetXmin() const { return fPosition[0] - fSize[0] / 2; }
43 Double_t GetYmin() const { return fPosition[1] - fSize[1] / 2; }
44
45 // TArrayI GetNeighbours() const { return fNeighbours; }
46 void SetNeighbours(std::vector<CbmMuchSectorRectangular*> neighbours) { fNeighbours = neighbours; }
47 Bool_t Inside(Double_t x, Double_t y) { return x > fX1 && x < fX2 && y > fY1 && y < fY2; }
48 Bool_t IsIncomplete() { return kFALSE; }
49
50 std::vector<CbmMuchSectorRectangular*> GetNeighbours() { return fNeighbours; }
51 CbmMuchPadRectangular* GetPad(Double_t x, Double_t y);
52 void AddPads();
53 void DrawPads();
54
55protected:
56 TVector3 fPosition;
57 TVector3 fSize;
58 Int_t fPadNx;
59 Int_t fPadNy;
60 Double_t fPadDx;
61 Double_t fPadDy;
62 std::vector<CbmMuchSectorRectangular*> fNeighbours;
63
65};
66
67#endif
static constexpr size_t size()
Definition KfSimdPseudo.h:2
CbmMuchPadRectangular * GetPad(Double_t x, Double_t y)
std::vector< CbmMuchSectorRectangular * > GetNeighbours()
std::vector< CbmMuchSectorRectangular * > fNeighbours
void SetNeighbours(std::vector< CbmMuchSectorRectangular * > neighbours)
Bool_t Inside(Double_t x, Double_t y)
ClassDef(CbmMuchSectorRectangular, 1)