Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_BCAL_LED_time.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_BCAL_LED_time.h
4 //
5 
6 #ifndef _JEventProcessor_BCAL_LED_time_
7 #define _JEventProcessor_BCAL_LED_time_
8 
9 #include <JANA/JEventProcessor.h>
10 
11 #include <stdint.h>
12 #include <vector>
13 #include "TTree.h"
15 #include <JANA/JApplication.h>
16 #include <iostream>
17 #include <fstream>
18 
19 using namespace std;
20 using namespace jana;
21 
22 #include "BCAL/DBCALDigiHit.h"
23 #include "BCAL/DBCALHit.h"
24 #include "BCAL/DBCALPoint.h"
25 #include "BCAL/DBCALUnifiedHit.h"
26 #include "DAQ/Df250PulseIntegral.h"
27 #include "DAQ/Df250WindowRawData.h"
28 #include "TRIGGER/DL1Trigger.h"
29 
30 #include <TDirectory.h>
31 #include <TH3.h>
32 #include <TH2.h>
33 #include <TH1.h>
34 #include <TProfile2D.h>
35 #include <TStyle.h>
36 
38 
39 
40 class JEventProcessor_BCAL_LED_time:public jana::JEventProcessor{
41  public:
44  const char* className(void){return "JEventProcessor_BCAL_LED_time";}
45 
46 // int NOtrig, GTPtrig, FPtrig, FPGTPtrig, trigUS, trigDS, trigCosmic;
47 // int low_down_1_counter, low_down_2_counter, low_down_3_counter, low_down_4_counter, low_up_1_counter, low_up_2_counter, low_up_3_counter, low_up_4_counter, high_down_1_counter, high_down_2_counter, high_down_3_counter, high_down_4_counter, high_up_1_counter, high_up_2_counter, high_up_3_counter, high_up_4_counter;
48 // int unidentified, ledcounter;
49  int adccount1, adccount2, adccount3, nbins;
51 
52 
53  private:
54  jerror_t init(void); ///< Called once at program start.
55  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
56  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
57  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
58  jerror_t fini(void); ///< Called after last event of last event source has been processed.
59 
60 
61 
62 // root hist pointers
63 
64 //all channels
65 TProfile *bcal_time_vevent = NULL;
66 
67 //2 sides
68 TProfile *up_time_vevent = NULL;
69 TProfile *down_time_vevent = NULL;
70 //4 columns
71 TProfile *column1_time_vevent = NULL;
72 TProfile *column2_time_vevent = NULL;
73 TProfile *column3_time_vevent = NULL;
74 TProfile *column4_time_vevent = NULL;
75 
76 TProfile *column1_up_peak_vevent = NULL;
77 TProfile *column2_up_peak_vevent = NULL;
78 TProfile *column3_up_peak_vevent = NULL;
79 TProfile *column4_up_peak_vevent = NULL;
80 TProfile *column1_down_peak_vevent = NULL;
81 TProfile *column2_down_peak_vevent = NULL;
82 TProfile *column3_down_peak_vevent = NULL;
83 TProfile *column4_down_peak_vevent = NULL;
84 
85 
86 TProfile *column1_up_time_vevent1 = NULL;
87 TProfile *column1_down_time_vevent1 = NULL;
88 TProfile *column1_up_time_vevent2 = NULL;
89 TProfile *column1_down_time_vevent2 = NULL;
90 TProfile *column1_up_time_vevent3 = NULL;
91 TProfile *column1_down_time_vevent3 = NULL;
92 TProfile *column1_up_time_vevent4 = NULL;
93 TProfile *column1_down_time_vevent4 = NULL;
94 
95 TProfile *column2_up_time_vevent1 = NULL;
96 TProfile *column2_down_time_vevent1 = NULL;
97 TProfile *column2_up_time_vevent2 = NULL;
98 TProfile *column2_down_time_vevent2 = NULL;
99 TProfile *column2_up_time_vevent3 = NULL;
100 TProfile *column2_down_time_vevent3 = NULL;
101 TProfile *column2_up_time_vevent4 = NULL;
102 TProfile *column2_down_time_vevent4 = NULL;
103 
104 TProfile *column3_up_time_vevent1 = NULL;
105 TProfile *column3_down_time_vevent1 = NULL;
106 TProfile *column3_up_time_vevent2 = NULL;
107 TProfile *column3_down_time_vevent2 = NULL;
108 TProfile *column3_up_time_vevent3 = NULL;
109 TProfile *column3_down_time_vevent3 = NULL;
110 TProfile *column3_up_time_vevent4 = NULL;
111 TProfile *column3_down_time_vevent4 = NULL;
112 
113 TProfile *column4_up_time_vevent1 = NULL;
114 TProfile *column4_down_time_vevent1 = NULL;
115 TProfile *column4_up_time_vevent2 = NULL;
116 TProfile *column4_down_time_vevent2 = NULL;
117 TProfile *column4_up_time_vevent3 = NULL;
118 TProfile *column4_down_time_vevent3 = NULL;
119 TProfile *column4_up_time_vevent4 = NULL;
120 TProfile *column4_down_time_vevent4 = NULL;
121 
122 TProfile *low_up_1 = NULL;
123 TProfile *low_up_2 = NULL;
124 TProfile *low_up_3 = NULL;
125 TProfile *low_up_4 = NULL;
126 TProfile *low_down_1 = NULL;
127 TProfile *low_down_2 = NULL;
128 TProfile *low_down_3 = NULL;
129 TProfile *low_down_4 = NULL;
130 
131 TProfile *low_up = NULL;
132 TProfile *low_down = NULL;
133 
134 TProfile *high_up_1 = NULL;
135 TProfile *high_up_2 = NULL;
136 TProfile *high_up_3 = NULL;
137 TProfile *high_up_4 = NULL;
138 TProfile *high_down_1 = NULL;
139 TProfile *high_down_2 = NULL;
140 TProfile *high_down_3 = NULL;
141 TProfile *high_down_4 = NULL;
142 
143 TProfile *high_up = NULL;
144 TProfile *high_down = NULL;
145 
146 // Histograms added by Elton for z distributions
147 
148 TProfile* h2_ledboth_Tall_vs_event = NULL;
149 TProfile* h2_ledboth_sector_vs_event = NULL;
150 TH1I* h1_ledall_layer = NULL;
151 TH1I* h1_led0_layer = NULL;
152 
153 TH1I* h1_ledup_z_all = NULL;;
154 TH2I* h2_ledup_z_vs_cellid = NULL;
155 TH1I* h1_ledup_layer = NULL;
156 TH1I* h1_ledup_sector = NULL;
157 TH1I* h1_ledup_sector_config = NULL;
158 TH1I* h1_ledup_Tdiff_all = NULL;
159 TH1I* h1_ledup_Tup_all = NULL;
160 TH1I* h1_ledup_Tdown_all = NULL;
161 TH2I* h2_ledup_Tup_vs_z = NULL;
162 TH2I* h2_ledup_Tdown_vs_z = NULL;
163 TProfile* h2_ledup_Tup_vs_event = NULL;
164 TProfile* h2_ledup_Tdown_vs_event = NULL;
165 TProfile* h2_ledup_Tall_vs_event = NULL;
166 TProfile* h2_ledup_sector_vs_event = NULL;
167 
168 TH1I* h1_leddown_z_all = NULL;
169 TH2I* h2_leddown_z_vs_cellid = NULL;
170 TH1I* h1_leddown_layer = NULL;
171 TH1I* h1_leddown_sector = NULL;
172 TH1I* h1_leddown_sector_config = NULL;
173 TH1I* h1_leddown_Tdiff_all = NULL;
174 TH1I* h1_leddown_Tup_all = NULL;
175 TH1I* h1_leddown_Tdown_all = NULL;
176 TH2I* h2_leddown_Tup_vs_z = NULL;
177 TH2I* h2_leddown_Tdown_vs_z = NULL;
178 TProfile* h2_leddown_Tup_vs_event = NULL;
179 TProfile* h2_leddown_Tdown_vs_event = NULL;
180 TProfile* h2_leddown_Tall_vs_event = NULL;
181 TProfile* h2_leddown_sector_vs_event = NULL;
182 
183 };
184 
185 #endif // _JEventProcessor_BCAL_LED_time_