CbmRoot
CbmPsdDigi.h
Go to the documentation of this file.
1 
16 #ifndef CBMPSDDIGI_H
17 #define CBMPSDDIGI_H 1
18 
19 #include <Rtypes.h> // for THashConsistencyHolder, ClassDefNV
20 #include <RtypesCore.h> // for Double_t, UInt_t, Int_t
21 
22 #include <string> // for string
23 
24 #include "CbmDefs.h" // for ECbmModuleId::kPsd
25 #include "CbmPsdAddress.h" // for CbmPsdAddress
26 
27 #include <boost/serialization/access.hpp>
28 #include <boost/serialization/base_object.hpp>
29 
30 
31 class CbmPsdDigi {
32 
33 public:
36  CbmPsdDigi();
37 
38 
44  CbmPsdDigi(UInt_t address, Double_t edep, Double_t time);
45 
46 
53  CbmPsdDigi(UInt_t moduleId, UInt_t sectionId, Double_t edep, Double_t time);
54 
55 
57  CbmPsdDigi(const CbmPsdDigi&);
58 
59 
62 
63 
66 
67 
70 
71 
73  ~CbmPsdDigi();
74 
75 
79  Int_t GetAddress() const { return fuAddress; };
80 
81 
87  Double_t GetCharge() const { return fdEdep; };
88 
89 
93  static const char* GetClassName() { return "CbmPsdDigi"; }
94 
95 
99  Double_t GetEdep() const { return fdEdep; };
100 
101 
105  Double_t GetModuleID() const {
107  }
108 
109 
113  Double_t GetSectionID() const {
115  }
116 
117 
122 
123 
127  Double_t GetTime() const { return fdTime; };
128 
129 
131  void SetAddress(Int_t address) { fuAddress = address; };
132  void SetAddress(UInt_t moduleId, UInt_t sectionId);
133  void SetEdep(Double_t edep) { fdEdep = edep; }
134  void SetTime(Double_t time) { fdTime = time; }
135 
136 
140  std::string ToString() const;
141 
142  //additional
143  UInt_t GetAmpl() const { return fuAmpl; };
144  UInt_t GetZL() const { return fuZL; };
145  Double_t GetEdepWfm() const { return fdEdepWfm; };
146  void SetAmpl(UInt_t ampl) { fuAmpl = ampl; }
147  void SetZL(UInt_t zl) { fuZL = zl; }
148  void SetEdepWfm(Double_t edep) { fdEdepWfm = edep; }
149 
150  Float_t ffFitHarmonic1 = 0.;
151  Float_t ffFitHarmonic2 = 0.;
152  Float_t ffFitR2 = 999.;
153  Float_t ffFitEdep = 0.;
154 
155 private:
156  Double_t fdEdep = 0.;
157  Double_t fdTime = -1.;
158  UInt_t fuAddress = 0;
159 
160  //additional
161  UInt_t fuAmpl = 0;
162  UInt_t fuZL = 0;
163  Double_t fdEdepWfm = 0.;
164 
167  template<class Archive>
168  void serialize(Archive& ar, const unsigned int /*version*/) {
169  ar& ffFitHarmonic1;
170  ar& ffFitHarmonic2;
171  ar& ffFitR2;
172  ar& ffFitEdep;
173  ar& fdEdep;
174  ar& fdTime;
175  ar& fuAddress;
176  ar& fuAmpl;
177  ar& fuZL;
178  ar& fdEdepWfm;
179  }
180 
182 };
183 
184 #endif // CBMPSDDIGI_H
CbmPsdDigi::serialize
void serialize(Archive &ar, const unsigned int)
Definition: CbmPsdDigi.h:168
CbmPsdAddress.h
CbmPsdDigi::access
friend class boost::serialization::access
BOOST serialization interface.
Definition: CbmPsdDigi.h:166
CbmPsdDigi::GetSystem
static ECbmModuleId GetSystem()
System identifier.
Definition: CbmPsdDigi.h:121
CbmPsdDigi::ffFitHarmonic2
Float_t ffFitHarmonic2
Definition: CbmPsdDigi.h:151
CbmPsdDigi::ToString
std::string ToString() const
String output.
Definition: CbmPsdDigi.cxx:78
CbmPsdDigi::fuAddress
UInt_t fuAddress
Time of measurement.
Definition: CbmPsdDigi.h:158
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmPsdDigi::SetEdepWfm
void SetEdepWfm(Double_t edep)
Definition: CbmPsdDigi.h:148
CbmPsdDigi::SetTime
void SetTime(Double_t time)
Definition: CbmPsdDigi.h:134
CbmPsdDigi::ffFitR2
Float_t ffFitR2
Definition: CbmPsdDigi.h:152
CbmPsdDigi::GetAddress
Int_t GetAddress() const
Address.
Definition: CbmPsdDigi.h:79
CbmPsdDigi::fdTime
Double_t fdTime
Energy deposition.
Definition: CbmPsdDigi.h:157
CbmPsdDigi::operator=
CbmPsdDigi & operator=(const CbmPsdDigi &)
Definition: CbmPsdDigi.cxx:50
CbmPsdDigi::fuZL
UInt_t fuZL
Definition: CbmPsdDigi.h:162
CbmPsdDigi::fuAmpl
UInt_t fuAmpl
Unique channel address.
Definition: CbmPsdDigi.h:161
CbmPsdDigi::~CbmPsdDigi
~CbmPsdDigi()
Definition: CbmPsdDigi.cxx:46
CbmPsdDigi::ffFitEdep
Float_t ffFitEdep
Definition: CbmPsdDigi.h:153
CbmPsdDigi::GetEdepWfm
Double_t GetEdepWfm() const
Definition: CbmPsdDigi.h:145
CbmPsdDigi::GetTime
Double_t GetTime() const
Time.
Definition: CbmPsdDigi.h:127
CbmPsdDigi::SetEdep
void SetEdep(Double_t edep)
Definition: CbmPsdDigi.h:133
CbmPsdDigi::CbmPsdDigi
CbmPsdDigi()
Default constructor.
Definition: CbmPsdDigi.cxx:17
CbmPsdDigi::GetClassName
static const char * GetClassName()
Class name (static)
Definition: CbmPsdDigi.h:93
CbmPsdAddress::GetModuleId
static UInt_t GetModuleId(UInt_t address)
Return module ID from address.
Definition: CbmPsdAddress.h:60
CbmPsdDigi::SetAmpl
void SetAmpl(UInt_t ampl)
Definition: CbmPsdDigi.h:146
CbmPsdDigi::GetModuleID
Double_t GetModuleID() const
Module Identifier.
Definition: CbmPsdDigi.h:105
CbmPsdDigi::GetZL
UInt_t GetZL() const
Definition: CbmPsdDigi.h:144
CbmPsdDigi::fdEdep
Double_t fdEdep
Definition: CbmPsdDigi.h:156
CbmPsdDigi::GetAmpl
UInt_t GetAmpl() const
Definition: CbmPsdDigi.h:143
CbmPsdDigi::fdEdepWfm
Double_t fdEdepWfm
Definition: CbmPsdDigi.h:163
CbmPsdDigi::SetZL
void SetZL(UInt_t zl)
Definition: CbmPsdDigi.h:147
CbmPsdDigi::GetCharge
Double_t GetCharge() const
Charge.
Definition: CbmPsdDigi.h:87
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
CbmPsdDigi
Data class for PSD digital information.
Definition: CbmPsdDigi.h:31
CbmPsdAddress::GetSectionId
static UInt_t GetSectionId(UInt_t address)
Return sector ID from address.
Definition: CbmPsdAddress.h:70
CbmPsdDigi::ffFitHarmonic1
Float_t ffFitHarmonic1
Definition: CbmPsdDigi.h:150
CbmPsdDigi::GetSectionID
Double_t GetSectionID() const
Section Identifier.
Definition: CbmPsdDigi.h:113
CbmPsdDigi::SetAddress
void SetAddress(Int_t address)
Definition: CbmPsdDigi.h:131
CbmPsdDigi::ClassDefNV
ClassDefNV(CbmPsdDigi, 4)
CbmDefs.h
CbmPsdDigi::GetEdep
Double_t GetEdep() const
Energy deposit.
Definition: CbmPsdDigi.h:99