BmnRoot
Loading...
Searching...
No Matches
CbmStsDigiLight.h
Go to the documentation of this file.
1
23#ifndef CBMSTSDIGILIGHT_H
24#define CBMSTSDIGILIGHT_H 1
25
26#include "CbmDigi.h"
27#include "CbmStsDetectorId.h"
28
29#include <vector>
30
32{
33 public:
34
37
38
48// CbmStsDigi(std::vector<Int_t> index, Int_t station, Int_t sector, Int_t side,
49// Int_t channel, Int_t adc, Int_t time);
50 CbmStsDigiLight(Int_t station, Int_t sector, Int_t side,
51 Int_t channel, Int_t adc, Int_t time);
52
53
55 virtual ~CbmStsDigiLight();
56
57
59 void AddAdc(Int_t adc);
60// void AddIndex(int index, int adc){
61// AddLink(FairLink(kStsPoint, index, adc));
62// }
63// void AddIndex(std::vector<Int_t> index){
64// SetLinks(FairMultiLinkedData(kStsPoint, index));
65// }
66
68 Int_t GetSystemId() const { return kGEM; }
69
70
72 Int_t GetStationNr() const { return StationNr(GetAddress()); }
73
74
76 Int_t GetSectorNr() const { return SectorNr(GetAddress()); }
77
78
80 Int_t GetSide() const { return Side(GetAddress()); }
81
82
84 Int_t GetChannelNr() const { return ChannelNr(GetAddress()); }
85
86
88 Int_t GetAdc() const { return ( (fData >> fgkCharShift) & fgkCharMask ); }
89
90
92 Double_t GetTime() const { return Double_t( (fData >> fgkTimeShift) & fgkTimeMask ); }
93
94
96 Int_t GetAddress() const {
97 return ( kGEM | ( (fData & fgkAddrMask) << 4) );
98 }
99
100
101 private:
102
104 Long64_t fData;
105
106
108 void SetAdc(Int_t charge);
109
110
112 static const Int_t fgkAddrBits;
113 static const Int_t fgkCharBits;
114 static const Int_t fgkTimeBits;
115 static const Int_t fgkCharShift;
116 static const Int_t fgkTimeShift;
117 static const Long64_t fgkAddrMask;
118 static const Long64_t fgkCharMask;
119 static const Long64_t fgkTimeMask;
120
121
122 ClassDef(CbmStsDigiLight,1);
123
124};
125
126
127#endif
@ kGEM
Base class for persistent representation of digital information.
Definition CbmDigi.h:44
Int_t StationNr(Int_t detectorId) const
Int_t ChannelNr(Int_t detectorId) const
Int_t Side(Int_t detectorId) const
Int_t SectorNr(Int_t detectorId) const
void AddAdc(Int_t adc)
Int_t GetAddress() const
Double_t GetTime() const
Int_t GetAdc() const
Int_t GetStationNr() const
Int_t GetSide() const
Int_t GetChannelNr() const
Int_t GetSectorNr() const
Int_t GetSystemId() const
virtual ~CbmStsDigiLight()