CbmRoot
Loading...
Searching...
No Matches
CbmRichDigi.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2020 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Semen Lebedev, Volker Friese, Andrey Lebedev [committer], Florian Uhlig */
4
5/*
6 * CbmRichDigi.h
7 *
8 * Created on: Dec 17, 2015
9 * Author: slebedev
10 * Modified on: Mar 25, 2019
11 * e.ovcharenko
12 */
13
14//TODO implement copy constructor and operator= ?
15
16#include "CbmDefs.h" // for kRich
17
18#ifndef NO_ROOT
19#include <Rtypes.h> // for ClassDef
20#endif
21
22#include <boost/serialization/access.hpp>
23#include <boost/serialization/base_object.hpp>
24
25#include <cstdint>
26#include <string> // for basic_string, string
27
28#ifndef DATA_RICH_CBMRICHDIGI_H_
29#define DATA_RICH_CBMRICHDIGI_H_
30
32public:
34
35 CbmRichDigi(int32_t addr, double time, double tot);
36
38
39 /*
40 * \brief Inherited from CbmDigi
41 * @value Unique address of pixel channel
42 */
43 int32_t GetAddress() const { return fAddress; }
44
48 static const char* GetBranchName() { return "RichDigi"; }
49
56 double GetCharge() const { return fToT; }
57
61 static const char* GetClassName() { return "CbmRichDigi"; }
62
67
68 /*
69 * @brief Time
70 * @value Time [ns]
71 */
72 double GetTime() const { return fTime; }
73
74 /*
75 * \brief Get Time-over-threshold
76 * @value Time-over-threshold, pulse width [ns]
77 */
78 double GetToT() const { return fToT; }
79
80 /*
81 * \brief Set pixel Address
82 */
83 void SetAddress(int32_t address) { fAddress = address; }
84
85 /*
86 * \brief Set pixel Address
87 */
88 void SetTime(double time) { fTime = time; }
89
90
91 std::string ToString() const { return std::string {""}; }
92
93private:
97 int32_t fAddress;
98
102 double fTime;
103
108 double fToT;
109
112 template<class Archive>
113 void serialize(Archive& ar, const unsigned int /*version*/)
114 {
115 ar& fAddress;
116 ar& fTime;
117 ar& fToT;
118 }
119
120#ifndef NO_ROOT
122#endif
123};
124
125#endif /* DATA_RICH_CBMRICHDIGI_H_ */
ECbmModuleId
Definition CbmDefs.h:39
@ kRich
Ring-Imaging Cherenkov Detector.
double fTime
Leading (rising) edge time.
void serialize(Archive &ar, const unsigned int)
int32_t GetAddress() const
Definition CbmRichDigi.h:43
int32_t fAddress
Unique pixel address.
Definition CbmRichDigi.h:97
std::string ToString() const
Definition CbmRichDigi.h:91
static const char * GetBranchName()
Get the desired name of the branch for this obj in the cbm output tree (static)
Definition CbmRichDigi.h:48
static const char * GetClassName()
Class name (static)
Definition CbmRichDigi.h:61
void SetTime(double time)
Definition CbmRichDigi.h:88
ClassDefNV(CbmRichDigi, 3)
double GetToT() const
Definition CbmRichDigi.h:78
double GetCharge() const
Charge.
Definition CbmRichDigi.h:56
double GetTime() const
Definition CbmRichDigi.h:72
friend class boost::serialization::access
BOOST serialization interface.
void SetAddress(int32_t address)
Definition CbmRichDigi.h:83
static ECbmModuleId GetSystem()
System identifier.
Definition CbmRichDigi.h:66