CbmRoot
CbmMuchDigi.cxx
Go to the documentation of this file.
1 
14 #include "CbmMuchDigi.h"
15 
17  : fTime(digi->fTime), fAddress(digi->fAddress), fCharge(digi->fCharge) {}
18 
19 
21  : fTime(rhs.fTime), fAddress(rhs.fAddress), fCharge(rhs.fCharge) {}
22 
24 
25  if (this != &rhs) {
26  fAddress = rhs.fAddress;
27  fTime = rhs.fTime;
28  fCharge = rhs.fCharge;
29  }
30  return *this;
31 }
32 
33 // ----- Set new charge ------------------------------------------------
34 void CbmMuchDigi::SetAdc(Int_t adc) {
35  //ADC value should not be more than saturation
36  if (adc < 0) {
37  fCharge = 0;
38  } else {
39  fCharge = adc;
40  }
41  // if Saturation
42  // Int_t saturation = (1<<12); //2 ^ 12 - 1;
43  Int_t saturation =
44  (1
45  << 5); //2 ^ 5 - 1; // 32 for 5 bit adc*** modified by Ekata Nandy on 25/06/19***
46  if (fCharge >= saturation) {
47  //fCharge=saturation-1;
48  fCharge =
49  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(ULong64_t time) { fTime = time; }
59 // -------------------------------------------------------------------------
60 
CbmMuchDigi.h
CbmMuchDigi::CbmMuchDigi
CbmMuchDigi()
Definition: CbmMuchDigi.h:34
CbmMuchDigi::fSaturationFlag
Bool_t fSaturationFlag
Definition: CbmMuchDigi.h:114
CbmMuchDigi::fCharge
UShort_t fCharge
Definition: CbmMuchDigi.h:111
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmMuchDigi
Definition: CbmMuchDigi.h:31
CbmMuchDigi::fAddress
UInt_t fAddress
Definition: CbmMuchDigi.h:110
CbmMuchDigi::fTime
ULong64_t fTime
Definition: CbmMuchDigi.h:109
CbmMuchDigi::SetTime
void SetTime(ULong64_t time)
Definition: CbmMuchDigi.cxx:58
CbmMuchDigi::SetAdc
void SetAdc(Int_t adc)
Definition: CbmMuchDigi.cxx:34
CbmMuchDigi::operator=
CbmMuchDigi & operator=(const CbmMuchDigi &)
Definition: CbmMuchDigi.cxx:23