MiniballSort
Loading...
Searching...
No Matches
Histogrammer.cc
Go to the documentation of this file.
1#include "Histogrammer.hh"
2
3MiniballHistogrammer::MiniballHistogrammer( std::shared_ptr<MiniballReaction> myreact, std::shared_ptr<MiniballSettings> myset ){
4
6 set = myset;
7
8 // Progress bar starts as false
9 _prog_ = false;
10
11 // Calculate histogram limits
12 int window_ticks = ( set->GetEventWindow() + 10 ) / 10;
13 TMAX = (float)window_ticks * 10.0 + 5.0;
14 TMIN = TMAX * -1.0;
15 TBIN = window_ticks * 2 + 1;
16
17 GBIN = react->HistGammaBins();
18 GMIN = react->HistGammaMin();
19 GMAX = react->HistGammaMax();
20 EBIN = react->HistElectronBins();
21 EMIN = react->HistElectronMin();
22 EMAX = react->HistElectronMax();
23 PBIN = react->HistParticleBins();
24 PMIN = react->HistParticleMin();
25 PMAX = react->HistParticleMax();
26
27 // Intialise the hist list
28 histlist = new TList();
29
30}
31
33
34 // Make the histograms track the sum of the weights for correctly
35 // performing the error propagation when subtracting
36 if( !spymode ) TH1::SetDefaultSumw2(kTRUE);
37
38 std::string hname, htitle;
39 std::string dirname;
40 unsigned int ncry = set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals();
41
42 // Time difference plots
43 dirname = "Timing";
44 output_file->mkdir( dirname.data() );
45 output_file->cd( dirname.data() );
46
47 ebis_td_gamma = new TH1F( "ebis_td_gamma", "Gamma-ray time with respect to EBIS;#Deltat;Counts per 20 #mus", 5.5e3, -0.1e8, 1e8 );
48 ebis_td_particle = new TH1F( "ebis_td_particle", "Particle time with respect to EBIS;#Deltat;Counts per 20 #mus", 5.5e3, -0.1e8, 1e8 );
51
52 hname = "gamma_particle_td";
53 htitle = "Particle - Gamma-ray time difference;#Deltat (p-#gamma) [ns];Counts";
54 gamma_particle_td = new TH1F( hname.data(), htitle.data(),
55 TBIN, TMIN, TMAX );
57
58
59 hname = "gamma_particle_E_vs_td";
60 htitle = "Particle - Gamma-ray time difference versus gamma-ray energy;#Deltat (p-#gamma) [ns];Gamma-ray energy (keV);Counts";
61 gamma_particle_E_vs_td = new TH2F( hname.data(), htitle.data(),
62 TBIN, TMIN, TMAX, GBIN/4., 0., 2000. );
64
65 // Sector-by-sector particle plots
66 if( react->HistBySector() ) {
67
68 gamma_particle_td_sec.resize( set->GetNumberOfCDSectors() );
69 gamma_particle_E_vs_td_sec.resize( set->GetNumberOfCDSectors() );
70
71 for( unsigned int i = 0; i < set->GetNumberOfCDSectors(); ++i ) {
72
73 hname = "gamma_particle_td_sec" + std::to_string(i);
74 htitle = "Particle - Gamma-ray time difference for CD sector ";
75 htitle += std::to_string(i) + ";#Deltat (p-#gamma) [ns];Counts";
76 gamma_particle_td_sec[i] = new TH1F( hname.data(), htitle.data(),
77 TBIN, TMIN, TMAX );
79
80 hname = "gamma_particle_E_vs_td_sec" + std::to_string(i);
81 htitle = "Particle - Gamma-ray time difference versus gamma-ray energy for CD sector ";
82 htitle += std::to_string(i) + ";#Deltat (p-#gamma) [ns];Gamma-ray energy (keV);Counts";
83 gamma_particle_E_vs_td_sec[i] = new TH2F( hname.data(), htitle.data(),
84 TBIN, TMIN, TMAX, GBIN/4., 0., 2000. );
86
87 }
88
89 }
90
91 hname = "gamma_gamma_td";
92 htitle = "Gamma-ray - Gamma-ray time difference;#Deltat [ns];Counts";
93 gamma_gamma_td = new TH1F( hname.data(), htitle.data(),
94 TBIN, TMIN, TMAX );
96
97 hname = "gamma_electron_td";
98 htitle = "Electron - Gamma-ray time difference;#Deltat (e-#gamma) [ns];Counts per 10 ns";
99 gamma_electron_td = new TH1F( hname.data(), htitle.data(),
100 TBIN, TMIN, TMAX );
102
103 hname = "electron_electron_td";
104 htitle = "Electron - Electron time difference;#Deltat [ns];Counts per 10 ns";
105 electron_electron_td = new TH1F( hname.data(), htitle.data(),
106 TBIN, TMIN, TMAX );
108
109 hname = "electron_particle_td";
110 htitle = "Particle - Electron time difference;#Deltat (p-e) [ns];Counts per 10 ns";
111 electron_particle_td = new TH1F( hname.data(), htitle.data(),
112 TBIN, TMIN, TMAX );
114
115 hname = "particle_particle_td";
116 htitle = "Particle - Particle time difference;#Deltat [ns];Counts per 10 ns";
117 particle_particle_td = new TH1F( hname.data(), htitle.data(),
118 TBIN, TMIN, TMAX );
120
121 hname = "gamma_particle_td_prompt";
122 htitle = "Particle - Gamma-ray time difference in prompt time window;#Deltat (p-#gamma) [ns];Counts";
123 gamma_particle_td_prompt = new TH1F( hname.data(), htitle.data(),
124 TBIN, TMIN, TMAX );
126
127 hname = "gamma_gamma_td_prompt";
128 htitle = "Gamma-ray - Gamma-ray time difference in prompt time window;#Deltat [ns];Counts";
129 gamma_gamma_td_prompt = new TH1F( hname.data(), htitle.data(),
130 TBIN, TMIN, TMAX );
132
133 hname = "gamma_electron_td_prompt";
134 htitle = "Electron - Gamma-ray time difference in prompt time window;#Deltat (e-#gamma) [ns];Counts per 10 ns";
135 gamma_electron_td_prompt = new TH1F( hname.data(), htitle.data(),
136 TBIN, TMIN, TMAX );
138
139 hname = "electron_electron_td_prompt";
140 htitle = "Electron - Electron time difference in prompt time window;#Deltat [ns];Counts per 10 ns";
141 electron_electron_td_prompt = new TH1F( hname.data(), htitle.data(),
142 TBIN, TMIN, TMAX );
144
145 hname = "electron_particle_td_prompt";
146 htitle = "Particle - Electron time difference in prompt time window;#Deltat (p-e) [ns];Counts per 10 ns";
147 electron_particle_td_prompt = new TH1F( hname.data(), htitle.data(),
148 TBIN, TMIN, TMAX );
150
151 hname = "particle_particle_td_prompt";
152 htitle = "Particle - Particle time difference in prompt time window;#Deltat [ns];Counts per 10 ns";
153 particle_particle_td_prompt = new TH1F( hname.data(), htitle.data(),
154 TBIN, TMIN, TMAX );
156
157 hname = "gamma_particle_td_random";
158 htitle = "Particle - Gamma-ray time difference in random time window;#Deltat (p-#gamma) [ns];Counts";
159 gamma_particle_td_random = new TH1F( hname.data(), htitle.data(),
160 TBIN, TMIN, TMAX );
162
163 hname = "gamma_gamma_td_random";
164 htitle = "Gamma-ray - Gamma-ray time difference in random time window;#Deltat [ns];Counts";
165 gamma_gamma_td_random = new TH1F( hname.data(), htitle.data(),
166 TBIN, TMIN, TMAX );
168
169 hname = "gamma_electron_td_random";
170 htitle = "Electron - Gamma-ray time difference in random time window;#Deltat (e-#gamma) [ns];Counts per 10 ns";
171 gamma_electron_td_random = new TH1F( hname.data(), htitle.data(),
172 TBIN, TMIN, TMAX );
174
175 hname = "electron_electron_td_random";
176 htitle = "Electron - Electron time difference in random time window;#Deltat [ns];Counts per 10 ns";
177 electron_electron_td_random = new TH1F( hname.data(), htitle.data(),
178 TBIN, TMIN, TMAX );
180
181 hname = "electron_particle_td_random";
182 htitle = "Particle - Electron time difference in random time window;#Deltat (p-e) [ns];Counts per 10 ns";
183 electron_particle_td_random = new TH1F( hname.data(), htitle.data(),
184 TBIN, TMIN, TMAX );
186
187 hname = "particle_particle_td_random";
188 htitle = "Particle - Particle time difference in random time window;#Deltat [ns];Counts per 10 ns";
189 particle_particle_td_random = new TH1F( hname.data(), htitle.data(),
190 TBIN, TMIN, TMAX );
192
193 // Gamma-ray singles histograms
194 if( react->HistWithoutAddback() ) {
195
196 dirname = "GammaRaySingles";
197 output_file->mkdir( dirname.data() );
198 output_file->cd( dirname.data() );
199
200 hname = "gE_singles";
201 htitle = "Gamma-ray energy singles;Energy [keV];Counts per 0.5 keV";
202 gE_singles = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
203 histlist->Add(gE_singles);
204
205 if( react->HistByCrystal() ) {
206
207 hname = "gE_singles_vs_crystal";
208 htitle = "Gamma-ray energy singles versus crystal ID;Crystal ID;Energy [keV];Counts per 0.5 keV";
209 gE_singles_vs_crystal = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
211
212 }
213
214 hname = "gE_singles_ebis";
215 htitle = "Gamma-ray energy singles EBIS on-off;Energy [keV];Counts per 0.5 keV";
216 gE_singles_ebis = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
218
219 hname = "gE_singles_ebis_on";
220 htitle = "Gamma-ray energy singles EBIS on;Energy [keV];Counts per 0.5 keV";
221 gE_singles_ebis_on = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
223
224 hname = "gE_singles_ebis_off";
225 htitle = "Gamma-ray energy singles EBIS off;Energy [keV];Counts per 0.5 keV";
226 gE_singles_ebis_off = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
228
229 hname = "gE_singles_dc";
230 htitle = "Gamma-ray energy singles, Doppler corrected for unscattered beam;Energy [keV];Counts per 0.5 keV";
231 gE_singles_dc = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
233
234 hname = "gE_singles_dc_ebis";
235 htitle = "Gamma-ray energy singles, Doppler corrected for unscattered beam, EBIS on-off;Energy [keV];Counts per 0.5 keV";
236 gE_singles_dc_ebis = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
238
239 hname = "gamma_xy_map_forward";
240 htitle = "Gamma-ray X-Y hit map (forward: z > 0);y (horizontal) [mm];x (vertical) [mm];Counts";
241 gamma_xy_map_forward = new TH2F( hname.data(), htitle.data(), 201, -201., 201., 201, -201., 201. );
243
244 hname = "gamma_xy_map_backward";
245 htitle = "Gamma-ray X-Y hit map (backwards: z < 0);y (horizontal) [mm];x (vertical) [mm];Counts";
246 gamma_xy_map_backward = new TH2F( hname.data(), htitle.data(), 201, -201., 201., 201, -201., 201. );
248
249 hname = "gamma_xz_map_left";
250 htitle = "Gamma-ray X-Z hit map (left: y < 0);z (horizontal) [mm];x (vertical) [mm];Counts";
251 gamma_xz_map_left = new TH2F( hname.data(), htitle.data(), 201, -201., 201., 201, -201., 201. );
253
254 hname = "gamma_xz_map_right";
255 htitle = "Gamma-ray X-Z hit map (right: y > 0);z (horizontal) [mm];x (vertical) [mm];Counts";
256 gamma_xz_map_right = new TH2F( hname.data(), htitle.data(), 201, -201., 201., 201, -201., 201. );
258
259 hname = "gamma_theta_phi_map";
260 htitle = "Gamma-ray #theta-#phi hit map;#theta [degrees];#phi [degrees];Counts";
261 gamma_theta_phi_map = new TH2F( hname.data(), htitle.data(), 180, 0., 180., 360, 0., 360. );
263
264 }
265
266 // Gamma-ray addback singles histograms
267 if( react->HistWithAddback() ) {
268
269 hname = "aE_singles";
270 htitle = "Gamma-ray energy with addback singles;Energy [keV];Counts per 0.5 keV";
271 aE_singles = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
272 histlist->Add(aE_singles);
273
274 if( react->HistByCrystal() ) {
275
276 hname = "aE_singles_vs_crystal";
277 htitle = "Gamma-ray energy with addback singles versus crystal ID;Crystal ID;Energy [keV];Counts per 0.5 keV";
278 aE_singles_vs_crystal = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
280
281 }
282
283 hname = "aE_singles_ebis";
284 htitle = "Gamma-ray energy with addback singles EBIS on-off;Energy [keV];Counts per 0.5 keV";
285 aE_singles_ebis = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
287
288 hname = "aE_singles_ebis_on";
289 htitle = "Gamma-ray energy with addback singles EBIS on;Energy [keV];Counts per 0.5 keV";
290 aE_singles_ebis_on = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
292
293 hname = "aE_singles_ebis_off";
294 htitle = "Gamma-ray energy with addback singles EBIS off;Energy [keV];Counts per 0.5 keV";
295 aE_singles_ebis_off = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
297
298 hname = "aE_singles_dc";
299 htitle = "Gamma-ray energy with addback singles, Doppler corrected for unscattered beam;Energy [keV];Counts per 0.5 keV";
300 aE_singles_dc = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
302
303 hname = "aE_singles_dc_ebis";
304 htitle = "Gamma-ray energy with addback singles, Doppler corrected for unscattered beam, EBIS on-off;Energy [keV];Counts per 0.5 keV";
305 aE_singles_dc_ebis = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
307
308 }
309
310
311 // Gamma-ray coincidence histograms
312 dirname = "CoincidenceMatrices";
313 output_file->mkdir( dirname.data() );
314 output_file->cd( dirname.data() );
315
316 // If gamma-gamma histograms are turned on
317 if( react->HistGammaGamma() ) {
318
319 if( react->HistWithoutAddback() ) {
320
321 hname = "gE_gE";
322 htitle = "Gamma-ray coincidence matrix;Energy [keV];Energy [keV];Counts per 0.5 keV";
323 gE_gE = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
324 histlist->Add(gE_gE);
325
326 hname = "gE_gE_ebis_on";
327 htitle = "Gamma-ray coincidence matrix EBIS on;Energy [keV];Energy [keV];Counts per 0.5 keV";
328 gE_gE_ebis_on = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
330
331 }
332
333 if( react->HistWithAddback() ) {
334
335 hname = "aE_aE";
336 htitle = "Gamma-ray addback coincidence matrix;Energy [keV];Energy [keV];Counts per 0.5 keV";
337 aE_aE = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
338 histlist->Add(aE_aE);
339
340 hname = "aE_aE_ebis_on";
341 htitle = "Gamma-ray addback coincidence matrix EBIS on;Energy [keV];Energy [keV];Counts per 0.5 keV";
342 aE_aE_ebis_on = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
344
345 }
346
347 } // gamma-gamma on
348
349 // If electron histograms are turned on
350 if( react->HistElectron() ) {
351
352 hname = "eE_eE";
353 htitle = "Electron coincidence matrix;Energy [keV];Energy [keV];Counts per keV";
354 eE_eE = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, EBIN, EMIN, EMAX );
355 histlist->Add(eE_eE);
356
357 hname = "eE_eE_ebis_on";
358 htitle = "Electron coincidence matrix EBIS on;Energy [keV];Energy [keV];Counts per keV";
359 eE_eE_ebis_on = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, EBIN, EMIN, EMAX );
361
362 // If electron-gamma histograms are turned on
363 if( react->HistElectronGamma() ) {
364
365 hname = "gE_eE";
366 htitle = "Gamma-ray and electron coincidence matrix;#gamma-ray energy [keV];e^{-} energy [keV];Counts per 0.5 keV";
367 gE_eE = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, EBIN, EMIN, EMAX );
368 histlist->Add(gE_eE);
369
370 hname = "gE_eE_ebis_on";
371 htitle = "Gamma-ray and electron coincidence matrix EBIS on;#gamma-ray energy [keV];e^{-} energy [keV];Counts per 0.5 keV";
372 gE_eE_ebis_on = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, EBIN, EMIN, EMAX );
374
375 hname = "aE_eE";
376 htitle = "Gamma-ray addback and electron coincidence matrix;#gamma-ray energy [keV];e^{-} energy [keV];Counts per 0.5 keV";
377 aE_eE = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, EBIN, EMIN, EMAX );
378 histlist->Add(aE_eE);
379
380 hname = "aE_eE_ebis_on";
381 htitle = "Gamma-ray addback and electron coincidence matrix EBIS on;#gamma-ray energy [keV];e^{-} energy [keV];Counts per 0.5 keV";
382 aE_eE_ebis_on = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, EBIN, EMIN, EMAX );
384
385 } // electron-gamma on
386
387 // Electron singles histograms
388 dirname = "ElectronSingles";
389 output_file->mkdir( dirname.data() );
390 output_file->cd( dirname.data() );
391
392 hname = "eE_singles";
393 htitle = "Electron energy singles;Energy [keV];Counts keV";
394 eE_singles = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
395 histlist->Add(eE_singles);
396
397 hname = "eE_singles_ebis";
398 htitle = "Electron energy singles EBIS on-off;Energy [keV];Counts keV";
399 eE_singles_ebis = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
401
402 hname = "eE_singles_ebis_on";
403 htitle = "Electron energy singles EBIS on;Energy [keV];Counts keV";
404 eE_singles_ebis_on = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
406
407 hname = "eE_singles_ebis_off";
408 htitle = "Electron energy singles EBIS off;Energy [keV];Counts keV";
409 eE_singles_ebis_off = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
411
412 hname = "electron_xy_map";
413 htitle = "Electron X-Y hit map (#theta < 90);y (horizontal) [mm];x (vertical) [mm];Counts per mm^2";
414 electron_xy_map = new TH2F( hname.data(), htitle.data(), 361, -45.125, 45.125, 361, -45.125, 45.125 );
416
417 } // electrons on
418
419 // CD singles histograms
420 dirname = "ParticleSpectra";
421 output_file->mkdir( dirname.data() );
422 output_file->cd( dirname.data() );
423
424 hname = "pE_theta";
425 htitle = "Particle energy singles;Angle [deg];Energy [keV];Counts";
426 pE_theta = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
427 histlist->Add(pE_theta);
428
429 hname = "pE_theta_coinc";
430 htitle = "Particle energy in coincidence with a gamma ray;Angle [deg];Energy [keV];Counts";
431 pE_theta_coinc = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
433
434 hname = "pE_theta_ejectile";
435 htitle = "Particle energy singles, gated on ejectile;Angle [deg];Energy [keV];Counts";
436 pE_theta_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
438
439 hname = "pE_theta_recoil";
440 htitle = "Particle energy singles, gated on recoil;Angle [deg];Energy [keV];Counts";
441 pE_theta_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
443
444 // 1p and 2p particle histograms
445 if( react->HistByMultiplicity() ){
446
447 hname = "pE_theta_1p_ejectile";
448 htitle = "Particle energy singles, gated on ejectile without matching recoil;Angle [deg];Energy [keV];Counts";
449 pE_theta_1p_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
451
452 hname = "pE_theta_1p_recoil";
453 htitle = "Particle energy singles, gated on recoil without matching ejectile;Angle [deg];Energy [keV];Counts";
454 pE_theta_1p_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
456
457 hname = "pE_theta_2p_ejectile";
458 htitle = "Particle energy singles, gated on ejectile with 2-particle condition;Angle [deg];Energy [keV];Counts";
459 pE_theta_2p_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
461
462 hname = "pE_theta_2p_recoil";
463 htitle = "Particle energy singles, gated on recoil with 2-particle condition;Angle [deg];Energy [keV];Counts";
464 pE_theta_2p_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
466
467 }
468
469 // Sector-by-sector particle plots
470 if( react->HistBySector() ) {
471
472 pE_theta_sec.resize( set->GetNumberOfCDSectors() );
473 pE_theta_coinc_sec.resize( set->GetNumberOfCDSectors() );
474 pE_theta_ejectile_sec.resize( set->GetNumberOfCDSectors() );
475 pE_theta_recoil_sec.resize( set->GetNumberOfCDSectors() );
476
477 for( unsigned int i = 0; i < set->GetNumberOfCDSectors(); ++i ) {
478
479 hname = "pE_theta_sec" + std::to_string(i);
480 htitle = "Particle energy singles for sector " + std::to_string(i);
481 htitle += ";Angle [deg];Energy [keV];Counts";
482 pE_theta_sec[i] = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
483 histlist->Add(pE_theta_sec[i]);
484
485 hname = "pE_theta_coinc_sec" + std::to_string(i);
486 htitle = "Particle energy in coincidence with a gamma ray for sector " + std::to_string(i);
487 htitle += ";Angle [deg];Energy [keV];Counts";
488 pE_theta_coinc_sec[i] = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
490
491 hname = "pE_theta_ejectile_sec" + std::to_string(i);
492 htitle = "Particle energy singles, gated on ejectile for sector " + std::to_string(i);
493 htitle += ";Angle [deg];Energy [keV];Counts";
494 pE_theta_ejectile_sec[i] = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
496
497 hname = "pE_theta_recoil_sec" + std::to_string(i);
498 htitle = "Particle energy singles, gated on recoil for sector " + std::to_string(i);
499 htitle += ";Angle [deg];Energy [keV];Counts";
500 pE_theta_recoil_sec[i] = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), PBIN, PMIN, PMAX );
502
503 } // loop over sectors
504
505 } // by sector
506
507
508 pE_dE.resize( set->GetNumberOfCDDetectors() );
509 pE_dE_coinc.resize( set->GetNumberOfCDDetectors() );
510 pE_dE_cut.resize( set->GetNumberOfCDDetectors() );
511 pE_dE_sec.resize( set->GetNumberOfCDDetectors() );
512 pE_dE_coinc_sec.resize( set->GetNumberOfCDDetectors() );
513 pE_dE_cut_sec.resize( set->GetNumberOfCDDetectors() );
514 for( unsigned int i = 0; i < set->GetNumberOfCDDetectors(); ++i ) {
515
516 pE_dE_sec[i].resize( set->GetNumberOfCDSectors() );
517 pE_dE_coinc_sec[i].resize( set->GetNumberOfCDSectors() );
518 pE_dE_cut_sec[i].resize( set->GetNumberOfCDSectors() );
519
520 hname = "pE_dE" + std::to_string(i);
521 htitle = "Particle energy total versus energy loss for CD " + std::to_string(i);
522 htitle += ";Energy total [keV];Energy loss [keV];Counts";
523 pE_dE[i] = new TH2F( hname.data(), htitle.data(), PBIN, PMIN, PMAX, PBIN, PMIN, PMAX );
524 histlist->Add(pE_dE[i]);
525
526 hname = "pE_dE_" + std::to_string(i) + "_coinc";
527 htitle = "Particle energy total versus energy loss for CD " + std::to_string(i);
528 htitle += ", coincident with a gamma-ray";
529 htitle += ";Energy total [keV];Energy loss [keV];Counts";
530 pE_dE_coinc[i] = new TH2F( hname.data(), htitle.data(), PBIN, PMIN, PMAX, PBIN, PMIN, PMAX );
531 histlist->Add(pE_dE_coinc[i]);
532
533 hname = "pE_dE_" + std::to_string(i) + "_cut";
534 htitle = "Particle energy total versus energy loss for CD " + std::to_string(i);
535 htitle += ", after transfer cut applied";
536 htitle += ";Energy total [keV];Energy loss [keV];Counts";
537 pE_dE_cut[i] = new TH2F( hname.data(), htitle.data(), PBIN, PMIN, PMAX, PBIN, PMIN, PMAX );
538 histlist->Add(pE_dE_cut[i]);
539
540 // Sector-by-sector particle plots
541 if( react->HistBySector() ) {
542
543 for( unsigned int j = 0; j < set->GetNumberOfCDSectors(); ++j ) {
544
545 hname = "pE_dE_" + std::to_string(i) + "_" + std::to_string(j);
546 htitle = "Particle energy total versus energy loss for CD " + std::to_string(i);
547 htitle += ", sector " + std::to_string(j);
548 htitle += ";Energy total [keV];Energy loss [keV];Counts";
549 pE_dE_sec[i][j] = new TH2F( hname.data(), htitle.data(), PBIN, PMIN, PMAX, PBIN, PMIN, PMAX );
550 histlist->Add(pE_dE_sec[i][j]);
551
552 hname = "pE_dE_" + std::to_string(i) + "_" + std::to_string(j) + "_coinc";
553 htitle = "Particle energy total versus energy loss for CD " + std::to_string(i);
554 htitle += ", sector " + std::to_string(j) + ", coincident with a gamma-ray";
555 htitle += ";Energy total [keV];Energy loss [keV];Counts";
556 pE_dE_coinc_sec[i][j] = new TH2F( hname.data(), htitle.data(), PBIN, PMIN, PMAX, PBIN, PMIN, PMAX );
557 histlist->Add(pE_dE_coinc_sec[i][j]);
558
559 hname = "pE_dE_" + std::to_string(i) + "_" + std::to_string(j) + "_cut";
560 htitle = "Particle energy total versus energy loss for CD " + std::to_string(i);
561 htitle += ", sector " + std::to_string(j) + ", after transfer cut applied";
562 htitle += ";Energy total [keV];Energy loss [keV];Counts";
563 pE_dE_cut_sec[i][j] = new TH2F( hname.data(), htitle.data(), PBIN, PMIN, PMAX, PBIN, PMIN, PMAX );
564 histlist->Add(pE_dE_cut_sec[i][j]);
565
566 }
567
568 } // by sector
569
570 }
571
572 hname = "pBeta_theta_ejectile";
573 htitle = "Reconstructed ejectile velocity;Angle [deg];#beta [c];Counts";
574 pBeta_theta_ejectile = new TProfile( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data() );
576
577 hname = "pBeta_theta_recoil";
578 htitle = "Reconstructed recoil velocity;Angle [deg];#beta [c];Counts";
579 pBeta_theta_recoil = new TProfile( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data() );
581
582 hname = "particle_xy_map_forward";
583 htitle = "Particle X-Y hit map (#theta < 90);y (horizontal) [mm];x (vertical) [mm];Counts per mm^2";
584 particle_xy_map_forward = new TH2F( hname.data(), htitle.data(), 361, -45.125, 45.125, 361, -45.125, 45.125 );
586
587 hname = "particle_xy_map_backward";
588 htitle = "Particle X-Y hit map (#theta > 90);y (horizontal) [mm];x (vertical);Counts per mm^2";
589 particle_xy_map_backward = new TH2F( hname.data(), htitle.data(), 361, -45.125, 45.125, 361, -45.125, 45.125 );
591
592 hname = "particle_theta_phi_map";
593 htitle = "Particle #theta-#phi hit map;#theta [deg];#phi [deg];Counts";
594 particle_theta_phi_map = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), 180, -181, 181 );
596
597 // Gamma-particle coincidences without addback
598 if( react->HistWithoutAddback() ) {
599
600 dirname = "GammaRayParticleCoincidences";
601 output_file->mkdir( dirname.data() );
602 output_file->cd( dirname.data() );
603
604 hname = "gE_prompt";
605 htitle = "Gamma-ray energy in prompt coincide with any particle;Energy [keV];Counts per 0.5 keV";
606 gE_prompt = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
607 histlist->Add(gE_prompt);
608
609 hname = "gE_prompt_1p";
610 htitle = "Gamma-ray energy in prompt coincide with just 1 particle;Energy [keV];Counts per 0.5 keV";
611 gE_prompt_1p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
613
614 hname = "gE_prompt_2p";
615 htitle = "Gamma-ray energy in prompt coincide with 2 particles;Energy [keV];Counts per 0.5 keV";
616 gE_prompt_2p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
618
619 hname = "gE_random";
620 htitle = "Gamma-ray energy in random coincide with any particle;Energy [keV];Counts per 0.5 keV";
621 gE_random = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
622 histlist->Add(gE_random);
623
624 hname = "gE_random_1p";
625 htitle = "Gamma-ray energy in random coincide with just 1 particle;Energy [keV];Counts per 0.5 keV";
626 gE_random_1p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
628
629 hname = "gE_random_2p";
630 htitle = "Gamma-ray energy in random coincide with 2 particles;Energy [keV];Counts per 0.5 keV";
631 gE_random_2p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
633
634 hname = "gE_ejectile_dc_none";
635 htitle = "Gamma-ray energy, gated on the ejectile with random subtraction;";
636 htitle += "Energy [keV];Counts per 0.5 keV";
637 gE_ejectile_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
639
640 hname = "gE_ejectile_dc_ejectile";
641 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
642 htitle += "Energy [keV];Counts per 0.5 keV";
643 gE_ejectile_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
645
646 hname = "gE_ejectile_dc_recoil";
647 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
648 htitle += "Energy [keV];Counts per 0.5 keV";
649 gE_ejectile_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
651
652 hname = "gE_recoil_dc_none";
653 htitle = "Gamma-ray energy, gated on the recoil with random subtraction;";
654 htitle += "Energy [keV];Counts per 0.5 keV";
655 gE_recoil_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
657
658 hname = "gE_recoil_dc_ejectile";
659 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
660 htitle += "Energy [keV];Counts per 0.5 keV";
661 gE_recoil_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
663
664 hname = "gE_recoil_dc_recoil";
665 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
666 htitle += "Energy [keV];Counts per 0.5 keV";
667 gE_recoil_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
669
670 // 1p and 2p gamma-ray histograms
671 if( react->HistByMultiplicity() ){
672
673 hname = "gE_1p_ejectile_dc_none";
674 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only with random subtraction;";
675 htitle += "Energy [keV];Counts per 0.5 keV";
676 gE_1p_ejectile_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
678
679 hname = "gE_1p_ejectile_dc_ejectile";
680 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
681 htitle += "Energy [keV];Counts per 0.5 keV";
682 gE_1p_ejectile_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
684
685 hname = "gE_1p_ejectile_dc_recoil";
686 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
687 htitle += "Energy [keV];Counts per 0.5 keV";
688 gE_1p_ejectile_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
690
691 hname = "gE_1p_recoil_dc_none";
692 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only with random subtraction;";
693 htitle += "Energy [keV];Counts per 0.5 keV";
694 gE_1p_recoil_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
696
697 hname = "gE_1p_recoil_dc_ejectile";
698 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
699 htitle += "Energy [keV];Counts per 0.5 keV";
700 gE_1p_recoil_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
702
703 hname = "gE_1p_recoil_dc_recoil";
704 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
705 htitle += "Energy [keV];Counts per 0.5 keV";
706 gE_1p_recoil_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
708
709 hname = "gE_2p_dc_none";
710 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil with random subtraction;";
711 htitle += "Energy [keV];Counts per 0.5 keV";
712 gE_2p_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
714
715 hname = "gE_2p_dc_ejectile";
716 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
717 htitle += "Energy [keV];Counts per 0.5 keV";
718 gE_2p_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
720
721 hname = "gE_2p_dc_recoil";
722 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
723 htitle += "Energy [keV];Counts per 0.5 keV";
724 gE_2p_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
726
727 }
728
729 hname = "gE_vs_costheta_ejectile_dc_none";
730 htitle = "Gamma-ray energy versus cos(#theta) of angle between ejectile and gamma-ray, gated on the ejectile;Energy [keV];cos(#theta_p#gamma)";
731 gE_vs_costheta_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
733
734 hname = "gE_vs_costheta2_ejectile_dc_none";
735 htitle = "Gamma-ray energy versus cos(#theta) of angle between recoil and gamma-ray, gated on the ejectile;Energy [keV];cos(#theta_p#gamma)";
736 gE_vs_costheta2_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
738
739 hname = "gE_vs_costheta_ejectile_dc_ejectile";
740 htitle = "Gamma-ray energy versus cos(#theta) of angle between ejectile and gamma-ray, gated on the ejectile, Doppler corrected for the ejectile;Energy [keV];cos(#theta_p#gamma)";
741 gE_vs_costheta_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
743
744 hname = "gE_vs_costheta_ejectile_dc_recoil";
745 htitle = "Gamma-ray energy versus cos(#theta) of angle between recoil and gamma-ray, gated on the ejectile, Doppler corrected for the recoil;Energy [keV];cos(#theta_p#gamma)";
746 gE_vs_costheta_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
748
749 hname = "gE_vs_costheta_recoil_dc_none";
750 htitle = "Gamma-ray energy versus cos(#theta) of angle between recoil and gamma-ray, gated on the recoil, no Doppler correction;Energy [keV];cos(#theta_p#gamma)";
751 gE_vs_costheta_recoil_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
753
754 hname = "gE_vs_costheta2_recoil_dc_none";
755 htitle = "Gamma-ray energy versus cos(#theta) of angle between ejectile and gamma-ray, gated on the recoil, no Doppler correction;Energy [keV];cos(#theta_p#gamma)";
756 gE_vs_costheta2_recoil_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
758
759 hname = "gE_vs_costheta_recoil_dc_ejectile";
760 htitle = "Gamma-ray energy versus cos(#theta) of angle between ejectile and gamma-ray, gated on the recoil, Doppler corrected for the ejectile;Energy [keV];cos(#theta_p#gamma)";
761 gE_vs_costheta_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
763
764 hname = "gE_vs_costheta_recoil_dc_recoil";
765 htitle = "Gamma-ray energy versus cos(#theta) of angle between recoil and gamma-ray, gated on the recoil, Doppler corrected for the recoil;Energy [keV];cos(#theta_p#gamma)";
766 gE_vs_costheta_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
768
769 hname = "gE_vs_theta_ejectile_dc_none";
770 htitle = "Gamma-ray energy, gated on the ejectile with random subtraction;";
771 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
772 gE_vs_theta_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
774
775 hname = "gE_vs_theta_ejectile_dc_ejectile";
776 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
777 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
778 gE_vs_theta_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
780
781 hname = "gE_vs_theta_ejectile_dc_recoil";
782 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
783 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
784 gE_vs_theta_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
786
787 hname = "gE_vs_theta_recoil_dc_none";
788 htitle = "Gamma-ray energy, gated on the recoil with random subtraction;";
789 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
790 gE_vs_theta_recoil_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
792
793 hname = "gE_vs_theta_recoil_dc_ejectile";
794 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
795 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
796 gE_vs_theta_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
798
799 hname = "gE_vs_theta_recoil_dc_recoil";
800 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
801 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
802 gE_vs_theta_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
804
805 // 1p and 2p gamma-ray histograms
806 if( react->HistByMultiplicity() ){
807
808 hname = "gE_vs_theta_1p_ejectile_dc_none";
809 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only with random subtraction;";
810 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
811 gE_vs_theta_1p_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
813
814 hname = "gE_vs_theta_1p_ejectile_dc_ejectile";
815 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
816 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
817 gE_vs_theta_1p_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
819
820 hname = "gE_vs_theta_1p_ejectile_dc_recoil";
821 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
822 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
823 gE_vs_theta_1p_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
825
826 hname = "gE_vs_theta_1p_recoil_dc_none";
827 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only with random subtraction;";
828 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
829 gE_vs_theta_1p_recoil_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
831
832 hname = "gE_vs_theta_1p_recoil_dc_ejectile";
833 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
834 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
835 gE_vs_theta_1p_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
837
838 hname = "gE_vs_theta_1p_recoil_dc_recoil";
839 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
840 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
841 gE_vs_theta_1p_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
843
844 hname = "gE_vs_theta_2p_dc_none";
845 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil with random subtraction;";
846 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
847 gE_vs_theta_2p_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
849
850 hname = "gE_vs_theta_2p_dc_ejectile";
851 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
852 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
853 gE_vs_theta_2p_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
855
856 hname = "gE_vs_theta_2p_dc_recoil";
857 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
858 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
859 gE_vs_theta_2p_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
861
862 }
863
864 // Per crystal Doppler-corrected spectra
865 if( react->HistByCrystal() ) {
866
867 hname = "gE_vs_crystal_ejectile_dc_none";
868 htitle = "Gamma-ray energy, gated on the ejectile with random subtraction;";
869 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
870 gE_vs_crystal_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
872
873 hname = "gE_vs_crystal_ejectile_dc_ejectile";
874 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
875 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
876 gE_vs_crystal_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
878
879 hname = "gE_vs_crystal_ejectile_dc_recoil";
880 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
881 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
882 gE_vs_crystal_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
884
885 hname = "gE_vs_crystal_recoil_dc_none";
886 htitle = "Gamma-ray energy, gated on the recoil with random subtraction;";
887 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
888 gE_vs_crystal_recoil_dc_none = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
890
891 hname = "gE_vs_crystal_recoil_dc_ejectile";
892 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
893 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
894 gE_vs_crystal_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
896
897 hname = "gE_vs_crystal_recoil_dc_recoil";
898 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
899 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
900 gE_vs_crystal_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
902
903 // 1p and 2p gamma-ray histograms
904 if( react->HistByMultiplicity() ){
905
906 hname = "gE_vs_crystal_1p_ejectile_dc_none";
907 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only with random subtraction;";
908 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
909 gE_vs_crystal_1p_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
911
912 hname = "gE_vs_crystal_1p_ejectile_dc_ejectile";
913 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
914 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
915 gE_vs_crystal_1p_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
917
918 hname = "gE_vs_crystal_1p_ejectile_dc_recoil";
919 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
920 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
921 gE_vs_crystal_1p_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
923
924 hname = "gE_vs_crystal_1p_recoil_dc_none";
925 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only with random subtraction;";
926 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
927 gE_vs_crystal_1p_recoil_dc_none = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
929
930 hname = "gE_vs_crystal_1p_recoil_dc_ejectile";
931 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
932 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
933 gE_vs_crystal_1p_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
935
936 hname = "gE_vs_crystal_1p_recoil_dc_recoil";
937 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
938 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
939 gE_vs_crystal_1p_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
941
942 hname = "gE_vs_crystal_2p_dc_none";
943 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil with random subtraction;";
944 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
945 gE_vs_crystal_2p_dc_none = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
947
948 hname = "gE_vs_crystal_2p_dc_ejectile";
949 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
950 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
951 gE_vs_crystal_2p_dc_ejectile = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
953
954 hname = "gE_vs_crystal_2p_dc_recoil";
955 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
956 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
957 gE_vs_crystal_2p_dc_recoil = new TH2F( hname.data(), htitle.data(), ncry, -0.5, ncry-0.5, GBIN, GMIN, GMAX );
959
960 }
961
962 } // by crystal
963
964 // T1 impact time
965 if( react->HistByT1() ) {
966
967 hname = "gE_ejectile_dc_none_t1";
968 htitle = "Gamma-ray energy, gated on the ejectile, with random subtraction;";
969 htitle += "T1 time [ns];Energy [keV];Counts per keV";
970 gE_ejectile_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
972
973 hname = "gE_ejectile_dc_ejectile_t1";
974 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
975 htitle += "T1 time [ns];Energy [keV];Counts per keV";
976 gE_ejectile_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
978
979 hname = "gE_ejectile_dc_recoil_t1";
980 htitle = "Gamma-ray energy, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
981 htitle += "T1 time [ns];Energy [keV];Counts per keV";
982 gE_ejectile_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
984
985 hname = "gE_recoil_dc_none_t1";
986 htitle = "Gamma-ray energy, gated on the recoil, with random subtraction;";
987 htitle += "T1 time [ns];Energy [keV];Counts per keV";
988 gE_recoil_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
990
991 hname = "gE_recoil_dc_ejectile_t1";
992 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
993 htitle += "T1 time [ns];Energy [keV];Counts per keV";
994 gE_recoil_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
996
997 hname = "gE_recoil_dc_recoil_t1";
998 htitle = "Gamma-ray energy, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
999 htitle += "T1 time [ns];Energy [keV];Counts per eV";
1000 gE_recoil_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1002
1003 // 1p and 2p gamma-ray histograms
1004 if( react->HistByMultiplicity() ){
1005
1006 hname = "gE_1p_ejectile_dc_none_t1";
1007 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, with random subtraction;";
1008 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1009 gE_1p_ejectile_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1011
1012 hname = "gE_1p_ejectile_dc_ejectile_t1";
1013 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1014 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1015 gE_1p_ejectile_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1017
1018 hname = "gE_1p_ejectile_dc_recoil_t1";
1019 htitle = "Gamma-ray energy, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1020 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1021 gE_1p_ejectile_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1023
1024 hname = "gE_1p_recoil_dc_none_t1";
1025 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, with random subtraction;";
1026 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1027 gE_1p_recoil_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1029
1030 hname = "gE_1p_recoil_dc_ejectile_t1";
1031 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1032 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1033 gE_1p_recoil_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1035
1036 hname = "gE_1p_recoil_dc_recoil_t1";
1037 htitle = "Gamma-ray energy, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1038 htitle += "T1 time [ns];Energy [keV];Counts per eV";
1039 gE_1p_recoil_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1041
1042 hname = "gE_2p_dc_none_t1";
1043 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil with random subtraction;";
1044 htitle += "Energy [keV];Counts per keV";
1045 gE_2p_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1047
1048 hname = "gE_2p_dc_ejectile_t1";
1049 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
1050 htitle += "Energy [keV];Counts per keV";
1051 gE_2p_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1053
1054 hname = "gE_2p_dc_recoil_t1";
1055 htitle = "Gamma-ray energy, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
1056 htitle += "Energy [keV];Counts per keV";
1057 gE_2p_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1059
1060 }
1061
1062 }
1063 // Gamma-gamma hists
1064 if( react->HistGammaGamma() ) {
1065
1066 hname = "ggE_ejectile_dc_none";
1067 htitle = "Gamma-gamma matrix, gated on the ejectile with random subtraction;";
1068 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1069 ggE_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1071
1072 hname = "ggE_ejectile_dc_ejectile";
1073 htitle = "Gamma-gamma matrix, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1074 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1075 ggE_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1077
1078 hname = "ggE_ejectile_dc_recoil";
1079 htitle = "Gamma-gamma matrix, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1080 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1081 ggE_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1083
1084 hname = "ggE_recoil_dc_none";
1085 htitle = "Gamma-gamma matrix, gated on the recoil with random subtraction;";
1086 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1087 ggE_recoil_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1089
1090 hname = "ggE_recoil_dc_ejectile";
1091 htitle = "Gamma-gamma matrix, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1092 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1093 ggE_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1095
1096 hname = "ggE_recoil_dc_recoil";
1097 htitle = "Gamma-gamma matrix, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1098 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1099 ggE_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1101
1102 }
1103
1104 }
1105
1106
1107 // Gamma-particle coincidences with addback
1108 if( react->HistWithAddback() ) {
1109
1110 dirname = "GammaRayAddbackParticleCoincidences";
1111 output_file->mkdir( dirname.data() );
1112 output_file->cd( dirname.data() );
1113
1114 hname = "aE_prompt";
1115 htitle = "Gamma-ray energy with addback in prompt coincide with any particle;Energy [keV];Counts per 0.5 keV";
1116 aE_prompt = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1117 histlist->Add(aE_prompt);
1118
1119 hname = "aE_prompt_1p";
1120 htitle = "Gamma-ray energy with addback in prompt coincide with just 1 particle;Energy [keV];Counts per 0.5 keV";
1121 aE_prompt_1p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1122 histlist->Add(aE_prompt_1p);
1123
1124 hname = "aE_prompt_2p";
1125 htitle = "Gamma-ray energy with addback in prompt coincide with 2 particles;Energy [keV];Counts per 0.5 keV";
1126 aE_prompt_2p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1127 histlist->Add(aE_prompt_2p);
1128
1129 hname = "aE_random";
1130 htitle = "Gamma-ray energy with addback in random coincide with any particle;Energy [keV];Counts per 0.5 keV";
1131 aE_random = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1132 histlist->Add(aE_random);
1133
1134 hname = "aE_random_1p";
1135 htitle = "Gamma-ray energy with addback in random coincide with just 1 particle;Energy [keV];Counts per 0.5 keV";
1136 aE_random_1p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1137 histlist->Add(aE_random_1p);
1138
1139 hname = "aE_random_2p";
1140 htitle = "Gamma-ray energy with addback in random coincide with 2 particles;Energy [keV];Counts per 0.5 keV";
1141 aE_random_2p = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1142 histlist->Add(aE_random_2p);
1143
1144 hname = "aE_ejectile_dc_none";
1145 htitle = "Gamma-ray energy with addback, gated on the ejectile with random subtraction;";
1146 htitle += "Energy [keV];Counts per 0.5 keV";
1147 aE_ejectile_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1149
1150 hname = "aE_ejectile_dc_ejectile";
1151 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1152 htitle += "Energy [keV];Counts per 0.5 keV";
1153 aE_ejectile_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1155
1156 hname = "aE_ejectile_dc_recoil";
1157 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1158 htitle += "Energy [keV];Counts per 0.5 keV";
1159 aE_ejectile_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1161
1162 hname = "aE_recoil_dc_none";
1163 htitle = "Gamma-ray energy with addback, gated on the recoil with random subtraction;";
1164 htitle += "Energy [keV];Counts per 0.5 keV";
1165 aE_recoil_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1167
1168 hname = "aE_recoil_dc_ejectile";
1169 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1170 htitle += "Energy [keV];Counts per 0.5 keV";
1171 aE_recoil_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1173
1174 hname = "aE_recoil_dc_recoil";
1175 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1176 htitle += "Energy [keV];Counts per 0.5 keV";
1177 aE_recoil_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1179
1180 // 1p and 2p gamma-ray histograms
1181 if( react->HistByMultiplicity() ){
1182
1183 hname = "aE_1p_ejectile_dc_none";
1184 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only with random subtraction;";
1185 htitle += "Energy [keV];Counts per 0.5 keV";
1186 aE_1p_ejectile_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1188
1189 hname = "aE_1p_ejectile_dc_ejectile";
1190 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1191 htitle += "Energy [keV];Counts per 0.5 keV";
1192 aE_1p_ejectile_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1194
1195 hname = "aE_1p_ejectile_dc_recoil";
1196 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1197 htitle += "Energy [keV];Counts per 0.5 keV";
1198 aE_1p_ejectile_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1200
1201 hname = "aE_1p_recoil_dc_none";
1202 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only with random subtraction;";
1203 htitle += "Energy [keV];Counts per 0.5 keV";
1204 aE_1p_recoil_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1206
1207 hname = "aE_1p_recoil_dc_ejectile";
1208 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1209 htitle += "Energy [keV];Counts per 0.5 keV";
1210 aE_1p_recoil_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1212
1213 hname = "aE_1p_recoil_dc_recoil";
1214 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1215 htitle += "Energy [keV];Counts per 0.5 keV";
1216 aE_1p_recoil_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1218
1219 hname = "aE_2p_dc_none";
1220 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil with random subtraction;";
1221 htitle += "Energy [keV];Counts per 0.5 keV";
1222 aE_2p_dc_none = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1223 histlist->Add(aE_2p_dc_none);
1224
1225 hname = "aE_2p_dc_ejectile";
1226 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
1227 htitle += "Energy [keV];Counts per 0.5 keV";
1228 aE_2p_dc_ejectile = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1230
1231 hname = "aE_2p_dc_recoil";
1232 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
1233 htitle += "Energy [keV];Counts per 0.5 keV";
1234 aE_2p_dc_recoil = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
1236
1237 }
1238
1239 hname = "aE_vs_costheta_ejectile_dc_none";
1240 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between ejectile and gamma-ray, gated on the ejectile;Energy [keV];cos(#theta_p#gamma)";
1241 aE_vs_costheta_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1243
1244 hname = "aE_vs_costheta2_ejectile_dc_none";
1245 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between recoil and gamma-ray, gated on the ejectile;Energy [keV];cos(#theta_p#gamma)";
1246 aE_vs_costheta2_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1248
1249 hname = "aE_vs_costheta_ejectile_dc_ejectile";
1250 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between ejectile and gamma-ray, gated on the ejectile, Doppler corrected for the ejectile;Energy [keV];cos(#theta_p#gamma)";
1251 aE_vs_costheta_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1253
1254 hname = "aE_vs_costheta_ejectile_dc_recoil";
1255 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between recoil and gamma-ray, gated on the ejectile, Doppler corrected for the recoil;Energy [keV];cos(#theta_p#gamma)";
1256 aE_vs_costheta_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1258
1259 hname = "aE_vs_costheta_recoil_dc_none";
1260 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between recoil and gamma-ray, gated on the recoil, no Doppler correction;Energy [keV];cos(#theta_p#gamma)";
1261 aE_vs_costheta_recoil_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1263
1264 hname = "aE_vs_costheta2_recoil_dc_none";
1265 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between ejectile and gamma-ray, gated on the recoil, no Doppler correction;Energy [keV];cos(#theta_p#gamma)";
1266 aE_vs_costheta2_recoil_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1268
1269 hname = "aE_vs_costheta_recoil_dc_ejectile";
1270 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between ejectile and gamma-ray, gated on the recoil, Doppler corrected for the ejectile;Energy [keV];cos(#theta_p#gamma)";
1271 aE_vs_costheta_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1273
1274 hname = "aE_vs_costheta_recoil_dc_recoil";
1275 htitle = "Gamma-ray energy with addback versus cos(#theta) of angle between recoil and gamma-ray, gated on the recoil, Doppler corrected for the recoil;Energy [keV];cos(#theta_p#gamma)";
1276 aE_vs_costheta_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, 100, -1.0, 1.0 );
1278
1279 hname = "aE_vs_theta_ejectile_dc_none";
1280 htitle = "Gamma-ray energy with addback, gated on the ejectile with random subtraction;";
1281 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1282 aE_vs_theta_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1284
1285 hname = "aE_vs_theta_ejectile_dc_ejectile";
1286 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1287 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1288 aE_vs_theta_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1290
1291 hname = "aE_vs_theta_ejectile_dc_recoil";
1292 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1293 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1294 aE_vs_theta_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1296
1297 hname = "aE_vs_theta_recoil_dc_none";
1298 htitle = "Gamma-ray energy with addback, gated on the recoil with random subtraction;";
1299 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1300 aE_vs_theta_recoil_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1302
1303 hname = "aE_vs_theta_recoil_dc_ejectile";
1304 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1305 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1306 aE_vs_theta_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1308
1309 hname = "aE_vs_theta_recoil_dc_recoil";
1310 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1311 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1312 aE_vs_theta_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1314
1315 // 1p and 2p gamma-ray histograms
1316 if( react->HistByMultiplicity() ){
1317
1318 hname = "aE_1p_vs_theta_1p_ejectile_dc_none";
1319 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only with random subtraction;";
1320 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1321 aE_vs_theta_1p_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1323
1324 hname = "aE_vs_theta_1p_ejectile_dc_ejectile";
1325 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1326 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1327 aE_vs_theta_1p_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1329
1330 hname = "aE_vs_theta_1p_ejectile_dc_recoil";
1331 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1332 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1333 aE_vs_theta_1p_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1335
1336 hname = "aE_vs_theta_1p_recoil_dc_none";
1337 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only with random subtraction;";
1338 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1339 aE_vs_theta_1p_recoil_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1341
1342 hname = "aE_vs_theta_1p_recoil_dc_ejectile";
1343 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1344 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1345 aE_vs_theta_1p_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1347
1348 hname = "aE_vs_theta_1p_recoil_dc_recoil";
1349 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1350 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1351 aE_vs_theta_1p_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1353
1354 hname = "aE_vs_theta_2p_dc_none";
1355 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil with random subtraction;";
1356 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1357 aE_vs_theta_2p_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1359
1360 hname = "aE_vs_theta_2p_dc_ejectile";
1361 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
1362 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1363 aE_vs_theta_2p_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1365
1366 hname = "aE_vs_theta_2p_dc_recoil";
1367 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
1368 htitle += "Theta [deg];Energy [keV];Counts per 0.5 keV per strip";
1369 aE_vs_theta_2p_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), GBIN, GMIN, GMAX );
1371
1372 }
1373
1374 // Per crystal Doppler-corrected spectra
1375 if( react->HistByCrystal() ) {
1376
1377 hname = "aE_vs_crystal_ejectile_dc_none";
1378 htitle = "Gamma-ray energy with addback, gated on the ejectile with random subtraction;";
1379 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1380 aE_vs_crystal_ejectile_dc_none = new TH2F( hname.data(), htitle.data(),
1381 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1383
1384 hname = "aE_vs_crystal_ejectile_dc_ejectile";
1385 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1386 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1387 aE_vs_crystal_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(),
1388 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1390
1391 hname = "aE_vs_crystal_ejectile_dc_recoil";
1392 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1393 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1394 aE_vs_crystal_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(),
1395 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1397
1398 hname = "aE_vs_crystal_recoil_dc_none";
1399 htitle = "Gamma-ray energy with addback, gated on the recoil with random subtraction;";
1400 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1401 aE_vs_crystal_recoil_dc_none = new TH2F( hname.data(), htitle.data(),
1402 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1404
1405 hname = "aE_vs_crystal_recoil_dc_ejectile";
1406 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1407 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1408 aE_vs_crystal_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(),
1409 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1411
1412 hname = "aE_vs_crystal_recoil_dc_recoil";
1413 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1414 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1415 aE_vs_crystal_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(),
1416 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1418
1419 // 1p and 2p gamma-ray histograms
1420 if( react->HistByMultiplicity() ){
1421
1422 hname = "aE_vs_crystal_1p_ejectile_dc_none";
1423 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only with random subtraction;";
1424 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1425 aE_vs_crystal_1p_ejectile_dc_none = new TH2F( hname.data(), htitle.data(),
1426 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1428
1429 hname = "aE_vs_crystal_1p_ejectile_dc_ejectile";
1430 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1431 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1432 aE_vs_crystal_1p_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(),
1433 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1435
1436 hname = "aE_vs_crystal_1p_ejectile_dc_recoil";
1437 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1438 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1439 aE_vs_crystal_1p_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(),
1440 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1442
1443 hname = "aE_vs_crystal_1p_recoil_dc_none";
1444 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only with random subtraction;";
1445 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1446 aE_vs_crystal_1p_recoil_dc_none = new TH2F( hname.data(), htitle.data(),
1447 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1449
1450 hname = "aE_vs_crystal_1p_recoil_dc_ejectile";
1451 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1452 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1453 aE_vs_crystal_1p_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(),
1454 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1456
1457 hname = "aE_vs_crystal_1p_recoil_dc_recoil";
1458 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1459 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1460 aE_vs_crystal_1p_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(),
1461 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1463
1464 hname = "aE_vs_crystal_2p_dc_none";
1465 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil with random subtraction;";
1466 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1467 aE_vs_crystal_2p_dc_none = new TH2F( hname.data(), htitle.data(),
1468 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1470
1471 hname = "aE_vs_crystal_2p_dc_ejectile";
1472 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
1473 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1474 aE_vs_crystal_2p_dc_ejectile = new TH2F( hname.data(), htitle.data(),
1475 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1477
1478 hname = "aE_vs_crystal_2p_dc_recoil";
1479 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
1480 htitle += "Crystal ID;Energy [keV];Counts per 0.5 keV per strip";
1481 aE_vs_crystal_2p_dc_recoil = new TH2F( hname.data(), htitle.data(),
1482 set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals(), -0.5, set->GetNumberOfMiniballClusters() * set->GetNumberOfMiniballCrystals() - 0.5, GBIN, GMIN, GMAX );
1484
1485 }
1486
1487 } // by crystal
1488
1489 // T1 impact time
1490 if( react->HistByT1() ) {
1491
1492 hname = "aE_ejectile_dc_none_t1";
1493 htitle = "Gamma-ray energy with addback, gated on the ejectile, with random subtraction;";
1494 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1495 aE_ejectile_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1497
1498 hname = "aE_ejectile_dc_ejectile_t1";
1499 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1500 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1501 aE_ejectile_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1503
1504 hname = "aE_ejectile_dc_recoil_t1";
1505 htitle = "Gamma-ray energy with addback, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1506 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1507 aE_ejectile_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1509
1510 hname = "aE_recoil_dc_none_t1";
1511 htitle = "Gamma-ray energy with addback, gated on the recoil, with random subtraction;";
1512 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1513 aE_recoil_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1515
1516 hname = "aE_recoil_dc_ejectile_t1";
1517 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1518 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1519 aE_recoil_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1521
1522 hname = "aE_recoil_dc_recoil_t1";
1523 htitle = "Gamma-ray energy with addback, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1524 htitle += "T1 time [ns];Energy [keV];Counts per eV";
1525 aE_recoil_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1527
1528 // 1p and 2p gamma-ray histograms
1529 if( react->HistByMultiplicity() ){
1530
1531 hname = "aE_1p_ejectile_dc_none_t1";
1532 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, with random subtraction;";
1533 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1534 aE_1p_ejectile_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1536
1537 hname = "aE_1p_ejectile_dc_ejectile_t1";
1538 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1539 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1540 aE_1p_ejectile_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1542
1543 hname = "aE_1p_ejectile_dc_recoil_t1";
1544 htitle = "Gamma-ray energy with addback, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1545 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1546 aE_1p_ejectile_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1548
1549 hname = "aE_1p_recoil_dc_none_t1";
1550 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, with random subtraction;";
1551 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1552 aE_1p_recoil_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1554
1555 hname = "aE_1p_recoil_dc_ejectile_t1";
1556 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1557 htitle += "T1 time [ns];Energy [keV];Counts per keV";
1558 aE_1p_recoil_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1560
1561 hname = "aE_1p_recoil_dc_recoil_t1";
1562 htitle = "Gamma-ray energy with addback, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1563 htitle += "T1 time [ns];Energy [keV];Counts per eV";
1564 aE_1p_recoil_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1566
1567 hname = "aE_2p_dc_none_t1";
1568 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, with random subtraction;";
1569 htitle += "Energy [keV];Counts per keV";
1570 aE_2p_dc_none_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1572
1573 hname = "aE_2p_dc_ejectile_t1";
1574 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
1575 htitle += "Energy [keV];Counts per keV";
1576 aE_2p_dc_ejectile_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1578
1579 hname = "aE_2p_dc_recoil_t1";
1580 htitle = "Gamma-ray energy with addback, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
1581 htitle += "Energy [keV];Counts per keV";
1582 aE_2p_dc_recoil_t1 = new TH2F( hname.data(), htitle.data(), T1BIN, T1MIN, T1MAX, GBIN, GMIN, GMAX );
1584
1585 }
1586
1587 }
1588
1589 // Gamma-gamma hists
1590 if( react->HistGammaGamma() ) {
1591
1592 hname = "aaE_ejectile_dc_none";
1593 htitle = "Gamma-gamma matrix with addback, gated on the ejectile with random subtraction;";
1594 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1595 aaE_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1597
1598 hname = "aaE_ejectile_dc_ejectile";
1599 htitle = "Gamma-gamma matrix with addback, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1600 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1601 aaE_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1603
1604 hname = "aaE_ejectile_dc_recoil";
1605 htitle = "Gamma-gamma matrix with addback, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1606 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1607 aaE_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1609
1610 hname = "aaE_recoil_dc_none";
1611 htitle = "Gamma-gamma matrix with addback, gated on the recoil with random subtraction;";
1612 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1613 aaE_recoil_dc_none = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1615
1616 hname = "aaE_recoil_dc_ejectile";
1617 htitle = "Gamma-gamma matrix with addback, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1618 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1619 aaE_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1621
1622 hname = "aaE_recoil_dc_recoil";
1623 htitle = "Gamma-gamma matrix with addback, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1624 htitle += "Gamma-ray Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1625 aaE_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
1627
1628 }
1629
1630 }
1631
1632 // Segment phi determination
1633 if( react->HistSegmentPhi() && react->HistWithoutAddback() ) {
1634
1635 dirname = "SegmentPhiDetermination";
1636 output_file->mkdir( dirname.data() );
1637 output_file->cd( dirname.data() );
1638
1639 unsigned int nsegs = set->GetNumberOfMiniballClusters();
1640 nsegs *= set->GetNumberOfMiniballCrystals();
1641 nsegs *= set->GetNumberOfMiniballSegments();
1642
1643 gE_vs_phi_dc_ejectile.resize( nsegs );
1644 gE_vs_phi_dc_recoil.resize( nsegs );
1645
1646 for ( unsigned int i = 0; i < nsegs; i++ ) {
1647
1648 hname = "gE_vs_phi_dc_ejectile_seg";
1649 hname += std::to_string(i);
1650 htitle = "Gamma-ray energy versus segment phi angle, Doppler corrected for the ejectile with random subtraction;";
1651 htitle += "Phi angle of segment " + std::to_string(i) + ";Gamma-ray Energy [keV];Counts";
1652 gE_vs_phi_dc_ejectile[i] = new TH2F( hname.data(), htitle.data(), 360, -0.5, 359.5, GBIN, GMIN, GMAX );
1654
1655 hname = "gE_vs_phi_dc_recoil_seg";
1656 hname += std::to_string(i);
1657 htitle = "Gamma-ray energy versus segment phi angle, Doppler corrected for the recoil with random subtraction;";
1658 htitle += "Phi angle of segment " + std::to_string(i) + ";Gamma-ray Energy [keV];Counts";
1659 gE_vs_phi_dc_recoil[i] = new TH2F( hname.data(), htitle.data(), 360, -0.5, 359.5, GBIN, GMIN, GMAX );
1661
1662 }
1663
1664 }
1665
1666 // Electron-particle coincidences
1667 if( react->HistElectron() ) {
1668
1669 dirname = "ElectronParticleCoincidences";
1670 output_file->mkdir( dirname.data() );
1671 output_file->cd( dirname.data() );
1672
1673 hname = "eE_prompt";
1674 htitle = "Electron energy in prompt coincide with any particle;Energy [keV];Counts per keV";
1675 eE_prompt = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1676 histlist->Add(eE_prompt);
1677
1678 hname = "eE_prompt_1p";
1679 htitle = "Electron energy in prompt coincide with just 1 particle;Energy [keV];Counts per keV";
1680 eE_prompt_1p = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1681 histlist->Add(eE_prompt_1p);
1682
1683 hname = "eE_prompt_2p";
1684 htitle = "Electron energy in prompt coincide with 2 particles;Energy [keV];Counts per keV";
1685 eE_prompt_2p = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1686 histlist->Add(eE_prompt_2p);
1687
1688 hname = "eE_random";
1689 htitle = "Electron energy in random coincide with any particle;Energy [keV];Counts per keV";
1690 eE_random = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1691 histlist->Add(eE_random);
1692
1693 hname = "eE_random_1p";
1694 htitle = "Electron energy in random coincide with just 1 particle;Energy [keV];Counts per keV";
1695 eE_random_1p = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1696 histlist->Add(eE_random_1p);
1697
1698 hname = "eE_random_2p";
1699 htitle = "Electron energy in random coincide with 2 particles;Energy [keV];Counts per keV";
1700 eE_random_2p = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1701 histlist->Add(eE_random_2p);
1702
1703 hname = "eE_ejectile_dc_none";
1704 htitle = "Electron energy, gated on the ejectile with random subtraction;";
1705 htitle += "Energy [keV];Counts per keV";
1706 eE_ejectile_dc_none = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1708
1709 hname = "eE_ejectile_dc_ejectile";
1710 htitle = "Electron energy, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1711 htitle += "Energy [keV];Counts per keV";
1712 eE_ejectile_dc_ejectile = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1714
1715 hname = "eE_ejectile_dc_recoil";
1716 htitle = "Electron energy, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1717 htitle += "Energy [keV];Counts per keV";
1718 eE_ejectile_dc_recoil = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1720
1721 hname = "eE_recoil_dc_none";
1722 htitle = "Electron energy, gated on the recoil with random subtraction;";
1723 htitle += "Energy [keV];Counts per keV";
1724 eE_recoil_dc_none = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1726
1727 hname = "eE_recoil_dc_ejectile";
1728 htitle = "Electron energy, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1729 htitle += "Energy [keV];Counts per keV";
1730 eE_recoil_dc_ejectile = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1732
1733 hname = "eE_recoil_dc_recoil";
1734 htitle = "Electron energy, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1735 htitle += "Energy [keV];Counts per keV";
1736 eE_recoil_dc_recoil = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1738
1739 // 1p and 2p gamma-ray histograms
1740 if( react->HistByMultiplicity() ){
1741
1742 hname = "eE_1p_ejectile_dc_none";
1743 htitle = "Electron energy, gated on the ejectile, 1-particle only with random subtraction;";
1744 htitle += "Energy [keV];Counts per keV";
1745 eE_1p_ejectile_dc_none = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1747
1748 hname = "eE_1p_ejectile_dc_ejectile";
1749 htitle = "Electron energy, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1750 htitle += "Energy [keV];Counts per keV";
1751 eE_1p_ejectile_dc_ejectile = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1753
1754 hname = "eE_1p_ejectile_dc_recoil";
1755 htitle = "Electron energy, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1756 htitle += "Energy [keV];Counts per keV";
1757 eE_1p_ejectile_dc_recoil = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1759
1760 hname = "eE_1p_recoil_dc_none";
1761 htitle = "Electron energy, gated on the recoil, 1-particle only with random subtraction;";
1762 htitle += "Energy [keV];Counts per keV";
1763 eE_1p_recoil_dc_none = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1765
1766 hname = "eE_1p_recoil_dc_ejectile";
1767 htitle = "Electron energy, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1768 htitle += "Energy [keV];Counts per keV";
1769 eE_1p_recoil_dc_ejectile = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1771
1772 hname = "eE_1p_recoil_dc_recoil";
1773 htitle = "Electron energy, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1774 htitle += "Energy [keV];Counts per keV";
1775 eE_1p_recoil_dc_recoil = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1777
1778 hname = "eE_2p_dc_none";
1779 htitle = "Electron energy, in coincidence with ejectile and recoil with random subtraction;";
1780 htitle += "Energy [keV];Counts per keV";
1781 eE_2p_dc_none = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1782 histlist->Add(eE_2p_dc_none);
1783
1784 hname = "eE_2p_dc_ejectile";
1785 htitle = "Electron energy, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
1786 htitle += "Energy [keV];Counts per keV";
1787 eE_2p_dc_ejectile = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1789
1790 hname = "eE_2p_dc_recoil";
1791 htitle = "Electron energy, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
1792 htitle += "Energy [keV];Counts per keV";
1793 eE_2p_dc_recoil = new TH1F( hname.data(), htitle.data(), EBIN, EMIN, EMAX );
1795
1796 }
1797
1798 hname = "eE_vs_theta_ejectile_dc_none";
1799 htitle = "Electron energy, gated on the ejectile with random subtraction;";
1800 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1801 eE_vs_theta_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1803
1804 hname = "eE_vs_theta_ejectile_dc_ejectile";
1805 htitle = "Electron energy, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1806 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1807 eE_vs_theta_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1809
1810 hname = "eE_vs_theta_ejectile_dc_recoil";
1811 htitle = "Electron energy, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1812 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1813 eE_vs_theta_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1815
1816 hname = "eE_vs_theta_recoil_dc_none";
1817 htitle = "Electron energy, gated on the recoil with random subtraction;";
1818 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1819 eE_vs_theta_recoil_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1821
1822 hname = "eE_vs_theta_recoil_dc_ejectile";
1823 htitle = "Electron energy, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1824 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1825 eE_vs_theta_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1827
1828 hname = "eE_vs_theta_recoil_dc_recoil";
1829 htitle = "Electron energy, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1830 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1831 eE_vs_theta_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1833
1834 // 1p and 2p gamma-ray histograms
1835 if( react->HistByMultiplicity() ){
1836
1837 hname = "eE_vs_theta_1p_ejectile_dc_none";
1838 htitle = "Electron energy, gated on the ejectile, 1-particle only with random subtraction;";
1839 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1840 eE_vs_theta_1p_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1842
1843 hname = "eE_vs_theta_1p_ejectile_dc_ejectile";
1844 htitle = "Electron energy, gated on the ejectile, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1845 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1846 eE_vs_theta_1p_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1848
1849 hname = "eE_vs_theta_1p_ejectile_dc_recoil";
1850 htitle = "Electron energy, gated on the ejectile, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1851 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1852 eE_vs_theta_1p_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1854
1855 hname = "eE_vs_theta_1p_recoil_dc_none";
1856 htitle = "Electron energy, gated on the recoil, 1-particle only with random subtraction;";
1857 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1858 eE_vs_theta_1p_recoil_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1860
1861 hname = "eE_vs_theta_1p_recoil_dc_ejectile";
1862 htitle = "Electron energy, gated on the recoil, 1-particle only, Doppler corrected for the ejectile with random subtraction;";
1863 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1864 eE_vs_theta_1p_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1866
1867 hname = "eE_vs_theta_1p_recoil_dc_recoil";
1868 htitle = "Electron energy, gated on the recoil, 1-particle only, Doppler corrected for the recoil with random subtraction;";
1869 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1870 eE_vs_theta_1p_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1872
1873 hname = "eE_vs_theta_2p_dc_none";
1874 htitle = "Electron energy, in coincidence with ejectile and recoil with random subtraction;";
1875 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1876 eE_vs_theta_2p_dc_none = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1878
1879 hname = "eE_vs_theta_2p_dc_ejectile";
1880 htitle = "Electron energy, in coincidence with ejectile and recoil, Doppler corrected for the ejectile with random subtraction;";
1881 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1882 eE_vs_theta_2p_dc_ejectile = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1884
1885 hname = "eE_vs_theta_2p_dc_recoil";
1886 htitle = "Electron energy, in coincidence with ejectile and recoil, Doppler corrected for the recoil with random subtraction;";
1887 htitle += "Theta [deg];Energy [keV];Counts per keV per strip";
1888 eE_vs_theta_2p_dc_recoil = new TH2F( hname.data(), htitle.data(), react->GetNumberOfParticleThetas(), react->GetParticleThetas().data(), EBIN, EMIN, EMAX );
1890
1891 }
1892
1893 hname = "eE_costheta_ejectile";
1894 htitle = "Electron energy versus cos(#theta) of angle between ejectile and electron;";
1895 htitle += "Energy [keV];cos(#theta_pe)";
1896 eE_costheta_ejectile = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 100, -1.0, 1.0 );
1898
1899 hname = "eE_costheta_recoil";
1900 htitle = "Electron energy versus cos(#theta) of angle between recoil and electron;";
1901 htitle += "Energy [keV];cos(#theta_pe)";
1902 eE_costheta_recoil = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 100, -1.0, 1.0 );
1904
1905 hname = "eE_vs_ejectile_dc_none_segment";
1906 htitle = "Electron energy, gated on the ejectile with random subtraction;";
1907 htitle += "Energy [keV];Ring;Counts per keV per segment";
1908 eE_vs_ejectile_dc_none_segment = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 24, -0.5, 23.5 );
1910
1911 hname = "eE_vs_ejectile_dc_ejectile_segment";
1912 htitle = "Electron energy, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1913 htitle += "Energy [keV];Ring;Counts per keV per ring";
1914 eE_vs_ejectile_dc_ejectile_segment = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 24, -0.5, 23.5 );
1916
1917 hname = "eE_vs_ejectile_dc_recoil_segment";
1918 htitle = "Electron energy, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1919 htitle += "Energy [keV];Ring;Counts per keV per ring";
1920 eE_vs_ejectile_dc_recoil_segment = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 24, -0.5, 23.5 );
1922
1923 hname = "eE_vs_recoil_dc_none_segment";
1924 htitle = "Electron energy, gated on the recoil with random subtraction;";
1925 htitle += "Energy [keV];Ring;Counts per keV per ring";
1926 eE_vs_recoil_dc_none_segment = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 24, -0.5, 23.5 );
1928
1929 hname = "eE_vs_recoil_dc_ejectile_segment";
1930 htitle = "Electron energy, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1931 htitle += "Energy [keV];Ring;Counts per keV per ring";
1932 eE_vs_recoil_dc_ejectile_segment = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 24, -0.5, 23.5 );
1934
1935 hname = "eE_vs_recoil_dc_recoil_segment";
1936 htitle = "Electron energy, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1937 htitle += "Energy [keV];Ring;Counts per keV per ring";
1938 eE_vs_recoil_dc_recoil_segment = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, 24, -0.5, 23.5 );
1940
1941 if( react->HistWithoutAddback() ) {
1942
1943 hname = "egE_ejectile_dc_none";
1944 htitle = "Electron-gamma matrix without addback, gated on the ejectile with random subtraction;";
1945 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1946 egE_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1948
1949 hname = "egE_ejectile_dc_ejectile";
1950 htitle = "Electron-gamma matrix without addback, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1951 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1952 egE_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1954
1955 hname = "egE_ejectile_dc_recoil";
1956 htitle = "Electron-gamma matrix without addback, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1957 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1958 egE_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1960
1961 hname = "egE_recoil_dc_none";
1962 htitle = "Electron-gamma matrix without addback, gated on the recoil with random subtraction;";
1963 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1964 egE_recoil_dc_none = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1966
1967 hname = "egE_recoil_dc_ejectile";
1968 htitle = "Electron-gamma matrix without addback, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
1969 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1970 egE_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1972
1973 hname = "egE_recoil_dc_recoil";
1974 htitle = "Electron-gamma matrix without addback, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
1975 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1976 egE_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1978
1979 }
1980
1981 if( react->HistWithAddback() ) {
1982
1983 hname = "eaE_ejectile_dc_none";
1984 htitle = "Electron-gamma matrix with addback, gated on the ejectile with random subtraction;";
1985 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1986 eaE_ejectile_dc_none = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1988
1989 hname = "eaE_ejectile_dc_ejectile";
1990 htitle = "Electron-gamma matrix with addback, gated on the ejectile, Doppler corrected for the ejectile with random subtraction;";
1991 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1992 eaE_ejectile_dc_ejectile = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
1994
1995 hname = "eaE_ejectile_dc_recoil";
1996 htitle = "Electron-gamma matrix with addback, gated on the ejectile, Doppler corrected for the recoil with random subtraction;";
1997 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
1998 eaE_ejectile_dc_recoil = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
2000
2001 hname = "eaE_recoil_dc_none";
2002 htitle = "Electron-gamma matrix with addback, gated on the recoil with random subtraction;";
2003 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
2004 eaE_recoil_dc_none = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
2006
2007 hname = "eaE_recoil_dc_ejectile";
2008 htitle = "Electron-gamma matrix with addback, gated on the recoil, Doppler corrected for the ejectile with random subtraction;";
2009 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
2010 eaE_recoil_dc_ejectile = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
2012
2013 hname = "eaE_recoil_dc_recoil";
2014 htitle = "Electron-gamma matrix with addback, gated on the recoil, Doppler corrected for the recoil with random subtraction;";
2015 htitle += "Electron Energy [keV];Gamma-ray Energy [keV];Counts per 0.5 keV";
2016 eaE_recoil_dc_recoil = new TH2F( hname.data(), htitle.data(), EBIN, EMIN, EMAX, GBIN, GMIN, GMAX );
2018
2019 }
2020
2021 } // electrons on
2022
2023 // Beam dump histograms
2024 if( react->HistBeamDump() ) {
2025
2026 dirname = "BeamDump";
2027 output_file->mkdir( dirname.data() );
2028 output_file->cd( dirname.data() );
2029
2030 hname = "bdE_singles";
2031 htitle = "Beam-dump gamma-ray energy singles;Energy [keV];Counts per 0.5 keV";
2032 bdE_singles = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
2033 histlist->Add(bdE_singles);
2034
2035 hname = "bd_bd_td";
2036 htitle = "Beam-dump - Beam-dump time difference;#Deltat [ns];Counts per 10 ns";
2037 bd_bd_td = new TH1F( hname.data(), htitle.data(),
2038 TBIN, TMIN, TMAX );
2039 histlist->Add(bd_bd_td);
2040
2041 hname = "bdE_bdE";
2042 htitle = "Beam-dump gamma-ray coincidence matrix;Energy [keV];Energy [keV];Counts per 0.5 keV";
2043 bdE_bdE = new TH2F( hname.data(), htitle.data(), GBIN, GMIN, GMAX, GBIN, GMIN, GMAX );
2044 histlist->Add(bdE_bdE);
2045
2046 bdE_singles_det.resize( set->GetNumberOfBeamDumpDetectors() );
2047 for( unsigned int i = 0; i < set->GetNumberOfBeamDumpDetectors(); ++i ){
2048
2049 hname = "bdE_singles_det" + std::to_string(i);
2050 htitle = "Beam-dump gamma-ray energy singles in detector ";
2051 htitle += std::to_string(i);
2052 htitle += ";Energy [keV];Counts per 0.5 keV";
2053 bdE_singles_det[i] = new TH1F( hname.data(), htitle.data(), GBIN, GMIN, GMAX );
2054 histlist->Add(bdE_singles_det[i]);
2055
2056 }
2057
2058 } // beam dump on
2059
2060 // Ionisation chamber histograms
2061 if( react->HistIonChamber() ) {
2062
2063 dirname = "IonChamber";
2064 output_file->mkdir( dirname.data() );
2065 output_file->cd( dirname.data() );
2066
2067 hname = "ic_dE";
2068 htitle = "Ionisation chamber;Energy loss in dE layers (Gas) (arb. units);Counts";
2069 ic_dE = new TH1F( hname.data(), htitle.data(), 4096, 0, 10000 );
2070 histlist->Add(ic_dE);
2071
2072 hname = "ic_E";
2073 htitle = "Ionisation chamber;Energy loss in rest of the layers (Si) (Gas) (arb. units);Counts";
2074 ic_E = new TH1F( hname.data(), htitle.data(), 4096, 0, 10000 );
2075 histlist->Add(ic_E);
2076
2077 hname = "ic_dE_E";
2078 htitle = "Ionisation chamber;Energy loss in dE layers (Gas) (arb. units);Energy loss in rest of the layers (Si) (arb. units);Counts";
2079 ic_dE_E = new TH2F( hname.data(), htitle.data(), 4096, 0, 10000, 4096, 0, 10000 );
2080 histlist->Add(ic_dE_E);
2081
2082 } // ion-chamber on
2083
2084 return;
2085
2086}
2087
2089
2090 // Check that we're ready
2091 if( !hists_ready ) return;
2092
2093 // Make the canvas
2094 c1 = std::make_unique<TCanvas>("Diagnostics","Monitor hists");
2095 c1->Divide(2,3);
2096
2097 // Plot things
2098 c1->cd(1);
2099 if( gamma_particle_td != nullptr )
2100 gamma_particle_td->Draw("hist");
2101
2102 c1->cd(2);
2103 if( gE_singles_vs_crystal != nullptr ){
2104 c1->GetPad(2)->SetLogz();
2105 gE_singles_vs_crystal->GetYaxis()->SetRangeUser(1430,1490);
2106 gE_singles_vs_crystal->Draw("colz");
2107 }
2108 else if( gE_singles != nullptr ){
2109 gE_singles->GetXaxis()->SetRangeUser(1430,1490);
2110 gE_singles->Draw("hist");
2111 }
2112
2113 c1->cd(3);
2114 if( ebis_td_gamma != nullptr )
2115 ebis_td_gamma->Draw("hist");
2116
2117 c1->cd(4);
2118 if( ebis_td_particle != nullptr )
2119 ebis_td_particle->Draw("hist");
2120
2121 c1->cd(5);
2122 c1->GetPad(5)->SetLogz();
2123 if( gamma_theta_phi_map != nullptr )
2124 gamma_theta_phi_map->Draw("colz");
2125
2126 c1->cd(6);
2127 c1->GetPad(6)->SetLogz();
2128 if( particle_xy_map_forward != nullptr )
2129 particle_xy_map_forward->Draw("colz");
2130
2131 return;
2132
2133}
2134
2135void MiniballHistogrammer::SetSpyHists( std::vector<std::vector<std::string>> hists, short layout[2] ) {
2136
2137 // Copy the input hists and layouts
2138 spyhists = hists;
2139 spylayout[0] = layout[0];
2140 spylayout[1] = layout[1];
2141
2142 // Flag that we have spy mode
2143 spymode = true;
2144
2145}
2146
2148
2149 // Escape if we haven't built the hists to avoid a seg fault
2150 if( !hists_ready ){
2151
2152 std::cout << "Cannot plot diagnostics yet, wait until histogrammer is ready" << std::endl;
2153 return;
2154
2155 }
2156
2157 // Get appropriate layout and number of hists
2158 unsigned short maxhists = spylayout[0] * spylayout[1];
2159 if( maxhists == 0 ) maxhists = 1;
2160 if( spyhists.size() > maxhists ) {
2161
2162 std::cout << "Too many histograms for layout size. Plotting the first ";
2163 std::cout << maxhists << " histograms in the list." << std::endl;
2164
2165 }
2166 else maxhists = spyhists.size();
2167
2168 // Make the canvas
2169 c2 = std::make_unique<TCanvas>("Physics","User hists");
2170 if( maxhists > 1 && spylayout[0] > 0 && spylayout[1] > 0 )
2171 c2->Divide( spylayout[0], spylayout[1] );
2172
2173 // User defined histograms
2174 TH1F *ptr_th1;
2175 TH2F *ptr_th2;
2176 for( unsigned int i = 0; i < maxhists; i++ ){
2177
2178 // Go to corresponding canvas
2179 c2->cd(i+1);
2180
2181 // Get this histogram of the right type
2182 if( spyhists[i][1] == "TH1" || spyhists[i][1] == "TH1F" || spyhists[i][1] == "TH1D" ) {
2183
2184 ptr_th1 = (TH1F*)output_file->Get( spyhists[i][0].data() );
2185 if( ptr_th1 != nullptr )
2186 ptr_th1->Draw( spyhists[i][2].data() );
2187
2188 }
2189
2190 else if( spyhists[i][1] == "TH2" || spyhists[i][1] == "TH2F" || spyhists[i][1] == "TH2D" ) {
2191
2192 ptr_th2 = (TH2F*)output_file->Get( spyhists[i][0].data() );
2193 if( ptr_th2 != nullptr )
2194 ptr_th2->Draw( spyhists[i][2].data() );
2195
2196 }
2197
2198 else std::cout << "Type " << spyhists[i][1] << " not currently supported" << std::endl;
2199
2200 }
2201
2202 return;
2203
2204}
2205
2206
2207// Reset histograms in the DataSpy
2209
2210 // Loop over the hist list
2211 TIter next( histlist->MakeIterator() );
2212 while( TObject *obj = next() ) {
2213
2214 if( obj->InheritsFrom( "TH2" ) ) {
2215 ( (TH2*)obj )->Reset("ICESM");
2216 ( (TH2*)obj )->GetZaxis()->UnZoom();
2217 }
2218 else if( obj->InheritsFrom( "TH1" ) )
2219 ( (TH1*)obj )->Reset("ICESM");
2220
2221 }
2222
2223 return;
2224
2225}
2226
2227
2228// Particle-Gamma coincidences without addback
2229void MiniballHistogrammer::FillParticleGammaHists( std::shared_ptr<GammaRayEvt> g ) {
2230
2231 // Work out the weight if it's prompt or random
2232 bool prompt = false;
2233 float weight;
2234 if( PromptCoincidence( g, react->GetParticleTime() ) ) {
2235 prompt = true;
2236 weight = 1.0;
2237 }
2238 else if( RandomCoincidence( g, react->GetParticleTime() ) ){
2239 weight = -1.0 * react->GetParticleGammaFillRatio();
2240 }
2241 else return; // outside of either window, quit now
2242
2243 // Get the energy from the core or the segment as the user requests
2244 double gamma_energy = g->GetEnergy();
2245 if( react->EventsGammaSegmentEnergy() )
2246 gamma_energy = g->GetSegmentSumEnergy();
2247
2248 // Plot the prompt and random gamma spectra
2249 if( prompt ) gE_prompt->Fill( gamma_energy );
2250 else gE_random->Fill( gamma_energy );
2251
2252 // Same again but explicitly 1 particle events
2253 if( prompt && ( react->IsEjectileDetected() != react->IsRecoilDetected() ) )
2254 gE_prompt_1p->Fill( gamma_energy );
2255 else if( react->IsEjectileDetected() != react->IsRecoilDetected() )
2256 gE_random_1p->Fill( gamma_energy );
2257
2258 // Ejectile-gated spectra
2259 if( react->IsEjectileDetected() ) {
2260
2261 gE_vs_costheta_ejectile_dc_none->Fill( gamma_energy, react->CosTheta( g, true ), weight );
2262 gE_vs_costheta2_ejectile_dc_none->Fill( gamma_energy, react->CosTheta( g, false ), weight );
2263 gE_vs_costheta_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g, true ), react->CosTheta( g, true ), weight );
2264 gE_vs_costheta_ejectile_dc_recoil->Fill( react->DopplerCorrection( g, false ), react->CosTheta( g, false ), weight );
2265
2266 gE_ejectile_dc_none->Fill( gamma_energy, weight );
2267 gE_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2268 gE_ejectile_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2269
2270 gE_vs_theta_ejectile_dc_none->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2271 gE_vs_theta_ejectile_dc_ejectile->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2272 gE_vs_theta_ejectile_dc_recoil->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2273
2274 // Check if it is 1-particle only
2275 if( !react->IsRecoilDetected() && react->HistByMultiplicity() ){
2276
2277 gE_1p_ejectile_dc_none->Fill( gamma_energy, weight );
2278 gE_1p_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2279 gE_1p_ejectile_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2280
2281 gE_vs_theta_1p_ejectile_dc_none->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2282 gE_vs_theta_1p_ejectile_dc_ejectile->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2283 gE_vs_theta_1p_ejectile_dc_recoil->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2284
2285
2286 }
2287
2288 // T1 impact time
2289 if( react->HistByT1() ) {
2290
2291 gE_ejectile_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2292 gE_ejectile_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2293 gE_ejectile_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2294
2295 // Check if it is 1-particle only
2296 if( !react->IsRecoilDetected() && react->HistByMultiplicity() ){
2297
2298 gE_1p_ejectile_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2299 gE_1p_ejectile_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2300 gE_1p_ejectile_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2301
2302 }
2303
2304 }
2305
2306 // Per crystal Doppler-corrected spectra
2307 if( react->HistByCrystal() ) {
2308
2309 int cry = g->GetCrystal() + set->GetNumberOfMiniballCrystals() * g->GetCluster();
2310 gE_vs_crystal_ejectile_dc_none->Fill( cry, gamma_energy, weight );
2311 gE_vs_crystal_ejectile_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2312 gE_vs_crystal_ejectile_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2313
2314 // Check if it is 1-particle only
2315 if( !react->IsRecoilDetected() && react->HistByMultiplicity() ){
2316
2317 gE_vs_crystal_1p_ejectile_dc_none->Fill( cry, gamma_energy, weight );
2318 gE_vs_crystal_1p_ejectile_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2319 gE_vs_crystal_1p_ejectile_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2320
2321 }
2322
2323 }
2324
2325 }
2326
2327 // Recoil-gated spectra
2328 if( react->IsRecoilDetected() || react->IsTransferDetected() ) {
2329
2330 gE_vs_costheta_recoil_dc_none->Fill( gamma_energy, react->CosTheta( g, false ), weight );
2331 gE_vs_costheta2_recoil_dc_none->Fill( gamma_energy, react->CosTheta( g, true ), weight );
2332 gE_vs_costheta_recoil_dc_ejectile->Fill( react->DopplerCorrection( g, true ), react->CosTheta( g, true ), weight );
2333 gE_vs_costheta_recoil_dc_recoil->Fill( react->DopplerCorrection( g, false ), react->CosTheta( g, false ), weight );
2334
2335 gE_recoil_dc_none->Fill( gamma_energy, weight );
2336 gE_recoil_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2337 gE_recoil_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2338
2339 gE_vs_theta_recoil_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2340 gE_vs_theta_recoil_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2341 gE_vs_theta_recoil_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2342
2343 // Check if it is 1-particle only
2344 if( !react->IsEjectileDetected() && react->HistByMultiplicity() ){
2345
2346 gE_1p_recoil_dc_none->Fill( gamma_energy, weight );
2347 gE_1p_recoil_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2348 gE_1p_recoil_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2349
2350 gE_vs_theta_1p_recoil_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2351 gE_vs_theta_1p_recoil_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2352 gE_vs_theta_1p_recoil_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2353
2354 }
2355
2356 // T1 impact time
2357 if( react->HistByT1() ) {
2358
2359 gE_recoil_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2360 gE_recoil_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2361 gE_recoil_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2362
2363 // Check if it is 1-particle only
2364 if( !react->IsEjectileDetected() && react->HistByMultiplicity() ){
2365
2366 gE_1p_recoil_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2367 gE_1p_recoil_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2368 gE_1p_recoil_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2369
2370 }
2371
2372 }
2373
2374 // Per crystal Doppler-corrected spectra
2375 if( react->HistByCrystal() ) {
2376
2377 int cry = g->GetCrystal() + set->GetNumberOfMiniballCrystals() * g->GetCluster();
2378 gE_vs_crystal_recoil_dc_none->Fill( cry, gamma_energy, weight );
2379 gE_vs_crystal_recoil_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2380 gE_vs_crystal_recoil_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2381
2382 // Check if it is 1-particle only
2383 if( !react->IsEjectileDetected() && react->HistByMultiplicity() ){
2384
2385 gE_vs_crystal_1p_recoil_dc_none->Fill( cry, gamma_energy, weight );
2386 gE_vs_crystal_1p_recoil_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2387 gE_vs_crystal_1p_recoil_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2388
2389 }
2390
2391 }
2392
2393 }
2394
2395 // Two-particle spectra
2396 if( react->IsEjectileDetected() && react->IsRecoilDetected() ){
2397
2398 // Prompt and random spectra
2399 if( prompt ) gE_prompt_2p->Fill( gamma_energy );
2400 else gE_random_2p->Fill( gamma_energy );
2401
2402 // Check if we need to plot by multplicity
2403 if( react->HistByMultiplicity() ){
2404
2405 gE_2p_dc_none->Fill( gamma_energy, weight );
2406 gE_2p_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2407 gE_2p_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2408
2409 gE_vs_theta_2p_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2410 gE_vs_theta_2p_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2411 gE_vs_theta_2p_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2412
2413 // T1 impact time
2414 if( react->HistByT1() ) {
2415
2416 gE_2p_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2417 gE_2p_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2418 gE_2p_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2419
2420 }
2421
2422 // Per crystal Doppler-corrected spectra
2423 if( react->HistByCrystal() ) {
2424
2425 int cry = g->GetCrystal() + set->GetNumberOfMiniballCrystals() * g->GetCluster();
2426 gE_vs_crystal_2p_dc_none->Fill( cry, gamma_energy, weight );
2427 gE_vs_crystal_2p_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2428 gE_vs_crystal_2p_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2429
2430 }
2431
2432 }
2433
2434 }
2435
2436 // Segment-phi determination
2437 if( react->HistSegmentPhi() ) {
2438
2439 for( unsigned int i = 0; i < 360; i ++ ) {
2440
2441 double gphi_deg = (double)i;
2442 double gphi = gphi_deg * TMath::DegToRad();
2443 double gtheta = react->GetGammaTheta(g);
2444
2445 unsigned short segID = g->GetCluster();
2446 segID *= set->GetNumberOfMiniballCrystals() * set->GetNumberOfMiniballSegments();
2447 segID += set->GetNumberOfMiniballSegments() * g->GetCrystal();
2448 segID += g->GetSegment();
2449
2450 // Ejectile DC
2451 double dc_gen = react->DopplerCorrection( gamma_energy, gtheta, gphi, true );
2452 gE_vs_phi_dc_ejectile[segID]->Fill( gphi_deg, dc_gen, weight );
2453
2454 // Recoil DC
2455 dc_gen = react->DopplerCorrection( gamma_energy, gtheta, gphi, false );
2456 gE_vs_phi_dc_recoil[segID]->Fill( gphi_deg, dc_gen, weight );
2457
2458 }
2459
2460 }
2461
2462 return;
2463
2464}
2465
2466// Particle-Gamma coincidences with addback
2467void MiniballHistogrammer::FillParticleGammaHists( std::shared_ptr<GammaRayAddbackEvt> g ) {
2468
2469 // Work out the weight if it's prompt or random
2470 bool prompt = false;
2471 float weight;
2472 if( PromptCoincidence( g, react->GetParticleTime() ) ) {
2473 prompt = true;
2474 weight = 1.0;
2475 }
2476 else if( RandomCoincidence( g, react->GetParticleTime() ) ){
2477 weight = -1.0 * react->GetParticleGammaFillRatio();
2478 }
2479 else return; // outside of either window, quit now
2480
2481 // Get the energy from the core or the segment as the user requests
2482 double gamma_energy = g->GetEnergy();
2483 if( react->EventsGammaSegmentEnergy() )
2484 gamma_energy = g->GetSegmentSumEnergy();
2485
2486 // Plot the prompt and random gamma spectra
2487 if( prompt ) aE_prompt->Fill( gamma_energy );
2488 else aE_random->Fill( gamma_energy );
2489
2490 // Same again but explicitly 1 particle events
2491 if( prompt && ( react->IsEjectileDetected() != react->IsRecoilDetected() ) )
2492 aE_prompt_1p->Fill( gamma_energy );
2493 else if( react->IsEjectileDetected() != react->IsRecoilDetected() )
2494 aE_random_1p->Fill( gamma_energy );
2495
2496 // Ejectile-gated spectra
2497 if( react->IsEjectileDetected() ) {
2498
2499 aE_vs_costheta_ejectile_dc_none->Fill( gamma_energy, react->CosTheta( g, true ), weight );
2500 aE_vs_costheta2_ejectile_dc_none->Fill( gamma_energy, react->CosTheta( g, false ), weight );
2501 aE_vs_costheta_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g, true ), react->CosTheta( g, true ), weight );
2502 aE_vs_costheta_ejectile_dc_recoil->Fill( react->DopplerCorrection( g, false ), react->CosTheta( g, false ), weight );
2503
2504 aE_ejectile_dc_none->Fill( gamma_energy, weight );
2505 aE_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2506 aE_ejectile_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2507
2508 aE_vs_theta_ejectile_dc_none->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2509 aE_vs_theta_ejectile_dc_ejectile->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2510 aE_vs_theta_ejectile_dc_recoil->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2511
2512 // Check if it is 1-particle only
2513 if( !react->IsRecoilDetected() && react->HistByMultiplicity() ){
2514
2515 aE_1p_ejectile_dc_none->Fill( gamma_energy, weight );
2516 aE_1p_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2517 aE_1p_ejectile_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2518
2519 aE_vs_theta_1p_ejectile_dc_none->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2520 aE_vs_theta_1p_ejectile_dc_ejectile->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2521 aE_vs_theta_1p_ejectile_dc_recoil->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2522
2523 }
2524
2525 // T1 impact time
2526 if( react->HistByT1() ) {
2527
2528 aE_ejectile_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2529 aE_ejectile_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2530 aE_ejectile_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2531
2532 // Check if it is 1-particle only
2533 if( !react->IsRecoilDetected() && react->HistByMultiplicity() ){
2534
2535 aE_1p_ejectile_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2536 aE_1p_ejectile_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2537 aE_1p_ejectile_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2538
2539 }
2540
2541 }
2542
2543 // Per crystal Doppler-corrected spectra
2544 if( react->HistByCrystal() ) {
2545
2546 int cry = g->GetCrystal() + set->GetNumberOfMiniballCrystals() * g->GetCluster();
2547 aE_vs_crystal_ejectile_dc_none->Fill( cry, gamma_energy, weight );
2548 aE_vs_crystal_ejectile_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2549 aE_vs_crystal_ejectile_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2550
2551 // Check if it is 1-particle only
2552 if( !react->IsRecoilDetected() && react->HistByMultiplicity() ){
2553
2554 aE_vs_crystal_1p_ejectile_dc_none->Fill( cry, gamma_energy, weight );
2555 aE_vs_crystal_1p_ejectile_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2556 aE_vs_crystal_1p_ejectile_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2557
2558 }
2559
2560 }
2561
2562 }
2563
2564 // Recoil-gated spectra
2565 if( react->IsRecoilDetected() || react->IsTransferDetected() ) {
2566
2567 aE_vs_costheta_recoil_dc_none->Fill( gamma_energy, react->CosTheta( g, false ), weight );
2568 aE_vs_costheta2_recoil_dc_none->Fill( gamma_energy, react->CosTheta( g, true ), weight );
2569 aE_vs_costheta_recoil_dc_ejectile->Fill( react->DopplerCorrection( g, true ), react->CosTheta( g, true ), weight );
2570 aE_vs_costheta_recoil_dc_recoil->Fill( react->DopplerCorrection( g, false ), react->CosTheta( g, false ), weight );
2571
2572 aE_recoil_dc_none->Fill( gamma_energy, weight );
2573 aE_recoil_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2574 aE_recoil_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2575
2576 aE_vs_theta_recoil_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2577 aE_vs_theta_recoil_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2578 aE_vs_theta_recoil_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2579
2580 // Check if it is 1-particle only
2581 if( !react->IsEjectileDetected() && react->HistByMultiplicity() ){
2582
2583 aE_1p_recoil_dc_none->Fill( gamma_energy, weight );
2584 aE_1p_recoil_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2585 aE_1p_recoil_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2586
2587 aE_vs_theta_1p_recoil_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2588 aE_vs_theta_1p_recoil_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2589 aE_vs_theta_1p_recoil_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2590
2591 }
2592
2593 // T1 impact time
2594 if( react->HistByT1() ) {
2595
2596 aE_recoil_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2597 aE_recoil_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2598 aE_recoil_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2599
2600 // Check if it is 1-particle only
2601 if( !react->IsEjectileDetected() && react->HistByMultiplicity() ){
2602
2603 aE_1p_recoil_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2604 aE_1p_recoil_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2605 aE_1p_recoil_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2606
2607 }
2608
2609 }
2610
2611 // Per crystal Doppler-corrected spectra
2612 if( react->HistByCrystal() ) {
2613
2614 int cry = g->GetCrystal() + set->GetNumberOfMiniballCrystals() * g->GetCluster();
2615 aE_vs_crystal_recoil_dc_none->Fill( cry, gamma_energy, weight );
2616 aE_vs_crystal_recoil_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2617 aE_vs_crystal_recoil_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2618
2619 // Check if it is 1-particle only
2620 if( !react->IsEjectileDetected() && react->HistByMultiplicity() ){
2621
2622 aE_vs_crystal_1p_recoil_dc_none->Fill( cry, gamma_energy, weight );
2623 aE_vs_crystal_1p_recoil_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2624 aE_vs_crystal_1p_recoil_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2625
2626 }
2627
2628 }
2629
2630 }
2631
2632 // Two-particle spectra
2633 if( react->IsEjectileDetected() && react->IsRecoilDetected() ){
2634
2635 // Prompt and random spectra
2636 if( prompt ) aE_prompt_2p->Fill( gamma_energy );
2637 else aE_random_2p->Fill( gamma_energy );
2638
2639 // Check if we need to plot by multplicity
2640 if( react->HistByMultiplicity() ){
2641
2642 aE_2p_dc_none->Fill( gamma_energy, weight );
2643 aE_2p_dc_ejectile->Fill( react->DopplerCorrection( g, true ), weight );
2644 aE_2p_dc_recoil->Fill( react->DopplerCorrection( g, false ), weight );
2645
2646 aE_vs_theta_2p_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), gamma_energy, weight );
2647 aE_vs_theta_2p_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, true ), weight );
2648 aE_vs_theta_2p_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( g, false ), weight );
2649
2650 // T1 impact time
2651 if( react->HistByT1() ) {
2652
2653 aE_2p_dc_none_t1->Fill( g->GetTime() - read_evts->GetT1(), gamma_energy, weight );
2654 aE_2p_dc_ejectile_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, true ), weight );
2655 aE_2p_dc_recoil_t1->Fill( g->GetTime() - read_evts->GetT1(), react->DopplerCorrection( g, false ), weight );
2656
2657 }
2658
2659 // Per crystal Doppler-corrected spectra
2660 if( react->HistByCrystal() ) {
2661
2662 int cry = g->GetCrystal() + set->GetNumberOfMiniballCrystals() * g->GetCluster();
2663 aE_vs_crystal_2p_dc_none->Fill( cry, gamma_energy, weight );
2664 aE_vs_crystal_2p_dc_ejectile->Fill( cry, react->DopplerCorrection( g, true ), weight );
2665 aE_vs_crystal_2p_dc_recoil->Fill( cry, react->DopplerCorrection( g, false ), weight );
2666
2667 }
2668
2669 }
2670
2671 }
2672
2673 return;
2674
2675}
2676
2677// Particle-Electron coincidences with addback
2678void MiniballHistogrammer::FillParticleElectronHists( std::shared_ptr<SpedeEvt> e ) {
2679
2680 // Work out the weight if it's prompt or random
2681 bool prompt = false;
2682 float weight;
2683 if( PromptCoincidence( e, react->GetParticleTime() ) ) {
2684 prompt = true;
2685 weight = 1.0;
2686 }
2687 else if( RandomCoincidence( e, react->GetParticleTime() ) ){
2688 weight = -1.0 * react->GetParticleElectronFillRatio();
2689 }
2690 else return; // outside of either window, quit now
2691
2692 // Plot the prompt and random gamma spectra
2693 if( prompt ) eE_prompt->Fill( e->GetEnergy() );
2694 else eE_random->Fill( e->GetEnergy() );
2695
2696 // Same again but explicitly 1 particle events
2697 if( prompt && ( react->IsEjectileDetected() != react->IsRecoilDetected() ) )
2698 eE_prompt_1p->Fill( e->GetEnergy() );
2699 else if( react->IsEjectileDetected() != react->IsRecoilDetected() )
2700 eE_random_1p->Fill( e->GetEnergy() );
2701
2702 // Ejectile-gated spectra
2703 if( react->IsEjectileDetected() ) {
2704
2705 eE_costheta_ejectile->Fill( e->GetEnergy(), react->CosTheta( e, true ), weight );
2706
2707 eE_ejectile_dc_none->Fill( e->GetEnergy(), weight );
2708 eE_ejectile_dc_ejectile->Fill( react->DopplerCorrection( e, true ), weight );
2709 eE_ejectile_dc_recoil->Fill( react->DopplerCorrection( e, false ), weight );
2710
2711 eE_vs_theta_ejectile_dc_none->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), e->GetEnergy(), weight );
2712 eE_vs_theta_ejectile_dc_ejectile->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, true ), weight );
2713 eE_vs_theta_ejectile_dc_recoil->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, false ), weight );
2714
2715 // Check if it is 1-particle only
2716 if( !react->IsRecoilDetected() && react->HistByMultiplicity() ){
2717
2718 eE_1p_ejectile_dc_none->Fill( e->GetEnergy(), weight );
2719 eE_1p_ejectile_dc_ejectile->Fill( react->DopplerCorrection( e, true ), weight );
2720 eE_1p_ejectile_dc_recoil->Fill( react->DopplerCorrection( e, false ), weight );
2721
2722 eE_vs_theta_1p_ejectile_dc_none->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), e->GetEnergy(), weight );
2723 eE_vs_theta_1p_ejectile_dc_ejectile->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, true ), weight );
2724 eE_vs_theta_1p_ejectile_dc_recoil->Fill( react->GetEjectile()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, false ), weight );
2725
2726 }
2727
2728 eE_vs_ejectile_dc_none_segment->Fill( e->GetEnergy(), e->GetSegment(), weight );
2729 eE_vs_ejectile_dc_ejectile_segment->Fill( react->DopplerCorrection( e, true ), e->GetSegment(), weight );
2730 eE_vs_ejectile_dc_recoil_segment->Fill( react->DopplerCorrection( e, false ), e->GetSegment(), weight );
2731
2732 }
2733
2734 // Recoil-gated spectra
2735 if( react->IsRecoilDetected() || react->IsTransferDetected() ) {
2736
2737 eE_costheta_recoil->Fill( e->GetEnergy(), react->CosTheta( e, false ), weight );
2738
2739 eE_recoil_dc_none->Fill( e->GetEnergy(), weight );
2740 eE_recoil_dc_ejectile->Fill( react->DopplerCorrection( e, true ), weight );
2741 eE_recoil_dc_recoil->Fill( react->DopplerCorrection( e, false ), weight );
2742
2743 eE_vs_theta_recoil_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), e->GetEnergy(), weight );
2744 eE_vs_theta_recoil_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, true ), weight );
2745 eE_vs_theta_recoil_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, false ), weight );
2746
2747 // Check if it is 1-particle only
2748 if( !react->IsEjectileDetected() && react->HistByMultiplicity() ){
2749
2750 eE_1p_recoil_dc_none->Fill( e->GetEnergy(), weight );
2751 eE_1p_recoil_dc_ejectile->Fill( react->DopplerCorrection( e, true ), weight );
2752 eE_1p_recoil_dc_recoil->Fill( react->DopplerCorrection( e, false ), weight );
2753
2754 eE_vs_theta_1p_recoil_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), e->GetEnergy(), weight );
2755 eE_vs_theta_1p_recoil_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, true ), weight );
2756 eE_vs_theta_1p_recoil_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, false ), weight );
2757
2758
2759 }
2760
2761 eE_vs_recoil_dc_none_segment->Fill( e->GetEnergy(), e->GetSegment(), weight );
2762 eE_vs_recoil_dc_ejectile_segment->Fill( react->DopplerCorrection( e, true ), e->GetSegment(), weight );
2763 eE_vs_recoil_dc_recoil_segment->Fill( react->DopplerCorrection( e, false ), e->GetSegment(), weight );
2764
2765 }
2766
2767 // Two-particle spectra
2768 if( react->IsEjectileDetected() && react->IsRecoilDetected() ){
2769
2770 // Prompt and random spectra
2771 if( prompt ) eE_prompt_2p->Fill( e->GetEnergy() );
2772 else eE_random_2p->Fill( e->GetEnergy() );
2773
2774 // Check if we need to plot by multplicity
2775 if( react->HistByMultiplicity() ){
2776
2777 eE_2p_dc_none->Fill( e->GetEnergy(), weight );
2778 eE_2p_dc_ejectile->Fill( react->DopplerCorrection( e, true ), weight );
2779 eE_2p_dc_recoil->Fill( react->DopplerCorrection( e, false ), weight );
2780
2781 eE_vs_theta_2p_dc_none->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), e->GetEnergy(), weight );
2782 eE_vs_theta_2p_dc_ejectile->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, true ), weight );
2783 eE_vs_theta_2p_dc_recoil->Fill( react->GetRecoil()->GetTheta() * TMath::RadToDeg(), react->DopplerCorrection( e, false ), weight );
2784
2785 }
2786
2787 }
2788
2789 return;
2790
2791}
2792
2793// Particle-Gamma-Gamma coincidences without addback
2794void MiniballHistogrammer::FillParticleGammaGammaHists( std::shared_ptr<GammaRayEvt> g1, std::shared_ptr<GammaRayEvt> g2 ) {
2795
2796 // Work out the weight if it's prompt or random
2797 float weight;
2798 if( PromptCoincidence( g1, react->GetParticleTime() ) ) {
2799 weight = 1.0;
2800 }
2801 else if( RandomCoincidence( g1, react->GetParticleTime() ) ){
2802 weight = -1.0 * react->GetParticleGammaFillRatio();
2803 }
2804 else return; // outside of either window, quit now
2805
2806 // Get the energy from the core or the segment as the user requests
2807 double gamma_energy1 = g1->GetEnergy();
2808 double gamma_energy2 = g2->GetEnergy();
2809 if( react->EventsGammaSegmentEnergy() ) {
2810 gamma_energy1 = g1->GetSegmentSumEnergy();
2811 gamma_energy2 = g2->GetSegmentSumEnergy();
2812 }
2813
2814 // Ejectile-gated spectra
2815 if( react->IsEjectileDetected() ) {
2816
2817 // Gamma-gamma
2818 ggE_ejectile_dc_none->Fill( gamma_energy1, gamma_energy2, weight );
2819 ggE_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g1, true ), react->DopplerCorrection( g2, true ), weight );
2820 ggE_ejectile_dc_recoil->Fill( react->DopplerCorrection( g1, false ), react->DopplerCorrection( g2, false ), weight );
2821
2822 }
2823
2824 // Recoil-gated spectra
2825 if( react->IsRecoilDetected() || react->IsTransferDetected() ) {
2826
2827 // Gamma-gamma
2828 ggE_recoil_dc_none->Fill( gamma_energy1, gamma_energy2, weight );
2829 ggE_recoil_dc_ejectile->Fill( react->DopplerCorrection( g1, true ), react->DopplerCorrection( g2, true ), weight );
2830 ggE_recoil_dc_recoil->Fill( react->DopplerCorrection( g1, false ), react->DopplerCorrection( g2, false ), weight );
2831
2832 }
2833
2834 return;
2835
2836}
2837
2838// Particle-Gamma-Gamma coincidences with addback
2839void MiniballHistogrammer::FillParticleGammaGammaHists( std::shared_ptr<GammaRayAddbackEvt> g1, std::shared_ptr<GammaRayAddbackEvt> g2 ) {
2840
2841 // Work out the weight if it's prompt or random
2842 float weight;
2843 if( PromptCoincidence( g1, react->GetParticleTime() ) ) {
2844 weight = 1.0;
2845 }
2846 else if( RandomCoincidence( g1, react->GetParticleTime() ) ){
2847 weight = -1.0 * react->GetParticleGammaFillRatio();
2848 }
2849 else return; // outside of either window, quit now
2850
2851 // Get the energy from the core or the segment as the user requests
2852 double gamma_energy1 = g1->GetEnergy();
2853 double gamma_energy2 = g2->GetEnergy();
2854 if( react->EventsGammaSegmentEnergy() ) {
2855 gamma_energy1 = g1->GetSegmentSumEnergy();
2856 gamma_energy2 = g2->GetSegmentSumEnergy();
2857 }
2858
2859 // Ejectile-gated spectra
2860 if( react->IsEjectileDetected() ) {
2861
2862 // Gamma-gamma
2863 aaE_ejectile_dc_none->Fill( gamma_energy1, gamma_energy2, weight );
2864 aaE_ejectile_dc_ejectile->Fill( react->DopplerCorrection( g1, true ), react->DopplerCorrection( g2, true ), weight );
2865 aaE_ejectile_dc_recoil->Fill( react->DopplerCorrection( g1, false ), react->DopplerCorrection( g2, false ), weight );
2866
2867 }
2868
2869 // Recoil-gated spectra
2870 if( react->IsRecoilDetected() || react->IsTransferDetected() ) {
2871
2872 // Gamma-gamma
2873 aaE_recoil_dc_none->Fill( gamma_energy1, gamma_energy2, weight );
2874 aaE_recoil_dc_ejectile->Fill( react->DopplerCorrection( g1, true ), react->DopplerCorrection( g2, true ), weight );
2875 aaE_recoil_dc_recoil->Fill( react->DopplerCorrection( g1, false ), react->DopplerCorrection( g2, false ), weight );
2876
2877 }
2878
2879 return;
2880
2881}
2882
2883// Particle-Electron-Gamma coincidences without addback
2884void MiniballHistogrammer::FillParticleElectronGammaHists( std::shared_ptr<SpedeEvt> e, std::shared_ptr<GammaRayEvt> g ) {
2885
2886 // Work out the weight if it's prompt or random
2887 float weight;
2888 if( PromptCoincidence( e, react->GetParticleTime() ) ) {
2889 weight = 1.0;
2890 }
2891 else if( RandomCoincidence( e, react->GetParticleTime() ) ){
2892 weight = -1.0 * react->GetParticleElectronFillRatio();
2893 }
2894 else return; // outside of either window, quit now
2895
2896 // Get the energy from the core or the segment as the user requests
2897 double gamma_energy = g->GetEnergy();
2898 if( react->EventsGammaSegmentEnergy() )
2899 gamma_energy = g->GetSegmentSumEnergy();
2900
2901 // Ejectile-gated spectra
2902 if( react->IsEjectileDetected() ) {
2903
2904 // Electon-gamma
2905 egE_ejectile_dc_none->Fill( e->GetEnergy(), gamma_energy, weight );
2906 egE_ejectile_dc_ejectile->Fill( react->DopplerCorrection( e, true ), react->DopplerCorrection( g, true ), weight );
2907 egE_ejectile_dc_recoil->Fill( react->DopplerCorrection( e, false ), react->DopplerCorrection( g, false ), weight );
2908
2909 }
2910
2911 // Recoil-gated spectra
2912 if( react->IsRecoilDetected() || react->IsTransferDetected() ) {
2913
2914 // Electon-gamma
2915 egE_recoil_dc_none->Fill( e->GetEnergy(), gamma_energy, weight );
2916 egE_recoil_dc_ejectile->Fill( react->DopplerCorrection( e, true ), react->DopplerCorrection( g, true ), weight );
2917 egE_recoil_dc_recoil->Fill( react->DopplerCorrection( e, false ), react->DopplerCorrection( g, false ), weight );
2918
2919 }
2920
2921 return;
2922
2923}
2924
2925// Particle-Electron-Gamma coincidences with addback
2926void MiniballHistogrammer::FillParticleElectronGammaHists( std::shared_ptr<SpedeEvt> e, std::shared_ptr<GammaRayAddbackEvt> g ) {
2927
2928 // Work out the weight if it's prompt or random
2929 float weight;
2930 if( PromptCoincidence( e, react->GetParticleTime() ) ) {
2931 weight = 1.0;
2932 }
2933 else if( RandomCoincidence( e, react->GetParticleTime() ) ){
2934 weight = -1.0 * react->GetParticleElectronFillRatio();
2935 }
2936 else return; // outside of either window, quit now
2937
2938 // Get the energy from the core or the segment as the user requests
2939 double gamma_energy = g->GetEnergy();
2940 if( react->EventsGammaSegmentEnergy() )
2941 gamma_energy = g->GetSegmentSumEnergy();
2942
2943 // Ejectile-gated spectra
2944 if( react->IsEjectileDetected() ) {
2945
2946 // Electon-gamma
2947 eaE_ejectile_dc_none->Fill( e->GetEnergy(), gamma_energy, weight );
2948 eaE_ejectile_dc_ejectile->Fill( react->DopplerCorrection( e, true ), react->DopplerCorrection( g, true ), weight );
2949 eaE_ejectile_dc_recoil->Fill( react->DopplerCorrection( e, false ), react->DopplerCorrection( g, false ), weight );
2950
2951 }
2952
2953 // Recoil-gated spectra
2954 if( react->IsRecoilDetected() || react->IsTransferDetected() ) {
2955
2956 // Electon-gamma
2957 eaE_recoil_dc_none->Fill( e->GetEnergy(), gamma_energy, weight );
2958 eaE_recoil_dc_ejectile->Fill( react->DopplerCorrection( e, true ), react->DopplerCorrection( g, true ), weight );
2959 eaE_recoil_dc_recoil->Fill( react->DopplerCorrection( e, false ), react->DopplerCorrection( g, false ), weight );
2960
2961 }
2962
2963 return;
2964
2965}
2966
2968
2970 n_entries = input_tree->GetEntries();
2971
2972 std::cout << " MiniballHistogrammer: number of entries in event tree = ";
2973 std::cout << n_entries << std::endl;
2974
2975 if( n_entries == 0 ){
2976
2977 std::cout << " MiniballHistogrammer: Nothing to do..." << std::endl;
2978 return n_entries;
2979
2980 }
2981 else {
2982
2983 std::cout << " MiniballHistogrammer: Start filling histograms" << std::endl;
2984
2985 }
2986
2987 // ------------------------------------------------------------------------ //
2988 // Main loop over TTree to find events
2989 // ------------------------------------------------------------------------ //
2990 for( unsigned int i = 0; i < n_entries; ++i ){
2991
2992 // Current event data
2993 input_tree->GetEntry(i);
2994
2995 // Get laser status
2996 unsigned char laser_status = read_evts->GetLaserStatus();
2997
2998 // Check laser mode
2999 unsigned char laser_mode = react->GetLaserMode();
3000
3001 // Test if we want to plot this event or not
3002 if( laser_status != laser_mode && laser_mode != 2 ) continue;
3003
3004 // Apply the T1 cut if requested by the user
3005 if( react->GetT1Cut() && !T1Cut() ) continue;
3006
3007 // Check if it we are restricting to particle-gamma events
3009 if( ( read_evts->GetParticleMultiplicity() == 0 || g_e_mult == 0 )
3010 && react->EventsParticleGammaOnly() ) continue;
3011
3012 // ------------------------- //
3013 // Loop over particle events //
3014 // ------------------------- //
3015 for( unsigned int j = 0; j < read_evts->GetParticleMultiplicity(); ++j ){
3016
3017 // Get particle event
3019
3020 // Check if we are demanding CD-Pad coincidences
3021 if( react->EventsCdPadCoincidence() && particle_evt->GetEnergyPad() < 1e-9 )
3022 continue;
3023
3024 // Check if we are demanding CD-Pad veto
3025 if( react->EventsCdPadVeto() && particle_evt->GetEnergyPad() > 1e-9 )
3026 continue;
3027
3028 // EBIS time
3029 ebis_td_particle->Fill( (double)particle_evt->GetTime() - (double)read_evts->GetEBIS() );
3030
3031 // Get angles and plot maps
3032 float pid = particle_evt->GetStripP() + rand.Rndm() - 0.5; // randomise strip number
3033 float nid = particle_evt->GetStripN() + rand.Rndm() - 0.5; // randomise strip number
3034 TVector3 pvec = react->GetCDVector( particle_evt->GetDetector(), particle_evt->GetSector(), pid, nid );
3035 particle_theta_phi_map->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(),
3036 react->GetParticlePhi( particle_evt ) * TMath::RadToDeg() );
3037 if( react->GetParticleTheta( particle_evt ) < TMath::PiOver2() )
3038 particle_xy_map_forward->Fill( pvec.Y(), pvec.X() );
3039 else
3040 particle_xy_map_backward->Fill( pvec.Y(), pvec.X() );
3041
3042 // Energy vs Angle plot no gates
3043 pE_theta->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3044
3045 // Energy total versus energy loss, i.e. CD+PAD vs. CD
3046 pE_dE[particle_evt->GetDetector()]->Fill( particle_evt->GetEnergy(), particle_evt->GetDeltaEnergy() );
3047
3048 // Sector-by-sector particle plots
3049 if( react->HistBySector() ) {
3050
3051 pE_dE_sec[particle_evt->GetDetector()][particle_evt->GetSector()]->Fill( particle_evt->GetEnergy(), particle_evt->GetDeltaEnergy() );
3052 pE_theta_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3053
3054 } // by sector
3055
3056 // Check for coincidence with another particle
3057 for( unsigned int k = j+1; k < read_evts->GetParticleMultiplicity(); ++k ){
3058
3059 // Get second particle event
3061
3062 // Check if we are demanding CD-Pad coincidences
3063 if( react->EventsCdPadCoincidence() && particle_evt2->GetEnergyPad() < 1e-9 )
3064 continue;
3065
3066 // Check if we are demanding CD-Pad veto
3067 if( react->EventsCdPadVeto() && particle_evt->GetEnergyPad() > 1e-9 )
3068 continue;
3069
3070 // Time differences and fill symmetrically
3071 particle_particle_td->Fill( (double)particle_evt->GetTime() - (double)particle_evt2->GetTime() );
3072 particle_particle_td->Fill( (double)particle_evt2->GetTime() - (double)particle_evt->GetTime() );
3073
3075 particle_particle_td_prompt->Fill((double)particle_evt->GetTime() - (double)particle_evt2->GetTime() );
3076 } // if prompt
3078 particle_particle_td_random->Fill((double)particle_evt->GetTime() - (double)particle_evt2->GetTime() );
3079 } // if random
3081 particle_particle_td_prompt->Fill((double)particle_evt2->GetTime() - (double)particle_evt->GetTime() );
3082 } // if prompt
3084 particle_particle_td_random->Fill((double)particle_evt2->GetTime() - (double)particle_evt->GetTime() );
3085 } // if random
3086
3087 }
3088
3089 // Check for coincidence with a gamma-ray
3090 for( unsigned int k = 0; k < read_evts->GetGammaRayMultiplicity(); ++k ){
3091
3092 // Get gamma-ray event
3094
3095 // Time differences
3096 gamma_particle_td->Fill( (double)particle_evt->GetTime() - (double)gamma_evt->GetTime() );
3097 gamma_particle_E_vs_td->Fill( (double)particle_evt->GetTime() - (double)gamma_evt->GetTime(), gamma_evt->GetEnergy() );
3098
3100 gamma_particle_td_prompt->Fill( (double)particle_evt->GetTime() - (double)gamma_evt->GetTime() );
3101 } // if prompt
3103 gamma_particle_td_random->Fill( (double)particle_evt->GetTime() - (double)gamma_evt->GetTime() );
3104 } // if random
3105
3106 // Time differences by sector
3107 if( react->HistBySector() ) {
3108
3109 gamma_particle_td_sec[particle_evt->GetSector()]->Fill( (double)particle_evt->GetTime() - (double)gamma_evt->GetTime() );
3110 gamma_particle_E_vs_td_sec[particle_evt->GetSector()]->Fill( (double)particle_evt->GetTime() - (double)gamma_evt->GetTime(), gamma_evt->GetEnergy() );
3111
3112 }
3113
3114 // Check for prompt coincidence
3116
3117 // Energy vs Angle plot with gamma-ray coincidence
3118 pE_theta_coinc->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3119 pE_dE_coinc[particle_evt->GetDetector()]->Fill( particle_evt->GetEnergy(), particle_evt->GetDeltaEnergy() );
3120
3121 // Sector-by-sector particle plots
3122 if( react->HistBySector() ) {
3123
3124 // Energy vs Angle plot with gamma-ray coincidence
3125 pE_theta_coinc_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3126 pE_dE_coinc_sec[particle_evt->GetDetector()][particle_evt->GetSector()]->Fill( particle_evt->GetEnergy(), particle_evt->GetDeltaEnergy() );
3127
3128 } // by sector
3129
3130 } // if prompt
3131
3132 } // k: gammas
3133
3134 // Check for coincidence with an electron
3135 for( unsigned int k = 0; k < read_evts->GetSpedeMultiplicity(); ++k ){
3136
3137 // Get SPEDE event
3139
3140 // Time differences
3141 electron_particle_td->Fill( (double)particle_evt->GetTime() - (double)spede_evt->GetTime() );
3142
3144 electron_particle_td_prompt->Fill( (double)particle_evt->GetTime() - (double)spede_evt->GetTime() );
3145 } // if prompt
3147 electron_particle_td_random->Fill( (double)particle_evt->GetTime() - (double)spede_evt->GetTime() );
3148 } // if random
3149
3150 } // k: electrons
3151
3152 } // j: particles
3153
3154 // Annoyingly, we need to do another loop to check the kinematics
3155 // TODO: make this more efficient than looping twice?
3156 // TODO: It needs to be improved to allow multiple particles in transfer
3157 react->ResetParticles();
3158 for( unsigned int j = 0; j < read_evts->GetParticleMultiplicity(); ++j ){
3159
3160 // Get particle event
3162
3163 // Check if we are demanding CD-Pad coincidences
3164 if( react->EventsCdPadCoincidence() && particle_evt->GetEnergyPad() < 1e-9 )
3165 continue;
3166
3167 // Check if we are demanding CD-Pad veto
3168 if( react->EventsCdPadVeto() && particle_evt->GetEnergyPad() > 1e-9 )
3169 continue;
3170
3171 // Make sure that we don't double count
3172 bool event_used = false;
3173
3174 // See if we are doing transfer reactions
3175 if( react->GetBeam()->GetIsotope() != react->GetEjectile()->GetIsotope() &&
3177
3178 react->TransferProduct( particle_evt );
3179 react->SetParticleTime( particle_evt->GetTime() );
3180
3181 pE_dE_cut[particle_evt->GetDetector()]->Fill( particle_evt->GetEnergy(), particle_evt->GetDeltaEnergy() );
3182
3183 if( react->HistBySector() )
3184 pE_dE_cut_sec[particle_evt->GetDetector()][particle_evt->GetSector()]->Fill( particle_evt->GetEnergy(), particle_evt->GetDeltaEnergy() );
3185
3186 // Got what we came for
3187 // TODO: What if we have multiple particles in transfer?
3188 break;
3189
3190 } // transfer event
3191
3192 // Check for prompt coincidence with another particle
3193 for( unsigned int k = j+1; k < read_evts->GetParticleMultiplicity(); ++k ){
3194
3195 // Get second particle event
3197
3198 // Check if we are demanding CD-Pad coincidences
3199 if( react->EventsCdPadCoincidence() && particle_evt2->GetEnergyPad() < 1e-9 )
3200 continue;
3201
3202 // Check if we are demanding CD-Pad veto
3203 if( react->EventsCdPadVeto() && particle_evt->GetEnergyPad() > 1e-9 )
3204 continue;
3205
3206 // Do a two-particle cut and check that they are coincident
3207 // particle_evt (j) is beam and particle_evt2 (k) is target
3209
3210 react->IdentifyEjectile( particle_evt );
3211 react->IdentifyRecoil( particle_evt2 );
3212 if( particle_evt->GetTime() < particle_evt2->GetTime() )
3213 react->SetParticleTime( particle_evt->GetTime() );
3214 else react->SetParticleTime( particle_evt2->GetTime() );
3215
3216 pE_theta_ejectile->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3217 pE_theta_recoil->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), particle_evt2->GetDeltaEnergy() );
3218 if( react->HistByMultiplicity() ){
3219 pE_theta_2p_ejectile->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3220 pE_theta_2p_recoil->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), particle_evt2->GetDeltaEnergy() );
3221 }
3222 pBeta_theta_ejectile->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), react->GetEjectile()->GetBeta() );
3223 pBeta_theta_recoil->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), react->GetRecoil()->GetBeta() );
3224
3225 // Sector-by-sector particle plots
3226 if( react->HistBySector() ) {
3227
3228 pE_theta_ejectile_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3229 pE_theta_recoil_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), particle_evt2->GetDeltaEnergy() );
3230
3231 } // by sector
3232
3233 // Got what we came for
3234 event_used = true;
3235 break;
3236
3237 } // 2-particle check
3238
3239 // particle_evt2 (k) is beam and particle_evt (j) is target
3241
3242 react->IdentifyEjectile( particle_evt2 );
3243 react->IdentifyRecoil( particle_evt );
3244 if( particle_evt->GetTime() < particle_evt2->GetTime() )
3245 react->SetParticleTime( particle_evt->GetTime() );
3246 else react->SetParticleTime( particle_evt2->GetTime() );
3247
3248 pE_theta_ejectile->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), particle_evt2->GetDeltaEnergy() );
3249 pE_theta_recoil->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3250 if( react->HistByMultiplicity() ){
3251 pE_theta_2p_ejectile->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), particle_evt2->GetDeltaEnergy() );
3252 pE_theta_2p_recoil->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3253 }
3254 pBeta_theta_ejectile->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), react->GetEjectile()->GetBeta() );
3255 pBeta_theta_recoil->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), react->GetRecoil()->GetBeta() );
3256
3257 // Sector-by-sector particle plots
3258 if( react->HistBySector() ) {
3259
3260 pE_theta_ejectile_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt2 ) * TMath::RadToDeg(), particle_evt2->GetDeltaEnergy() );
3261 pE_theta_recoil_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3262
3263 } // by sector
3264
3265 // Got what we came for
3266 event_used = true;
3267 break;
3268
3269 } // 2-particle check
3270
3271 } // k: second particle
3272
3273 // If we found a two-particle event, we're done
3274 if( event_used ) break;
3275
3276 // If we got here, there were no transfer events or 2p events
3277 // Therefore, we can build a one particle event
3278 else if( EjectileCut( particle_evt ) ) {
3279
3280 react->IdentifyEjectile( particle_evt );
3281 react->CalculateRecoil();
3282 react->SetParticleTime( particle_evt->GetTime() );
3283
3284 pE_theta_ejectile->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3285 if( react->HistByMultiplicity() )
3286 pE_theta_1p_ejectile->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3287 pBeta_theta_ejectile->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), react->GetEjectile()->GetBeta() );
3288
3289 if( react->HistBySector() )
3290 pE_theta_ejectile_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3291
3292 // Got what we came for
3293 break;
3294
3295 } // ejectile event
3296
3297 else if( RecoilCut( particle_evt ) ) {
3298
3299 react->IdentifyRecoil( particle_evt );
3300 react->CalculateEjectile();
3301 react->SetParticleTime( particle_evt->GetTime() );
3302
3303 pE_theta_recoil->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3304 if( react->HistByMultiplicity() )
3305 pE_theta_1p_recoil->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3306 pBeta_theta_recoil->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), react->GetRecoil()->GetBeta() );
3307
3308 if( react->HistBySector() )
3309 pE_theta_recoil_sec[particle_evt->GetSector()]->Fill( react->GetParticleTheta( particle_evt ) * TMath::RadToDeg(), particle_evt->GetDeltaEnergy() );
3310
3311 // Got what we came for
3312 break;
3313
3314 } // recoil event
3315
3316 } // j: particles
3317
3318
3319 // ------------------------------------------ //
3320 // Loop over gamma-ray events without addback //
3321 // ------------------------------------------ //
3322 if( react->HistWithoutAddback() ) {
3323
3324 for( unsigned int j = 0; j < read_evts->GetGammaRayMultiplicity(); ++j ){
3325
3326 // Get gamma-ray event
3328
3329 // Check user condition for matching a segment
3330 if( react->EventsGammaDemandSegment() && gamma_evt->GetSegmentMultiplicity() == 0 )
3331 continue;
3332
3333 // Check user condition for maximum segment multiplicity
3334 if( gamma_evt->GetSegmentMultiplicity() > react->EventsGammaMaxSegmentMultiplicity() )
3335 continue;
3336
3337 // Check user condition for segment-core energy difference
3338 if( TMath::Abs( gamma_evt->GetSegmentSumEnergy() - gamma_evt->GetEnergy() )
3339 > react->EventsGammaCoreSegmentEnergyDifference() )
3340 continue;
3341
3342 // Get the energy from the core or the segment as the user requests
3343 double gamma_energy = gamma_evt->GetEnergy();
3344 if( react->EventsGammaSegmentEnergy() )
3345 gamma_energy = gamma_evt->GetSegmentSumEnergy();
3346
3347 // Singles
3348 int cry = gamma_evt->GetCrystal() + set->GetNumberOfMiniballCrystals() * gamma_evt->GetCluster();
3349 gE_singles->Fill( gamma_energy );
3350 if( react->HistByCrystal() )
3351 gE_singles_vs_crystal->Fill( cry, gamma_energy );
3352
3353 // Singles - Doppler corrected
3354 gE_singles_dc->Fill( react->DopplerCorrection( gamma_evt, react->GetBeam()->GetBeta(), 0, 0 ) );
3355
3356 // EBIS time
3357 ebis_td_gamma->Fill( (double)gamma_evt->GetTime() - (double)read_evts->GetEBIS() );
3358
3359 // Check for events in the EBIS on-beam window
3360 if( OnBeam( gamma_evt ) ){
3361
3362 gE_singles_ebis->Fill( gamma_energy );
3363 gE_singles_ebis_on->Fill( gamma_energy );
3364 gE_singles_dc_ebis->Fill( react->DopplerCorrection( gamma_evt, react->GetBeam()->GetBeta(), 0, 0 ) );
3365
3366 } // ebis on
3367
3368 else if( OffBeam( gamma_evt ) ){
3369
3370 gE_singles_ebis->Fill( gamma_energy, -1.0 * react->GetEBISFillRatio() );
3371 gE_singles_ebis_off->Fill( gamma_energy );
3372 gE_singles_dc_ebis->Fill( react->DopplerCorrection( gamma_evt, react->GetBeam()->GetBeta(), 0, 0 ), -1.0 * react->GetEBISFillRatio() );
3373
3374 } // ebis off
3375
3376 // Gamma-ray X-Y hit map
3377 if( react->GetGammaZ( gamma_evt ) > 0 )
3378 gamma_xy_map_forward->Fill( react->GetGammaY( gamma_evt ), react->GetGammaX( gamma_evt ) );
3379 else
3380 gamma_xy_map_backward->Fill( react->GetGammaY( gamma_evt ), react->GetGammaX( gamma_evt ) );
3381
3382 // Gamma-ray X-Z hit map
3383 if( react->GetGammaY( gamma_evt ) > 0 )
3384 gamma_xz_map_right->Fill( react->GetGammaZ( gamma_evt ), react->GetGammaX( gamma_evt ) );
3385 else
3386 gamma_xz_map_left->Fill( react->GetGammaZ( gamma_evt ), react->GetGammaX( gamma_evt ) );
3387
3388 // Gamma-ray theta-phi map
3389 double theta = react->GetGammaTheta( gamma_evt );
3390 double phi = react->GetGammaPhi( gamma_evt );
3391 if( theta < 0 ) theta += TMath::Pi();
3392 if( phi < 0 ) phi += TMath::TwoPi();
3393 gamma_theta_phi_map->Fill( theta*TMath::RadToDeg(), phi*TMath::RadToDeg() );
3394
3395 // Particle-gamma coincidence spectra
3397
3398 // Loop over other gamma events
3399 for( unsigned int k = j+1; k < read_evts->GetGammaRayMultiplicity(); ++k ){
3400
3401 // Get gamma-ray event
3403
3404 // Get the energy from the core or the segment as the user requests
3405 double gamma_energy2 = gamma_evt2->GetEnergy();
3406 if( react->EventsGammaSegmentEnergy() )
3407 gamma_energy2 = gamma_evt2->GetSegmentSumEnergy();
3408
3409 // Time differences - symmetrise
3410 gamma_gamma_td->Fill( (double)gamma_evt->GetTime() - (double)gamma_evt2->GetTime() );
3411 gamma_gamma_td->Fill( (double)gamma_evt2->GetTime() - (double)gamma_evt->GetTime() );
3412
3414 gamma_gamma_td_prompt->Fill( (double)gamma_evt->GetTime() - (double)gamma_evt2->GetTime() );
3415 } // if prompt
3416 else if( RandomCoincidence( gamma_evt, gamma_evt2 ) ) {
3417 gamma_gamma_td_random->Fill( (double)gamma_evt->GetTime() - (double)gamma_evt2->GetTime() );
3418 } // if random
3420 gamma_gamma_td_prompt->Fill( (double)gamma_evt2->GetTime() - (double)gamma_evt->GetTime() );
3421 } // if prompt
3422 else if( RandomCoincidence( gamma_evt2, gamma_evt ) ) {
3423 gamma_gamma_td_random->Fill( (double)gamma_evt2->GetTime() - (double)gamma_evt->GetTime() );
3424 } // if random
3425
3426 // Particle-gamma-gamma coincidence spectra
3427 if( react->HistGammaGamma() ) {
3428
3429 // Check for prompt gamma-gamma coincidences
3431
3432 // Fill and symmetrise
3433 gE_gE->Fill( gamma_energy, gamma_energy2 );
3434 gE_gE->Fill( gamma_energy2, gamma_energy );
3435
3436 // Apply EBIS condition
3437 if( OnBeam( gamma_evt ) && OnBeam( gamma_evt2 ) ) {
3438
3439 // Fill and symmetrise
3440 gE_gE_ebis_on->Fill( gamma_energy, gamma_energy2 );
3441 gE_gE_ebis_on->Fill( gamma_energy2, gamma_energy );
3442
3443 } // On Beam
3444
3447
3448 } // if prompt
3449
3450 } // gamma-gamma user option on
3451
3452 } // k: second gamma-ray
3453
3454 } // j: gamma ray
3455
3456 } // user requests histograms without addback
3457
3458
3459 // --------------------------------------- //
3460 // Loop over gamma-ray events with addback //
3461 // --------------------------------------- //
3462 if( react->HistWithAddback() ) {
3463
3464 for( unsigned int j = 0; j < read_evts->GetGammaRayAddbackMultiplicity(); ++j ){
3465
3466 // Get gamma-ray event
3468
3469 // Check user condition for matching a segment
3470 if( react->EventsGammaDemandSegment() && gamma_ab_evt->GetSegmentMultiplicity() == 0 )
3471 continue;
3472
3473 // Check user condition for maximum segment multiplicity
3474 if( gamma_ab_evt->GetSegmentMultiplicity() > react->EventsGammaMaxSegmentMultiplicity() )
3475 continue;
3476
3477 // Get the energy from the core or the segment as the user requests
3478 double gamma_energy = gamma_ab_evt->GetEnergy();
3479 if( react->EventsGammaSegmentEnergy() )
3480 gamma_energy = gamma_ab_evt->GetSegmentSumEnergy();
3481
3482 // Singles
3483 int cry = gamma_ab_evt->GetCrystal() + set->GetNumberOfMiniballCrystals() * gamma_ab_evt->GetCluster();
3484 aE_singles->Fill( gamma_energy );
3485 if( react->HistByCrystal() )
3486 aE_singles_vs_crystal->Fill( cry, gamma_energy );
3487
3488 // Singles - Doppler corrected
3489 aE_singles_dc->Fill( react->DopplerCorrection( gamma_ab_evt, react->GetBeam()->GetBeta(), 0, 0 ) );
3490
3491 // Check for events in the EBIS on-beam window
3492 if( OnBeam( gamma_ab_evt ) ){
3493
3494 aE_singles_ebis->Fill( gamma_energy );
3495 aE_singles_ebis_on->Fill( gamma_energy );
3496 aE_singles_dc_ebis->Fill( react->DopplerCorrection( gamma_ab_evt, react->GetBeam()->GetBeta(), 0, 0 ) );
3497
3498 } // ebis on
3499
3500 else if( OffBeam( gamma_ab_evt ) ){
3501
3502 aE_singles_ebis->Fill( gamma_energy, -1.0 * react->GetEBISFillRatio() );
3503 aE_singles_ebis_off->Fill( gamma_energy );
3504 aE_singles_dc_ebis->Fill( react->DopplerCorrection( gamma_ab_evt, react->GetBeam()->GetBeta(), 0, 0 ), -1.0 * react->GetEBISFillRatio() );
3505
3506 } // ebis off
3507
3508 // Particle-gamma coincidence spectra
3510
3511 // If gamma-gamma histograms are turned on
3512 if( react->HistGammaGamma() ) {
3513
3514 // Loop over other gamma events
3515 for( unsigned int k = j+1; k < read_evts->GetGammaRayAddbackMultiplicity(); ++k ){
3516
3517 // Get gamma-ray event
3519
3520 // Get the energy from the core or the segment as the user requests
3521 double gamma_energy2 = gamma_ab_evt2->GetEnergy();
3522 if( react->EventsGammaSegmentEnergy() )
3523 gamma_energy2 = gamma_ab_evt2->GetSegmentSumEnergy();
3524
3525 // Check for prompt gamma-gamma coincidences
3527
3528 // Fill and symmetrise
3529 aE_aE->Fill( gamma_energy, gamma_energy2 );
3530 aE_aE->Fill( gamma_energy2, gamma_energy );
3531
3532 // Apply EBIS condition
3533 if( OnBeam( gamma_ab_evt ) && OnBeam( gamma_ab_evt2 ) ) {
3534
3535 // Fill and symmetrise
3536 aE_aE_ebis_on->Fill( gamma_energy, gamma_energy2 );
3537 aE_aE_ebis_on->Fill( gamma_energy2, gamma_energy );
3538
3539 } // On Beam
3540
3541 // Particle-gamma-gamma coincidence spectra
3544
3545 } // if prompt
3546
3547 } // k: second gamma-ray
3548
3549 } // gamma-gamma user option on
3550
3551 } // j: gamma ray
3552
3553 } // user requests histograms with addback
3554
3555
3556 // ---------------------------------- //
3557 // Loop over electron events in SPEDE //
3558 // ---------------------------------- //
3559 // If the electron histograms are turned on
3560 if( react->HistElectron() ) {
3561
3562 // Get the first SPEDE event
3563 for( unsigned int j = 0; j < read_evts->GetSpedeMultiplicity(); ++j ){
3564
3565 // Get SPEDE event
3567
3568 // Singles
3569 eE_singles->Fill( spede_evt->GetEnergy() );
3570
3571 // Check for events in the EBIS on-beam window
3572 if( OnBeam( spede_evt ) ){
3573
3574 eE_singles_ebis->Fill( spede_evt->GetEnergy() );
3575 eE_singles_ebis_on->Fill( spede_evt->GetEnergy() );
3576
3577 } // ebis on
3578
3579 else if( OffBeam( spede_evt ) ){
3580
3581 eE_singles_ebis->Fill( spede_evt->GetEnergy(), -1.0 * react->GetEBISFillRatio() );
3582 eE_singles_ebis_off->Fill( spede_evt->GetEnergy() );
3583
3584 } // ebis off
3585
3586 // Particle-electron coincidence spectra
3588
3589 // SPEDE hitmap
3590 TVector3 evec = react->GetSpedeVector( spede_evt->GetSegment(), true );
3591 electron_xy_map->Fill( evec.Y(), evec.X() );
3592
3593 // Loop over other SPEDE events
3594 for( unsigned int k = j+1; k < read_evts->GetSpedeMultiplicity(); ++k ){
3595
3596 // Get second SPEDE event
3598
3599 // Time differences - symmetrise
3600 electron_electron_td->Fill( (double)spede_evt->GetTime() - (double)spede_evt2->GetTime() );
3601 electron_electron_td->Fill( (double)spede_evt2->GetTime() - (double)spede_evt->GetTime() );
3602
3604 electron_electron_td_prompt->Fill( (double)spede_evt->GetTime() - (double)spede_evt2->GetTime() );
3605 } //if prompt
3606 else if( RandomCoincidence( spede_evt, spede_evt2 ) ) {
3607 electron_electron_td_random->Fill( (double)spede_evt->GetTime() - (double)spede_evt2->GetTime() );
3608 } // if random
3610 electron_electron_td_prompt->Fill( (double)spede_evt2->GetTime() - (double)spede_evt->GetTime() );
3611 } //if prompt
3612 else if( RandomCoincidence( spede_evt2, spede_evt ) ) {
3613 electron_electron_td_random->Fill( (double)spede_evt2->GetTime() - (double)spede_evt->GetTime() );
3614 } // if random
3615
3616 // Check for prompt electron-electron coincidences
3618
3619 // Fill and symmetrise
3620 eE_eE->Fill( spede_evt->GetEnergy(), spede_evt2->GetEnergy() );
3621 eE_eE->Fill( spede_evt2->GetEnergy(), spede_evt->GetEnergy() );
3622
3623 // Apply EBIS condition
3624 if( OnBeam( spede_evt ) && OnBeam( spede_evt2 ) ) {
3625
3626 // Fill and symmetrise
3627 eE_eE_ebis_on->Fill( spede_evt->GetEnergy(), spede_evt2->GetEnergy() );
3628 eE_eE_ebis_on->Fill( spede_evt2->GetEnergy(), spede_evt->GetEnergy() );
3629
3630 } // On Beam
3631
3632 } // if prompt
3633
3634 } // k: second electron
3635
3636 // Loop over gamma events
3637 // If electron-gamma and gamma without addback histograms are turned on
3638 if( react->HistElectronGamma() && react->HistWithoutAddback() ) {
3639
3640 for( unsigned int k = 0; k < read_evts->GetGammaRayMultiplicity(); ++k ){
3641
3642 // Get gamma-ray event
3644
3645 // Check user condition for matching a segment
3646 if( react->EventsGammaDemandSegment() && gamma_evt->GetSegmentMultiplicity() == 0 )
3647 continue;
3648
3649 // Check user condition for maximum segment multiplicity
3650 if( gamma_evt->GetSegmentMultiplicity() > react->EventsGammaMaxSegmentMultiplicity() )
3651 continue;
3652
3653 // Get the energy from the core or the segment as the user requests
3654 double gamma_energy = gamma_evt->GetEnergy();
3655 if( react->EventsGammaSegmentEnergy() )
3656 gamma_energy = gamma_evt->GetSegmentSumEnergy();
3657
3658 // Time differences
3659 gamma_electron_td->Fill( (double)spede_evt->GetTime() - (double)gamma_evt->GetTime() );
3660
3662 gamma_electron_td_prompt->Fill( (double)spede_evt->GetTime() - (double)gamma_evt->GetTime() );
3663 } // if prompt
3664 else if( RandomCoincidence( gamma_evt, spede_evt ) ){
3665 gamma_electron_td_random->Fill( (double)spede_evt->GetTime() - (double)gamma_evt->GetTime() );
3666 } // if random
3667
3668 // If electron-gamma histograms are turned on
3669 if( react->HistElectronGamma() ) {
3670
3671 // Check for prompt gamma-electron coincidences
3673
3674 // Fill
3675 gE_eE->Fill( gamma_energy, spede_evt->GetEnergy() );
3676
3677 // Apply EBIS condition
3678 if( OnBeam( gamma_evt ) && OnBeam( spede_evt ) ) {
3679
3680 // Fill
3681 gE_eE_ebis_on->Fill( gamma_energy, spede_evt->GetEnergy() );
3682
3683 } // On Beam
3684
3685 // Particle-electron-gamma coincidence spectra
3687
3688 } // if prompt
3689
3690 } // electron-gamma user option
3691
3692 } // k: gamma without addback
3693
3694 } // // electron-gamma user option
3695
3696 // If electron-gamma and addback histograms are turned on
3697 if( react->HistElectronGamma() && react->HistWithAddback() ) {
3698
3699 // Loop over gamma addback events
3700 for( unsigned int k = 0; k < read_evts->GetGammaRayAddbackMultiplicity(); ++k ){
3701
3702 // Get gamma-ray event
3704
3705 // Check user condition for matching a segment
3706 if( react->EventsGammaDemandSegment() && gamma_ab_evt->GetSegmentMultiplicity() == 0 )
3707 continue;
3708
3709 // Check user condition for maximum segment multiplicity
3710 if( gamma_ab_evt->GetSegmentMultiplicity() > react->EventsGammaMaxSegmentMultiplicity() )
3711 continue;
3712
3713 // Get the energy from the core or the segment as the user requests
3714 double gamma_energy = gamma_ab_evt->GetEnergy();
3715 if( react->EventsGammaSegmentEnergy() )
3716 gamma_energy = gamma_ab_evt->GetSegmentSumEnergy();
3717
3718 // Check for prompt gamma-electron coincidences
3720
3721 // Fill
3722 aE_eE->Fill( gamma_energy, spede_evt->GetEnergy() );
3723
3724 // Apply EBIS condition
3725 if( OnBeam( gamma_ab_evt ) && OnBeam( spede_evt ) ) {
3726
3727 // Fill
3728 aE_eE_ebis_on->Fill( gamma_energy, spede_evt->GetEnergy() );
3729
3730 } // On Beam
3731
3732 // Particle-electron-gamma coincidence spectra
3734
3735 } // if prompt
3736
3737 } // k: gamma with addback
3738
3739 } // electron-gamma user option
3740
3741 } // j: SPEDE electrons
3742
3743 } // if electron hists turned on
3744
3745
3746 // -------------------------- //
3747 // Loop over beam dump events //
3748 // -------------------------- //
3749 // If beam-dump histograms are turned on
3750 if( react->HistBeamDump() ) {
3751
3752 // Do loop over first beam-dump event
3753 for( unsigned int j = 0; j < read_evts->GetBeamDumpMultiplicity(); ++j ){
3754
3755 // Get beam-dump event
3757
3758 // Singles spectra
3759 bdE_singles->Fill( bd_evt->GetEnergy() );
3760 bdE_singles_det[bd_evt->GetDetector()]->Fill( bd_evt->GetEnergy() );
3761
3762 // Check for coincidences in case we have multiple beam dump detectors
3763 for( unsigned int k = j+1; k < read_evts->GetBeamDumpMultiplicity(); ++k ){
3764
3765 // Get second beam dump event
3767
3768 // Fill time differences symmetrically
3769 bd_bd_td->Fill( (double)bd_evt->GetTime() - (double)bd_evt2->GetTime() );
3770 bd_bd_td->Fill( (double)bd_evt2->GetTime() - (double)bd_evt->GetTime() );
3771
3772 // Check for prompt coincidence
3773 if( PromptCoincidence( bd_evt, bd_evt2 ) ) {
3774
3775 // Fill energies symmetrically
3776 bdE_bdE->Fill( bd_evt->GetEnergy(), bd_evt2->GetEnergy() );
3777 bdE_bdE->Fill( bd_evt2->GetEnergy(), bd_evt->GetEnergy() );
3778
3779 } // if prompt
3780
3781 } // k: second beam dump
3782
3783 } // j: beam dump
3784
3785 } // beam-dump user histograms on
3786
3787
3788 // ---------------------------- //
3789 // Loop over ion chamber events //
3790 // ---------------------------- //
3791 // If ionisation chamber histograms are turned on
3792 if( react->HistIonChamber() ) {
3793
3794 // Loop over ion chamber events
3795 for( unsigned int j = 0; j < read_evts->GetIonChamberMultiplicity(); ++j ){
3796
3797 // Get ion chamber event
3799
3800 // Single spectra
3801 ic_dE->Fill( ic_evt->GetEnergyLoss() );
3802 ic_E->Fill( ic_evt->GetEnergyRest() );
3803
3804 // 2D plot
3805 ic_dE_E->Fill( ic_evt->GetEnergyLoss(), ic_evt->GetEnergyRest() );
3806
3807 } // j: ion chamber
3808
3809 } // if ion chamber hists are on
3810
3811 // Progress bar
3812 bool update_progress = false;
3813 if( n_entries < 200 )
3814 update_progress = true;
3815 else if( i % (n_entries/100) == 0 || i+1 == n_entries )
3816 update_progress = true;
3817
3818 if( update_progress ) {
3819
3820 // Percent complete
3821 float percent = (float)(i+1)*100.0/(float)n_entries;
3822
3823 // Progress bar in GUI
3824 if( _prog_ ){
3825
3826 prog->SetPosition( percent );
3827 gSystem->ProcessEvents();
3828
3829 }
3830
3831 // Progress bar in terminal
3832 std::cout << " " << std::setw(6) << std::setprecision(4);
3833 std::cout << percent << "% \r";
3834 std::cout.flush();
3835
3836 }
3837
3838
3839 } // all events
3840
3841 return n_entries;
3842
3843}
3844
3845void MiniballHistogrammer::SetInputFile( std::vector<std::string> input_file_names ) {
3846
3848 input_tree = new TChain( "evt_tree" );
3849 for( unsigned int i = 0; i < input_file_names.size(); i++ ) {
3850
3851 input_tree->Add( input_file_names[i].data() );
3852
3853 }
3854 input_tree->SetBranchAddress( "MiniballEvts", &read_evts );
3855
3856 return;
3857
3858}
3859
3860void MiniballHistogrammer::SetInputFile( std::string input_file_name ) {
3861
3863 input_tree = new TChain( "evt_tree" );
3864 input_tree->Add( input_file_name.data() );
3865 input_tree->SetBranchAddress( "MiniballEvts", &read_evts );
3866
3867 return;
3868
3869}
3870
3871void MiniballHistogrammer::SetInputTree( TTree *user_tree ){
3872
3873 // Find the tree and set branch addresses
3874 input_tree = (TChain*)user_tree;
3875 input_tree->SetBranchAddress( "MiniballEvts", &read_evts );
3876
3877 return;
3878
3879}
unsigned int GetParticleMultiplicity()
unsigned int GetGammaRayAddbackMultiplicity()
unsigned int GetSpedeMultiplicity()
std::shared_ptr< GammaRayEvt > GetGammaRayEvt(unsigned int i)
std::shared_ptr< SpedeEvt > GetSpedeEvt(unsigned int i)
unsigned int GetIonChamberMultiplicity()
unsigned long GetT1()
unsigned long GetEBIS()
unsigned int GetGammaRayMultiplicity()
bool GetLaserStatus()
std::shared_ptr< BeamDumpEvt > GetBeamDumpEvt(unsigned int i)
unsigned int GetBeamDumpMultiplicity()
std::shared_ptr< IonChamberEvt > GetIonChamberEvt(unsigned int i)
std::shared_ptr< GammaRayAddbackEvt > GetGammaRayAddbackEvt(unsigned int i)
std::shared_ptr< ParticleEvt > GetParticleEvt(unsigned int i)
TH2F * aE_vs_crystal_1p_ejectile_dc_ejectile
TH2F * aE_vs_crystal_ejectile_dc_recoil
TH2F * gE_vs_costheta_ejectile_dc_ejectile
TH2F * gE_1p_ejectile_dc_ejectile_t1
std::vector< TH2F * > pE_theta_recoil_sec
std::shared_ptr< SpedeEvt > spede_evt2
TH2F * gE_vs_theta_1p_recoil_dc_none
TH2F * gE_vs_theta_ejectile_dc_ejectile
TH2F * gE_vs_crystal_recoil_dc_none
MiniballEvts * read_evts
TH2F * aE_vs_theta_recoil_dc_ejectile
std::vector< TH1F * > gamma_particle_td_sec
TH2F * aE_vs_theta_1p_ejectile_dc_ejectile
std::vector< std::vector< TH2F * > > pE_dE_cut_sec
TH2F * gE_vs_crystal_2p_dc_ejectile
TH2F * gE_vs_crystal_1p_ejectile_dc_none
TH2F * aE_vs_crystal_recoil_dc_recoil
TH2F * gE_vs_costheta2_recoil_dc_none
TH2F * aE_vs_theta_ejectile_dc_recoil
std::shared_ptr< TGProgressBar > prog
TH2F * aE_vs_theta_recoil_dc_recoil
TH2F * gE_vs_crystal_1p_recoil_dc_recoil
std::vector< TH2F * > pE_dE
void FillParticleGammaHists(std::shared_ptr< GammaRayEvt > g)
TH2F * aE_vs_theta_1p_recoil_dc_ejectile
std::shared_ptr< GammaRayEvt > gamma_evt
TH2F * aE_vs_costheta_recoil_dc_none
std::shared_ptr< BeamDumpEvt > bd_evt
unsigned long FillHists()
TH2F * aE_vs_crystal_ejectile_dc_ejectile
std::shared_ptr< GammaRayAddbackEvt > gamma_ab_evt2
TH2F * gE_vs_theta_1p_ejectile_dc_recoil
TH2F * gE_vs_theta_1p_recoil_dc_recoil
TH2F * gE_vs_crystal_ejectile_dc_none
bool EjectileCut(std::shared_ptr< ParticleEvt > p)
TH2F * aE_vs_crystal_1p_ejectile_dc_none
TH2F * eE_vs_theta_ejectile_dc_recoil
std::shared_ptr< IonChamberEvt > ic_evt
TH2F * gE_vs_costheta_recoil_dc_none
bool TransferCut(std::shared_ptr< ParticleEvt > p)
std::vector< std::vector< std::string > > spyhists
TH2F * gE_vs_crystal_1p_recoil_dc_none
std::shared_ptr< ParticleEvt > particle_evt
TH2F * eE_vs_theta_recoil_dc_ejectile
std::shared_ptr< SpedeEvt > spede_evt
std::vector< TH1F * > bdE_singles_det
std::vector< TH2F * > gamma_particle_E_vs_td_sec
TH2F * eE_vs_theta_1p_ejectile_dc_recoil
TH2F * gE_vs_crystal_1p_recoil_dc_ejectile
std::vector< TH2F * > pE_theta_coinc_sec
TH2F * aE_vs_costheta2_ejectile_dc_none
std::vector< std::vector< TH2F * > > pE_dE_sec
TH2F * aE_vs_theta_1p_ejectile_dc_recoil
TH2F * aE_vs_crystal_recoil_dc_ejectile
TH2F * gE_vs_costheta_ejectile_dc_none
TH2F * gE_vs_crystal_ejectile_dc_recoil
TH2F * aE_vs_crystal_1p_ejectile_dc_recoil
TH2F * eE_vs_theta_1p_recoil_dc_recoil
TH2F * gE_vs_costheta_recoil_dc_ejectile
std::vector< TH2F * > gE_vs_phi_dc_recoil
TH2F * aE_vs_crystal_1p_recoil_dc_recoil
TProfile * pBeta_theta_recoil
std::unique_ptr< TCanvas > c2
bool TwoParticleCut(std::shared_ptr< ParticleEvt > p1, std::shared_ptr< ParticleEvt > p2)
TH2F * eE_vs_ejectile_dc_recoil_segment
TH2F * aE_vs_costheta_recoil_dc_recoil
void SetSpyHists(std::vector< std::vector< std::string > > hists, short layout[2])
TH2F * aE_vs_theta_ejectile_dc_none
bool PromptCoincidence(std::shared_ptr< GammaRayEvt > g, std::shared_ptr< ParticleEvt > p)
TH2F * gE_vs_theta_1p_ejectile_dc_ejectile
std::vector< TH2F * > gE_vs_phi_dc_ejectile
TH2F * aE_vs_crystal_2p_dc_ejectile
TH2F * aE_vs_costheta_ejectile_dc_ejectile
TH2F * eE_vs_theta_recoil_dc_recoil
TH2F * eE_vs_theta_ejectile_dc_ejectile
TH2F * eE_vs_recoil_dc_recoil_segment
TH2F * aE_vs_crystal_recoil_dc_none
TH2F * eE_vs_theta_1p_recoil_dc_none
bool OffBeam(std::shared_ptr< GammaRayEvt > g)
TH2F * gE_vs_crystal_recoil_dc_ejectile
std::shared_ptr< GammaRayAddbackEvt > gamma_ab_evt
TH2F * eE_vs_theta_1p_ejectile_dc_none
TH2F * eE_vs_ejectile_dc_ejectile_segment
unsigned long n_entries
TH2F * eE_vs_theta_1p_recoil_dc_ejectile
TH2F * aE_vs_crystal_ejectile_dc_none
TH2F * aE_vs_costheta_recoil_dc_ejectile
TH2F * gE_vs_costheta2_ejectile_dc_none
std::shared_ptr< GammaRayEvt > gamma_evt2
TH2F * gE_vs_costheta_ejectile_dc_recoil
TH2F * aE_vs_theta_1p_recoil_dc_recoil
TH2F * gE_vs_theta_recoil_dc_ejectile
TH2F * gE_vs_crystal_1p_ejectile_dc_recoil
TH2F * aE_vs_crystal_1p_recoil_dc_ejectile
bool RandomCoincidence(std::shared_ptr< GammaRayEvt > g, std::shared_ptr< ParticleEvt > p)
std::unique_ptr< TCanvas > c1
TH2F * gE_vs_theta_ejectile_dc_none
TH2F * eE_vs_theta_1p_ejectile_dc_ejectile
std::vector< TH2F * > pE_dE_coinc
TH2F * aE_vs_theta_1p_recoil_dc_none
TH2F * gE_vs_theta_ejectile_dc_recoil
std::shared_ptr< MiniballSettings > set
TH2F * gE_vs_crystal_1p_ejectile_dc_ejectile
TH2F * gE_vs_theta_1p_ejectile_dc_none
TH2F * aE_vs_crystal_1p_recoil_dc_none
TH2F * aE_vs_theta_1p_ejectile_dc_none
TH2F * aE_vs_costheta2_recoil_dc_none
TH2F * gE_vs_crystal_recoil_dc_recoil
TH2F * eE_vs_recoil_dc_none_segment
TH2F * eE_vs_ejectile_dc_none_segment
std::shared_ptr< BeamDumpEvt > bd_evt2
TH2F * aE_vs_theta_ejectile_dc_ejectile
TH2F * gE_vs_theta_recoil_dc_recoil
TH2F * aE_1p_ejectile_dc_ejectile_t1
bool RecoilCut(std::shared_ptr< ParticleEvt > p)
void FillParticleGammaGammaHists(std::shared_ptr< GammaRayEvt > g1, std::shared_ptr< GammaRayEvt > g2)
TH2F * gE_vs_crystal_ejectile_dc_ejectile
TH2F * eE_vs_recoil_dc_ejectile_segment
std::vector< std::vector< TH2F * > > pE_dE_coinc_sec
std::shared_ptr< MiniballReaction > react
TH2F * gE_vs_theta_1p_recoil_dc_ejectile
TH2F * aE_vs_costheta_ejectile_dc_recoil
std::shared_ptr< ParticleEvt > particle_evt2
void SetInputTree(TTree *user_tree)
MiniballHistogrammer(std::shared_ptr< MiniballReaction > myreact, std::shared_ptr< MiniballSettings > myset)
void SetInputFile(std::vector< std::string > input_file_names)
void FillParticleElectronGammaHists(std::shared_ptr< SpedeEvt > s, std::shared_ptr< GammaRayEvt > g)
TH2F * gE_vs_costheta_recoil_dc_recoil
void FillParticleElectronHists(std::shared_ptr< SpedeEvt > s)
TH2F * eE_vs_theta_ejectile_dc_none
std::vector< TH2F * > pE_theta_ejectile_sec
std::vector< TH2F * > pE_theta_sec
bool OnBeam(std::shared_ptr< GammaRayEvt > g)
std::vector< TH2F * > pE_dE_cut
TH2F * aE_vs_costheta_ejectile_dc_none
TProfile * pBeta_theta_ejectile
std::shared_ptr< MiniballSettings > myset
Definition mb_sort.cc:123
std::shared_ptr< MiniballReaction > myreact
Definition mb_sort.cc:130