BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsDigiLight.h
Go to the documentation of this file.
1/** CbmStsDigiLight.h
2 **@author V.Friese <v.friese@gsi.de>
3 **@since 28.08.2006
4 **@version 2.0
5 **
6 ** Data class for digital STS information
7 ** Data level: RAW
8 **
9 ** Without inheritance from FairTimeStamp and FairMultiLinkedData
10 **
11 ** The information is encoded into 8 bytes (1 Long64_t).
12 ** Address: 25 bits
13 ** - Station Nr. 4 bits
14 ** - Sector Nr. 10 bits
15 ** - Side (front/back) 1 bit
16 ** - Channel Nr. 10 bits
17 ** Charge (ADC): 12 bits
18 ** Time (ns): 14 bits
19 **
20 ** The time is relative to the event time.
21 **/
22
23#ifndef CBMSTSDIGILIGHT_H
24#define CBMSTSDIGILIGHT_H 1
25
26#include "CbmDigi.h"
27#include "CbmStsDetectorId.h"
28
29#include <vector>
30
32 : public CbmDigi
33 , public CbmStsDetectorId
34{
35 public:
36 /** Default constructor **/
38
39 /** Constructor from station number, sector number,
40 ** front/back side and channel number
41 **@param station station number (1 - 15)
42 **@param sector sector number (1 - 1023)
43 **@param side 0=front side; 1=back side
44 **@param channel channel number (1 - 1023)
45 **@param adc Charge ADC channel (0 - 4095)
46 **@param time Time within event [ns]
47 **/
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, Int_t channel, Int_t adc, Int_t time);
51
52 /** Destructor **/
54
55 /** Add charge **/
56 void AddAdc(Int_t adc);
57 // void AddIndex(int index, int adc){
58 // AddLink(FairLink(kStsPoint, index, adc));
59 // }
60 // void AddIndex(std::vector<Int_t> index){
61 // SetLinks(FairMultiLinkedData(kStsPoint, index));
62 // }
63
64 /** System ID **/
65 Int_t GetSystemId() const { return kGEM; }
66
67 /** Station number **/
68 Int_t GetStationNr() const { return StationNr(GetAddress()); }
69
70 /** Sector number **/
71 Int_t GetSectorNr() const { return SectorNr(GetAddress()); }
72
73 /** Side ( 0 = front, 1 = back ) **/
74 Int_t GetSide() const { return Side(GetAddress()); }
75
76 /** Channel number **/
77 Int_t GetChannelNr() const { return ChannelNr(GetAddress()); }
78
79 /** Charge **/
80 Int_t GetAdc() const { return ((fData >> fgkCharShift) & fgkCharMask); }
81
82 /** Time **/
84
85 /** Unique detector ID **/
86 Int_t GetAddress() const { return (kGEM | ((fData & fgkAddrMask) << 4)); }
87
88 private:
89 /** Data members **/
91
92 /** Modifiers **/
93 void SetAdc(Int_t charge);
94
95 /** Static members for bit operations **/
96 static const Int_t fgkAddrBits;
97 static const Int_t fgkCharBits;
98 static const Int_t fgkTimeBits;
99 static const Int_t fgkCharShift;
100 static const Int_t fgkTimeShift;
101 static const Long64_t fgkAddrMask;
102 static const Long64_t fgkCharMask;
103 static const Long64_t fgkTimeMask;
104
106};
107
108#endif
int Int_t
double Double_t
long long Long64_t
#define ClassDef(name, id)
@ kGEM
Base class for persistent representation of digital information.
Definition CbmDigi.h:39
CbmStsDetectorId.h.
Int_t StationNr(Int_t detectorId) const
Get station number from detectorId.
Int_t ChannelNr(Int_t detectorId) const
Get channel number from detectorId.
Int_t Side(Int_t detectorId) const
Get side from detectorId.
Int_t SectorNr(Int_t detectorId) const
Get sector number from detectorId.
CbmStsDigiLight.h.
virtual ~CbmStsDigiLight()
Destructor.
void AddAdc(Int_t adc)
Add charge.
Long64_t fData
Data members.
static const Int_t fgkAddrBits
Static members for bit operations.
static const Long64_t fgkAddrMask
static const Int_t fgkTimeShift
CbmStsDigiLight(Int_t station, Int_t sector, Int_t side, Int_t channel, Int_t adc, Int_t time)
Constructor from station number, sector number, front/back side and channel number.
static const Long64_t fgkCharMask
Int_t GetAddress() const
Unique detector ID.
static const Int_t fgkCharShift
Double_t GetTime() const
Time.
Int_t GetAdc() const
Charge.
Int_t GetStationNr() const
Station number.
Int_t GetSide() const
Side ( 0 = front, 1 = back ).
void SetAdc(Int_t charge)
Modifiers.
CbmStsDigiLight()
Default constructor.
Int_t GetChannelNr() const
Channel number.
Int_t GetSectorNr() const
Sector number.
static const Int_t fgkTimeBits
static const Int_t fgkCharBits
CbmStsDigiLight.cxx.
Int_t GetSystemId() const
System ID.
static const Long64_t fgkTimeMask