Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaG0Helicity.cxx
Go to the documentation of this file.
1//*-- Author : Robert Michaels Sept 2002
2// Changed into a separate class, Ole Hansen, Aug 2006
4//
5// THaG0Helicity
6//
7// Helicity of the beam from G0 electronics in delayed mode
8// +1 = plus, -1 = minus, 0 = unknown
9//
10// Also supports in-time mode with delay = 0
11//
13
14#include "THaG0Helicity.h"
15#include "THaEvData.h"
16#include "TH1F.h"
17#include "TMath.h"
18#include <iostream>
19#include <cmath>
20
21using namespace std;
22
23// Default parameters
24static const Double_t kDefaultTdavg = 14050.;
25static const Double_t kDefaultTtol = 40.;
26static const Int_t kDefaultDelay = 8;
27static const Int_t kDefaultMissQ = 30;
28
29//_____________________________________________________________________________
30THaG0Helicity::THaG0Helicity( const char* name, const char* description,
31 THaApparatus* app ) :
32 THaHelicityDet( name, description, app ),
33 fG0delay(kDefaultDelay), fEvtype(0), fTdavg(kDefaultTdavg), fTdiff(0.),
34 fT0(0.), fT9(0.), fT0T9(false), fQuad_calibrated(false),
35 fValidHel(false), fRecovery_flag(true),
36 fTlastquad(0), fTtol(kDefaultTtol), fQuad(0),
37 fFirstquad(0), fLastTimestamp(0.0), fTimeLastQ1(0.0),
38 fT9count(0), fPredicted_reading(0), fQ1_reading(0),
39 fPresent_helicity(kUnknown), fSaved_helicity(kUnknown),
40 fQ1_present_helicity(kUnknown), fMaxMissed(kDefaultMissQ),
41 fHbits{}, // zero-initialize array
42 fNqrt(0), fHisto(nullptr), fNB(0), fIseed(0), fIseed_earlier(0),
43 fInquad(0), fTET9Index(0), fTELastEvtQrt(-1), fTELastEvtTime(-1.),
44 fTELastTime(-1.), fTEPresentReadingQ1(-1), fTEStartup(3), fTETime(-1.),
45 fTEType9(false), fManuallySet(0), fDelayedQrt(true)
46{
47}
48
49//_____________________________________________________________________________
52 fG0delay(kDefaultDelay), fEvtype(0), fTdavg(kDefaultTdavg), fTdiff(0.),
53 fT0(0.), fT9(0.), fT0T9(false), fQuad_calibrated(false),
54 fValidHel(false), fRecovery_flag(true),
55 fTlastquad(0), fTtol(kDefaultTtol), fQuad(0),
56 fFirstquad(0), fLastTimestamp(0.0), fTimeLastQ1(0.0),
57 fT9count(0), fPredicted_reading(0), fQ1_reading(0),
58 fPresent_helicity(kUnknown), fSaved_helicity(kUnknown),
59 fQ1_present_helicity(kUnknown), fMaxMissed(kDefaultMissQ),
60 fHbits{}, // zero-initialize array
61 fNqrt(0), fHisto(nullptr), fNB(0), fIseed(0), fIseed_earlier(0),
62 fInquad(0), fTET9Index(0), fTELastEvtQrt(-1), fTELastEvtTime(-1.),
63 fTELastTime(-1.), fTEPresentReadingQ1(-1), fTEStartup(3), fTETime(-1.),
64 fTEType9(false), fManuallySet(0), fDelayedQrt(true)
65{
66 // Default constructor for ROOT I/O
67}
68
69//_____________________________________________________________________________
76
77//_____________________________________________________________________________
79{
80 // Initialize global variables
81
82 // Define standard variables from base class
84 if( ret )
85 return ret;
86
87 const RVarDef var[] = {
88 { "qrt", "qrt from ROC", "fQrt" },
89 { "nqrt", "number of qrts seen", "fNqrt" },
90 { "quad", "quad (1, 2, or 4)", "fQuad" },
91 { "tdiff", "time since quad start", "fTdiff" },
92 { "gate", "Helicity Gate from ROC", "fGate" },
93 { "pread", "Present helicity reading", "fPresentReading" },
94 { "timestamp", "Timestamp from ROC", "fTimestamp" },
95 { "validtime", "validtime flag", "fValidTime" },
96 { "validHel", "validHel flag", "fValidHel" },
97 { nullptr }
98 };
99 return DefineVarsFromList( var, mode );
100}
101
102
103//_____________________________________________________________________________
105{
106 // Read parameters from database: ROC info (detector map), G0 delay, etc.
107
108 // Read general HelicityDet database values (e.g. fSign)
110 if( st != kOK )
111 return st;
112
113 // Read G0 readout parameters (ROC addresses etc.)
115 date, fG0Debug );
116 if( st != kOK )
117 return st;
118
119 // Read parameters for the delayed-mode algorithm
120 FILE* file = OpenFile( date );
121 if( !file ) return kFileError;
122
123 Int_t delay = kDefaultDelay;
124 Double_t tdavg = kDefaultTdavg;
125 Double_t ttol = kDefaultTtol;
126 Int_t missqrt = kDefaultMissQ;
127
128 DBRequest req[] = {
129 { "delay", &delay, kInt, 0, true, -2 },
130 { "tdavg", &tdavg, kDouble, 0, true, -2 },
131 { "ttol", &ttol, kDouble, 0, true, -2 },
132 { "missqrt", &missqrt, kInt, 0, true, -2 },
133 { nullptr }
134 };
135 st = LoadDB( file, date, req );
136 fclose(file);
137 if( st )
138 return kInitError;
139
140 // Manually set parameters take precedence over the database values.
141 // This is meant for quick-and-dirty debugging.
142 if( !TESTBIT(fManuallySet,0) )
143 fG0delay = delay;
144 if( !TESTBIT(fManuallySet,1) )
145 fTdavg = tdavg;
146 if( !TESTBIT(fManuallySet,2) )
147 fTtol = ttol;
148 if( !TESTBIT(fManuallySet,3) )
149 fMaxMissed = missqrt;
150
151 return kOK;
152}
153
154//_____________________________________________________________________________
156{
157 // Book a histogram, if requested
158 if (fDebug == -1) {
159 if( !fHisto )
160 fHisto = new TH1F("hahel1","Time diff for QRT",1000,11000,22000);
161 else
162 //TODO: only clear if run number changes?
163 fHisto->Clear();
164 }
165 return 0;
166}
167
168//_____________________________________________________________________________
170{
171 // Clear event-by-event data
172
176 fEvtype = fQuad = 0;
177 fValidHel = false;
179}
180
181//_____________________________________________________________________________
183{
184 // Decode Helicity data.
185 // Return 1 if helicity was assigned, 0 if not, <0 if error.
186
187 Int_t err = ReadData( evdata );
188 if( err ) {
189 Error( Here("Decode"), "Error decoding helicity data." );
190 return err;
191 }
192
193 fEvtype = evdata.GetEvType();
194 if (fDebug >= 3) {
195 cout << dec << "--> Data for spectrometer " << GetName() << endl;
196 cout << " evtype " << fEvtype;
197 cout << " helicity reading " << fPresentReading;
198 cout << " qrt " << fQrt;
199 cout << " gate " << fGate;
200 cout << " time stamp " << fTimestamp << endl;
201 }
202
203 if( fG0delay > 0 ) {
204 TimingEvent();
205 QuadCalib();
206 LoadHelicity();
207 }
208 else if( fGate ) {
210 }
211
212 if( fSign >= 0 )
214 else
216
217 if (fDebug >= 3)
218 cout << "G0 helicity "<< GetName() << " = " << fHelicity <<endl;
219
220 return HelicityValid() ? 1 : 0;
221}
222
223//_____________________________________________________________________________
225{
226 // End of run processing. Write histograms.
227
228 if( fHisto )
229 fHisto->Write();
230
231 return 0;
232}
233
234//_____________________________________________________________________________
236{
237 // Set debug level of this detector as well as the THaG0HelicityReader
238 // helper class.
239
241 fG0Debug = level;
242}
243
244//_____________________________________________________________________________
246{
247 // Set delay of helicity data (# windows).
248 // This value will override the value from the database.
249
250 fG0delay = value;
251 fManuallySet |= BIT(0);
252}
253
254//_____________________________________________________________________________
256{
257 // Set average time delay (# channels)
258 // This value will override the value from the database.
259
260 fTdavg = value;
261 fManuallySet |= BIT(1);
262}
263
264//_____________________________________________________________________________
266{
267 // Set the tolerance in timing when looking for missing quads
268 // (# channels)
269 // This value will override the value from the database.
270
271 fTtol = value;
272 fManuallySet |= BIT(2);
273}
274
275//_____________________________________________________________________________
277{
278 // Set the maximum number of missing quads permitted before
279 // forcing the helicity calibration to be re-performed.
280 // (# quads)
281 // This value will override the value from the database.
282
284 fManuallySet |= BIT(3);
285}
286
287//_____________________________________________________________________________
289{
290 // Check for and process timing events
291 // A timing event is a T9, *or* if enough time elapses without a
292 // T9, it's any event with QRT==1 following an event with QRT==0.
293 //
294 // NOTE: This presently has NO EFFECT on the helicity processing,
295 // just provides warning messages if something suspicious
296 // happens.
297
298 static const char* const here = "TimingEvent";
299
300 if (fEvtype == 9) {
301 fTEType9 = true;
303 }
304 else if (fQrt && !fTELastEvtQrt
305 && fTimestamp - fTELastTime > 8 * fTdavg) {
306 // After a while we give up on finding T9s and instead take
307 // either the average timestamp of the first QRT==1 we find
308 // and the previous event (if that's not to far in the past)
309 // or just the timestamp of the QRT==1 event (if it is).
310 // This is lousy accuracy but better than nothing.
311 fTEType9 = false;
312 if (fTELastEvtTime>0.
313 && (fTimestamp - fTELastEvtTime) < 0.1 * fTdavg) {
315 } else {
316 // Either we have not seen a previous event or it was too far away,
317 // work with the present reading
319 }
320 }
321 else {
324 return;
325 }
326
327 // Now check for anomalies.
328
329 if (fTELastTime > 0)
330 {
331 // Look for missed timing events
332 Double_t t9diff = 0.25 * fTdavg;
333 Double_t tdiff = fTETime - fTELastTime;
334 auto nt9miss = static_cast<Int_t>(tdiff / t9diff - 0.5);
335 fTET9Index += nt9miss;
336 if (fTET9Index > 3) {
339 }
340 if (fTEType9 &&
341 TMath::Abs(tdiff - (nt9miss+1) * t9diff) > 10*(nt9miss + 1) )
342 Warning( Here(here), "Weird time difference between timing events: "
343 "%f at %f.", tdiff, fTETime);
344 }
345 ++fTET9Index;
346 if (fQrt) {
347 if (fTET9Index != 4 && !fTEStartup)
348 Warning("THaG0Helicity", "QRT wrong spacing: %d at %f.",
350 fTET9Index = 0;
352 fTEStartup = 0;
353 }
354 else {
355 if (fTEStartup)
356 --fTEStartup;
357 if (fTEPresentReadingQ1 > -1)
359 (fTET9Index == 1 || fTET9Index == 2))
361 fTET9Index == 3))
362 Warning( Here(here), "Wrong helicity pattern: "
363 "%d in window 1, %d in window %d at timestamp %f.",
365 }
366 // Now push back information
370}
371
372//_____________________________________________________________________________
374{
375 // Calibrate the helicity predictor shift register.
376
377 const char* const here = "QuadCalib";
378
379 if (fEvtype == 9) {
380 fT9count += 1;
381 if ( fDelayedQrt && fQrt ) {
382 // don't record this time
383 } else {
384 fT9 = fTimestamp; // this sets the timing reference.
385 }
386 }
387
388 if (fEvtype != 9 && !fGate) return;
389
391 if (fDebug >= 3) {
392 cout << here << " " << fTimestamp<<" "<<fT0;
393 cout << " "<<fTdiff
394 << " " << fEvtype
395 <<" "<<fQrt<<endl;
396 }
397 if (fFirstquad == 0 &&
398 fTdiff > (1.25*fTdavg + fTtol)) {
399 // Try a recovery. Use time to flip helicity by the number of
400 // missed quads, unless this are more than 30 (~1 sec).
401 auto nqmiss = static_cast<Int_t>(fTdiff/fTdavg);
402 if (fDebug >= 1)
403 Info( Here(here), "Recovering large DT, nqmiss = %d "
404 "at timestamp %f, tdiff %f", nqmiss, fTimestamp, fTdiff );
405 if (fQuad_calibrated && nqmiss < fMaxMissed) {
406 for (Int_t i = 0; i < nqmiss; i++) {
407 if (fQrt && fT9 > 0 && fTimestamp - fT9 < 8*fTdavg) {
409 *(.25*fTdavg) + fT9;
410 fT0T9 = true;
411 }
412 else {
413 fT0 += fTdavg;
414 fT0T9 = false;
415 }
416 QuadHelicity(1);
417 fNqrt++;
418
419 fQ1_reading = (fPredicted_reading == -1) ? 0 : 1;
420
422 if (fDebug>=1) {
423 Info(Here(here)," %5d M M %1d %2d %10.0f %10.0f %10.0f Missing",
425 }
426 }
428 } else {
429 Warning( Here(here), "Cannot recover: Too many skipped QRT (Low rate ?) "
430 "or uninitialized" );
431 fNqrt += nqmiss; // advance counter for later check
432 fT0 += nqmiss*fTdavg;
433 fRecovery_flag = true; // clear & recalibrate the predictor
434 fQuad_calibrated = false;
435 fFirstquad = 1;
436 }
437 }
438 if (fQrt && fFirstquad == 1) {
439 fT0 = fTimestamp;
440 fT0T9 = false;
441 fFirstquad = 0;
442 }
443
444 // Check for QRT at anomalous separations
445
446 if (fEvtype == 9 && fQrt) {
447 if (fTimeLastQ1 > 0) {
449 if (q1tdiff > .1*fTdavg)
450 Warning( Here(here), "QRT==1 timing error -- Last time = %f "
451 "This time = %f\nHELICITY SIGNALS MAY BE CORRUPT",
453 }
455 }
456
457 if (fQrt)
458 fT9count = 0;
459
460 // The most solid predictor of a new helicity window:
461 // (RJF) Simply look for sufficient time to have passed with a fQrt signal.
462 // Do not worry about evt9's for now, since that transition is redundant
463 // when a new Qrt is found. And frequently the evt9 came immediately
464 // BEFORE the Qrt.
465 // NOTE: missing QRT's are already handled by the 'nmissq' section above
466 if ( ( fTdiff > 0.5*fTdavg ) && fQrt ) {
467 if (fDebug >= 3)
468 Info(Here(here),"found qrt ");
469
470 // If we have T9 within recent time: Update fT0 to match the
471 // nearest/closest last evt9 (extrapolated from the last
472 // observed type 9 event) at the beginning of the Qrt.
473 // Otherwise: if there was a previous event very recently, take
474 // average of its and this timestamp. And if not, just take
475 // this timestamp. This will usually be sufficiently accurate
476 // for our purposes, though having T9 would be nicer.
477 if (fT9 > 0 && fTimestamp - fT9 < 8*fTdavg) {
479 *(.25*fTdavg) + fT9;
480 fT0T9 = true;
481 }
482 else {
483 fT0 = (fLastTimestamp == 0
486 fT0T9 = false;
487 }
489 QuadHelicity();
490 fNqrt++;
492 if (fQuad_calibrated && fDebug >= 3)
493 cout << "------------ quad calibrated --------------------------"<<endl;
494 if (fQuad_calibrated && !CompHel() ) {
495 // This is ok if it doesn't happen too often. You lose these events.
496 Warning( Here(here), "QuadCalib G0 prediction failed at timestamp %f.\n"
497 "HELICITY ASSIGNMENT IN PREVIOUS %d WINDOWS MAY BE INCORRECT",
499 if (fDebug >= 3) {
500 cout << "Qrt " << fQrt << " Tdiff "<<fTdiff;
501 cout<<" gate "<<fGate<<" evtype "<<fEvtype<<endl;
502 }
503 fRecovery_flag = true; // clear & recalibrate the predictor
504 fQuad_calibrated = false;
505 fFirstquad = 1;
507 }
508 if (fDebug>=3) {
509 Info(Here(here), "%5d %1u %1d %1d %2d %10.0f %10.0f %10.0f",fNqrt,
511 }
512 if (fDebug==-1) { // Only used during an initial calibration.
513 cout << fTdiff<<endl;
514 if (fHisto) {
516 }
517 }
518 }
520}
521
522
523//_____________________________________________________________________________
525{
526 // Load the helicity in G0 mode.
527 // If fGate == 0, helicity remains 'Unknown'.
528
529 static const char* const here = "LoadHelicity";
530
531 if ( fQuad_calibrated )
532 fValidHel = true;
533 if ( !fQuad_calibrated || !fGate ) {
535 return;
536 }
537 if (fDebug >= 2)
538 cout << "Loading helicity ##########" << endl;
539 // Look for pattern (+ - - +) or (- + + -) to decide where in quad
540 // Ignore timing for assignment, but later we'll check it.
541 fInquad = 0;
542 if (fQrt) {
543 fInquad = 1;
545 Warning( Here(here), "Invalid bit pattern !! "
546 "fPresentReading != fQ1_reading while QRT == 1 at timestamp "
547 "%f.\nHELICITY ASSIGNMENT MAY BE INCORRECT", fTimestamp);
548 }
549 }
550 if (!fQrt && fPresentReading != fQ1_reading) {
551 fInquad = 2; // same is inquad = 3
552 }
553 if (!fQrt && fPresentReading == fQ1_reading) {
554 fInquad = 4;
555 }
556 if (fInquad == 0) {
558 Error( Here(here), "Quad assignment impossible !! "
559 " qrt = %d present read = %d Q1 read = %d at timestamp %f.\n"
560 "HELICITY SET TO UNKNOWN",
562 }
563 else if (fInquad == 1 || fInquad >= 4) {
565 } else {
570 }
571
572 // Here we check timing, with stringency depending on whether fTdiff
573 // was set using T9 or not
574 if (
575 (!fT0T9 &&
576 ((fInquad == 1 && fTdiff > 0.5 * fTdavg) ||
577 (fInquad == 4 && fTdiff < 0.5 * fTdavg)))
578 ||
579 (fT0T9 &&
580 ((fInquad == 1 && fTdiff > 0.3 * fTdavg) ||
581 (fInquad == 2 && (fTdiff < 0.2 * fTdavg ||
582 fTdiff > 0.8 * fTdavg)) ||
583 (fInquad == 4 && fTdiff < 0.7 * fTdavg))))
584 {
585 Warning( Here(here), "Quad assignment inconsistent with timing !! "
586 "quad = %d tdiff = %f at timestamp %f. "
587 "HELICITY ASSIGNMENT MAY BE INCORRECT",
589 }
590
591
592 if (fDebug >= 2) {
593 cout << dec << "Quad "<<fInquad;
594 cout << " Time diff "<<fTdiff;
595 cout << " Qrt "<<fQrt;
596 cout << " Helicity "<<fPresent_helicity<<endl;
597 }
598 fQuad = fInquad;
599}
600
601//_____________________________________________________________________________
603{
604 // Load the helicity from the present reading for the
605 // start of a quad.
606 // Requires: cond!=0 in order to force the quad to advance
607 // fT0 to be updated and set for THIS quad
608 static const char* const here = "QuadHelicity";
609
610 if (fRecovery_flag) {
611 fNB = 0;
613 }
614 fRecovery_flag = false;
615
617 // Make certain a given qrt is used only once UNLESS
618 // a reset of the Quad calibration has happened
619 if (cond == 0 && fNB>0
620 && fTlastquad > 0
621 && fT0 - fTlastquad < 0.3 * fTdavg) {
622 if (fDebug >= 2) Warning(Here(here),"SKIP this quad, QRT's too close");
623 return;
624 }
625 fTlastquad = fT0;
626
627 if (fNB < kNbits) {
629 fNB++;
630 fQuad_calibrated = false;
631 } else if (fNB == kNbits) { // Have finished loading
634 for( int i = 0; i < kNbits+1; i++) {
636 RanBit(1);
637 }
638
639 if( fPredicted_reading > 0 )
641 else if( fPredicted_reading < 0 )
643 else
645
646 // Delay by fG0delay windows which is fG0delay/4 quads
647 for( int i = 0; i < fG0delay/4; i++)
649 fNB++;
651 fQuad_calibrated = true;
652 } else {
655 if (fDebug >= 3) {
656 cout << "quad helicities " << dec;
657 cout << fPredicted_reading; // -1, +1
658 cout << " ?=? " << fPresentReading; // 0, 1
659 cout << " pred-> " << fPresent_helicity
660 << " time " << fTimestamp
661 << " <<<<<<<<<<<<<================================="
662 <<endl;
663 if (CompHel()) cout << "HELICITY OK "<<endl;
664 }
665 fQuad_calibrated = true;
666
667 }
668}
669
670//_____________________________________________________________________________
672{
673 // This is the random bit generator according to the G0
674 // algorithm described in "G0 Helicity Digital Controls" by
675 // E. Stangland, R. Flood, H. Dong, July 2002.
676 // Argument:
677 // which = 0 or 1
678 // if 0 then fIseed_earlier is modified
679 // if 1 then fIseed is modified
680 // Return value:
681 // helicity (-1 or +1).
682
683 const int MASK = BIT(0)+BIT(2)+BIT(3)+BIT(23);
684
685 if (which == 0) {
686 if( TESTBIT(fIseed_earlier,23) ) {
687 fIseed_earlier = ((fIseed_earlier^MASK)<<1) | BIT(0);
688 return kPlus;
689 } else {
690 fIseed_earlier <<= 1;
691 return kMinus;
692 }
693 } else {
694 if( TESTBIT(fIseed,23) ) {
695 fIseed = ((fIseed^MASK)<<1) | BIT(0);
696 return kPlus;
697 } else {
698 fIseed <<= 1;
699 return kMinus;
700 }
701 }
702}
703
704
705//_____________________________________________________________________________
707{
708 int seedbits[kNbits];
709 UInt_t ranseed = 0;
710 for (int i = 0; i < 20; i++)
711 seedbits[23-i] = fHbits[i];
712 seedbits[3] = fHbits[20]^seedbits[23];
713 seedbits[2] = fHbits[21]^seedbits[22]^seedbits[23];
714 seedbits[1] = fHbits[22]^seedbits[21]^seedbits[22];
715 seedbits[0] = fHbits[23]^seedbits[20]^seedbits[21]^seedbits[23];
716 for (int i=kNbits-1; i >= 0; i--)
717 ranseed = ranseed<<1|(seedbits[i]&1);
718 ranseed &= 0xFFFFFF;
719 return ranseed;
720}
721
722//_____________________________________________________________________________
724{
725 // Compare the present reading to the predicted reading.
726 // The raw data are 0's and 1's which compare to predictions of
727 // -1 and +1. A prediction of 0 occurs when there is no gate.
728 if (fPresentReading == 0 &&
729 fPredicted_reading == kMinus) return true;
730 if (fPresentReading == 1 &&
731 fPredicted_reading == kPlus) return true;
732 return false;
733}
734
#define kOK
Definition BdataLoc.cxx:40
#define kInitError
Definition BdataLoc.cxx:41
int Int_t
unsigned int UInt_t
bool Bool_t
double Double_t
const char Option_t
#define BIT(n)
#define TESTBIT(n, i)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char mode
char name[80]
static const Int_t kDefaultDelay
static const Double_t kDefaultTdavg
static const Double_t kDefaultTtol
static const Int_t kDefaultMissQ
static const char *const here
Definition THaVar.cxx:64
kUnknown
virtual Int_t Fill(const char *name, Double_t w)
virtual void SetDebug(Int_t level)
static Int_t LoadDB(FILE *file, const TDatime &date, const DBRequest *request, const char *prefix, Int_t search=0, const char *here="THaAnalysisObject::LoadDB")
static Int_t DefineVarsFromList(const void *list, EType type, EMode mode, const char *def_prefix, const TObject *obj, const char *prefix, const char *here, const char *comment_subst="")
virtual const char * Here(const char *) const
const char * GetPrefix() const
virtual FILE * OpenFile(const TDatime &date)
UInt_t GetEvType() const
Definition THaEvData.h:53
virtual Int_t ReadData(const THaEvData &evdata)
Int_t ReadDatabase(const char *dbfilename, const char *prefix, const TDatime &date, int debug_flag=0)
virtual void Clear(Option_t *opt="")
Int_t fTEPresentReadingQ1
Double_t fTlastquad
virtual Int_t ReadDatabase(const TDatime &date)
Int_t fPredicted_reading
Double_t fTELastEvtTime
virtual ~THaG0Helicity()
Double_t fTimeLastQ1
void SetMaxMsQrt(Int_t missq)
virtual Int_t DefineVariables(EMode mode=kDefine)
void SetTtol(Double_t ttol)
Double_t fTELastTime
virtual Int_t End(THaRunBase *r=nullptr)
virtual void SetDebug(Int_t level)
Double_t fLastTimestamp
UInt_t fManuallySet
Int_t fHbits[kNbits]
Double_t fTdavg
EHelicity RanBit(Int_t i)
virtual Int_t Decode(const THaEvData &evdata)
virtual void Clear(Option_t *opt="")
Bool_t fRecovery_flag
void SetTdavg(Double_t tdavg)
UInt_t fIseed_earlier
EHelicity fPresent_helicity
EHelicity fQ1_present_helicity
Bool_t fQuad_calibrated
EHelicity fSaved_helicity
void QuadHelicity(Int_t cond=0)
Double_t fTdiff
virtual Bool_t HelicityValid() const
Double_t fTETime
virtual Int_t Begin(THaRunBase *r=nullptr)
void SetG0Delay(Int_t delay)
virtual void Clear(Option_t *opt="")
virtual Int_t ReadDatabase(const TDatime &date)
virtual const char * GetDBFileName() const
EHelicity fHelicity
virtual Int_t DefineVariables(EMode mode=kDefine)
const char * GetName() const override
void Clear(Option_t *option="") override
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
RVec< PromoteTypes< T0, T1 > > fmod(const RVec< T0 > &v, const T1 &y)
Double_t Floor(Double_t x)
Double_t Abs(Double_t d)
STL namespace.
ClassImp(TPyArg)