Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcHelicityScaler.h
Go to the documentation of this file.
1#ifndef THcHelicityScaler_
2#define THcHelicityScaler_
3
5//
6// THcHelicityScaler
7// class to handle Helicity scaler events
8//
10
11#include "THcScalerEvtHandler.h"
12#include "Decoder.h"
13#include <string>
14#include <vector>
15#include <algorithm>
16#include <set>
17#include "TTree.h"
18#include "TString.h"
19#include <cstring>
20
21
22class THcHelicity;
23class HCScalerLoc;
24
26
27public:
28
29 THcHelicityScaler(const char*, const char*);
31
35
36 virtual EStatus Init( const TDatime& run_time);
37 virtual Int_t ReadDatabase(const TDatime& date );
38 virtual Int_t End( THaRunBase* r=0 );
39
40 virtual void SetUseFirstEvent(Bool_t b = kFALSE) {fUseFirstEvent = b;}
41 virtual void SetDelayedType(int evtype);
42 virtual void SetROC(Int_t roc) {fROC=roc;}
43 virtual void SetBankID(Int_t bankid) {fBankID=bankid;}
45 virtual Int_t GetNevents() { return fNTrigsInBuf;}
46 virtual Int_t GetNcycles() { return fNTriggers;}
47 virtual Int_t GetEvNum() { return evNumber;}
51 virtual Bool_t IsSeedGood() {return fNBits>=30;}
52
53private:
54
55 //------------C.Y. Sep 20, 2020 :: Added Utility Function Prototypes----------------
56 void AddVars(const TString& name, const TString& desc, UInt_t iscal, UInt_t ichan, UInt_t ikind);
57 void DefVars();
58
59 std::vector<Decoder::GenScaler*> scalers;
60 std::vector<HCScalerLoc*> scalerloc;
61 //----------------------------------------------------------------------------------
62
63 static Int_t RanBit30(Int_t ranseed);
64 void MakeParms();
65
67 // Helicity Scaler variables
68 Int_t fNTrigsInBuf; /* # of helicity scaler reads in last event */
72 //
75
80
88 //Double_t *fCharge;
89
92 //Double_t fTime;
93 //Double_t fTimeAsymmetry;
95
96 //---- C.Y.: 12/14/2020 Variables for quartet-by-quartet asymmetry/error calculations ----
98
99 Int_t fQuartetCount; //keep track of number of quartets
100
101 //quartet-by-quartet time asymmetry variables
108
109 //quartet-by-quartet scaler counts asymmetry variables
111 Double_t *fScalSum; //reminder: need to initialize
116
117 //quartet-by-quartet charge asymmetry variables
124
125
126
127
128 //----------------------
129
130
131
132 //----C.Y. Nov 26, 2020----
134
135 std::vector<UInt_t*> fDelayedEvents;
137 Int_t fNScalerChannels; // Number of scaler channels/event
138
141
144 //---C.Y. Sep 2020 : Added additional BCM-related variables--
154 std::vector <std::string> fBCM_Name;
155
156 //----C.Y. Sep 20, 2020 : Added additional variables-----
157 // (required by utility functions and scaler tree output)
172 std::set<UInt_t> fRocSet;
173 std::set<UInt_t> fModuleSet;
174 //--------------------------------------------------------
175
178
179
180 ClassDef(THcHelicityScaler,0) // Scaler Event handler
181
182};
183
184#endif
int Int_t
unsigned int UInt_t
bool Bool_t
double Double_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
virtual Int_t End(THaRunBase *r=0)
virtual void SetBankID(Int_t bankid)
virtual Int_t GetReportedSeed()
std::set< UInt_t > fRocSet
Int_t fHelicityHistory[200]
THcHelicityScaler(const THcHelicityScaler &fh)
std::vector< HCScalerLoc * > scalerloc
Int_t AnalyzeBuffer(UInt_t *rdata)
std::set< UInt_t > fModuleSet
THcHelicityScaler(const char *, const char *)
void AddVars(const TString &name, const TString &desc, UInt_t iscal, UInt_t ichan, UInt_t ikind)
virtual void SetNScalerChannels(Int_t n)
virtual Int_t GetReportedActual()
Double_t * fScalAsymmetryError
virtual Int_t ReadDatabase(const TDatime &date)
virtual void SetDelayedType(int evtype)
Int_t Analyze(THaEvData *evdata)
virtual EStatus Init(const TDatime &run_time)
Double_t * fHScalers[2]
THcHelicityScaler & operator=(const THcHelicityScaler &fh)
Double_t * fChargeAsymmetryError
virtual Bool_t IsSeedGood()
Int_t AnalyzeHelicityScaler(const UInt_t *p)
virtual void SetUseFirstEvent(Bool_t b=kFALSE)
virtual void SetROC(Int_t roc)
Double_t * fScalCycle[4]
virtual Int_t * GetHelicityHistoryP()
virtual Int_t GetEvNum()
std::vector< Decoder::GenScaler * > scalers
std::vector< std::string > fBCM_Name
Double_t * fChargeCycle[4]
virtual Int_t GetNcycles()
std::vector< UInt_t * > fDelayedEvents
virtual Int_t GetNevents()
static Int_t RanBit30(Int_t ranseed)
virtual ~THcHelicityScaler()
const Int_t n