FairRoot/PandaRoot
PndMdtDigi.h
Go to the documentation of this file.
1 #ifndef PNDMDTDIGI_HH
2 #define PNDMDTDIGI_HH
3 
4 //#include "FairMultiLinkedData.h"
5 #include "FairTimeStamp.h"
6 #include "TVector3.h"
7 #include <vector>
8 #include "PndMdtID.h"
9 
10 class PndMdtDigi : public FairTimeStamp
11 {
12 
13  public:
14 
15  PndMdtDigi();
16 
17  PndMdtDigi (Int_t detID, TVector3& pos, std::vector<Int_t> pointList);
18  PndMdtDigi (Int_t detID, TVector3& pos, Int_t evtNo);
19 
20  virtual ~PndMdtDigi();
21 
23  virtual void Print(const Option_t* opt = 0) const {std::cout << " opt = " << opt << std::endl; return;}
24 
25  bool operator < (const PndMdtDigi& ) const;
26 
30  //void Clear(); // not implemented
31 
33  void SetPosition(const TVector3& pos) { fLabPos = pos; };
34 
35  Double_t X() const { return fLabPos.X(); }
36  Double_t Y() const { return fLabPos.Y(); }
37  Double_t Z() const { return fLabPos.Z(); }
38  Int_t GetEvtNumber() const { return fEvtNo; }
39  TVector3 GetLabPosition() const { return fLabPos; }
40  Int_t GetDetectorID() const { return fDetectorID; }
41  Short_t GetModule() const { return PndMdtID::Module(GetDetectorID());}
42  Short_t GetSector() const { return PndMdtID::Sector(GetDetectorID());}
43  Short_t GetLayer() const { return PndMdtID::Layer(GetDetectorID());}
44  Short_t GetLayerID() const { return PndMdtID::Layer(GetDetectorID());}
45  Short_t GetBox() const { return PndMdtID::Box(GetDetectorID());}
46  Short_t GetWire() const { return PndMdtID::Wire(GetDetectorID());}
47  Short_t GetStrip() const { return PndMdtID::Strip(GetDetectorID());}
49 
50  Short_t GetNPoints() const { return fPointList.size(); }
51  const std::vector<Int_t> &GetPointList() {return fPointList; }
52 
53  //time-based simulation support
54  PndMdtDigi(const PndMdtDigi&);
55 
56  private:
57 
58  Int_t fDetectorID; // Detectior ID
59  TVector3 fLabPos; // Position in the la frame
60  std::vector<Int_t> fPointList; // List of MdtPoint indices
62  Int_t fEvtNo;
63 
65 };
66 
67 
68 #endif
TVector3 pos
Short_t GetNPoints() const
Definition: PndMdtDigi.h:50
static Short_t Box(Int_t detID)
Definition: PndMdtID.h:23
Double_t X() const
Definition: PndMdtDigi.h:35
Short_t GetLayer() const
Definition: PndMdtDigi.h:43
static Bool_t isWire(Int_t detID)
Definition: PndMdtID.h:26
static Short_t Module(Int_t detID)
Definition: PndMdtID.h:20
virtual void Print(const Option_t *opt=0) const
Definition: PndMdtDigi.h:23
Double_t Y() const
Definition: PndMdtDigi.h:36
static Short_t Layer(Int_t detID)
Definition: PndMdtID.h:22
ClassDef(PndMdtDigi, 2)
Double_t Z() const
Definition: PndMdtDigi.h:37
Int_t fEvtNo
Definition: PndMdtDigi.h:62
void SetPosition(const TVector3 &pos)
Definition: PndMdtDigi.h:33
TVector3 GetLabPosition() const
Definition: PndMdtDigi.h:39
std::vector< Int_t > fPointList
Definition: PndMdtDigi.h:60
Short_t GetWire() const
Definition: PndMdtDigi.h:46
Bool_t isWire() const
Definition: PndMdtDigi.h:48
Int_t GetEvtNumber() const
Definition: PndMdtDigi.h:38
Short_t GetBox() const
Definition: PndMdtDigi.h:45
Double_t fSignalWidth
Definition: PndMdtDigi.h:61
static Short_t Sector(Int_t detID)
Definition: PndMdtID.h:21
Short_t GetLayerID() const
Definition: PndMdtDigi.h:44
Double_t
bool operator<(const PndMdtDigi &) const
Definition: PndMdtDigi.cxx:49
TVector3 fLabPos
Definition: PndMdtDigi.h:59
virtual ~PndMdtDigi()
Definition: PndMdtDigi.cxx:34
static Short_t Strip(Int_t detID)
Definition: PndMdtID.h:25
static Short_t Wire(Int_t detID)
Definition: PndMdtID.h:24
const std::vector< Int_t > & GetPointList()
Definition: PndMdtDigi.h:51
Int_t GetDetectorID() const
Definition: PndMdtDigi.h:40
Short_t GetSector() const
Definition: PndMdtDigi.h:42
Short_t GetModule() const
Definition: PndMdtDigi.h:41
Int_t fDetectorID
Definition: PndMdtDigi.h:58
Short_t GetStrip() const
Definition: PndMdtDigi.h:47