PandaRoot
PndSttTube.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDSTTTUBE_H
14 #define PNDSTTTUBE_H 1
15 
16 #include "TVector3.h"
17 #include "TMatrixT.h"
18 #include "TObject.h"
19 #include "TArrayI.h"
20 #include "PndSttTubeParameters.h"
21 
23 class PndSttTube : public TObject {
24 
25  public:
27  PndSttTube();
28  PndSttTube(PndSttTube &tube);
29 
30  ~PndSttTube();
31  PndSttTube(PndSttTubeParameters *parms, Double_t x, Double_t y, Double_t z, Double_t r11, Double_t r12, Double_t r13, Double_t r21, Double_t r22, Double_t r23, Double_t r31,
32  Double_t r32, Double_t r33, Double_t radin, Double_t radout);
33 
35  {
36  fTubeParms = o.fTubeParms;
37  fCenPosition = o.fCenPosition;
38  fRotationMatrix = o.fRotationMatrix;
39  fRadIn = o.fRadIn;
40  fRadOut = o.fRadOut;
41  fSectorID = o.fSectorID;
42  fLayerID = o.fLayerID;
43  fNeighborings = o.fNeighborings;
44  fLayerLimit = o.fLayerLimit;
45  fSectorLimit = o.fSectorLimit;
46  return *this;
47  };
48 
49  TVector3 GetPosition();
50  TMatrixT<Double_t> GetRotationMatrix();
51  Double_t GetRadIn();
52  Double_t GetRadOut();
53  Double_t GetHalfLength();
54  TVector3 GetWireDirection();
56  Int_t GetTubeID();
57  void SetSectorID(int id);
58  void SetLayerID(int id);
59  int GetLayerID();
60  int GetSectorID();
61  void SetNeighborings(TArrayI neighborings);
62  TArrayI GetNeighborings();
63  Int_t GetNeighboring(int i);
64  Double_t GetDistance(PndSttTube *tube);
65  Bool_t IsNeighboring(int tubeID);
66 
67  void SetSectorLimitFlag(Int_t flag) { fSectorLimit = flag; }
68  void SetLayerLimitFlag(Bool_t flag = kTRUE) { fLayerLimit = flag; }
69  bool IsLayerLimit() { return fLayerLimit; }
70  int IsSectorLimit() { return fSectorLimit; }
71 
72  bool IsParallel() { return (GetWireDirection().Z() == 1); }
73 
74  bool IsSkew() { return !(GetWireDirection().Z() == 1); }
75 
76  private:
77  PndSttTubeParameters *fTubeParms;
78  TVector3 fCenPosition;
79  TMatrixT<double> fRotationMatrix;
80  Double_t fRadIn, fRadOut;
81  Int_t fSectorID, fLayerID;
82  TArrayI fNeighborings;
83  Bool_t fLayerLimit;
84  Int_t fSectorLimit;
85 
86  ClassDef(PndSttTube, 1);
87 };
88 
89 #endif
void SetSectorID(int id)
Double_t GetHalfLength()
void SetLayerLimitFlag(Bool_t flag=kTRUE)
Definition: PndSttTube.h:68
void SetSectorLimitFlag(Int_t flag)
Definition: PndSttTube.h:67
Double_t GetDistance(PndSttTube *tube)
unsigned int i
Definition: P4_F32vec4.h:33
void SetNeighborings(TArrayI neighborings)
Double_t GetRadIn()
int GetLayerID()
TMatrixT< Double_t > GetRotationMatrix()
PndSttTube & operator=(const PndSttTube &o)
Definition: PndSttTube.h:34
Bool_t IsNeighboring(int tubeID)
Int_t GetTubeID()
TArrayI GetNeighborings()
TVector3 GetPosition()
PndSttTubeParameters * GetTubeParameters()
int IsSectorLimit()
Definition: PndSttTube.h:70
Int_t GetNeighboring(int i)
bool IsParallel()
Definition: PndSttTube.h:72
int GetSectorID()
Double_t GetRadOut()
TVector3 GetWireDirection()
void SetLayerID(int id)
bool IsSkew()
Definition: PndSttTube.h:74
bool IsLayerLimit()
Definition: PndSttTube.h:69