Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaG0Helicity.h
Go to the documentation of this file.
1#ifndef Podd_THaG0Helicity_h_
2#define Podd_THaG0Helicity_h_
3
5//
6// THaG0Helicity
7//
8// Helicity of the beam - from G0 electronics in delayed mode
9//
11
12#include "THaHelicityDet.h"
13#include "THaG0HelicityReader.h"
14
15class TH1F;
16
18
19public:
20
21 THaG0Helicity( const char* name, const char* description,
22 THaApparatus* a = nullptr );
24 virtual ~THaG0Helicity();
25
26 virtual Int_t Begin( THaRunBase* r=nullptr );
27 virtual void Clear( Option_t* opt = "" );
28 virtual Int_t Decode( const THaEvData& evdata );
29 virtual Int_t End( THaRunBase* r=nullptr );
30 virtual void SetDebug( Int_t level );
31 virtual Bool_t HelicityValid() const { return fValidHel; }
32
33 Int_t GetQuad() const { return fQuad; }
34 Double_t GetTdiff() const { return fTdiff; }
35 // Set functions that can be used instead of database values
36 void SetG0Delay( Int_t delay );
37 void SetTdavg( Double_t tdavg );
38 void SetTtol( Double_t ttol );
39 void SetMaxMsQrt( Int_t missq );
40
41protected:
42
43 void TimingEvent(); // Check for and process timing events
44 void QuadCalib();
45 void LoadHelicity();
46 void QuadHelicity(Int_t cond=0);
50
51 enum { kNbits = 24 };
52
53 Int_t fG0delay; // delay of helicity (# windows)
54
55 UInt_t fEvtype; // Current CODA event type
57 Bool_t fT0T9; // Was fT0 computed using fT9?
63
69 Int_t fMaxMissed; // maximum number of missed quads before resetting
72 TH1F * fHisto; // Histogram of time diffs, filled in calibration mode
76
77 Int_t fTET9Index; // Count of T9s (missing and found) since QRT=1
78 Int_t fTELastEvtQrt; // QRT of last event
79 Double_t fTELastEvtTime; // Timestamp of last event
80 Double_t fTELastTime; // Time of last timing event (before this)
81 Int_t fTEPresentReadingQ1;// present_reading at last QRT==1 timing event
82 Int_t fTEStartup; // Nonzero if starting up
83 Double_t fTETime; // Time of timing event (this or most recent)
84 Bool_t fTEType9; // True if timing event was T9
85
86 UInt_t fManuallySet; // Bit pattern of manually set parameters
87 // fDelayedQrt indicates that the Qrt signal is delayed such that the evt9
88 // at the beginning of a Qrt does NOT contain the qrt flag
90
91 virtual Int_t DefineVariables( EMode mode = kDefine );
92 virtual Int_t ReadDatabase( const TDatime& date );
93
94 ClassDef(THaG0Helicity,2) // Beam helicity from G0 electronics in delayed mode
95
96};
97
98#endif
#define kDefine
Definition BdataLoc.cxx:38
int Int_t
unsigned int UInt_t
ROOT::R::TRInterface & r
bool Bool_t
double Double_t
const char Option_t
#define ClassDef(name, id)
char name[80]
Double_t GetTdiff() const
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
Int_t GetQuad() const
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)
TArc a