10 : m_decayTime(a_decayTime),
11 m_beta(exp(-1.0/m_decayTime)),
58 if ( cancelSignal )
m_alpha = 0.0;
75 if ( cancelSignal )
m_alpha = 0.0;
122 bool havePedVector =
m_ppedvec !=
nullptr;
123 if ( havePedVector &&
m_ppedvec->size() < nsam )
return 2;
124 m_s.resize(nsam, 0.0);
125 m_t.resize(nsam, 0.0);
129 for (
Index isam=0; isam<nsam; ++isam ) {
131 if ( havePedVector ) ped = (*m_ppedvec)[isam];
132 s =
m_d[isam] - t - ped;
153 bool havePedVector =
m_ppedvec !=
nullptr;
154 if ( havePedVector &&
m_ppedvec->size() < nsam )
return 2;
155 m_d.resize(nsam, 0.0);
156 m_t.resize(nsam, 0.0);
160 for (
Index isam=0; isam<nsam; ++isam ) {
164 if ( havePedVector ) ped = (*m_ppedvec)[isam];
165 m_d[isam] = s + t + ped;
175 if ( nsam == 0 )
return nullptr;
176 Name hnam =
"hst_data";
177 Name httl =
"Sample data; Tick;" +
unit();
178 TH1* ph =
new TH1F(hnam.c_str(), httl.c_str(), nsam, 0, nsam);
179 ph->SetDirectory(
nullptr);
182 for (
Index isam=0; isam<nsam; ++isam ) {
183 ph->SetBinContent(isam+1,
m_d[isam]);
194 if ( nsam == 0 )
return nullptr;
195 Name hnam =
"hst_signal";
196 Name httl =
"Sample signal; Tick;" +
unit();
197 TH1* ph =
new TH1F(hnam.c_str(), httl.c_str(), nsam, 0, nsam);
198 ph->SetDirectory(
nullptr);
201 for (
Index isam=0; isam<nsam; ++isam ) {
202 ph->SetBinContent(isam+1,
m_s[isam]);
213 if ( nsam == 0 )
return nullptr;
214 Name hnam =
"hst_tail";
215 Name httl =
"Sample tail; Tick;" +
unit();
216 TH1* ph =
new TH1F(hnam.c_str(), httl.c_str(), nsam, 0, nsam);
217 ph->SetDirectory(
nullptr);
220 for (
Index isam=0; isam<nsam; ++isam ) {
221 ph->SetBinContent(isam+1,
m_t[isam]);
std::vector< float > FloatVector
int setData(const FloatVector &inData)
const FloatVector * m_ppedvec
int setSignal(const FloatVector &inSignal)
int setPedestal(float val)
int setBeta(float val, bool cancelSignal)
int setDecayTime(float val, bool cancelSignal)
int setPedestalVector(const FloatVector *pval)
int setDataZero(Index nsam)
SampleTailer(float a_decayTime)