27 for(
unsigned int k = 0; k <
n_febex_ch; ++k ){
29 std::vector<std::string> active_chs;
35 detname =
"Miniball_";
39 active_chs.push_back( detname );
48 detname += std::to_string(
GetCDSector(i,j,k) ) +
"_";
49 detname += std::to_string(
GetCDStrip(i,j,k) ) +
".";
50 detname += std::to_string(
GetCDSide(i,j,k) ) +
"\n";
51 active_chs.push_back( detname );
61 active_chs.push_back( detname );
70 active_chs.push_back( detname );
77 detname =
"BeamDump_";
79 active_chs.push_back( detname );
86 detname =
"IonChamber_";
88 active_chs.push_back( detname );
96 detname += std::to_string(
GetPulser(i,j,k) ) +
"\n";
97 active_chs.push_back( detname );
103 active_chs.push_back(
"EBIS\n" );
107 active_chs.push_back(
"T1\n" );
111 active_chs.push_back(
"SC\n" );
115 active_chs.push_back(
"RILIS\n" );
119 if( active_chs.size() > 1 ) {
121 std::cout <<
"Too many detectors in SFP " << i;
122 std::cout <<
", board " << j <<
", channel " << k <<
":\n";
123 for(
unsigned int q = 0; q < active_chs.size(); ++q )
124 std::cout << active_chs.at(q);
138 TEnv *config =
new TEnv( fInputFile.data() );
141 n_febex_sfp = config->GetValue(
"NumberOfFebexSfps", 2 );
142 n_febex_board = config->GetValue(
"NumberOfFebexBoards", 16 );
143 n_febex_ch = config->GetValue(
"NumberOfFebexChannels", 16 );
146 n_dgf_mod = config->GetValue(
"NumberOfDgfModules", 0 );
147 n_dgf_ts_mod = config->GetValue(
"NumberOfDgfTimestampModules", 5 );
148 n_dgf_ch = config->GetValue(
"NumberOfDgfChannels", 4 );
151 dgf_ts_delay = config->GetValue(
"DgfTimestampDelay", 65527 );
152 dgf_ts_units = config->GetValue(
"DgfTimestampUnits", 25. );
155 n_caen_mod = config->GetValue(
"NumberOfCaenAdcModules", 0 );
156 n_caen_ch = config->GetValue(
"NumberOfCaenAdcChannels", 32 );
158 caen_ts_units = config->GetValue(
"CaenAdcTimestampUnits", 25. );
161 n_madc_mod = config->GetValue(
"NumberOfMesytecAdcModules", 0 );
162 n_madc_ch = config->GetValue(
"NumberOfMesytecAdcChannels", 32 );
164 madc_ts_units = config->GetValue(
"MesytecAdcTimestampUnits", 25. );
167 n_scaler_unit = config->GetValue(
"NumberOfScalerUnits", 1 );
187 n_mb_cluster = config->GetValue(
"NumberOfMiniballClusters", 8 );
188 n_mb_crystal = config->GetValue(
"NumberOfMiniballCrystals", 3 );
189 n_mb_segment = config->GetValue(
"NumberOfMiniballSegments", 7 );
192 n_cd_det = config->GetValue(
"NumberOfCDDetectors", 1 );
193 n_cd_sector = config->GetValue(
"NumberOfCDSectors", 4 );
195 n_cd_pstrip = config->GetValue(
"NumberOfCDStrips.P", 16 );
196 n_cd_nstrip = config->GetValue(
"NumberOfCDStrips.N", 12 );
199 n_bd_det = config->GetValue(
"NumberOfBeamDumpDetectors", 1 );
203 n_spede_seg = config->GetValue(
"NumberOfSpedeSegments", 0 );
206 n_ic_layer = config->GetValue(
"NumberOfIonChamberLayers", 2 );
209 n_pulsers = config->GetValue(
"NumberOfPulsers", 2 );
212 std::cout <<
"Number of pulsers limited to 10" << std::endl;
225 ebis_sfp = config->GetValue(
"EBIS.Sfp", 1 );
226 ebis_board = config->GetValue(
"EBIS.Board", 10 );
227 ebis_ch = config->GetValue(
"EBIS.Channel", 0 );
228 ebis_dgf = config->GetValue(
"EBIS.Dgf", 52 );
230 t1_sfp = config->GetValue(
"T1.Sfp", 1 );
231 t1_board = config->GetValue(
"T1.Board", 10 );
232 t1_ch = config->GetValue(
"T1.Channel", 2 );
233 t1_dgf = config->GetValue(
"T1.Dgf", 52 );
235 sc_sfp = config->GetValue(
"SC.Sfp", 1 );
236 sc_board = config->GetValue(
"SC.Board", 10 );
237 sc_ch = config->GetValue(
"SC.Channel", 4 );
238 sc_dgf = config->GetValue(
"SC.Dgf", 52 );
240 laser_sfp = config->GetValue(
"RILIS.Sfp", 1 );
241 laser_board = config->GetValue(
"RILIS.Board", 10 );
242 laser_ch = config->GetValue(
"RILIS.Channel", 6 );
252 mb_hit_window = config->GetValue(
"MiniballCrystalHitWindow", 400. );
253 ab_hit_window = config->GetValue(
"MiniballAddbackHitWindow", 400. );
256 ic_hit_window = config->GetValue(
"IonChamberHitWindow", 500. );
260 block_size = config->GetValue(
"DataBlockSize", 0x10000 );
266 config->GetValue(
"PileUpRejection",
false ) );
311 for(
unsigned int i = 0; i < i_size; ++i ){
316 bd_det[i].resize( j_size_dgf );
318 pulser[i].resize( j_size_dgf );
321 for(
unsigned int j = 0; j < j_size_dgf; ++j ){
326 bd_det[i][j].resize( k_size_dgf );
328 pulser[i][j].resize( k_size_dgf );
330 for(
unsigned int k = 0; k < k_size_dgf; ++k ){
343 cd_det[i].resize( j_size_adc );
345 cd_side[i].resize( j_size_adc );
347 pad_det[i].resize( j_size_adc );
352 for(
unsigned int j = 0; j < j_size_adc; ++j ){
354 cd_det[i][j].resize( k_size_adc );
356 cd_side[i][j].resize( k_size_adc );
357 cd_strip[i][j].resize( k_size_adc );
358 pad_det[i][j].resize( k_size_adc );
360 ic_layer[i][j].resize( k_size_adc );
362 for(
unsigned int k = 0; k < k_size_adc; ++k ){
411 mb_sfp[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Sfp", i, j, k ), s );
412 mb_board[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Board", i, j, k ), b );
413 mb_dgf[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Dgf", i, j, k ), g );
414 mb_ch[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Channel", i, j, k ), c );
415 mb_veto[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Veto", i, j, k ), false );
426 std::cout <<
"You have defined two Miniball detectors in the same channel:" << std::endl;
430 std::cout <<
"Miniball_" << i <<
"_" << j <<
"_" << k << std::endl;
452 std::cout <<
"You have defined two Miniball detectors in the same channel:" << std::endl;
456 std::cout <<
"Miniball_" << i <<
"_" << j <<
"_" << k << std::endl;
473 std::cerr <<
"Dodgy Miniball settings: sfp = " <<
mb_sfp[i][j][k];
476 std::cerr <<
", channel = " <<
mb_ch[i][j][k] << std::endl;
488 unsigned int side_size;
489 std::string side_str;
495 for(
unsigned int i = 0; i <
n_cd_det; ++i ){
509 for(
unsigned int k = 0; k <
n_cd_side; ++k ){
512 if( k == 0 ) side_str =
"P";
519 cd_sfp[i][j][k].resize( side_size );
520 cd_board[i][j][k].resize( side_size );
521 cd_adc[i][j][k].resize( side_size );
522 cd_ch[i][j][k].resize( side_size );
524 for(
unsigned int l = 0; l < side_size; ++l ){
530 cd_sfp[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Sfp", i, j, l, side_str.data() ), s );
531 cd_board[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Board", i, j, l, side_str.data() ), b );
532 cd_adc[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Adc", i, j, l, side_str.data() ), g );
533 cd_ch[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Channel", i, j, l, side_str.data() ), c );
544 std::cout <<
"You have defined two CD detector strips in the same channel:" << std::endl;
548 if( k == 0 ) std::cout <<
".P and" << std::endl;
549 else std::cout <<
".N and CD_" << std::endl;
550 std::cout << i <<
"_" << j <<
"_" << l;
551 if( k == 0 ) std::cout <<
".P" << std::endl;
552 else std::cout <<
".N" << std::endl;
576 std::cout <<
"You have defined two CD detector strips in the same channel:" << std::endl;
580 if( k == 0 ) std::cout <<
".P and" << std::endl;
581 else std::cout <<
".N and CD_" << std::endl;
582 std::cout << i <<
"_" << j <<
"_" << l;
583 if( k == 0 ) std::cout <<
".P" << std::endl;
584 else std::cout <<
".N" << std::endl;
601 std::cerr <<
"Dodgy CD settings: sfp = " <<
cd_sfp[i][j][k][l];
604 std::cerr <<
", channel = " <<
cd_ch[i][j][k][l] << std::endl;
623 for(
unsigned int i = 0; i <
n_cd_det; ++i ){
636 pad_sfp[i][j] = config->GetValue( Form(
"Pad_%d_%d.Sfp", i, j ), s );
637 pad_board[i][j] = config->GetValue( Form(
"Pad_%d_%d.Board", i, j ), b );
638 pad_adc[i][j] = config->GetValue( Form(
"Pad_%d_%d.Adc", i, j ), g );
639 pad_ch[i][j] = config->GetValue( Form(
"Pad_%d_%d.Channel", i, j ), c );
648 std::cout <<
"You have defined two Pad detectors in the same channel:" << std::endl;
651 std::cout <<
"Pad_" << i <<
"_" << j << std::endl;
670 std::cout <<
"You have defined two Pad detectors in the same channel:" << std::endl;
673 std::cout <<
"Pad_" << i <<
"_" << j << std::endl;
688 std::cerr <<
"Dodgy PAD settings: sfp = " <<
pad_sfp[i][j];
691 std::cerr <<
", channel = " <<
pad_ch[i][j] << std::endl;
706 for(
unsigned int i = 0; i <
n_bd_det; ++i ){
708 bd_sfp[i] = config->GetValue( Form(
"BeamDump_%d.Sfp", i ), 1 );
709 bd_board[i] = config->GetValue( Form(
"BeamDump_%d.Board", i ), 10 );
710 bd_dgf[i] = config->GetValue( Form(
"BeamDump_%d.Dgf", i ), 54 );
711 bd_ch[i] = config->GetValue( Form(
"BeamDump_%d.Channel", i ), (int)(i*2+1) );
719 std::cout <<
"You have defined two beam-dump detectors in the same channel:" << std::endl;
721 std::cout <<
"BeamDump_" << i << std::endl;
738 std::cout <<
"You have defined two beam-dump detectors in the same channel:" << std::endl;
740 std::cout <<
"BeamDump_" << i << std::endl;
754 std::cerr <<
"Dodgy beam-dump settings: sfp = " <<
bd_sfp[i];
757 std::cerr <<
", channel = " <<
bd_ch[i] << std::endl;
781 spede_sfp[i] = config->GetValue( Form(
"Spede_%d.Sfp", i ), s );
782 spede_board[i] = config->GetValue( Form(
"Spede_%d.Board", i ), b );
783 spede_ch[i] = config->GetValue( Form(
"Spede_%d.Channel", i ), c );
791 std::cout <<
"You have defined two SPEDE segments in the same channel:" << std::endl;
793 std::cout <<
"Spede_" << i << std::endl;
807 std::cerr <<
"Dodgy SPEDE settings: sfp = " <<
spede_sfp[i];
809 std::cerr <<
", channel = " <<
spede_ch[i] << std::endl;
822 for(
unsigned int i = 0; i <
n_ic_layer; ++i ){
824 ic_sfp[i] = config->GetValue( Form(
"IonChamber_%d.Sfp", i ), 1 );
825 ic_board[i] = config->GetValue( Form(
"IonChamber_%d.Board", i ), 10 );
826 ic_adc[i] = config->GetValue( Form(
"IonChamber_%d.Adc", i ), 4 );
827 ic_ch[i] = config->GetValue( Form(
"IonChamber_%d.Channel", i ), (int)((i+
n_bd_det)*2+1) );
835 std::cout <<
"You have defined two IonChamber elements in the same channel:" << std::endl;
837 std::cout <<
"IonChamber_" << i << std::endl;
854 std::cout <<
"You have defined two IonChamber elements in the same channel:" << std::endl;
856 std::cout <<
"IonChamber_" << i << std::endl;
870 std::cerr <<
"Dodgy IonChamber settings: sfp = " <<
ic_sfp[i];
873 std::cerr <<
", channel = " <<
ic_ch[i] << std::endl;
886 for(
unsigned int i = 0; i <
n_pulsers; ++i ){
888 pulser_sfp[i] = config->GetValue( Form(
"Pulser_%d.Sfp", i ), (int)i );
889 pulser_board[i] = config->GetValue( Form(
"Pulser_%d.Board", i ), 15 );
890 pulser_ch[i] = config->GetValue( Form(
"Pulser_%d.Channel", i ), 15 );
898 std::cout <<
"You have defined two Sync Pulsers in the same channel:" << std::endl;
900 std::cout <<
"Pulser_" << i << std::endl;
914 std::cerr <<
"Dodgy pulser settings: sfp = " <<
pulser_sfp[i];
916 std::cerr <<
", channel = " <<
pulser_ch[i] << std::endl;
933 if(
mb_cluster[0][dgf][ch] >= 0 )
return true;
939 std::cerr <<
"Bad Miniball event: dgf = " << dgf;
940 std::cerr <<
", channel = " << ch << std::endl;
952 if(
mb_cluster[sfp][board][ch] >= 0 )
return true;
959 std::cerr <<
"Bad Miniball event: sfp = " << sfp;
960 std::cerr <<
", board = " << board;
961 std::cerr <<
", channel = " << ch << std::endl;
976 std::cerr <<
"Bad Miniball detector: Cluster = " << clu;
977 std::cerr <<
", Crystal = " << cry;
978 std::cerr <<
", Segment = " << seg << std::endl;
986 const std::vector<std::vector<std::vector<int>>> &vector ) {
990 return vector[0][dgf][ch];
994 std::cerr <<
"Bad Miniball event: dgf = " << dgf;
995 std::cerr <<
", channel = " << ch << std::endl;
1003 const std::vector<std::vector<std::vector<int>>> &vector ) {
1007 return vector[sfp][board][ch];
1011 std::cerr <<
"Bad Miniball event: sfp = " << sfp;
1012 std::cerr <<
", board = " << board;
1013 std::cerr <<
", channel = " << ch << std::endl;
1026 if(
cd_det[0][adc][ch] >= 0 )
return true;
1033 std::cerr <<
"Bad CD event: adc = " << adc;
1034 std::cerr <<
", channel = " << ch << std::endl;
1046 if(
cd_det[sfp][board][ch] >= 0 )
return true;
1053 std::cerr <<
"Bad CD event: sfp = " << sfp;
1054 std::cerr <<
", board = " << board;
1055 std::cerr <<
", channel = " << ch << std::endl;
1063 const std::vector<std::vector<std::vector<int>>> &vector ) {
1067 return vector[0][adc][ch];
1071 std::cerr <<
"Bad CD event: adc = " << adc;
1072 std::cerr <<
", channel = " << ch << std::endl;
1080 const std::vector<std::vector<std::vector<int>>> &vector ) {
1084 return vector[sfp][board][ch];
1088 std::cerr <<
"Bad CD event: sfp = " << sfp;
1089 std::cerr <<
", board = " << board;
1090 std::cerr <<
", channel = " << ch << std::endl;
1102 if(
pad_det[0][adc][ch] >= 0 )
return true;
1109 std::cerr <<
"Bad Pad event: adc = " << adc;
1110 std::cerr <<
", channel = " << ch << std::endl;
1122 if(
pad_det[sfp][board][ch] >= 0 )
return true;
1129 std::cerr <<
"Bad Pad event: sfp = " << sfp;
1130 std::cerr <<
", board = " << board;
1131 std::cerr <<
", channel = " << ch << std::endl;
1146 std::cerr <<
"Bad Pad event: adc = " << adc;
1147 std::cerr <<
", channel = " << ch << std::endl;
1158 return pad_det[sfp][board][ch];
1162 std::cerr <<
"Bad Pad event: sfp = " << sfp;
1163 std::cerr <<
", board = " << board;
1164 std::cerr <<
", channel = " << ch << std::endl;
1179 std::cerr <<
"Bad Pad event: adc = " << adc;
1180 std::cerr <<
", channel = " << ch << std::endl;
1195 std::cerr <<
"Bad Pad event: sfp = " << sfp;
1196 std::cerr <<
", board = " << board;
1197 std::cerr <<
", channel = " << ch << std::endl;
1224 return bd_det[0][dgf][ch];
1228 std::cerr <<
"Bad beam dump event: dgf = " << dgf;
1229 std::cerr <<
", channel = " << ch << std::endl;
1240 return bd_det[sfp][board][ch];
1244 std::cerr <<
"Bad beam dump event: sfp = " << sfp;
1245 std::cerr <<
", board = " << board;
1246 std::cerr <<
", channel = " << ch << std::endl;
1269 std::cerr <<
"Bad SPEDE event: sfp = " << sfp;
1270 std::cerr <<
", board = " << board;
1271 std::cerr <<
", channel = " << ch << std::endl;
1302 std::cerr <<
"Bad IonChamber event: adc = " << adc;
1303 std::cerr <<
", channel = " << ch << std::endl;
1318 std::cerr <<
"Bad IonChamber event: sfp = " << sfp;
1319 std::cerr <<
", board = " << board;
1320 std::cerr <<
", channel = " << ch << std::endl;
1330 if(
GetPulser(sfp,board,ch) >= 0 )
return true;
1339 return pulser[sfp][board][ch];
1343 std::cerr <<
"Bad pulser event: sfp = " << sfp;
1344 std::cerr <<
", board = " << board;
1345 std::cerr <<
", channel = " << ch << std::endl;
ClassImp(MiniballSettings) MiniballSettings
unsigned int n_pattern_unit
Number of pattern unit modules.
unsigned int dgf_mod_offset
module number offset for the DGFs
unsigned int n_caen_mod
Number of CAEN ADC modules.
unsigned int pulser_code
Info code when we have a pulser event in InfoData packets.
unsigned int ebis_sfp
Location of the EBIS signal in the FEBEX system (sfp)
unsigned int caen_mod_offset
module number offset for the CAEN ADCs
double mb_hit_window
Prompt time for correlated Miniball events in crystal, i.e. segmen-core events.
unsigned int n_madc_mod
Number of Mesytec ADC modules.
std::vector< std::vector< std::vector< int > > > cd_det
A channel map for the CD detectors (-1 if not a CD, 0 forward CD, 1 backward CD)
unsigned int ebis_dgf
Location of the EBIS signal in the DGF system (module)
unsigned int n_scaler_unit
Number of scaler unit modules.
bool IsCD(unsigned int adc, unsigned int ch)
std::vector< unsigned int > bd_dgf
A list of DGF module numbers for each beam dump detector.
unsigned int laser_board
Location of the RILIS laser signal in the FEBEX system (board)
unsigned int block_size
not yet implemented, needs C++ style reading of data files
unsigned int ebis_ch
Location of the EBIS signal in the FEBEX system (channel)
unsigned int GetRILISChannel()
unsigned int adc_vme_first
unsigned int laser_sfp
Location of the RILIS laser signal in the FEBEX system (sfp)
unsigned int dgf_vme_last
Marabou IDs for DGFs.
std::vector< std::vector< std::vector< bool > > > mb_veto
A boolean to check if we need to veto any segments.
int GetIonChamberLayer(unsigned int adc, unsigned int ch)
std::vector< unsigned int > pulser_sfp
A list of SFP numbers for each pulser.
std::vector< std::vector< unsigned int > > pad_ch
A list of channel numbers for each PAD detector.
unsigned int dgf_ts_mod_offset
module number offset for the timestamper DGFs
std::vector< std::vector< std::vector< std::vector< unsigned int > > > > cd_adc
A list of ADC module numbers for each CD detector, sector, side and strip.
unsigned int n_cd_nstrip
number of n-side strips
std::vector< unsigned int > ic_board
A list of board numbers for each IonChamber segment.
unsigned int tm_msb_code
Medium significant bits of the timestamp are here.
unsigned int n_cd_sector
number of sectors in the CD (or quadrants, it's 4)
unsigned int pattern_unit_offset
module number offset for the pattern units
std::vector< std::vector< std::vector< std::vector< unsigned int > > > > cd_ch
A list of channel numbers for each CD detector, sector, side and strip.
bool clipped_reject
reject events that are clipped by the ADC range
unsigned int ebis_code
Info code when we have an EBIS event in InfoData packets.
double ab_hit_window
Prompt time for correlated Miniball events in cluster, i.e. addback events.
int GetSpedeSegment(unsigned int sfp, unsigned int board, unsigned int ch)
unsigned int pattern_vme_last
Marabou IDs for pattern unit modules.
unsigned int GetEBISChannel()
int GetMiniballSegment(unsigned int dgf, unsigned int ch)
int GetPadDetector(unsigned int adc, unsigned int ch)
bool IsIonChamber(unsigned int adc, unsigned int ch)
int GetPadSector(unsigned int adc, unsigned int ch)
unsigned int n_cd_pstrip
number of p-side strips
bool IsPulser(unsigned int sfp, unsigned int board, unsigned int ch)
std::vector< unsigned int > ic_ch
A list of channel numbers for each IonChamber segment.
unsigned int n_madc_ch
Number of Mesytec ADC channels.
unsigned int laser_ch
Location of the RILIS laser signal in the FEBEX system (channel)
std::vector< std::vector< unsigned int > > pad_board
A list of board numbers for each PAD detector.
unsigned int GetT1Channel()
std::vector< std::vector< std::vector< int > > > pad_det
A channel map for the PAD detectors (-1 if not a PAD, 0 forward CD-PAD, 1 backward CD-PAD)
int GetMiniballCrystal(unsigned int dgf, unsigned int ch)
unsigned int GetSCChannel()
int GetMiniballID(unsigned int dgf, unsigned int ch, const std::vector< std::vector< std::vector< int > > > &vector)
ClassDef(MiniballSettings, 3) private unsigned int n_febex_sfp
Number of SFPs in acquisition.
std::vector< unsigned int > bd_ch
A list of channel numbers for each beam dump detector.
std::vector< std::vector< std::vector< unsigned int > > > mb_sfp
A list of SFP numbers for each MB cluster, crystal and segment.
unsigned int sync_msb_code
Sync pulse code from Exploder (msb)
unsigned int GetNumberOfDgfChannels()
std::vector< unsigned int > spede_ch
A list of channel numbers for each SPEDE segment.
int GetMiniballCluster(unsigned int dgf, unsigned int ch)
void SetFile(std::string filename)
unsigned int n_caen_ch
Number of CAENADC channels.
bool mbs_event_sort
Flag to define if we sort MBS data by readout event (true), or by global time (false)
unsigned int scaler_unit_offset
module number offset for the scaler units
std::vector< unsigned int > bd_board
A list of board numbers for each beam dump detector.
unsigned int n_mb_cluster
Miniball usuall has 8 triple cluster detectors.
int GetCDStrip(unsigned int adc, unsigned int ch)
unsigned int GetRILISBoard()
bool IsPad(unsigned int adc, unsigned int ch)
unsigned int t1_sfp
Location of the T1 signal in the FEBEX system (sfp)
double cd_hit_window
Prompt time for correlated CD events.
std::vector< unsigned int > spede_board
A list of board numbers for each SPEDE segment.
int GetCDSector(unsigned int adc, unsigned int ch)
bool pileup_reject
reject events where the pileup flag is set by the MWD firmware
int GetCDDetector(unsigned int adc, unsigned int ch)
std::vector< unsigned int > spede_sfp
A list of SFP numbers for each SPEDE segment.
unsigned int n_spede_seg
Number of SPEDE segments, usually 24.
std::vector< std::vector< std::vector< std::vector< unsigned int > > > > cd_board
A list of board numbers for each CD detector, sector, side and strip.
std::vector< std::vector< std::vector< int > > > pad_sector
std::vector< std::vector< std::vector< unsigned int > > > mb_dgf
A list of DGF module numbers for each MB cluster, crystal and segment.
unsigned int n_bd_det
Number of beam dump detectors.
bool flag_febex_only
when there is only FEBEX data in the file
unsigned int t1_dgf
Location of the T1 signal in the DGF system (module)
unsigned int scaler_vme_last
Marabou IDs for scaler modules.
std::vector< std::vector< std::vector< unsigned int > > > mb_board
A list of board numbers for each MB cluster, crystal and segment.
unsigned int n_dgf_ch
Number of DGF channels.
unsigned int t1_code
Info code when we have a T1 event in InfoData packets.
unsigned int GetT1Board()
std::vector< unsigned int > ic_adc
A list of ADC module numbers for each IonChamber segment.
unsigned int ebis_board
Location of the EBIS signal in the FEBEX system (board)
double pad_hit_window
Prompt time for correlated CD-Pad events.
std::vector< std::vector< std::vector< int > > > cd_strip
A channel map for the CD strips IDs (-1 if not a CD, strip ID otherwise)
unsigned int n_cd_side
number of sides, it's always 2, i.e. p-side and n-side
unsigned int laser_pattern
Location of the RILIS laser signal in the pattern unit (channel)
unsigned int GetNumberOfAdcModules()
bool IsMiniballSegmentVetoed(unsigned int clu, unsigned int cry, unsigned int seg)
std::vector< std::vector< std::vector< std::vector< unsigned int > > > > cd_sfp
A list of SFP numbers for each CD detector, sector, side and strip.
unsigned int GetEBISSfp()
std::vector< std::vector< std::vector< int > > > bd_det
A channel map for the beam dump detectors (-1 if not a beam dump, otherwise detector number)
std::vector< std::vector< std::vector< int > > > mb_cluster
A channel map for the Miniball cluster IDs (-1 if not Miniball)
unsigned int madc_mod_offset
module number offset for the MADCs
unsigned int n_dgf_ts_mod
Number of DGF timestamp modules (subset of n_dgf_mod)
std::vector< std::vector< std::vector< int > > > cd_sector
A channel map for the CD sectors (-1 if not a CD, 0-3 for quadrants)
std::vector< std::vector< std::vector< int > > > ic_layer
A channel map for the IonChamber segments (-1 if not a IonChamber, otherwise layer number,...
std::vector< std::vector< std::vector< unsigned int > > > mb_ch
A list of channel numbers for each MB cluster, crystal and segment.
unsigned int laser_code
Info code when we have a RILIS Laser ON coincidence with EBIS in InfoData packets.
unsigned int n_ic_layer
Number of IonChamber layers, usually 2, dE (gas) and E (Si)
unsigned int sc_sfp
Location of the SuperCycle signal in the FEBEX system (sfp)
bool IsSpede(unsigned int sfp, unsigned int board, unsigned int ch)
std::vector< std::vector< std::vector< int > > > cd_side
A channel map for the CD sides (-1 if not a CD, 0 for p-side, 1 for n-side)
double ic_hit_window
Prompt time for correlated ionchamber events.
bool IsMiniball(unsigned int dgf, unsigned int ch)
std::vector< unsigned int > ic_sfp
A list of SFP numbers for each IonChamber segment.
bool IsBeamDump(unsigned int dgf, unsigned int ch)
unsigned int n_mb_segment
Number of sgements in a crystal is 7, including core = 0.
int GetBeamDumpDetector(unsigned int dgf, unsigned int ch)
int GetCDID(unsigned int adc, unsigned int ch, const std::vector< std::vector< std::vector< int > > > &vector)
int GetCDSide(unsigned int adc, unsigned int ch)
std::vector< std::vector< std::vector< int > > > pulser
A channel map for the pulser inputs.
std::vector< std::vector< std::vector< int > > > mb_crystal
A channel map for the Miniball crystal IDs (-1 if not Miniball)
unsigned int sc_dgf
Location of the SuperCycle signal in the DGF system (module)
unsigned int GetMaximumNumberOfAdcChannels()
int GetPulser(unsigned int sfp, unsigned int board, unsigned int ch)
unsigned int dgfscaler_vme_last
Marabou IDs for DGF scalers.
unsigned int n_febex_ch
Number of channels per board (16 for FEBEX4)
double event_window
Event builder time window in ns.
std::vector< std::vector< unsigned int > > pad_sfp
A list of SFP numbers for each PAD detector.
unsigned int pause_code
Info code when acquisition has paused due to a full buffer.
unsigned int GetSCBoard()
unsigned int t1_board
Location of the T1 signal in the FEBEX system (board)
std::vector< std::vector< unsigned int > > pad_adc
A list of ADC module numbers for each PAD detector.
unsigned int GetNumberOfDgfModules()
unsigned int pattern_vme_first
unsigned int sc_ch
Location of the SuperCycle signal in the FEBEX system (channel)
unsigned int scaler_vme_first
unsigned int adc_vme_last
Marabou IDs for ADCs.
unsigned int tm_hsb_code
Highest significant bits of the timestamp are here.
unsigned int n_dgf_mod
Number of DGF modules.
std::vector< std::vector< std::vector< int > > > mb_segment
A channel map for the Miniball segment IDs (-1 if not Miniball)
unsigned int dgfscaler_vme_first
unsigned int n_febex_board
Maximum number of boards per SFP.
unsigned int n_pulsers
Number of pulser inputs for synchronisation tests.
std::vector< unsigned int > pulser_board
A list of board numbers for each pulser.
unsigned int n_cd_det
Number of CD detectors (just 1 for Coulex)
unsigned int t1_ch
Location of the T1 signal in the FEBEX system (channel)
unsigned int n_mb_crystal
Number of crystals in a triple cluster is 3.
unsigned int GetRILISSfp()
unsigned int dgf_vme_first
unsigned int sync_hsb_code
Sync pulse code from Exploder (hsb)
unsigned int GetEBISBoard()
std::vector< unsigned int > bd_sfp
A list of SFP numbers for each beam dump detector.
unsigned int sc_board
Location of the SuperCycle signal in the FEBEX system (board)
unsigned int sc_code
Info code when we have a SuperCycle event in InfoData packets.
unsigned int resume_code
Info code when acquisition has resumed after a pause.
std::vector< unsigned int > pulser_ch
A list of channel numbers for each pulser.
std::vector< std::vector< std::vector< int > > > spede_seg
A channel map for the SPEDE segments (-1 if not a SPEDE, otherwise segment number)