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 ) );
313 for(
unsigned int i = 0; i < i_size; ++i ){
318 bd_det[i].resize( j_size_dgf );
320 pulser[i].resize( j_size_dgf );
323 for(
unsigned int j = 0; j < j_size_dgf; ++j ){
328 bd_det[i][j].resize( k_size_dgf );
330 pulser[i][j].resize( k_size_dgf );
332 for(
unsigned int k = 0; k < k_size_dgf; ++k ){
345 cd_det[i].resize( j_size_adc );
347 cd_side[i].resize( j_size_adc );
349 pad_det[i].resize( j_size_adc );
354 for(
unsigned int j = 0; j < j_size_adc; ++j ){
356 cd_det[i][j].resize( k_size_adc );
358 cd_side[i][j].resize( k_size_adc );
359 cd_strip[i][j].resize( k_size_adc );
360 pad_det[i][j].resize( k_size_adc );
362 ic_layer[i][j].resize( k_size_adc );
364 for(
unsigned int k = 0; k < k_size_adc; ++k ){
413 mb_sfp[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Sfp", i, j, k ), s );
414 mb_board[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Board", i, j, k ), b );
415 mb_dgf[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Dgf", i, j, k ), g );
416 mb_ch[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Channel", i, j, k ), c );
417 mb_veto[i][j][k] = config->GetValue( Form(
"Miniball_%d_%d_%d.Veto", i, j, k ), false );
428 std::cout <<
"You have defined two Miniball detectors in the same channel:" << std::endl;
432 std::cout <<
"Miniball_" << i <<
"_" << j <<
"_" << k << std::endl;
454 std::cout <<
"You have defined two Miniball detectors in the same channel:" << std::endl;
458 std::cout <<
"Miniball_" << i <<
"_" << j <<
"_" << k << std::endl;
475 std::cerr <<
"Dodgy Miniball settings: sfp = " <<
mb_sfp[i][j][k];
478 std::cerr <<
", channel = " <<
mb_ch[i][j][k] << std::endl;
490 unsigned int side_size;
491 std::string side_str;
497 for(
unsigned int i = 0; i <
n_cd_det; ++i ){
511 for(
unsigned int k = 0; k <
n_cd_side; ++k ){
514 if( k == 0 ) side_str =
"P";
521 cd_sfp[i][j][k].resize( side_size );
522 cd_board[i][j][k].resize( side_size );
523 cd_adc[i][j][k].resize( side_size );
524 cd_ch[i][j][k].resize( side_size );
526 for(
unsigned int l = 0; l < side_size; ++l ){
532 cd_sfp[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Sfp", i, j, l, side_str.data() ), s );
533 cd_board[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Board", i, j, l, side_str.data() ), b );
534 cd_adc[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Adc", i, j, l, side_str.data() ), g );
535 cd_ch[i][j][k][l] = config->GetValue( Form(
"CD_%d_%d_%d.%s.Channel", i, j, l, side_str.data() ), c );
546 std::cout <<
"You have defined two CD detector strips in the same channel:" << std::endl;
550 if( k == 0 ) std::cout <<
".P and" << std::endl;
551 else std::cout <<
".N and CD_" << std::endl;
552 std::cout << i <<
"_" << j <<
"_" << l;
553 if( k == 0 ) std::cout <<
".P" << std::endl;
554 else std::cout <<
".N" << std::endl;
578 std::cout <<
"You have defined two CD detector strips in the same channel:" << std::endl;
582 if( k == 0 ) std::cout <<
".P and" << std::endl;
583 else std::cout <<
".N and CD_" << std::endl;
584 std::cout << i <<
"_" << j <<
"_" << l;
585 if( k == 0 ) std::cout <<
".P" << std::endl;
586 else std::cout <<
".N" << std::endl;
603 std::cerr <<
"Dodgy CD settings: sfp = " <<
cd_sfp[i][j][k][l];
606 std::cerr <<
", channel = " <<
cd_ch[i][j][k][l] << std::endl;
625 for(
unsigned int i = 0; i <
n_cd_det; ++i ){
638 pad_sfp[i][j] = config->GetValue( Form(
"Pad_%d_%d.Sfp", i, j ), s );
639 pad_board[i][j] = config->GetValue( Form(
"Pad_%d_%d.Board", i, j ), b );
640 pad_adc[i][j] = config->GetValue( Form(
"Pad_%d_%d.Adc", i, j ), g );
641 pad_ch[i][j] = config->GetValue( Form(
"Pad_%d_%d.Channel", i, j ), c );
650 std::cout <<
"You have defined two Pad detectors in the same channel:" << std::endl;
653 std::cout <<
"Pad_" << i <<
"_" << j << std::endl;
672 std::cout <<
"You have defined two Pad detectors in the same channel:" << std::endl;
675 std::cout <<
"Pad_" << i <<
"_" << j << std::endl;
690 std::cerr <<
"Dodgy PAD settings: sfp = " <<
pad_sfp[i][j];
693 std::cerr <<
", channel = " <<
pad_ch[i][j] << std::endl;
708 for(
unsigned int i = 0; i <
n_bd_det; ++i ){
710 bd_sfp[i] = config->GetValue( Form(
"BeamDump_%d.Sfp", i ), 1 );
711 bd_board[i] = config->GetValue( Form(
"BeamDump_%d.Board", i ), 10 );
712 bd_dgf[i] = config->GetValue( Form(
"BeamDump_%d.Dgf", i ), 54 );
713 bd_ch[i] = config->GetValue( Form(
"BeamDump_%d.Channel", i ), (int)(i*2+1) );
721 std::cout <<
"You have defined two beam-dump detectors in the same channel:" << std::endl;
723 std::cout <<
"BeamDump_" << i << std::endl;
740 std::cout <<
"You have defined two beam-dump detectors in the same channel:" << std::endl;
742 std::cout <<
"BeamDump_" << i << std::endl;
756 std::cerr <<
"Dodgy beam-dump settings: sfp = " <<
bd_sfp[i];
759 std::cerr <<
", channel = " <<
bd_ch[i] << std::endl;
783 spede_sfp[i] = config->GetValue( Form(
"Spede_%d.Sfp", i ), s );
784 spede_board[i] = config->GetValue( Form(
"Spede_%d.Board", i ), b );
785 spede_ch[i] = config->GetValue( Form(
"Spede_%d.Channel", i ), c );
793 std::cout <<
"You have defined two SPEDE segments in the same channel:" << std::endl;
795 std::cout <<
"Spede_" << i << std::endl;
809 std::cerr <<
"Dodgy SPEDE settings: sfp = " <<
spede_sfp[i];
811 std::cerr <<
", channel = " <<
spede_ch[i] << std::endl;
824 for(
unsigned int i = 0; i <
n_ic_layer; ++i ){
826 ic_sfp[i] = config->GetValue( Form(
"IonChamber_%d.Sfp", i ), 1 );
827 ic_board[i] = config->GetValue( Form(
"IonChamber_%d.Board", i ), 10 );
828 ic_adc[i] = config->GetValue( Form(
"IonChamber_%d.Adc", i ), 4 );
829 ic_ch[i] = config->GetValue( Form(
"IonChamber_%d.Channel", i ), (int)((i+
n_bd_det)*2+1) );
837 std::cout <<
"You have defined two IonChamber elements in the same channel:" << std::endl;
839 std::cout <<
"IonChamber_" << i << std::endl;
856 std::cout <<
"You have defined two IonChamber elements in the same channel:" << std::endl;
858 std::cout <<
"IonChamber_" << i << std::endl;
872 std::cerr <<
"Dodgy IonChamber settings: sfp = " <<
ic_sfp[i];
875 std::cerr <<
", channel = " <<
ic_ch[i] << std::endl;
888 for(
unsigned int i = 0; i <
n_pulsers; ++i ){
890 pulser_sfp[i] = config->GetValue( Form(
"Pulser_%d.Sfp", i ), (int)i );
891 pulser_board[i] = config->GetValue( Form(
"Pulser_%d.Board", i ), 15 );
892 pulser_ch[i] = config->GetValue( Form(
"Pulser_%d.Channel", i ), 15 );
900 std::cout <<
"You have defined two Sync Pulsers in the same channel:" << std::endl;
902 std::cout <<
"Pulser_" << i << std::endl;
916 std::cerr <<
"Dodgy pulser settings: sfp = " <<
pulser_sfp[i];
918 std::cerr <<
", channel = " <<
pulser_ch[i] << std::endl;
935 if(
mb_cluster[0][dgf][ch] >= 0 )
return true;
941 std::cerr <<
"Bad Miniball event: dgf = " << dgf;
942 std::cerr <<
", channel = " << ch << std::endl;
954 if(
mb_cluster[sfp][board][ch] >= 0 )
return true;
961 std::cerr <<
"Bad Miniball event: sfp = " << sfp;
962 std::cerr <<
", board = " << board;
963 std::cerr <<
", channel = " << ch << std::endl;
978 std::cerr <<
"Bad Miniball detector: Cluster = " << clu;
979 std::cerr <<
", Crystal = " << cry;
980 std::cerr <<
", Segment = " << seg << std::endl;
988 const std::vector<std::vector<std::vector<int>>> &vector ) {
992 return vector[0][dgf][ch];
996 std::cerr <<
"Bad Miniball event: dgf = " << dgf;
997 std::cerr <<
", channel = " << ch << std::endl;
1005 const std::vector<std::vector<std::vector<int>>> &vector ) {
1009 return vector[sfp][board][ch];
1013 std::cerr <<
"Bad Miniball event: sfp = " << sfp;
1014 std::cerr <<
", board = " << board;
1015 std::cerr <<
", channel = " << ch << std::endl;
1031 std::vector<int> daqinfo(3,-1);
1090 if(
cd_det[0][adc][ch] >= 0 )
return true;
1097 std::cerr <<
"Bad CD event: adc = " << adc;
1098 std::cerr <<
", channel = " << ch << std::endl;
1110 if(
cd_det[sfp][board][ch] >= 0 )
return true;
1117 std::cerr <<
"Bad CD event: sfp = " << sfp;
1118 std::cerr <<
", board = " << board;
1119 std::cerr <<
", channel = " << ch << std::endl;
1127 const std::vector<std::vector<std::vector<int>>> &vector ) {
1131 return vector[0][adc][ch];
1135 std::cerr <<
"Bad CD event: adc = " << adc;
1136 std::cerr <<
", channel = " << ch << std::endl;
1144 const std::vector<std::vector<std::vector<int>>> &vector ) {
1148 return vector[sfp][board][ch];
1152 std::cerr <<
"Bad CD event: sfp = " << sfp;
1153 std::cerr <<
", board = " << board;
1154 std::cerr <<
", channel = " << ch << std::endl;
1171 std::vector<int> daqinfo(3,-1);
1232 if(
pad_det[0][adc][ch] >= 0 )
return true;
1239 std::cerr <<
"Bad Pad event: adc = " << adc;
1240 std::cerr <<
", channel = " << ch << std::endl;
1252 if(
pad_det[sfp][board][ch] >= 0 )
return true;
1259 std::cerr <<
"Bad Pad event: sfp = " << sfp;
1260 std::cerr <<
", board = " << board;
1261 std::cerr <<
", channel = " << ch << std::endl;
1276 std::cerr <<
"Bad Pad event: adc = " << adc;
1277 std::cerr <<
", channel = " << ch << std::endl;
1288 return pad_det[sfp][board][ch];
1292 std::cerr <<
"Bad Pad event: sfp = " << sfp;
1293 std::cerr <<
", board = " << board;
1294 std::cerr <<
", channel = " << ch << std::endl;
1309 std::cerr <<
"Bad Pad event: adc = " << adc;
1310 std::cerr <<
", channel = " << ch << std::endl;
1325 std::cerr <<
"Bad Pad event: sfp = " << sfp;
1326 std::cerr <<
", board = " << board;
1327 std::cerr <<
", channel = " << ch << std::endl;
1342 std::vector<int> daqinfo(3,-1);
1414 return bd_det[0][dgf][ch];
1418 std::cerr <<
"Bad beam dump event: dgf = " << dgf;
1419 std::cerr <<
", channel = " << ch << std::endl;
1430 return bd_det[sfp][board][ch];
1434 std::cerr <<
"Bad beam dump event: sfp = " << sfp;
1435 std::cerr <<
", board = " << board;
1436 std::cerr <<
", channel = " << ch << std::endl;
1450 std::vector<int> daqinfo(3,-1);
1516 std::cerr <<
"Bad SPEDE event: sfp = " << sfp;
1517 std::cerr <<
", board = " << board;
1518 std::cerr <<
", channel = " << ch << std::endl;
1532 std::vector<int> daqinfo(3,-1);
1589 std::cerr <<
"Bad IonChamber event: adc = " << adc;
1590 std::cerr <<
", channel = " << ch << std::endl;
1605 std::cerr <<
"Bad IonChamber event: sfp = " << sfp;
1606 std::cerr <<
", board = " << board;
1607 std::cerr <<
", channel = " << ch << std::endl;
1621 std::vector<int> daqinfo(3,-1);
1674 if(
GetPulser(sfp,board,ch) >= 0 )
return true;
1683 return pulser[sfp][board][ch];
1687 std::cerr <<
"Bad pulser event: sfp = " << sfp;
1688 std::cerr <<
", board = " << board;
1689 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 GetNumberOfFebexSfps()
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)
std::vector< int > GetCDDAQ(unsigned int det, unsigned int sec, unsigned int side, unsigned int strip)
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 GetNumberOfFebexChannels()
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)
std::vector< int > GetIonChamberDAQ(unsigned int layer)
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.
double cd_calibrator_max_energy
Max energy to fill spectra to calibrate CD strips with CD calibrator; default is 2000e3 keV.
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.
std::vector< int > GetSpedeDAQ(unsigned int seg)
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)
std::vector< int > GetMiniballDAQ(unsigned int clu, unsigned int cry, unsigned int seg)
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.
std::vector< int > GetBeamDumpDAQ(unsigned int det)
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.
std::vector< int > GetPadDAQ(unsigned int det, unsigned int sec)
unsigned int tm_hsb_code
Highest significant bits of the timestamp are here.
unsigned int GetNumberOfFebexBoards()
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)