Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcRaster.h
Go to the documentation of this file.
1
2//author Burcu Duran - Melanie Rehfuss (2017)
3
4#ifndef ROOT_THcRaster
5#define ROOT_THcRaster
6
8// //
9// THcRaster //
10// //
12
13#include "THaBeamDet.h"
14#include "TVector.h"
15#include "TClonesArray.h"
16#include "THcHitList.h"
17#include "THcDetectorMap.h"
18#include "THcRasterRawHit.h"
19#include "THaCutList.h"
20#include "THaOutput.h"
21#include "THaEpicsEvtHandler.h"
22
23class THcRaster : public THaBeamDet, public THcHitList {
24
25 public:
26
27 THcRaster(const char* name, const char* description ="",THaApparatus* a = NULL );
28
29 ~THcRaster();
30
31 void Clear(Option_t* opt="");
32 void AccumulatePedestals(TClonesArray* rawhits);
33 void CalculatePedestals();
34
35 Int_t Decode( const THaEvData& );
36 Int_t ReadDatabase( const TDatime& date );
38
39 EStatus Init( const TDatime& run_time );
40
41 void InitArrays() { /* do nothing */;}
42 void DeleteArrays() { /* do nothing */;}
43
44 Int_t Process();
45
46 TVector3 GetPosition() const { return fPosition[1]; }
47 TVector3 GetDirection() const { return fDirection; }
48
49 Double_t GetCurrentX() { return fRawPos[0]; }
50 Double_t GetCurrentY() { return fRawPos[1]; }
51
52 THcRaster();
53
54 protected:
55
56 //event information
57
59
60 /* void InitializeReconstruction(); */
61
62 Double_t fgpbeam; //beam momentum
63 Double_t fgfrx_dist; //Distance of raster to target
65 Double_t fgbeam_xoff; // Beam offsets
66 Double_t fgbeam_xpoff; // Beam offsets
67 Double_t fgbeam_yoff; // Beam offsets
68 Double_t fgbeam_ypoff; // Beam offsets
69 Double_t fgbpmxa_slope; // BPM slope/offsets
70 Double_t fgbpmxa_off; // BPM slope/offsets
71 Double_t fgbpmxb_slope; // BPM slope/offsets
72 Double_t fgbpmxb_off; // BPM slope/offsets
73 Double_t fgbpmxc_slope; // BPM slope/offsets
74 Double_t fgbpmxc_off; // BPM slope/offsets
75 Double_t fgbpmya_slope; // BPM slope/offsets
76 Double_t fgbpmya_off; // BPM slope/offsets
77 Double_t fgbpmyb_slope; // BPM slope/offsets
78 Double_t fgbpmyb_off; // BPM slope/offsets
79 Double_t fgbpmyc_slope; // BPM slope/offsets
80 Double_t fgbpmyc_off; // BPM slope/offsets
81 Double_t fgbpma_zpos; // BPM A z position
82 Double_t fgbpmb_zpos; // BPM B z position
83 Double_t fgbpmc_zpos; // BPM C x position
84 Int_t fgusefr; /* Use Raster for beam position */
85
86 Double_t FRXA_rawadc; // XA raw ADC
87 Double_t FRYA_rawadc; // YA raw ADC
88 Double_t FRXB_rawadc; // XB raw ADC
89 Double_t FRYB_rawadc; // YB raw ADC
90 Double_t BPMXA_raw; // BPM A Raw X Position
91 Double_t BPMYA_raw; // BPM A Raw Y Position
92 Double_t BPMXB_raw; // BPM B Raw X Position
93 Double_t BPMYB_raw; // BPM B Raw Y Position
94 Double_t BPMXC_raw; // BPM C Raw X Position
95 Double_t BPMYC_raw; // BPM C Raw Y Position
96 Double_t BPMXA_pos; // BPM A Corrected X Position
97 Double_t BPMYA_pos; // BPM A Corrected Y Position
98 Double_t BPMXB_pos; // BPM B Corrected X Position
99 Double_t BPMYB_pos; // BPM B Corrected Y Position
100 Double_t BPMXC_pos; // BPM C Corrected X Position
101 Double_t BPMYC_pos; // BPM C Corrected Y Position
102 Double_t fXA_ADC; // XA ADC
103 Double_t fYA_ADC; // YA ADC
104 Double_t fXB_ADC; // XB ADC
105 Double_t fYB_ADC; // YB ADC
106 Double_t fXA_pos; // XA position
107 Double_t fYA_pos; // YA position
108 Double_t fXB_pos; // XB position
109 Double_t fYB_pos; // YB position
110 Double_t fXbpm_tar; // X BPM at target (+X is beam right)
111 Double_t fYbpm_tar; // Y BPM at target (+Y is up)
112 Double_t fXpbpm_tar; // Xp BPM at target (+X is beam right)
113 Double_t fYpbpm_tar; // Yp BPM at target (+Y is up)
114 Double_t fXbpm_A; // X BPM at BPMA (+X is beam right)
115 Double_t fYbpm_A; // Y BPM at BPMA (+Y is up)
116 Double_t fXbpm_B; // X BPM at BPMB (+X is beam right)
117 Double_t fYbpm_B; // Y BPM at BPMB (+Y is up)
118 Double_t fXbpm_C; // X BPM at BPMC (+X is beam right)
119 Double_t fYbpm_C; // Y BPM at BPMC (+Y is up)
125 //
129 //
130
135
136
137 Double_t fPedADC[4]; // ADC poedestals
138 //Double_t fAvgPedADC[4]; // Avergage ADC poedestals
139
140 Double_t fRawPos[2]; // current in Raster ADCs for position
141 TVector3 fPosition[3]; // Beam position at 1st, 2nd BPM or at the target (meters)
143
146
147 private:
155
156 ClassDef(THcRaster, 0); // add THcRaster to ROOT library
157};
158
160
161
162#endif
int Int_t
bool Bool_t
double Double_t
const char Option_t
Option_t Option_t TPoint TPoint const char mode
Builds a Hall C ENGx1INE style list of raw hits from raw data.
Definition THcHitList.h:27
Detector class for fast raster.
Definition THcRaster.h:23
Double_t BPMYB_raw
Definition THcRaster.h:93
Double_t BPMXC_raw
Definition THcRaster.h:94
Double_t BPMYC_pos
Definition THcRaster.h:101
Double_t fYA_ADC
Definition THcRaster.h:103
Double_t fFrYB_ADC_zero_offset
Definition THcRaster.h:134
Double_t fYbpm_B
Definition THcRaster.h:117
Double_t fXpbpm_tar
Definition THcRaster.h:112
Double_t fYpbpm_tar
Definition THcRaster.h:113
void DeleteArrays()
Definition THcRaster.h:42
Double_t fgbpmyb_off
Definition THcRaster.h:78
Double_t fYbpm_C
Definition THcRaster.h:119
ClassDef(THcRaster, 0)
Double_t fgbpmyb_slope
Definition THcRaster.h:77
Double_t fPedADC[4]
Definition THcRaster.h:137
Double_t fFrXB_ADC_zero_offset
Definition THcRaster.h:133
Double_t FRXB_rawadc
Definition THcRaster.h:88
Double_t BPMYA_raw
Definition THcRaster.h:91
Double_t BPMXB_raw
Definition THcRaster.h:92
Double_t fFrYA_ADCperCM
Definition THcRaster.h:152
Double_t fgbeam_xpoff
Definition THcRaster.h:66
Double_t fEbeamEpics_prev
Definition THcRaster.h:128
Double_t fgbeam_ypoff
Definition THcRaster.h:68
Double_t fYbpm_A
Definition THcRaster.h:115
Double_t fgfry_dist
Definition THcRaster.h:64
Double_t fXB_pos
Definition THcRaster.h:108
Double_t BPMXC_pos
Definition THcRaster.h:100
Double_t fgbpmya_off
Definition THcRaster.h:76
Double_t fgbpmxa_slope
Definition THcRaster.h:69
Double_t fFrYA_ADC_zero_offset
Definition THcRaster.h:132
THaEpicsEvtHandler * fEpicsHandler
Definition THcRaster.h:145
Double_t BPMXB_pos
Definition THcRaster.h:98
Double_t fEbeamEpics
Definition THcRaster.h:126
TVector3 GetPosition() const
Definition THcRaster.h:46
Double_t fgbpmyc_slope
Definition THcRaster.h:79
TVector3 fDirection
Definition THcRaster.h:142
Int_t Decode(const THaEvData &)
Double_t fXbpm_tar
Definition THcRaster.h:110
Double_t fgbeam_xoff
Definition THcRaster.h:65
void AccumulatePedestals(TClonesArray *rawhits)
Double_t fXA_pos
Definition THcRaster.h:106
TClonesArray * frPosAdcPulseIntRaw
Definition THcRaster.h:144
Double_t fXbpm_A
Definition THcRaster.h:114
Double_t fgbpmyc_off
Definition THcRaster.h:80
Int_t fNPedestalEvents
Definition THcRaster.h:149
void Clear(Option_t *opt="")
Int_t ReadDatabase(const TDatime &date)
Double_t fXbeam_prev[4]
Definition THcRaster.h:120
Double_t fEbeamEpics_read
Definition THcRaster.h:127
Double_t fgbpmxa_off
Definition THcRaster.h:70
Int_t Process()
Double_t fFrXA_ADC_zero_offset
Definition THcRaster.h:131
Double_t FRYB_rawadc
Definition THcRaster.h:89
void CalculatePedestals()
Bool_t fFlag_use_EPICS_bpm
Definition THcRaster.h:124
Double_t fRawPos[2]
Definition THcRaster.h:140
Double_t FRXA_rawadc
Definition THcRaster.h:86
Bool_t fAnalyzePedestals
Definition THcRaster.h:148
Double_t fYpbeam_prev
Definition THcRaster.h:123
Double_t fgfrx_dist
Definition THcRaster.h:63
Double_t fgbeam_yoff
Definition THcRaster.h:67
void InitArrays()
Definition THcRaster.h:41
Double_t fYA_pos
Definition THcRaster.h:107
Double_t fgbpmxb_off
Definition THcRaster.h:72
Double_t FRYA_rawadc
Definition THcRaster.h:87
Double_t fXA_ADC
Definition THcRaster.h:102
Double_t fgbpmya_slope
Definition THcRaster.h:75
Double_t fFrYB_ADCperCM
Definition THcRaster.h:154
Double_t fYbeam_prev[4]
Definition THcRaster.h:121
Double_t BPMYB_pos
Definition THcRaster.h:99
Double_t BPMYA_pos
Definition THcRaster.h:97
Double_t fgpbeam
Definition THcRaster.h:62
Double_t fYB_pos
Definition THcRaster.h:109
Double_t fXbpm_B
Definition THcRaster.h:116
Double_t fXbpm_C
Definition THcRaster.h:118
Double_t fgbpmxb_slope
Definition THcRaster.h:71
Int_t DefineVariables(EMode mode)
Double_t fXB_ADC
Definition THcRaster.h:104
Double_t fFrCalMom
Definition THcRaster.h:150
Double_t GetCurrentX()
Definition THcRaster.h:49
Double_t fYbpm_tar
Definition THcRaster.h:111
Double_t BPMXA_raw
Definition THcRaster.h:90
Double_t fgbpmc_zpos
Definition THcRaster.h:83
Double_t fgbpmxc_off
Definition THcRaster.h:74
Double_t BPMXA_pos
Definition THcRaster.h:96
Double_t fgbpmxc_slope
Definition THcRaster.h:73
Double_t GetCurrentY()
Definition THcRaster.h:50
Double_t fFrXA_ADCperCM
Definition THcRaster.h:151
Double_t fXpbeam_prev
Definition THcRaster.h:122
Int_t fNhits
Definition THcRaster.h:58
TVector3 fPosition[3]
Definition THcRaster.h:141
Double_t BPMYC_raw
Definition THcRaster.h:95
Double_t fgbpmb_zpos
Definition THcRaster.h:82
TVector3 GetDirection() const
Definition THcRaster.h:47
Int_t fgusefr
Definition THcRaster.h:84
Double_t fFrXB_ADCperCM
Definition THcRaster.h:153
Double_t fgbpma_zpos
Definition THcRaster.h:81
Double_t fYB_ADC
Definition THcRaster.h:105
TArc a