CbmRoot
Loading...
Searching...
No Matches
CbmMuchDigi.cxx
Go to the documentation of this file.
1
/* Copyright (C) 2007-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Mikhail Ryzhinskiy, Florian Uhlig, Volker Friese [committer], Evgeny Kryshen */
4
18
#include "
CbmMuchDigi.h
"
19
20
CbmMuchDigi::CbmMuchDigi
(
CbmMuchDigi
* digi) : fTime(digi->fTime), fAddress(digi->fAddress), fCharge(digi->fCharge) {}
21
22
23
CbmMuchDigi::CbmMuchDigi
(
const
CbmMuchDigi
& rhs) : fTime(rhs.fTime), fAddress(rhs.fAddress), fCharge(rhs.fCharge) {}
24
25
CbmMuchDigi
&
CbmMuchDigi::operator=
(
const
CbmMuchDigi
& rhs)
26
{
27
28
if
(
this
!= &rhs) {
29
fAddress
= rhs.
fAddress
;
30
fTime
= rhs.
fTime
;
31
fCharge
= rhs.
fCharge
;
32
}
33
return
*
this
;
34
}
35
36
// ----- Set new charge ------------------------------------------------
37
void
CbmMuchDigi::SetAdc
(int32_t adc)
38
{
39
//ADC value should not be more than saturation
40
if
(adc < 0) {
fCharge
= 0; }
41
else
{
42
fCharge
= adc;
43
}
44
// if Saturation
45
// int32_t saturation = (1<<12); //2 ^ 12 - 1;
46
int32_t saturation = (1 << 5);
//2 ^ 5 - 1; // 32 for 5 bit adc*** modified by Ekata Nandy on 25/06/19***
47
if
(
fCharge
>= saturation) {
48
//fCharge=saturation-1;
49
fCharge
= saturation;
//As ADC value starts from 1, so -1 removed. Modified by Ekata Nandy on 25/06/19
50
fSaturationFlag
= 1;
51
}
52
// if(fCharge < 0) fCharge=0;
53
}
54
// -------------------------------------------------------------------------
55
56
57
// -------------------------------------------------------------------------
58
void
CbmMuchDigi::SetTime
(uint64_t time) {
fTime
= time; }
59
// -------------------------------------------------------------------------
60
61
#ifndef NO_ROOT
62
ClassImp
(
CbmMuchDigi
)
63
#endif
ClassImp
ClassImp(CbmConverterManager)
CbmMuchDigi.h
CbmMuchDigi
Definition
CbmMuchDigi.h:37
CbmMuchDigi::fAddress
uint32_t fAddress
Definition
CbmMuchDigi.h:125
CbmMuchDigi::operator=
CbmMuchDigi & operator=(const CbmMuchDigi &)
Definition
CbmMuchDigi.cxx:25
CbmMuchDigi::fSaturationFlag
bool fSaturationFlag
Definition
CbmMuchDigi.h:129
CbmMuchDigi::SetTime
void SetTime(uint64_t time)
Definition
CbmMuchDigi.cxx:58
CbmMuchDigi::SetAdc
void SetAdc(int32_t adc)
Definition
CbmMuchDigi.cxx:37
CbmMuchDigi::fCharge
uint16_t fCharge
Definition
CbmMuchDigi.h:126
CbmMuchDigi::CbmMuchDigi
CbmMuchDigi()
Definition
CbmMuchDigi.h:40
CbmMuchDigi::fTime
uint64_t fTime
Definition
CbmMuchDigi.h:124
core
data
much
CbmMuchDigi.cxx
Generated on Sun Dec 22 2024 23:04:08 for CbmRoot by
1.12.0