Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcRawShowerHit.cxx
Go to the documentation of this file.
1
11#include "THcRawShowerHit.h"
12
13#include <iostream>
14#include <stdexcept>
15
16
18 fAdcHits()
19{}
20
21
24
25 if (this != &right) {
26 for (Int_t iAdcSig=0; iAdcSig<fNAdcSignals; ++iAdcSig) {
27 fAdcHits[iAdcSig] = right.fAdcHits[iAdcSig];
28 }
29 }
30
31 return *this;
32}
33
34
36
37
40
41 for (Int_t iAdcSig=0; iAdcSig<fNAdcSignals; ++iAdcSig) {
42 fAdcHits[iAdcSig].Clear();
43 }
44}
45
46
48 if (0 <= signal && signal < fNAdcSignals) {
49 fAdcHits[signal].SetData(data);
50 }
51 else {
52 throw std::out_of_range(
53 "`THcRawShowerHit::SetData`: only signals `0` and `1` available!"
54 );
55 }
56}
57
58
60 if (0 <= signal && signal < fNAdcSignals) {
61 fAdcHits[signal].SetSample(data);
62 }
63 else {
64 throw std::out_of_range(
65 "`THcRawShowerHit::SetSample`: only signals `0` and `1` available!"
66 );
67 }
68}
69
70
72 Int_t signal, Int_t data, Int_t time, Int_t pedestal, Int_t peak
73) {
74 if (0 <= signal && signal < fNAdcSignals) {
76 }
77 else {
78 throw std::out_of_range(
79 "`THcRawShowerHit::SetDataTimePedestalPeak`: only signals `0` and `1` available!"
80 );
81 }
82}
83
84
85void THcRawShowerHit::SetReference(Int_t signal, Int_t reference) {
86 if (signal < fNAdcSignals) {
87 fAdcHits[signal].SetRefTime(reference);
88 } else {
89 throw std::out_of_range(
90 "`THcRawHodoHit::SetReference`: only signals `2` and `3` available!"
91 );
92 }
93}
94
96 if (signal < fNAdcSignals) {
97 fAdcHits[signal].SetRefDiffTime(reference);
98 } else {
99 throw std::out_of_range(
100 "`THcRawHodoHit::SetReference`: only signals `2` and `3` available!"
101 );
102 }
103}
104
105
107 if (0 <= signal && signal < fNAdcSignals) {
108 return fAdcHits[signal].GetRawData();
109 }
110 else {
111 throw std::out_of_range(
112 "`THcRawShowerHit::GetData`: only signals `0` and `1` available!"
113 );
114 }
115}
116
117
119 if (0 <= signal && signal < fNAdcSignals) {
120 return fAdcHits[signal].GetRawData();
121 }
122 else {
123 throw std::out_of_range(
124 "`THcRawShowerHit::GetRawData`: only signals `0` and `1` available!"
125 );
126 }
127}
128
129
131 if (0 <= signal && signal < fNAdcSignals) {
132 return kADC;
133 }
134 else {
135 throw std::out_of_range(
136 "`THcRawShowerHit::GetSignalType`: only signals `0` and `1` available!"
137 );
138 }
139}
140
141
145
146
150
151
155
156
158 for (Int_t iAdcSig=0; iAdcSig<fNAdcSignals; ++iAdcSig) {
159 fAdcHits[iAdcSig].SetF250Params(NSA, NSB, NPED);
160 }
161}
162
163
int Int_t
uint32_t NSB
std::vector< uint32_t > peak
uint32_t NSA
uint32_t pedestal
uint32_t time
const char Option_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
ClassImp(VDC::AnalyticTTDConv) using namespace std
Class representing a single raw ADC hit.
Definition THcRawAdcHit.h:7
void SetData(Int_t data)
Sets raw ADC value.
void SetRefDiffTime(Int_t refDiffTime)
void SetDataTimePedestalPeak(Int_t data, Int_t time, Int_t pedestal, Int_t peak)
Sets various bits of ADC data.
Int_t GetRawData(UInt_t iPulse=0) const
Gets raw pulse integral. In channels.
void SetSample(Int_t data)
Sets raw signal sample.
virtual void Clear(Option_t *opt="")
Clears variables before next event.
void SetF250Params(Int_t NSA, Int_t NSB, Int_t NPED)
Sets F250 parameters used for pedestal subtraction.
void SetRefTime(Int_t refTime)
Sets reference time. In channels.
THcRawHit & operator=(const THcRawHit &rhs)=default
Class representing a single raw hit for a shower paddle.
static const Int_t fNAdcSignals
void SetF250Params(Int_t NSA, Int_t NSB, Int_t NPED)
THcRawShowerHit & operator=(const THcRawShowerHit &right)
THcRawAdcHit fAdcHits[fNAdcSignals]
virtual void SetData(Int_t signal, Int_t data)
virtual ESignalType GetSignalType(Int_t signal)
virtual ~THcRawShowerHit()
virtual void SetDataTimePedestalPeak(Int_t signal, Int_t data, Int_t time, Int_t pedestal, Int_t peak)
THcRawShowerHit(Int_t plane=0, Int_t counter=0)
virtual void SetSample(Int_t signal, Int_t data)
THcRawAdcHit & GetRawAdcHitNeg()
virtual Int_t GetData(Int_t signal)
THcRawAdcHit & GetRawAdcHitPos()
virtual void Clear(Option_t *opt="")
virtual Int_t GetNSignals()
virtual void SetReference(Int_t signal, Int_t reference)
virtual Int_t GetRawData(Int_t signal)
virtual void SetReferenceDiff(Int_t signal, Int_t reference)
virtual void Clear(Option_t *="")