BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnCscRaw2Digit.h
Go to the documentation of this file.
1
#ifndef BMNCSCRAW2DIGIT_H
2
#define BMNCSCRAW2DIGIT_H
3
4
#include "BmnADCDigit.h"
5
#include "
BmnAdcProcessor.h
"
6
#include "BmnCSCDigit.h"
7
#include "BmnEnums.h"
8
#include "BmnMath.h"
9
#include "
TClonesArray.h
"
10
#include "
TH1F.h
"
11
#include "
TMath.h
"
12
#include "
TString.h
"
13
#include "
TTree.h
"
14
15
#define N_CSC_CHANNELS 2048
16
17
using
std::map;
18
using
std::string;
19
using
std::unordered_map;
20
using
std::vector;
21
using namespace
TMath
;
22
23
typedef
pair<string, Short_t>
LocalCSCMapKey
;
// {prefix, module}
24
25
struct
LocalCSC
26
{
27
// BmnCSCStation* station;
28
map<pair<uint16_t, int8_t>, uint16_t>
shift_map
;
// {mod, layer} -> strip shift
29
int8_t
channel2layer
[
N_CSC_CHANNELS
];
// {mod channel} -> layer
30
// StripMap channel2layer; // {mod channel} -> layer
31
// Int_t channel2layer[N_CSC_MODULES][N_CSC_CHANNELS];
32
int16_t
channel2strip
[
N_CSC_CHANNELS
];
// {mod channel} -> strip
33
// StripMap channel2strip; // {mod channel} -> strip
34
// Int_t channel2strip[N_CSC_MODULES][N_CSC_CHANNELS];
35
};
36
37
struct
BmnCscMapping
38
{
39
uint32_t
serial
;
40
uint16_t
module
;
41
int8_t
layer
;
// X = 0 or X' = 1
42
uint16_t
chan_shift
;
43
int16_t
channel_low
;
44
int16_t
channel_high
;
45
uint16_t
station
;
46
string
prefix
;
47
LocalCSC
*
local_map
;
48
};
49
50
typedef
map<Int_t, BmnCscMapping*>
InChanMapCSC
;
// channel ranges
51
52
class
BmnCscRaw2Digit
:
public
BmnAdcProcessor
53
{
54
public
:
55
BmnCscRaw2Digit
(
Int_t
period,
Int_t
run,
TString
MapFileName, BmnSetup bmnSetup =
kBMNSETUP
);
56
~BmnCscRaw2Digit
();
57
58
BmnStatus
FillEvent
(
TClonesArray
* adc,
TClonesArray
* csc);
59
BmnStatus
FillProfiles
(
TClonesArray
* adc);
60
BmnStatus
FillNoisyChannels
();
61
62
private
:
63
unique_ptr<BmnCSCStationSet>
fCscStationSet
;
64
TString
fMapFileName
;
65
unordered_map<UInt_t, InChanMapCSC>
fOuterMap
;
// serial map
66
// map<UInt_t, > fPrefixMap; // local map prefix map
67
// vector<UInt_t> fSerials;
68
map<LocalCSCMapKey, LocalCSC>
fLocalMapsMap
;
69
Int_t
fEventId
;
70
71
void
ProcessAdc
(
TClonesArray
* csc,
Bool_t
doFill);
72
BmnStatus
ReadMapFile
();
73
BmnStatus
ReadLocalMap
(
string
& FileName, int8_t* Layers, int16_t* Strips, int8_t& iLay, uint16_t& ChanShift);
74
BmnStatus
ReadLocalMaps
();
75
void
MatchMaps
();
76
inline
void
MapStrip
(
BmnCscMapping
* cscM, uint16_t iCh, uint16_t iSmpl, int8_t& layer, int16_t& strip);
77
78
ClassDef
(
BmnCscRaw2Digit
, 2);
79
};
80
81
#endif
/* BMNCSCRAW2DIGIT_H */
Bool_t
bool Bool_t
Int_t
int Int_t
ClassDef
#define ClassDef(name, id)
TClonesArray.h
TH1F.h
TMath.h
TString.h
TTree.h
BmnStatus
BmnStatus
Define status code.
Definition
BmnEnums.h:93
kBMNSETUP
@ kBMNSETUP
Definition
BmnEnums.h:166
BmnAdcProcessor::BmnAdcProcessor
BmnAdcProcessor(uint32_t period, uint32_t run, TString det, uint16_t nCh, const uint16_t nSmpl, BmnSetup setup=kBMNSETUP)
Definition
BmnAdcProcessor.cxx:11
BmnCscRaw2Digit::ReadLocalMap
BmnStatus ReadLocalMap(string &FileName, int8_t *Layers, int16_t *Strips, int8_t &iLay, uint16_t &ChanShift)
Definition
BmnCscRaw2Digit.cxx:143
BmnCscRaw2Digit::ReadLocalMaps
BmnStatus ReadLocalMaps()
Definition
BmnCscRaw2Digit.cxx:167
BmnCscRaw2Digit::FillNoisyChannels
BmnStatus FillNoisyChannels()
Definition
BmnCscRaw2Digit.cxx:234
BmnCscRaw2Digit::BmnCscRaw2Digit
BmnCscRaw2Digit(Int_t period, Int_t run, TString MapFileName, BmnSetup bmnSetup=kBMNSETUP)
Definition
BmnCscRaw2Digit.cxx:10
BmnCscRaw2Digit::ReadMapFile
BmnStatus ReadMapFile()
Definition
BmnCscRaw2Digit.cxx:32
BmnCscRaw2Digit::fEventId
Int_t fEventId
Definition
BmnCscRaw2Digit.h:69
BmnCscRaw2Digit::ProcessAdc
void ProcessAdc(TClonesArray *csc, Bool_t doFill)
Definition
BmnCscRaw2Digit.cxx:341
BmnCscRaw2Digit::fOuterMap
unordered_map< UInt_t, InChanMapCSC > fOuterMap
Definition
BmnCscRaw2Digit.h:65
BmnCscRaw2Digit::FillProfiles
BmnStatus FillProfiles(TClonesArray *adc)
Definition
BmnCscRaw2Digit.cxx:221
BmnCscRaw2Digit::fLocalMapsMap
map< LocalCSCMapKey, LocalCSC > fLocalMapsMap
Definition
BmnCscRaw2Digit.h:68
BmnCscRaw2Digit::FillEvent
BmnStatus FillEvent(TClonesArray *adc, TClonesArray *csc)
Definition
BmnCscRaw2Digit.cxx:209
BmnCscRaw2Digit::MapStrip
void MapStrip(BmnCscMapping *cscM, uint16_t iCh, uint16_t iSmpl, int8_t &layer, int16_t &strip)
Definition
BmnCscRaw2Digit.cxx:331
BmnCscRaw2Digit::MatchMaps
void MatchMaps()
Definition
BmnCscRaw2Digit.cxx:191
BmnCscRaw2Digit::fMapFileName
TString fMapFileName
Definition
BmnCscRaw2Digit.h:64
BmnCscRaw2Digit::fCscStationSet
unique_ptr< BmnCSCStationSet > fCscStationSet
Definition
BmnCscRaw2Digit.h:63
BmnCscRaw2Digit::~BmnCscRaw2Digit
~BmnCscRaw2Digit()
Definition
BmnCscRaw2Digit.cxx:24
TClonesArray
TString
BmnAdcProcessor.h
LocalCSCMapKey
pair< string, Short_t > LocalCSCMapKey
Definition
BmnCscRaw2Digit.h:23
InChanMapCSC
map< Int_t, BmnCscMapping * > InChanMapCSC
Definition
BmnCscRaw2Digit.h:50
N_CSC_CHANNELS
#define N_CSC_CHANNELS
Definition
BmnCscRaw2Digit.h:15
TMath
BmnCscMapping
Definition
BmnCscRaw2Digit.h:38
BmnCscMapping::prefix
string prefix
Definition
BmnCscRaw2Digit.h:46
BmnCscMapping::station
uint16_t station
Definition
BmnCscRaw2Digit.h:45
BmnCscMapping::local_map
LocalCSC * local_map
Definition
BmnCscRaw2Digit.h:47
BmnCscMapping::chan_shift
uint16_t chan_shift
Definition
BmnCscRaw2Digit.h:42
BmnCscMapping::serial
uint32_t serial
Definition
BmnCscRaw2Digit.h:39
BmnCscMapping::module
uint16_t module
Definition
BmnCscRaw2Digit.h:40
BmnCscMapping::layer
int8_t layer
Definition
BmnCscRaw2Digit.h:41
BmnCscMapping::channel_low
int16_t channel_low
Definition
BmnCscRaw2Digit.h:43
BmnCscMapping::channel_high
int16_t channel_high
Definition
BmnCscRaw2Digit.h:44
LocalCSC
Definition
BmnCscRaw2Digit.h:26
LocalCSC::channel2strip
int16_t channel2strip[N_CSC_CHANNELS]
Definition
BmnCscRaw2Digit.h:32
LocalCSC::channel2layer
int8_t channel2layer[N_CSC_CHANNELS]
Definition
BmnCscRaw2Digit.h:29
LocalCSC::shift_map
map< pair< uint16_t, int8_t >, uint16_t > shift_map
Definition
BmnCscRaw2Digit.h:28
decoder
BmnCscRaw2Digit.h
Generated on
for BmnRoot by
1.17.0