ATLAS Offline Software
ALFA_Raw2Digit.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALFA_Raw2Digit_h
6 #define ALFA_Raw2Digit_h
7 
8 
10 
11 
12 // for ALFA
16 
19 
20 
21 #include <fstream>
22 #include <sstream>
23 #include <string>
24 #include <sys/stat.h>
25 #include <sys/types.h>
26 #include <dirent.h>
27 
28 #include "TROOT.h"
29 #include "TString.h"
30 
31 class TH1F;
32 class TH2I;
33 class TH2D;
34 class TTree;
35 class TFile;
36 
37 
38 
40 {
41 public:
42  ALFA_Raw2Digit(const std::string& name, ISvcLocator* pSvcLocator);
43 
47 
48 private:
52  StatusCode ChanPlot(uint32_t pot_n, uint32_t iLayer, uint32_t MarChan, uint32_t &chan_i, uint32_t &chan_j);
53 
54 
56 
57  int m_nEvents{};
58 
59  int m_mbID{};
60  int m_pmfID{};
61  int m_fibID{};
62 
63  int m_MAPMTChan{};
64  int m_MapChan{};
65 
66  int m_pot{};
67  int m_side{};
68  int m_plate{};
69  int m_fiber{};
70 
71  int m_ODpot{};
72  int m_ODside{};
73  int m_ODplate{};
74  int m_ODfiber{};
75 
76 
77  int m_maroc2fiber[8][20][64]{};
78  int m_maroc2mapmt[8][20][64]{};
79  int m_mapmt2maroc[8][20][64]{};
80 
81  int m_pmf2layer[8][23]{};
82 
83  int m_OD_pmf2layer[8][4]{};
84  int m_OD_pmf_maroc2fiber[8][4][64]{};
85  int m_OD_pmf_maroc2side[8][4][64]{};
86 
87  int m_mb2det[8]{};
88 
89 
90 
91  TH2I *m_All_Trigger{};
93 
98  std::vector<bool> m_trigger_pattern;
99  bool m_pot_b[8]{}, m_layer_b[8][20]{}, m_fiber_b[8][20][64]{}, m_trigger_pattern_b[8][16]{};
100  Int_t m_n_hits_lay[8][20]{};
101  Int_t m_event_no{};
102  TTree* m_tree{};
103  TFile *m_rootOutput{};
105 
106 
107  Int_t m_pmf_chan_hit_counter[8][23][64]{};
108  Int_t m_hit_counter[8]{};
109 
110 
113 
116 
119 
120  std::ifstream m_inChan;
121  std::ifstream m_inPMF;
122  std::ifstream m_inOD;
123  std::ifstream m_inDet;
124 
125  std::string m_mapname;
126  std::stringstream m_s;
128  std::string m_h_loc1, m_h_loc2, m_h_loc3;
129  std::string m_CanName;
130 
133 
134 private:
136 
137 private:
138  std::ofstream m_toFile;
139 };
140 
141 
142 #endif
ALFA_Raw2Digit::m_nEvents
int m_nEvents
Definition: ALFA_Raw2Digit.h:57
ALFA_Raw2Digit::m_mb2det
int m_mb2det[8]
Definition: ALFA_Raw2Digit.h:87
ALFA_Raw2Digit::m_rootOutput
TFile * m_rootOutput
Definition: ALFA_Raw2Digit.h:103
ALFA_ODDigitCollection.h
ALFA_Raw2Digit::m_fiber
int m_fiber
Definition: ALFA_Raw2Digit.h:69
ALFA_Raw2Digit::m_h_name2
std::string m_h_name2
Definition: ALFA_Raw2Digit.h:127
ALFA_Raw2Digit::m_h_name3
std::string m_h_name3
Definition: ALFA_Raw2Digit.h:127
ALFA_Raw2Digit::m_WordId_count
int m_WordId_count
Definition: ALFA_Raw2Digit.h:131
ALFA_Raw2Digit::m_maroc2mapmt
int m_maroc2mapmt[8][20][64]
Definition: ALFA_Raw2Digit.h:78
ALFA_Raw2Digit::m_ODdigitCollection
ALFA_ODDigitCollection * m_ODdigitCollection
Definition: ALFA_Raw2Digit.h:114
ALFA_Raw2Digit::m_chan_i
uint32_t m_chan_i
Definition: ALFA_Raw2Digit.h:132
ALFA_Raw2Digit::m_hit_counter
Int_t m_hit_counter[8]
Definition: ALFA_Raw2Digit.h:108
ALFA_RawDataContainer.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_Raw2Digit::m_ODside
int m_ODside
Definition: ALFA_Raw2Digit.h:72
ALFA_Raw2Digit::m_key_DigitCollection
std::string m_key_DigitCollection
Definition: ALFA_Raw2Digit.h:117
ALFA_Raw2Digit::m_maroc2fiber
int m_maroc2fiber[8][20][64]
Definition: ALFA_Raw2Digit.h:77
ALFA_Raw2Digit::initialize
StatusCode initialize()
Definition: ALFA_Raw2Digit.cxx:59
ALFA_Raw2Digit
Definition: ALFA_Raw2Digit.h:40
ALFA_Raw2Digit::ALFA_Raw2Digit
ALFA_Raw2Digit(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ALFA_Raw2Digit.cxx:12
ALFA_Raw2Digit::m_lumi_block
uint32_t m_lumi_block
Definition: ALFA_Raw2Digit.h:96
ALFA_Raw2Digit::m_layer_b
bool m_layer_b[8][20]
Definition: ALFA_Raw2Digit.h:99
ALFA_Raw2Digit::m_inDet
std::ifstream m_inDet
Definition: ALFA_Raw2Digit.h:123
ALFA_Raw2Digit::ChanPlot
StatusCode ChanPlot(uint32_t pot_n, uint32_t iLayer, uint32_t MarChan, uint32_t &chan_i, uint32_t &chan_j)
Definition: ALFA_Raw2Digit.cxx:739
ALFA_Raw2Digit::m_charge_2
uint16_t m_charge_2[8]
Definition: ALFA_Raw2Digit.h:97
ALFA_Raw2Digit::m_h_name1
std::string m_h_name1
Definition: ALFA_Raw2Digit.h:127
ALFA_Raw2Digit::m_trigger_pattern
std::vector< bool > m_trigger_pattern
Definition: ALFA_Raw2Digit.h:98
ALFA_Raw2Digit::m_h_loc2
std::string m_h_loc2
Definition: ALFA_Raw2Digit.h:128
ALFA_Raw2Digit::m_ODfiber
int m_ODfiber
Definition: ALFA_Raw2Digit.h:74
ALFA_Raw2Digit::m_trigger_pattern_b
bool m_trigger_pattern_b[8][16]
Definition: ALFA_Raw2Digit.h:99
ALFA_Raw2Digit::m_charge_1
uint16_t m_charge_1[8]
Definition: ALFA_Raw2Digit.h:97
AthAlgorithm.h
ALFA_Raw2Digit::m_pmfID
int m_pmfID
Definition: ALFA_Raw2Digit.h:60
ALFA_Raw2Digit::m_pmf2layer
int m_pmf2layer[8][23]
Definition: ALFA_Raw2Digit.h:81
ALFA_Raw2Digit::m_mapname
std::string m_mapname
Definition: ALFA_Raw2Digit.h:125
ALFA_Raw2Digit::m_mapmt2maroc
int m_mapmt2maroc[8][20][64]
Definition: ALFA_Raw2Digit.h:79
ALFA_Raw2Digit::m_event_no
Int_t m_event_no
Definition: ALFA_Raw2Digit.h:101
ALFA_Digit
Definition: ALFA_Digit.h:8
ALFA_Raw2Digit::m_key_ODDigitCollection
std::string m_key_ODDigitCollection
Definition: ALFA_Raw2Digit.h:118
ALFA_Raw2Digit::m_pot
int m_pot
Definition: ALFA_Raw2Digit.h:66
ALFA_Raw2Digit::m_strMeasuredDataType
std::string m_strMeasuredDataType
Definition: ALFA_Raw2Digit.h:135
ALFA_Raw2Digit::m_h_loc3
std::string m_h_loc3
Definition: ALFA_Raw2Digit.h:128
ALFA_RawData.h
ALFA_Raw2Digit::m_plate
int m_plate
Definition: ALFA_Raw2Digit.h:68
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
ALFA_Raw2Digit::m_CanName
std::string m_CanName
Definition: ALFA_Raw2Digit.h:129
ALFA_Raw2Digit::m_chan_j
uint32_t m_chan_j
Definition: ALFA_Raw2Digit.h:132
ALFA_Raw2Digit::m_OD_pmf2layer
int m_OD_pmf2layer[8][4]
Definition: ALFA_Raw2Digit.h:83
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ALFA_Raw2Digit::m_lumi_block_old
uint32_t m_lumi_block_old
Definition: ALFA_Raw2Digit.h:96
ALFA_Raw2Digit::m_side
int m_side
Definition: ALFA_Raw2Digit.h:67
ALFA_Raw2Digit::m_pot_b
bool m_pot_b[8]
Definition: ALFA_Raw2Digit.h:99
ALFA_Raw2Digit::m_ALFA_RawDataCollectionKey
std::string m_ALFA_RawDataCollectionKey
Definition: ALFA_Raw2Digit.h:55
ALFA_Raw2Digit::m_MAPMTChan
int m_MAPMTChan
Definition: ALFA_Raw2Digit.h:63
ALFA_Raw2Digit::m_digitCollection
ALFA_DigitCollection * m_digitCollection
Definition: ALFA_Raw2Digit.h:111
ALFA_Raw2Digit::m_inPMF
std::ifstream m_inPMF
Definition: ALFA_Raw2Digit.h:121
ALFA_DigitCollection.h
AthAlgorithm
Definition: AthAlgorithm.h:47
ALFA_Raw2Digit::m_ODplate
int m_ODplate
Definition: ALFA_Raw2Digit.h:73
ALFA_Raw2Digit::m_ODpot
int m_ODpot
Definition: ALFA_Raw2Digit.h:71
ALFA_Raw2Digit::finalize
StatusCode finalize()
Definition: ALFA_Raw2Digit.cxx:382
ALFA_DigitCollection
Definition: ALFA_DigitCollection.h:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ALFA_Raw2Digit::m_All_Trigger_norm
TH2D * m_All_Trigger_norm
Definition: ALFA_Raw2Digit.h:92
ALFA_Raw2Digit::m_rootOutputFileName
TString m_rootOutputFileName
Definition: ALFA_Raw2Digit.h:104
ALFA_Raw2Digit::m_All_Trigger
TH2I * m_All_Trigger
Definition: ALFA_Raw2Digit.h:91
ALFA_Raw2Digit::m_tree
TTree * m_tree
Definition: ALFA_Raw2Digit.h:102
ALFA_Raw2Digit::execute
StatusCode execute()
Definition: ALFA_Raw2Digit.cxx:172
ALFA_Raw2Digit::m_fiber_b
bool m_fiber_b[8][20][64]
Definition: ALFA_Raw2Digit.h:99
ALFA_Raw2Digit::mapping
StatusCode mapping()
Definition: ALFA_Raw2Digit.cxx:506
ALFA_Raw2Digit::m_s
std::stringstream m_s
Definition: ALFA_Raw2Digit.h:126
ALFA_Raw2Digit::m_MapChan
int m_MapChan
Definition: ALFA_Raw2Digit.h:64
ALFA_Raw2Digit::m_inOD
std::ifstream m_inOD
Definition: ALFA_Raw2Digit.h:122
ALFA_Raw2Digit::m_OD_pmf_maroc2fiber
int m_OD_pmf_maroc2fiber[8][4][64]
Definition: ALFA_Raw2Digit.h:84
ALFA_Raw2Digit::m_n_hits_lay
Int_t m_n_hits_lay[8][20]
Definition: ALFA_Raw2Digit.h:100
ALFA_Raw2Digit::m_pmf_chan_hit_counter
Int_t m_pmf_chan_hit_counter[8][23][64]
Definition: ALFA_Raw2Digit.h:107
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
ALFA_Raw2Digit::m_OD_pmf_maroc2side
int m_OD_pmf_maroc2side[8][4][64]
Definition: ALFA_Raw2Digit.h:85
ALFA_Raw2Digit::recordCollection
StatusCode recordCollection()
Definition: ALFA_Raw2Digit.cxx:480
ALFA_RawDataCollection.h
ALFA_Raw2Digit::m_ODdigitObject
ALFA_ODDigit * m_ODdigitObject
Definition: ALFA_Raw2Digit.h:115
ALFA_Raw2Digit::m_h_loc1
std::string m_h_loc1
Definition: ALFA_Raw2Digit.h:128
ALFA_Raw2Digit::m_mbID
int m_mbID
Definition: ALFA_Raw2Digit.h:59
ALFA_Raw2Digit::recordODCollection
StatusCode recordODCollection()
Definition: ALFA_Raw2Digit.cxx:493
ALFA_Raw2Digit::m_hit_lay_h
TH1F * m_hit_lay_h[8]
Definition: ALFA_Raw2Digit.h:95
ALFA_ODDigit
Definition: ALFA_ODDigit.h:8
ALFA_Raw2Digit::m_fibID
int m_fibID
Definition: ALFA_Raw2Digit.h:61
ALFA_Raw2Digit::m_inChan
std::ifstream m_inChan
Definition: ALFA_Raw2Digit.h:120
ALFA_Raw2Digit::m_act_lay_h
TH1F * m_act_lay_h[8]
Definition: ALFA_Raw2Digit.h:94
ALFA_Raw2Digit::m_toFile
std::ofstream m_toFile
Definition: ALFA_Raw2Digit.h:138
ALFA_Raw2Digit::m_digitObject
ALFA_Digit * m_digitObject
Definition: ALFA_Raw2Digit.h:112
ALFA_ODDigitCollection
Definition: ALFA_ODDigitCollection.h:15