BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnSiliconRaw2Digit.h
Go to the documentation of this file.
1#ifndef BMNSILICONRAW2DIGIT_H
2#define BMNSILICONRAW2DIGIT_H
3
4#include "BmnADCDigit.h"
5#include "BmnAdcProcessor.h"
6#include "BmnEnums.h"
7#include "BmnSiliconDigit.h"
8#include "TClonesArray.h"
9#include "TColor.h"
10#include "TMath.h"
11#include "TString.h"
12#include "TTree.h"
13
14#include <BmnEventHeader.h>
15#include <BmnFunctionSet.h>
16#include <TSystem.h>
17#include <fstream>
18#include <iostream>
19#include <list>
20#include <map>
21#include <tuple>
22#include <vector>
23
24using std::map;
25using std::string;
26using std::unordered_map;
27using std::vector;
28
30{
31 uint32_t serial;
32 uint16_t station;
33 uint16_t module;
34 uint8_t layer; // X = 0 or X' = 1
36 uint16_t channel_low;
37 uint16_t channel_high;
38 int32_t strip_min;
39 int32_t strip_max;
40};
41/**
42 * upper channel to map info
43 * (range map (C++20 is still unavailable, so we have to use crutches))
44 */
45typedef map<int32_t, BmnSiliconMapInfo*> InChanMapSil;
46
48{
49 public:
50 BmnSiliconRaw2Digit(uint32_t period, uint32_t run, TString MapFileName, BmnSetup bmnSetup = kBMNSETUP);
51 virtual ~BmnSiliconRaw2Digit();
52
57
58 private:
59 unique_ptr<BmnSiliconStationSet> fSilStationSet;
60
61 unordered_map<uint32_t, InChanMapSil> fOuterMap; // serial to inner (channel range to ) map
62 map<KeySML, BmnSiliconMapInfo*> fSML2MapInfo; // {station, module, layer} to map info
64
65 TCanvas* canStrip = nullptr;
66 TH2F* hraw = nullptr;
67 TH2F* hrms = nullptr;
68 TH2F* hcorrp = nullptr;
69 TH2F* hcorr = nullptr;
70 TH2F* hfilter = nullptr;
71 TH2F* hped = nullptr;
72 TH2F* hcms = nullptr;
73 TH2F* hscms = nullptr;
74 TH1F* hscms1 = nullptr;
75 TH1F* hscms1full = nullptr;
76 TH1F* hped1 = nullptr;
77 TH1F* hsig = nullptr;
78 int32_t nev = -1;
79 int32_t niterped;
80 int32_t nchip;
81 int32_t nchmin;
82 int32_t npevents;
83
84 int32_t zeroCnt = 0;
85 int32_t allCnt = 0;
86
88
90
92 inline int32_t MapStrip(BmnSiliconMapInfo* v, uint16_t& iCh, uint16_t& iSmpl)
93 {
94 if (v->inverted)
95 return (v->channel_high - iCh) * GetNSamples() + iSmpl;
96 else
97 return (iCh - v->channel_low) * GetNSamples() + iSmpl;
98 }
99 void ProcessAdc(TClonesArray* silicon, Bool_t doFill);
100
102};
103
104#endif /* BMNSILICONRAW2DIGIT_H */
__m128 v
Definition P4_F32vec4.h:1
bool Bool_t
double Double_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)
const uint16_t GetNSamples()
unordered_map< uint32_t, InChanMapSil > fOuterMap
BmnStatus FillProfiles(TClonesArray *adc)
BmnSiliconRaw2Digit(uint32_t period, uint32_t run, TString MapFileName, BmnSetup bmnSetup=kBMNSETUP)
int32_t MapStrip(BmnSiliconMapInfo *v, uint16_t &iCh, uint16_t &iSmpl)
unique_ptr< BmnSiliconStationSet > fSilStationSet
BmnStatus FillEvent(TClonesArray *adc, TClonesArray *sts)
void ProcessAdc(TClonesArray *silicon, Bool_t doFill)
map< KeySML, BmnSiliconMapInfo * > fSML2MapInfo
map< int32_t, BmnSiliconMapInfo * > InChanMapSil
upper channel to map info (range map (C++20 is still unavailable, so we have to use crutches))