#include <DataTweaker.h>
Definition at line 24 of file DataTweaker.h.
◆ DataTweaker()
LArSamples::DataTweaker::DataTweaker |
( |
| ) |
|
|
default |
◆ addSample()
void LArSamples::DataTweaker::addSample |
( |
unsigned int |
n | ) |
|
|
inline |
◆ findOption()
bool DataTweaker::findOption |
( |
TString & |
tweaks, |
|
|
const TString & |
option |
|
) |
| const |
Definition at line 38 of file DataTweaker.cxx.
40 int i = tweaks.Index(option);
41 if (
i < 0)
return false;
42 tweaks = tweaks(0,
i) + tweaks(
i + option.Length(), tweaks.Length() -
i - option.Length());
◆ set()
bool DataTweaker::set |
( |
const TString & |
tweaks | ) |
|
Definition at line 23 of file DataTweaker.cxx.
25 TString toMod = tweaks;
32 if (toMod ==
"")
return true;
33 cout <<
"Invalid tweaker option(s) " << toMod << endl;
◆ setAdjust()
void LArSamples::DataTweaker::setAdjust |
( |
bool |
adjust = true | ) |
|
|
inline |
◆ setFitParams()
void LArSamples::DataTweaker::setFitParams |
( |
Chi2Params |
params | ) |
|
|
inline |
◆ setNSamplesTrunctation()
void LArSamples::DataTweaker::setNSamplesTrunctation |
( |
unsigned int |
n | ) |
|
|
inline |
◆ setRefit()
void LArSamples::DataTweaker::setRefit |
( |
bool |
refit = true | ) |
|
|
inline |
◆ setRemoveNoiseCorrelations()
void LArSamples::DataTweaker::setRemoveNoiseCorrelations |
( |
bool |
remove = true | ) |
|
|
inline |
◆ setRemoveRoIs()
void LArSamples::DataTweaker::setRemoveRoIs |
( |
bool |
removeRoIs = true | ) |
|
|
inline |
◆ tweak() [1/2]
Data * DataTweaker::tweak |
( |
const Data & |
data, |
|
|
int |
evtIndex = -1 |
|
) |
| const |
Definition at line 47 of file DataTweaker.cxx.
49 std::vector<short> samples =
data.container().samples();
50 std::vector<float> corrs =
data.container().corrs();
51 float time =
data.container().ofcTime();
52 double k = 1, deltaT = 0;
55 for (
unsigned int i = 1;
i < corrs.size();
i++) corrs[
i] = 0;
58 unsigned int maxIndex =
data.maxPosition();
64 if (i2 > (
int)
data.nSamples()) i2 = (
int)
data.nSamples();
66 for (
int i = i1;
i < i2;
i++) samples.push_back(
data.sample(
i));
67 corrs.resize(i2 - i1);
72 std::vector<short> oldSamples = samples;
74 for (std::map<unsigned int, bool>::const_iterator
i =
m_samples.begin();
77 samples.push_back(oldSamples[
i->first]);
93 if (!
result)
return nullptr;
97 if (!
data.history() ||
data.adcMax() == 0)
return nullptr;
99 if (!
ofc)
return nullptr;
104 if (evtIndex < 0) evtIndex =
data.container().eventIndex();
108 data.container().energy(), time + deltaT,
data.container().quality(),
109 data.container().pedestal(),
data.container().pedestalRMS(),
110 data.container().status(),
k*
data.container().adcMax());
◆ tweak() [2/2]
◆ m_adjust
bool LArSamples::DataTweaker::m_adjust {false} |
|
private |
◆ m_fitParams
◆ m_nSamplesTruncation
unsigned int LArSamples::DataTweaker::m_nSamplesTruncation {0} |
|
private |
◆ m_refit
bool LArSamples::DataTweaker::m_refit {false} |
|
private |
◆ m_removeNoiseCorrelations
bool LArSamples::DataTweaker::m_removeNoiseCorrelations {false} |
|
private |
◆ m_removeRoIs
bool LArSamples::DataTweaker::m_removeRoIs {false} |
|
private |
◆ m_samples
std::map<unsigned int, bool> LArSamples::DataTweaker::m_samples |
|
private |
The documentation for this class was generated from the following files:
bool fit(const LArSamples::AbsShape &data, const AbsShape &reference, double &k, double &deltaT, double &chi2, const ScaledErrorData *sed=0) const