BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnGemRaw2Digit.h
Go to the documentation of this file.
1#ifndef BMNGEMRAW2DIGIT_H
2#define BMNGEMRAW2DIGIT_H
3
4#include <map>
5#include <vector>
6// ROOT
7#include "BmnAdcProcessor.h"
8#include "TClonesArray.h"
9#include "TString.h"
10
11#define N_CH_BUF 4096
12
13using std::map;
14using std::vector;
15
17{
18
19 public:
20 BmnGemRaw2Digit(Int_t period, Int_t run, TString mapFileName, BmnSetup bmnSetup = kBMNSETUP);
22
26
27 struct BmnGemMap
28 {
30 Int_t lay; // strip type: 0 - x, 1 - y
31 Int_t mod; // hot zones: 1 - inner zone, 0 - outer zone
32
34 : strip(s)
35 , lay(l)
36 , mod(m)
37 {}
38
40 : strip(-1)
41 , lay(-1)
42 , mod(-1)
43 {}
44 };
45 typedef std::array<BmnGemMap, N_CH_BUF> StripMapArray;
46
48 {
60
61 void Print()
62 {
63 cout << std::hex << Serial << std::dec << " " << Ch_lo << " " << Ch_hi << " " << GEM_id << " " << Side
64 << " " << Type << " " << Station << " " << Module << " " << Zone << endl;
65 }
66
68 : Serial(-1)
69 , Ch_lo(-1)
70 , Ch_hi(-1)
71 , GEM_id(-1)
72 , Side(-1)
73 , Type(-1)
74 , Station(-1)
75 , Module(-1)
76 , Zone(-1)
77 , Channel_shift(0)
78 , Map_arr_ptr(nullptr)
79 {}
80 };
81 typedef map<int32_t, GemMapLine*> InChanMap;
82
83 private:
84 unique_ptr<BmnGemStripStationSet> fGemStationSet;
85 // starting thresholds, number of iterations
89
90 unordered_map<uint32_t, InChanMap> fOuterMap; // serial to inner (channel range to local strip map) map
91
94 vector<StripMapArray> fBigHot;
95 vector<StripMapArray> fBig;
97
98 typedef map<uint8_t, int32_t> MapLayer2MaxStrip;
99 map<KeySM, MapLayer2MaxStrip> fSM2MapMaxStrip; // {station, module} to max strip
100 inline void MapStrip(GemMapLine* gemM, UInt_t ch, Int_t iSmpl, Int_t& lay, Int_t& strip);
101 /**
102 * Uses raw ADC data to either fill profile histograms or produce output digits
103 * @param silicon raw ADC signals
104 * @param doFill true - fill profile histograms, false - produce digits
105 */
106 void ProcessAdc(TClonesArray* silicon, Bool_t doFill);
107 BmnStatus ReadMap(TString parName, StripMapArray& m, Int_t lay, Int_t mod);
110 void InitStripRanges(unique_ptr<BmnGemStripStationSet>& ss);
111
113};
114
115#endif /* BMNGEMRAW2DIGIT_H */
__m128 m
Definition P4_F32vec4.h:27
bool Bool_t
int Int_t
unsigned int UInt_t
float Float_t
#define ClassDef(name, id)
BmnStatus
Define status code.
Definition BmnEnums.h:93
BmnSetup
Define experimental setup.
Definition BmnEnums.h:165
@ kBMNSETUP
Definition BmnEnums.h:166
BmnAdcProcessor(uint32_t period, uint32_t run, TString det, uint16_t nCh, const uint16_t nSmpl, BmnSetup setup=kBMNSETUP)
std::array< BmnGemMap, N_CH_BUF > StripMapArray
StripMapArray fMid
map< uint8_t, int32_t > MapLayer2MaxStrip
map< int32_t, GemMapLine * > InChanMap
void ProcessAdc(TClonesArray *silicon, Bool_t doFill)
Uses raw ADC data to either fill profile histograms or produce output digits.
BmnStatus FillEvent(TClonesArray *adc, TClonesArray *gem)
BmnGemRaw2Digit(Int_t period, Int_t run, TString mapFileName, BmnSetup bmnSetup=kBMNSETUP)
BmnStatus ReadGlobalMap(TString FileName)
void MapStrip(GemMapLine *gemM, UInt_t ch, Int_t iSmpl, Int_t &lay, Int_t &strip)
vector< StripMapArray > fBig
vector< StripMapArray > fBigHot
BmnStatus FillNoisyChannels()
BmnStatus ReadMap(TString parName, StripMapArray &m, Int_t lay, Int_t mod)
unordered_map< uint32_t, InChanMap > fOuterMap
BmnStatus ReadLocalMap(TString parName, StripMapArray &m, Int_t lay, Int_t mod)
BmnStatus FillProfiles(TClonesArray *adc)
StripMapArray fSmall
map< KeySM, MapLayer2MaxStrip > fSM2MapMaxStrip
unique_ptr< BmnGemStripStationSet > fGemStationSet
void InitStripRanges(unique_ptr< BmnGemStripStationSet > &ss)
BmnGemMap(Int_t s, Int_t l, Int_t m)