Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaQWEAKHelicity.h
Go to the documentation of this file.
1#ifndef Podd_THaQWEAKHelicity_h_
2#define Podd_THaQWEAKHelicity_h_
3
5//
6// THaQWEAKHelicity
7//
8// Helicity of the beam - from QWEAK electronics in delayed mode
9//
11
12#include "THaHelicityDet.h"
14#include <vector>
15
16class TH1F;
17
19
20public:
21
22 THaQWEAKHelicity( const char* name, const char* description,
23 THaApparatus* a = nullptr );
25 virtual ~THaQWEAKHelicity();
26
27 virtual Int_t Begin( THaRunBase* r=nullptr );
28 virtual void Clear( Option_t* opt = "" );
29 virtual Int_t Decode( const THaEvData& evdata );
30 virtual Int_t End( THaRunBase* r=nullptr );
31 virtual void SetDebug( Int_t level );
32 virtual Bool_t HelicityValid() const { return fValidHel; }
33
34 void PrintEvent( UInt_t evtnum );
35
36protected:
37 virtual void FillHisto();
38 void CheckTIRvsRing( UInt_t eventnumber );
39 void LoadHelicity( UInt_t eventnumber );
40 UInt_t RanBit30( UInt_t& ranseed );
42
43
44 // variables that need to be read from the database
46 // Offset between the ring reported value and the TIR reported value
48 // delay of helicity (# windows)
50 //number of bit in the pseudo random helicity generator
51 std::vector<Int_t> fPatternSequence; // sequence of 0 and 1 in the pattern
52 UInt_t fQWEAKNPattern; // maximum of event in the pattern
54
55
59
62 void SetErrorCode(Int_t error);
64
65
66 // Ring related data
67 UInt_t fRing_NSeed; //number of event collected for seed
78
79 UInt_t fEvtype; // Current CODA event type
80
81 static const Int_t NHIST = 2;
82 std::vector<TH1F*> fHisto;
83
84 virtual Int_t DefineVariables( EMode mode = kDefine );
85 virtual Int_t ReadDatabase( const TDatime& date );
86
87 ClassDef(THaQWEAKHelicity,0) // Beam helicity from QWEAK electronics in delayed mode
88
89};
90
91#endif
92
#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]
void PrintEvent(UInt_t evtnum)
THaHelicityDet::EHelicity SetHelicity(UInt_t polarity, UInt_t phase)
virtual Bool_t HelicityValid() const
virtual void Clear(Option_t *opt="")
virtual Int_t Decode(const THaEvData &evdata)
virtual Int_t DefineVariables(EMode mode=kDefine)
void LoadHelicity(UInt_t eventnumber)
virtual Int_t ReadDatabase(const TDatime &date)
std::vector< Int_t > fPatternSequence
static const Int_t NHIST
UInt_t RanBit30(UInt_t &ranseed)
virtual void SetDebug(Int_t level)
void SetErrorCode(Int_t error)
std::vector< TH1F * > fHisto
virtual void FillHisto()
void CheckTIRvsRing(UInt_t eventnumber)
TArc a