ProtoDUNEBeamSpill.h
Go to the documentation of this file.
1 #ifndef BEAMDATA_PROTODUNEBEAMSPILL_H
2 #define BEAMDATA_PROTODUNEBEAMSPILL_H
3 
4 #include <vector>
5 #include <bitset>
6 #include <iostream>
7 #include <map>
9 
10 namespace beam
11 {
12 
13  //Fiber Beam Monitor
14  //
15  struct FBM{
16 
17 
18  FBM()
19  {
20  ID = -1;
21  timeStamp = 0.;
22  decoded = false;
23  active = std::vector<short>();
24  fibers = {};
25  glitch_mask = {};
26  std::uninitialized_fill( std::begin(fiberData), std::end(fiberData), 0. );
27  std::uninitialized_fill( std::begin(timeData), std::end(timeData), 0. );
28  };
29  FBM(int id)
30  {
31  ID = id;
32  timeStamp = 0.;
33  decoded = false;
34  active = std::vector<short>();
35  fibers = {};
36  glitch_mask = {};
37  std::uninitialized_fill( std::begin(fiberData), std::end(fiberData), 0. );
38  std::uninitialized_fill( std::begin(timeData), std::end(timeData), 0. );
39  };
40 
41  //Bitmap for hit fibers in the monitor
42  std::array<short,192> fibers;
43 
44  //If any of these are high, consider the fiber in error
45  std::array<short,192> glitch_mask;
46 
47  //Raw Data from ifbeam
48  double fiberData[6];
49  double timeData[4];
50 
51  double timeStamp;
52 
53  //ID (position in beamline?) of monitor
54  int ID;
55 
56  std::vector<short> active;
57  bool decoded;
58  };
59 
60  //Cerenkov Threshold Detector
61  //
62  struct CKov{
63 
64  CKov() : trigger(0), pressure(0.), timeStamp(0.)
65  { };
66 
67  //Status at time of system trigger (on/off)
68  short trigger;
69  double pressure;
70  double timeStamp;
71  };
72 
73 
74 
76  public:
79 
80  void InitFBMs(std::vector<std::string>);
81  std::pair< double, double > GetT0(size_t);
82  double GetT0Sec(size_t);
83  double GetT0Nano(size_t);
84  size_t GetNT0(){return t0.size();};
85  void AddT0(std::pair< double, double >);
86 
87  FBM GetFBM(std::string name, size_t theTrigger);
88  void AddFBMTrigger(std::string, FBM);
89  void ReplaceFBMTrigger(std::string, FBM, size_t);
90  void DecodeFibers(std::string, size_t);
91  double DecodeFiberTime(std::string, size_t, double);
92  void FixFiberGlitch(std::string);
93 
94  std::array<double,4> ReturnTriggerAndTime(std::string, size_t);
95  short GetFiberStatus(std::string, size_t, size_t);
96  std::vector<short> GetActiveFibers(std::string, size_t);
97  std::vector<short> GetMaskedFibers(std::string, size_t);
98  double GetFiberTime(std::string, size_t);
99  size_t GetNFBMTriggers(std::string);
100  std::bitset<32> toBinary(double);
101 
102 // void SetCKov0(CKov theCKov){ CKov0 = theCKov; };
103 // void SetCKov1(CKov theCKov){ CKov1 = theCKov; };
104  void AddCKov0(CKov theCKov){ CKov0.push_back(theCKov); };
105  void AddCKov1(CKov theCKov){ CKov1.push_back(theCKov); };
106  CKov GetCKov0(size_t i){ return CKov0[i]; };
107  CKov GetCKov1(size_t i){ return CKov1[i]; };
108  size_t GetNCKov0(){ return CKov0.size(); };
109  size_t GetNCKov1(){ return CKov1.size(); };
110 
111 
112  short GetCKov0Status(size_t i){ return CKov0[i].trigger; };
113  short GetCKov1Status(size_t i){ return CKov1[i].trigger; };
114  double GetCKov0Pressure(size_t i){ return CKov0[i].pressure; };
115  double GetCKov1Pressure(size_t i){ return CKov1[i].pressure; };
116  double GetCKov0Time(size_t i){ return CKov0[i].timeStamp; };
117  double GetCKov1Time(size_t i){ return CKov1[i].timeStamp; };
118 
119 
120  void AddTOF0Trigger( std::pair<double,double> theT){ TOF0.push_back(theT); };
121  void AddTOF1Trigger( std::pair<double,double> theT){ TOF1.push_back(theT); };
122  void AddTOFChan(int theChan){ TOFChan.push_back(theChan); };
123  std::pair< double, double > GetTOF0(size_t);
124  double GetTOF0Sec(size_t);
125  double GetTOF0Nano(size_t);
126  std::pair< double, double > GetTOF1(size_t);
127  double GetTOF1Sec(size_t);
128  double GetTOF1Nano(size_t);
129  double GetTOF( size_t );
130  int GetTOFChan(size_t);
131  int GetNTOF0Triggers(){ return TOF0.size(); };
132  int GetNTOF1Triggers(){ return TOF1.size(); };
133 
134  std::vector< double > GetMultipleTOFs( size_t i ){ return TOFs[i]; };
135  std::vector< int > GetMultipleTOFChans( size_t i ){ return TOFChans[i]; };
136  std::vector< size_t > GetUpstreamTriggers( size_t i ){ return UpstreamTriggers[i]; };
137  std::vector< size_t > GetDownstreamTriggers( size_t i ){ return DownstreamTriggers[i]; };
138 
139  void AddMultipleTOFs( std::vector< double > theTOFs){ TOFs.push_back( theTOFs ); };
140  void AddMultipleTOFChans( std::vector< int > theChans){ TOFChans.push_back( theChans ); };
141  void AddUpstreamTriggers( std::vector< size_t > theTriggers ){ UpstreamTriggers.push_back( theTriggers ); };
142  void AddDownstreamTriggers( std::vector< size_t > theTriggers ){ DownstreamTriggers.push_back( theTriggers ); };
143 
144  void AddBeamTrack(recob::Track theTrack){ Tracks.push_back(theTrack);};
145  recob::Track GetBeamTrack(size_t i){ return Tracks[i];};
146  size_t GetNBeamTracks(){return Tracks.size();}
147  const std::vector< recob::Track > & GetBeamTracks() const;
148  void ClearBeamTracks(){ Tracks.clear(); };
149 
150  void SetActiveTrigger(size_t theTrigger){ activeTrigger = theTrigger; isMatched = true; };
151  bool CheckIsMatched(){ return isMatched; };
152  void SetUnmatched(){ isMatched = false; };
153  size_t GetActiveTrigger(){ return activeTrigger; };
154 
155  void AddRecoBeamMomentum( double theMomentum ){ RecoBeamMomenta.push_back( theMomentum ); };
156  size_t GetNRecoBeamMomenta() { return RecoBeamMomenta.size(); };
157  double GetRecoBeamMomentum( size_t i ){ return RecoBeamMomenta[i]; };
158  void ClearRecoBeamMomenta() { RecoBeamMomenta.clear(); };
159 
160  void SetBITrigger(int theTrigger){ BITrigger = theTrigger; };
161  int GetBITrigger(){ return BITrigger; };
162 
163  void SetSpillStart(double theSpillStart){ SpillStart = theSpillStart; };
164  double GetSpillStart(){ return SpillStart; };
165 
166  void SetSpillOffset(double theSpillOffset){ SpillOffset = theSpillOffset; };
167  double GetSpillOffset(){ return SpillOffset; };
168 
169  void SetCTBTimestamp(double theCTBTimestamp){ CTBTimestamp = theCTBTimestamp; };
170  double GetCTBTimestamp(){ return CTBTimestamp; };
171 
172  void SetMagnetCurrent(double theMagnetCurrent){ MagnetCurrent = theMagnetCurrent; };
173  double GetMagnetCurrent(){ return MagnetCurrent; };
174 
175 
176  private:
177 
178  //Time of a coincidence between 2 TOFs
179  //Signalling a good particle
180  //
181  std::vector<std::pair<double,double>> t0;
182 
183  //Timestamp from the CTB signaling a
184  //Good particle signal was received
185  //
186  double CTBTimestamp;
187 
188  //Set of FBMs
189  //Indices: [Monitor in beam]['event' in monitor]
190 // std::vector< std::vector < FBM > > fiberMonitors;
191  std::map<std::string, std::vector< FBM > > fiberMonitors;
192  size_t nFBMs;
193 
194  //Set of TOF detectors
195  //
196  std::vector< std::pair< double, double > > TOF0;
197  std::vector< std::pair< double, double > > TOF1;
198  std::vector< int > TOFChan;
199 
200  //Possible combinations of TOFs
201  std::vector< std::vector< double > > TOFs;
202  std::vector< std::vector< int > > TOFChans;
203  std::vector< std::vector< size_t > > UpstreamTriggers;
204  std::vector< std::vector< size_t > > DownstreamTriggers;
205 
206  //Set of Cerenkov detectors
207  //
208  std::vector< CKov > CKov0;
209  std::vector< CKov > CKov1;
210 
211  std::vector<recob::Track> Tracks;
212 
214  bool isMatched = false;
215 
216  std::vector< double > RecoBeamMomenta;
217 
219  double SpillStart;
220  double SpillOffset;
221 
223  };
224 
225  inline const std::vector< recob::Track > & ProtoDUNEBeamSpill::GetBeamTracks() const { return Tracks; }
226 
227  inline std::pair< double, double > ProtoDUNEBeamSpill::GetT0(size_t trigger){
228  if( trigger > t0.size() - 1 ){
229  std::cout << "Error. Trigger out of bunds" << std::endl;
230  return std::make_pair(-1.,-1.);
231  }
232 
233  return t0[trigger];
234  }
235 
236  inline double ProtoDUNEBeamSpill::GetT0Sec(size_t trigger){
237  if( trigger > t0.size() - 1 ){
238  std::cout << "Error. Trigger out of bunds" << std::endl;
239  return -1.;
240  }
241 
242  return t0[trigger].first;
243  }
244 
245  inline double ProtoDUNEBeamSpill::GetT0Nano(size_t trigger){
246  if( trigger > t0.size() - 1 ){
247  std::cout << "Error. Trigger out of bunds" << std::endl;
248  return -1.;
249  }
250 
251  return t0[trigger].second;
252  }
253 
254  inline void ProtoDUNEBeamSpill::AddT0(std::pair< double, double > theT0){
255  t0.push_back(theT0);
256  }
257 
258  ////////////Fiber Monitor Access
259  inline FBM ProtoDUNEBeamSpill::GetFBM(std::string FBMName, size_t theTrigger){
260  //FBM dummy={{{0}}};
261  FBM dummy(-1);
262  //dummy.ID = -1;
263  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
264  std::cout << "Error FBM not found" << std::endl;
265 // for(size_t i = 0; i < fiberMonitors.find(FBMName); ++i){
266 
267  for(auto itF = fiberMonitors.begin(); itF != fiberMonitors.end(); ++itF){
268  std::cout << "\t" << itF->first << std::endl;
269  }
270  return dummy;
271  }
272 
273  if(theTrigger > t0.size()){
274  std::cout << "Error, trigger out of range" << std::endl;
275  return dummy;
276  }
277  return fiberMonitors[FBMName].at(theTrigger);
278  }
279 
280  inline void ProtoDUNEBeamSpill::AddFBMTrigger(std::string FBMName, FBM theFBM){
281 // if( (FBMName > (nFBMs - 1) ) ){
282  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
283  std::cout << "Error FBM not found" << std::endl;
284 // for(size_t i = 0; i < fiberMonitors.find(FBMName); ++i){
285 
286  for(auto itF = fiberMonitors.begin(); itF != fiberMonitors.end(); ++itF){
287  std::cout << "\t" << itF->first << std::endl;
288  }
289  return;
290  }
291 
292  //Check if it's the first time in the monitor. Replace dummy
293  if(fiberMonitors[FBMName][0].ID == -1){
294  std::cout << "Replacing dummy FBM" << std::endl;
295  std::vector<FBM>::iterator theIt = fiberMonitors[FBMName].begin();
296  fiberMonitors[FBMName].insert(theIt,theFBM);
297  fiberMonitors[FBMName].pop_back();
298  }
299  else{
300  fiberMonitors[FBMName].push_back(theFBM);
301  }
302  }
303 
304  inline void ProtoDUNEBeamSpill::ReplaceFBMTrigger(std::string FBMName, FBM theFBM, size_t theTrigger){
305  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
306  std::cout << "Error FBM not found" << std::endl;
307 
308  for(auto itF = fiberMonitors.begin(); itF != fiberMonitors.end(); ++itF){
309  std::cout << "\t" << itF->first << std::endl;
310  }
311 
312  return;
313  }
314 
315  if( theTrigger > t0.size() - 1 ){
316  std::cout << "Trigger out of range of good particles." << std::endl;
317  return;
318  }
319 
320 // std::cout << "Replacing FBM Trigger" << std::endl;
321  fiberMonitors[FBMName].at(theTrigger) = theFBM;
322 
323  }
324 
325  inline void ProtoDUNEBeamSpill::DecodeFibers(std::string FBMName, size_t nTrigger){
326  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
327  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
328  return;
329  }
330  if( (nTrigger > fiberMonitors[FBMName].size()) ){
331  std::cout << "Please input trigger in range [0," << fiberMonitors[FBMName].size() - 1 << "]" << std::endl;
332  return;
333  }
334 
335  //This always clears the currently active fibers in the FBM.
336  fiberMonitors[FBMName][nTrigger].active.clear();
337 
338  for(int iSet = 0; iSet < 6; ++iSet){
339 
340  std::bitset<32> theseFibers = toBinary( fiberMonitors[FBMName][nTrigger].fiberData[iSet] );
341 
342  for(int iFiber = 0; iFiber < 32; ++iFiber){
343  fiberMonitors[FBMName][nTrigger].fibers[iSet*32 + iFiber] = theseFibers[iFiber];
344  if(theseFibers[iFiber]) fiberMonitors[FBMName][nTrigger].active.push_back(iSet*32 + iFiber);
345  }
346  }
347 
348  fiberMonitors[FBMName][nTrigger].decoded = true;
349  }
350 
351  inline double ProtoDUNEBeamSpill::DecodeFiberTime(std::string FBMName, size_t nTrigger, double OffsetTAI){
352  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
353  std::cout << "FBM not found in list" << std::endl;
354  return -1.;
355  }
356  if( (nTrigger > fiberMonitors[FBMName].size()) ){
357  std::cout << "Please input trigger in range [0," << fiberMonitors[FBMName].size() - 1 << "]" << std::endl;
358  return -1.;
359  }
360 
361 
362  //timeData[3] -> Event Time in Seconds
363  //timeData[2] -> Number of 8ns ticks after that time
364 // return fiberMonitors[FBMName][nTrigger].timeData[0];
365  return fiberMonitors[FBMName][nTrigger].timeData[3] - OffsetTAI + fiberMonitors[FBMName][nTrigger].timeData[2]*8.e-9;
366  }
367 
368  inline std::array<double,4> ProtoDUNEBeamSpill::ReturnTriggerAndTime(std::string FBMName, size_t nTrigger){
369  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
370  std::cout << "FBM not found in list" << std::endl;
371  return {{-1.,-1.,-1.,-1.}};
372  }
373  if( (nTrigger > fiberMonitors[FBMName].size()) ){
374  std::cout << "Please input trigger in range [0," << fiberMonitors[FBMName].size() - 1 << "]" << std::endl;
375  return {{-1.,-1.,-1.,-1.}};
376  }
377 
378  return {{fiberMonitors[FBMName][nTrigger].timeData[0], fiberMonitors[FBMName][nTrigger].timeData[1], fiberMonitors[FBMName][nTrigger].timeData[2], fiberMonitors[FBMName][nTrigger].timeData[3]}};
379  }
380 
381  inline std::bitset<32> ProtoDUNEBeamSpill::toBinary(double num){
382  std::bitset<64> mybits( (long(num)) );
383  std::bitset<32> upper, lower;
384  for(int i = 0; i < 32; ++i){
385  lower[i] = mybits[i];
386  upper[i] = mybits[i + 32];
387  }
388  if(upper.any()) std::cout << "WARNING: NONZERO HALF" << std::endl;
389 
390  return lower;
391  }
392 
393 
394 // inline std::bitset<32> ProtoDUNEBeamSpill::toBinary(double num){
395 // return std::bitset<32>( (uint32_t(num)) );
396 // }
397 
398 
399  inline short ProtoDUNEBeamSpill::GetFiberStatus(std::string FBMName, size_t nTrigger, size_t iFiber){
400  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
401  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
402  return -1;
403  }
404  if( (iFiber > 191)){
405  std::cout << "Please input fiber in range [0,191]" << std::endl;
406  return -1;
407  }
408  if( (nTrigger > fiberMonitors[FBMName].size()) ){
409  std::cout << "Please input trigger in range [0," << fiberMonitors[FBMName].size() - 1 << "]" << std::endl;
410  return -1;
411  }
412  return fiberMonitors[FBMName][nTrigger].fibers[iFiber];
413  }
414 
415  inline std::vector<short> ProtoDUNEBeamSpill::GetActiveFibers(std::string FBMName, size_t nTrigger){
416  std::vector<short> active;
417 
418  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
419  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
420  return active;
421  }
422  if( (nTrigger > fiberMonitors[FBMName].size()) ){
423  std::cout << "Please input trigger in range [0," << fiberMonitors[FBMName].size() - 1 << "]" << std::endl;
424  return active;
425  }
426 
427  for(size_t iF = 0; iF < 192; ++iF){
428  if(fiberMonitors[FBMName][nTrigger].fibers[iF]) active.push_back(iF);
429  }
430 
431  return active;
432  }
433 
434  inline double ProtoDUNEBeamSpill::GetFiberTime(std::string FBMName, size_t nTrigger){
435  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
436  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
437  return -1;
438  }
439  if( (nTrigger > fiberMonitors[FBMName].size()) ){
440  std::cout << "Please input trigger in range [0," << fiberMonitors[FBMName].size() - 1 << "]" << std::endl;
441  return -1;
442  }
443  return fiberMonitors[FBMName][nTrigger].timeStamp;
444  }
445 
447  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
448  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
449  return -1;
450  }
451  return fiberMonitors[FBMName].size();
452  }
453  /////////////////////////////////
454 
455  ////////////TOF Access
456  inline std::pair< double, double > ProtoDUNEBeamSpill::GetTOF0(size_t nTrigger){
457  if( (nTrigger >= TOF0.size()) ){
458  std::cout << "Please input index in range [0," << TOF0.size() - 1 << "]" << std::endl;
459  return std::make_pair(-1.,-1.);
460  }
461 
462  return TOF0[nTrigger];
463  }
464 
465  inline double ProtoDUNEBeamSpill::GetTOF0Sec(size_t nTrigger){
466  if( (nTrigger >= TOF0.size()) ){
467  std::cout << "Please input index in range [0," << TOF0.size() - 1 << "]" << std::endl;
468  return -1.;
469  }
470 
471  return TOF0[nTrigger].first;
472  }
473 
474  inline double ProtoDUNEBeamSpill::GetTOF0Nano(size_t nTrigger){
475  if( (nTrigger >= TOF0.size()) ){
476  std::cout << "Please input index in range [0," << TOF0.size() - 1 << "]" << std::endl;
477  return -1.;
478  }
479 
480  return TOF0[nTrigger].second;
481  }
482 
483  inline std::pair< double, double > ProtoDUNEBeamSpill::GetTOF1(size_t nTrigger){
484  if( (nTrigger >= TOF1.size()) ){
485  std::cout << "Please input index in range [0," << TOF1.size() - 1 << "]" << std::endl;
486  return std::make_pair(-1.,-1.);
487  }
488 
489  return TOF1[nTrigger];
490  }
491 
492  inline double ProtoDUNEBeamSpill::GetTOF1Sec(size_t nTrigger){
493  if( (nTrigger >= TOF1.size()) ){
494  std::cout << "Please input index in range [0," << TOF1.size() - 1 << "]" << std::endl;
495  return -1.;
496  }
497 
498  return TOF1[nTrigger].first;
499  }
500 
501  inline double ProtoDUNEBeamSpill::GetTOF1Nano(size_t nTrigger){
502  if( (nTrigger >= TOF1.size()) ){
503  std::cout << "Please input index in range [0," << TOF1.size() - 1 << "]" << std::endl;
504  return -1.;
505  }
506 
507  return TOF1[nTrigger].second;
508  }
509 
510  inline int ProtoDUNEBeamSpill::GetTOFChan(size_t nTrigger){
511  if( (nTrigger >= TOF1.size()) ){
512  std::cout << "Please input index in range [0," << TOF1.size() - 1 << "]" << std::endl;
513  return -1;
514  }
515 
516  return TOFChan[nTrigger];
517  }
518 
519  inline double ProtoDUNEBeamSpill::GetTOF(size_t nTrigger){
520  if( (nTrigger >= TOF1.size()) ){
521  std::cout << "Please input index in range [0," << TOF1.size() - 1 << "]" << std::endl;
522  return -1;
523  }
524 
525  return (TOF1[nTrigger].first - TOF0[nTrigger].first + 1.e-9*(TOF1[nTrigger].second - TOF0[nTrigger].second));
526  }
527 
528 
530 
531  if( fiberMonitors.find(FBMName) == fiberMonitors.end() ){
532  std::cout << "Please input monitor with correct name" << std::endl;
533  return;
534  }
535 
536 
537  //We won't be able to tell if any are bad
538  if( fiberMonitors[FBMName].size() < 2 ){ return; }
539 
540  for( size_t i = 1; i < fiberMonitors[FBMName].size(); ++i ){
541  std::vector<short> previous_active = fiberMonitors[FBMName][i-1].active;
542  std::vector<short> current_active = fiberMonitors[FBMName][i].active;
543 
544  for( size_t j = 0; j < current_active.size(); ++j ){
545 
546  //The issue only occurs in the last 2 32-bit words
547  if( current_active[j] < 128 ){ continue; }
548 
549  //This means this active fiber in the last 2 words is also in the previous event
550  if( std::find( previous_active.begin(), previous_active.end(), current_active[j] ) != previous_active.end() ){
551  //Set the glitch mask to true
552  fiberMonitors[FBMName][i].glitch_mask[ current_active[j] ] = 1;
553  }
554  }
555  }
556 
557  }
558 
559  /////////////////////////////////
560 
561 }
562 
563 
564 #endif
static QCString name
Definition: declinfo.cpp:673
std::vector< std::vector< double > > TOFs
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
std::pair< double, double > GetTOF1(size_t)
code to link reconstructed objects back to the MC truth information
intermediate_table::iterator iterator
void AddFBMTrigger(std::string, FBM)
double GetCKov0Pressure(size_t i)
std::pair< double, double > GetTOF0(size_t)
std::vector< int > TOFChan
void AddTOF1Trigger(std::pair< double, double > theT)
std::string string
Definition: nybbler.cc:12
std::pair< double, double > GetT0(size_t)
std::vector< short > GetActiveFibers(std::string, size_t)
void AddRecoBeamMomentum(double theMomentum)
double DecodeFiberTime(std::string, size_t, double)
std::vector< double > GetMultipleTOFs(size_t i)
void AddTOFChan(int theChan)
std::map< std::string, std::vector< FBM > > fiberMonitors
void ReplaceFBMTrigger(std::string, FBM, size_t)
std::vector< std::vector< size_t > > UpstreamTriggers
FBM GetFBM(std::string name, size_t theTrigger)
double GetFiberTime(std::string, size_t)
std::vector< double > RecoBeamMomenta
std::vector< short > active
void AddBeamTrack(recob::Track theTrack)
void AddCKov1(CKov theCKov)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::array< double, 4 > ReturnTriggerAndTime(std::string, size_t)
std::vector< CKov > CKov1
std::vector< size_t > GetUpstreamTriggers(size_t i)
void DecodeFibers(std::string, size_t)
std::vector< size_t > GetDownstreamTriggers(size_t i)
const double e
void SetSpillOffset(double theSpillOffset)
double GetCKov1Pressure(size_t i)
void AddT0(std::pair< double, double >)
std::vector< std::vector< int > > TOFChans
void AddUpstreamTriggers(std::vector< size_t > theTriggers)
std::vector< CKov > CKov1
void SetActiveTrigger(size_t theTrigger)
recob::Track GetBeamTrack(size_t i)
std::vector< int > GetMultipleTOFChans(size_t i)
void SetCTBTimestamp(double theCTBTimestamp)
std::vector< std::pair< double, double > > TOF0
const std::vector< recob::Track > & GetBeamTracks() const
void SetBITrigger(int theTrigger)
void AddMultipleTOFs(std::vector< double > theTOFs)
std::vector< std::vector< size_t > > DownstreamTriggers
void FixFiberGlitch(std::string)
size_t GetNFBMTriggers(std::string)
std::vector< std::pair< double, double > > TOF1
std::array< short, 192 > fibers
std::vector< CKov > CKov0
void AddMultipleTOFChans(std::vector< int > theChans)
void AddTOF0Trigger(std::pair< double, double > theT)
void SetSpillStart(double theSpillStart)
void SetMagnetCurrent(double theMagnetCurrent)
Provides recob::Track data product.
std::array< short, 192 > glitch_mask
cet::LibraryManager dummy("noplugin")
std::vector< recob::Track > Tracks
void AddCKov0(CKov theCKov)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
double fiberData[6]
short GetFiberStatus(std::string, size_t, size_t)
double GetRecoBeamMomentum(size_t i)
second_as<> second
Type of time stored in seconds, in double precision.
Definition: spacetime.h:85
std::vector< long long int > TOF1
double timeData[4]
std::bitset< 32 > toBinary(double)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:49
std::vector< std::pair< double, double > > t0
void AddDownstreamTriggers(std::vector< size_t > theTriggers)
QTextStream & endl(QTextStream &s)