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