PandaRoot
PndMdtDigi.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 PNDMDTDIGI_HH
14 #define PNDMDTDIGI_HH
15 
16 //#include "FairMultiLinkedData.h"
17 #include "FairTimeStamp.h"
18 #include "TVector3.h"
19 #include <vector>
20 #include "PndMdtID.h"
21 
22 class PndMdtDigi : public FairTimeStamp {
23 
24  public:
25  PndMdtDigi();
26 
27  PndMdtDigi(Int_t detID, TVector3 &pos, std::vector<Int_t> pointList);
28  PndMdtDigi(Int_t detID, TVector3 &pos, Int_t evtNo);
29 
30  virtual ~PndMdtDigi();
31 
33  virtual void Print(const Option_t *opt = nullptr) const
34  {
35  std::cout << " opt = " << opt << std::endl;
36  return;
37  }
38 
39  bool operator<(const PndMdtDigi &) const;
40 
44  // void Clear(); // not implemented
45 
47  void SetPosition(const TVector3 &pos) { fLabPos = pos; };
48 
49  Double_t X() const { return fLabPos.X(); }
50  Double_t Y() const { return fLabPos.Y(); }
51  Double_t Z() const { return fLabPos.Z(); }
52  Int_t GetEvtNumber() const { return fEvtNo; }
53  TVector3 GetLabPosition() const { return fLabPos; }
54  Int_t GetDetectorID() const { return fDetectorID; }
55  Short_t GetModule() const { return PndMdtID::Module(GetDetectorID()); }
56  Short_t GetSector() const { return PndMdtID::Sector(GetDetectorID()); }
57  Short_t GetLayer() const { return PndMdtID::Layer(GetDetectorID()); }
58  Short_t GetLayerID() const { return PndMdtID::Layer(GetDetectorID()); }
59  Short_t GetBox() const { return PndMdtID::Box(GetDetectorID()); }
60  Short_t GetWire() const { return PndMdtID::Wire(GetDetectorID()); }
61  Short_t GetStrip() const { return PndMdtID::Strip(GetDetectorID()); }
62  Bool_t isWire() const { return PndMdtID::isWire(GetDetectorID()); }
63 
64  Short_t GetNPoints() const { return fPointList.size(); }
65  const std::vector<Int_t> &GetPointList() { return fPointList; }
66 
67  // time-based simulation support
68  PndMdtDigi(const PndMdtDigi &);
69 
70  private:
71  Int_t fDetectorID; // Detectior ID
72  TVector3 fLabPos; // Position in the la frame
73  std::vector<Int_t> fPointList; // List of MdtPoint indices
74  Double_t fSignalWidth;
75  Int_t fEvtNo;
76 
77  ClassDef(PndMdtDigi, 2);
78 };
79 
80 #endif
static Short_t Box(Int_t detID)
Definition: PndMdtID.h:31
Short_t GetLayer() const
Definition: PndMdtDigi.h:57
static Bool_t isWire(Int_t detID)
Definition: PndMdtID.h:34
static Short_t Module(Int_t detID)
Definition: PndMdtID.h:28
virtual ~PndMdtDigi()
static Short_t Layer(Int_t detID)
Definition: PndMdtID.h:30
void SetPosition(const TVector3 &pos)
Definition: PndMdtDigi.h:47
Bool_t isWire() const
Definition: PndMdtDigi.h:62
Short_t GetWire() const
Definition: PndMdtDigi.h:60
Double_t X() const
Definition: PndMdtDigi.h:49
Short_t GetModule() const
Definition: PndMdtDigi.h:55
Int_t GetDetectorID() const
Definition: PndMdtDigi.h:54
Int_t GetEvtNumber() const
Definition: PndMdtDigi.h:52
static Short_t Sector(Int_t detID)
Definition: PndMdtID.h:29
Short_t GetLayerID() const
Definition: PndMdtDigi.h:58
TVector3 GetLabPosition() const
Definition: PndMdtDigi.h:53
Short_t GetNPoints() const
Definition: PndMdtDigi.h:64
Short_t GetBox() const
Definition: PndMdtDigi.h:59
static Short_t Strip(Int_t detID)
Definition: PndMdtID.h:33
Double_t Y() const
Definition: PndMdtDigi.h:50
static Short_t Wire(Int_t detID)
Definition: PndMdtID.h:32
const std::vector< Int_t > & GetPointList()
Definition: PndMdtDigi.h:65
virtual void Print(const Option_t *opt=nullptr) const
Definition: PndMdtDigi.h:33
bool operator<(const PndMdtDigi &) const
Double_t Z() const
Definition: PndMdtDigi.h:51
Short_t GetSector() const
Definition: PndMdtDigi.h:56
Short_t GetStrip() const
Definition: PndMdtDigi.h:61