CbmRoot
CbmTofDigi.h
Go to the documentation of this file.
1 
22 #ifndef CBMTOFDIGI_H
23 #define CBMTOFDIGI_H 1
24 
25 #include <Rtypes.h> // for ClassDef
26 #include <RtypesCore.h> // for Double_t, UInt_t, Int_t, Bool_t, kTRUE
27 
28 #include <string> // for string
29 
30 #include "CbmDefs.h" // for kTof
31 #include "CbmTofAddress.h" // for CbmTofAddress
32 
33 #include <boost/serialization/access.hpp>
34 #include <boost/serialization/base_object.hpp>
35 
36 //class CbmMatch;
37 
38 class CbmTofDigi {
39 public:
43  CbmTofDigi();
44 
51  CbmTofDigi(UInt_t address, Double_t time, Double_t tot);
52 
63  CbmTofDigi(UInt_t Sm,
64  UInt_t Rpc,
65  UInt_t Channel,
66  Double_t time,
67  Double_t tot,
68  UInt_t Side = 0,
69  UInt_t SmType = 0);
70 
74  CbmTofDigi(const CbmTofDigi&) = default;
75 
76 
78  CbmTofDigi(CbmTofDigi&&) = default;
79 
80 
82  CbmTofDigi& operator=(const CbmTofDigi&) = default;
83 
84 
87 
88 
92  ~CbmTofDigi();
93 
98  Int_t GetAddress() const { return fuAddress; };
99 
100 
104  static const char* GetClassName() { return "CbmTofDigi"; }
105 
107 
111  Double_t GetTime() const { return fdTime; };
112 
116  Double_t GetCharge() const { return fdTot; };
120  Double_t GetTot() const { return GetCharge(); };
124  Double_t GetSm() const { return CbmTofAddress::GetSmId(GetAddress()); };
128  Double_t GetType() const { return CbmTofAddress::GetSmType(GetAddress()); };
132  Double_t GetRpc() const { return CbmTofAddress::GetRpcId(GetAddress()); };
136  Double_t GetChannel() const {
138  };
142  Double_t GetSide() const {
144  };
145 
147  void SetAddress(Int_t address) { fuAddress = address; };
148  void SetAddress(UInt_t Sm,
149  UInt_t Rpc,
150  UInt_t Channel,
151  UInt_t Side = 0,
152  UInt_t SmType = 0);
153  void SetTime(Double_t time) { fdTime = time; };
154  void SetTot(Double_t tot) { fdTot = tot; };
155 
156  std::string ToString() const;
157 
158 
159 private:
160  Double_t fdTime;
161  Double_t fdTot;
162  UInt_t fuAddress;
163 
165 
166  template<class Archive>
167  void serialize(Archive& ar, const unsigned int /*version*/) {
168  ar& fuAddress;
169  ar& fdTime;
170  ar& fdTot;
171  }
172 
174 };
175 #endif // CBMTOFDIGI_H
CbmTofDigi::ToString
std::string ToString() const
Definition: CbmTofDigi.cxx:47
CbmTofDigi::ClassDefNV
ClassDefNV(CbmTofDigi, 2)
CbmTofAddress::GetSmType
static Int_t GetSmType(UInt_t address)
Definition: CbmTofAddress.h:82
CbmTofDigi::SetTime
void SetTime(Double_t time)
Definition: CbmTofDigi.h:153
CbmTofDigi::serialize
void serialize(Archive &ar, const unsigned int)
Definition: CbmTofDigi.h:167
CbmTofDigi::fuAddress
UInt_t fuAddress
Unique channel address.
Definition: CbmTofDigi.h:162
CbmTofAddress::GetRpcId
static Int_t GetRpcId(UInt_t address)
Definition: CbmTofAddress.h:89
CbmTofDigi::SetTot
void SetTot(Double_t tot)
Definition: CbmTofDigi.h:154
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmTofDigi::GetSm
Double_t GetSm() const
Sm.
Definition: CbmTofDigi.h:124
CbmTofAddress::GetSmId
static Int_t GetSmId(UInt_t address)
Definition: CbmTofAddress.h:75
CbmTofDigi::~CbmTofDigi
~CbmTofDigi()
Destructor.
Definition: CbmTofDigi.cxx:42
CbmTofDigi::GetSide
Double_t GetSide() const
Channel Side.
Definition: CbmTofDigi.h:142
CbmTofAddress::GetChannelSide
static Int_t GetChannelSide(UInt_t address)
Definition: CbmTofAddress.h:103
CbmTofDigi::fdTot
Double_t fdTot
Tot [ps].
Definition: CbmTofDigi.h:161
CbmTofDigi::GetType
Double_t GetType() const
Sm Type .
Definition: CbmTofDigi.h:128
CbmTofDigi::CbmTofDigi
CbmTofDigi(const CbmTofDigi &)=default
Copy constructor.
CbmTofDigi::GetChannel
Double_t GetChannel() const
Channel .
Definition: CbmTofDigi.h:136
CbmTofAddress::GetChannelId
static Int_t GetChannelId(UInt_t address)
Definition: CbmTofAddress.h:96
CbmTofDigi::CbmTofDigi
CbmTofDigi(CbmTofDigi &&)=default
CbmTofDigi::GetTime
Double_t GetTime() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:111
CbmTofAddress.h
CbmTofDigi::CbmTofDigi
CbmTofDigi()
Default constructor.
Definition: CbmTofDigi.cxx:13
CbmTofDigi
Data class for expanded digital TOF information.
Definition: CbmTofDigi.h:38
CbmTofDigi::operator=
CbmTofDigi & operator=(CbmTofDigi &&)=default
CbmTofDigi::operator=
CbmTofDigi & operator=(const CbmTofDigi &)=default
CbmTofDigi::GetRpc
Double_t GetRpc() const
Detector aka Module aka RPC .
Definition: CbmTofDigi.h:132
CbmTofDigi::GetSystem
static ECbmModuleId GetSystem()
Definition: CbmTofDigi.h:106
CbmTofDigi::access
friend class boost::serialization::access
Definition: CbmTofDigi.h:164
CbmTofDigi::SetAddress
void SetAddress(Int_t address)
Definition: CbmTofDigi.h:147
CbmTofDigi::GetTot
Double_t GetTot() const
Alias for GetCharge.
Definition: CbmTofDigi.h:120
CbmTofDigi::GetAddress
Int_t GetAddress() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:98
CbmTofDigi::GetCharge
Double_t GetCharge() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:116
CbmTofDigi::GetClassName
static const char * GetClassName()
Class name (static)
Definition: CbmTofDigi.h:104
CbmTofDigi::fdTime
Double_t fdTime
Absolute time [ps].
Definition: CbmTofDigi.h:160
CbmDefs.h