AlcapDAQ
1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
musun_analysis_code
TNaIHit.h
Go to the documentation of this file.
1
#ifndef TNaIHit_h
2
#define TNaIHit_h
3
4
#include "TObject.h"
5
6
class
TOctalFADCIsland
;
7
10
class
TNaIHit
:
public
TObject{
11
public
:
12
TNaIHit
();
13
TNaIHit
(
const
TOctalFADCIsland
& timePulse,
const
TOctalFADCIsland
& energyPulse,
int
count
,
int
nAv);
14
TNaIHit
(
const
TOctalFADCIsland
& timePulse,
const
TOctalFADCIsland
& energyPulse,
int
count);
15
16
double
GetTime
()
const
{
return
GetTimingTime
(); }
17
double
GetEnergy
()
const
{
return
GetEnergyAmp
(); }
18
int
GetDetector
()
const
{
return
detector
;}
19
20
void
SetFromTimingPulse
(
const
TOctalFADCIsland
& timePulse);
21
void
SetFromEnergyPulse
(
const
TOctalFADCIsland
& energyPulse);
22
23
const
TOctalFADCIsland
*
GetTimingIsland
()
const
{
return
fTimePulse
; }
24
const
TOctalFADCIsland
*
GetEnergyIsland
()
const
{
return
fEnergyPulse
; }
25
26
void
SetTimingIsland
(
const
TOctalFADCIsland
* island) {
fTimePulse
= island;}
27
void
SetEnergyIsland
(
const
TOctalFADCIsland
* island) {
fEnergyPulse
= island;}
28
29
double
GetTimingTime
()
const
{
return
fTimingTime
; }
30
double
GetTimingAmp
()
const
{
return
fTimingAmp
; }
31
double
GetEnergyTime
()
const
{
return
fEnergyTime
; }
32
double
GetEnergyAmp
()
const
{
return
fEnergyAmp
; }
33
34
void
SetTimingTime
(
double
time
) {
fTimingTime
=
time
;}
35
void
SetEnergyTime
(
double
time
) {
fEnergyTime
=
time
; }
36
void
SetTimingAmp
(
double
amp) {
fTimingAmp
= amp;}
37
void
SetEnergyAmp
(
double
amp) {
fEnergyAmp
= amp; }
38
void
SetDetector
(
int
det) {
detector
= det;}
39
40
double
GetCount
()
const
{
return
fCount
; }
41
double
GetnAverage
()
const
{
return
nAverage
; }
42
bool
GetPileUp
()
const
{
return
fPileUp
; }
43
bool
GetNoisy
()
const
{
return
fNoisy
; }
44
45
46
47
void
SetCount
(
int
counts){
fCount
= counts; }
48
void
SetnAverage
(
int
Av){
nAverage
= Av;}
49
void
SetPileUp
(
bool
PU){
fPileUp
= PU; }
50
void
SetNoisy
(
bool
fN){
fNoisy
= fN; }
51
52
53
54
struct
TNaIHitTimeComparator
{
55
bool
operator()
(
const
TNaIHit
& a,
double
time
) {
56
return
a.
GetTime
() <
time
;
57
}
58
bool
operator()
(
double
time
,
const
TNaIHit
& b) {
59
return
time < b.
GetTime
();
60
}
61
};
62
63
struct
TNaIHitComparator
{
64
bool
operator()
(
const
TNaIHit
& a,
const
TNaIHit
& b){
65
return
a.
GetTime
() < b.
GetTime
();
66
}
67
};
68
69
struct
TimeSortNaIHits
{
70
bool
operator()
(
const
TNaIHit
& h1,
const
TNaIHit
& h2) {
71
int
t1 = h1.
GetTime
();
72
int
t2 = h2.
GetTime
();
73
return
t1 < t2;
74
}
75
};
76
77
private
:
78
79
double
fTimingTime
;
80
double
fTimingAmp
;
// save as an integer, 100 times the real values
81
double
fEnergyTime
;
82
double
fEnergyAmp
;
83
84
int
detector
;
//"1" is NaI, "2" is CsI
85
int
fCount
;
86
int
nAverage
;
87
bool
fPileUp
;
88
bool
fNoisy
;
//There was switching power supply noisy on the timing channel. This does not mean the hit is useless, but the E info from the PMT pulse was degraded. flag this hit
89
90
const
TOctalFADCIsland
*
fTimePulse
;
91
const
TOctalFADCIsland
*
fEnergyPulse
;
92
93
94
ClassDef
(
TNaIHit
,1);
95
96
};
97
98
#endif
Generated by
1.8.4