![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <ZDCPulseAnalyzer.h>
|
enum | {
PulseBit = 0,
LowGainBit = 1,
FailBit = 2,
HGOverflowBit = 3,
HGUnderflowBit = 4,
PSHGOverUnderflowBit = 5,
LGOverflowBit = 6,
LGUnderflowBit = 7,
PrePulseBit = 8,
PostPulseBit = 9,
FitFailedBit = 10,
BadChisqBit = 11,
BadT0Bit = 12,
ExcludeEarlyLGBit = 13,
ExcludeLateLGBit = 14,
preExpTailBit = 15,
FitMinAmpBit = 16,
RepassPulseBit = 17,
ArmSumIncludeBit = 18
} |
|
enum | TimingCorrMode { NoTimingCorr = 0,
TimingCorrLin,
TimingCorrLog
} |
|
|
| ZDCPulseAnalyzer (ZDCMsg::MessageFunctionPtr msgFunc_p, const std::string &tag, int Nsample, float deltaTSample, size_t preSampleIdx, int pedestal, float gainHG, const std::string &fitFunction, int peak2ndDerivMinSample, float peak2DerivMinThreshHG, float peak2DerivMinThreshLG) |
|
| ~ZDCPulseAnalyzer () |
|
void | enableDelayed (float deltaT, float pedestalShift, bool fixedBaseline=false) |
|
void | enableRepass (float peak2ndDerivMinRepassHG, float peak2ndDerivMinRepassLG) |
|
void | enableTimeSigCut (bool AND, float sigCut, std::string TF1String, const std::vector< double > &parsHG, const std::vector< double > &parsLG) |
|
void | enablePreExclusion (unsigned int maxSamplesExcl, unsigned int HGADCThresh, unsigned int LGADCThresh) |
|
void | enablePostExclusion (unsigned int maxSamplesExcl, unsigned int HGADCThresh, unsigned int LGADCThresh) |
|
void | SetPeak2ndDerivMinTolerance (size_t tolerance) |
|
void | SetForceLG (bool forceLG) |
|
bool | ForceLG () const |
|
void | set2ndDerivStep (size_t step) |
|
void | SetCutValues (float chisqDivAmpCutHG, float chisqDivAmpCutLG, float deltaT0MinHG, float deltaT0MaxHG, float deltaT0MinLG, float deltaT0MaxLG) |
|
void | SetNoiseSigmas (float noiseSigHG, float noiseSigLG) |
|
void | SetGainFactorsHGLG (float gainFactorHG, float gainFactorLG) |
|
void | SetFitMinMaxAmp (float minAmpHG, float minAmpLG, float maxAmpHG, float maxAmpLG) |
|
void | SetTauT0Values (bool fixTau1, bool fixTau2, float tau1, float tau2, float t0HG, float t0LG) |
|
void | SetADCOverUnderflowValues (int HGOverflowADC, int HGUnderflowADC, int LGOverflowADC) |
|
void | SetTimingCorrParams (TimingCorrMode mode, float refADC, float refScale, const std::vector< float > &HGT0CorrParams, const std::vector< float > &LGT0CorrParams) |
|
void | SetFitTimeMax (float tmax) |
|
void | SetNonlinCorrParams (float refADC, float refScale, const std::vector< float > ¶msHG, const std::vector< float > ¶msLG) |
|
bool | LoadAndAnalyzeData (const std::vector< float > &ADCSamplesHG, const std::vector< float > &ADCSamplesLG) |
|
bool | LoadAndAnalyzeData (const std::vector< float > &ADCSamplesHG, const std::vector< float > &ADCSamplesLG, const std::vector< float > &ADCSamplesHGDelayed, const std::vector< float > &ADCSamplesLGDelayed) |
|
bool | ReanalyzeData () |
|
bool | HaveData () const |
|
bool | HavePulse () const |
|
bool | UseLowGain () const |
|
bool | Failed () const |
|
bool | HGOverflow () const |
|
bool | HGUnderflow () const |
|
bool | PSHGOverUnderflow () const |
|
bool | LGOverflow () const |
|
bool | LGUnderflow () const |
|
bool | PrePulse () const |
|
bool | PostPulse () const |
|
bool | FitFailed () const |
|
bool | BadChisq () const |
|
bool | BadT0 () const |
|
bool | ExcludeEarlyLG () const |
|
bool | ExcludeLateLG () const |
|
bool | preExpTail () const |
|
bool | fitMinimumAmplitude () const |
|
bool | repassPulse () const |
|
bool | ArmSumInclude () const |
|
float | GetFitAmplitude () const |
|
float | GetFitT0 () const |
|
float | GetT0Sub () const |
|
float | GetT0Corr () const |
|
float | getTimeSig () const |
|
float | GetChisq () const |
|
float | GetFitTau1 () const |
|
float | GetFitTau2 () const |
|
float | GetFitPreT0 () const |
|
float | GetFitPreAmp () const |
|
float | GetFitPostT0 () const |
|
float | GetFitPostAmp () const |
|
float | GetFitExpAmp () const |
|
float | GetAmpNoNonLin () const |
|
float | GetAmplitude () const |
|
float | GetAmpError () const |
|
float | GetPreExpAmp () const |
|
float | GetPresample () const |
|
float | GetMaxADC () const |
|
float | GetMinADC () const |
|
int | GetMaxADCSample () const |
|
int | GetMinADCSample () const |
|
float | GetMaxDelta () const |
|
float | GetMinDelta () const |
|
float | GetFitTMax () const |
|
float | GetFitTMin () const |
|
float | GetdelayBS () const |
|
float | GetMinDeriv2nd () const |
|
float | GetMinDeriv2ndIndex () const |
|
unsigned int | GetStatusMask () const |
|
float | GetPreSampleAmp () const |
|
float | GetBkgdMaxFraction () const |
|
float | GetDelayedBaselineShiftFit () const |
|
float | GetDelayedBaselineCorr () const |
|
const TH1 * | GetHistogramPtr () const |
|
std::shared_ptr< TGraphErrors > | GetCombinedGraph () const |
|
std::shared_ptr< TGraphErrors > | GetGraph () const |
|
std::vector< float > | GetFitPulls () const |
|
std::shared_ptr< TGraphErrors > | GetUndelayedGraph () const |
|
std::shared_ptr< TGraphErrors > | GetDelayedGraph () const |
|
void | dump () const |
|
void | dumpSetting () const |
|
void | dumpTF1 (const TF1 *) const |
|
const std::vector< float > & | GetSamplesSub () const |
|
const std::vector< float > & | GetSamplesDeriv2nd () const |
|
|
typedef std::vector< float >::const_iterator | SampleCIter |
|
|
void | Reset (bool reanalyze=false) |
|
void | SetDefaults () |
|
void | SetupFitFunctions () |
|
bool | DoAnalysis (bool repass) |
|
bool | ScanAndSubtractSamples () |
|
bool | AnalyzeData (size_t nSamples, size_t preSample, const std::vector< float > &samples, const std::vector< bool > &useSamples, float peak2ndDerivMinThresh, float noiseSig, const std::vector< float > &toCorrParams, float maxChisqDivAmp, float minT0Corr, float maxT0Corr) |
|
void | FillHistogram (const std::vector< float > &samples, float noiseSig) const |
|
void | DoFit () |
|
void | DoFitCombined () |
|
void | UpdateFitterTimeLimits (TFitter *fitter, ZDCFitWrapper *wrapper, bool prePulse) |
|
Definition at line 23 of file ZDCPulseAnalyzer.h.
◆ SampleCIter
◆ anonymous enum
Enumerator |
---|
PulseBit | |
LowGainBit | |
FailBit | |
HGOverflowBit | |
HGUnderflowBit | |
PSHGOverUnderflowBit | |
LGOverflowBit | |
LGUnderflowBit | |
PrePulseBit | |
PostPulseBit | |
FitFailedBit | |
BadChisqBit | |
BadT0Bit | |
ExcludeEarlyLGBit | |
ExcludeLateLGBit | |
preExpTailBit | |
FitMinAmpBit | |
RepassPulseBit | |
ArmSumIncludeBit | |
Definition at line 26 of file ZDCPulseAnalyzer.h.
◆ TimingCorrMode
Enumerator |
---|
NoTimingCorr | |
TimingCorrLin | |
TimingCorrLog | |
Definition at line 51 of file ZDCPulseAnalyzer.h.
◆ ZDCPulseAnalyzer()
ZDCPulseAnalyzer::ZDCPulseAnalyzer |
( |
ZDCMsg::MessageFunctionPtr |
msgFunc_p, |
|
|
const std::string & |
tag, |
|
|
int |
Nsample, |
|
|
float |
deltaTSample, |
|
|
size_t |
preSampleIdx, |
|
|
int |
pedestal, |
|
|
float |
gainHG, |
|
|
const std::string & |
fitFunction, |
|
|
int |
peak2ndDerivMinSample, |
|
|
float |
peak2DerivMinThreshHG, |
|
|
float |
peak2DerivMinThreshLG |
|
) |
| |
◆ ~ZDCPulseAnalyzer()
ZDCPulseAnalyzer::~ZDCPulseAnalyzer |
( |
| ) |
|
|
inline |
◆ AnalyzeData()
bool ZDCPulseAnalyzer::AnalyzeData |
( |
size_t |
nSamples, |
|
|
size_t |
preSample, |
|
|
const std::vector< float > & |
samples, |
|
|
const std::vector< bool > & |
useSamples, |
|
|
float |
peak2ndDerivMinThresh, |
|
|
float |
noiseSig, |
|
|
const std::vector< float > & |
toCorrParams, |
|
|
float |
maxChisqDivAmp, |
|
|
float |
minT0Corr, |
|
|
float |
maxT0Corr |
|
) |
| |
|
private |
Definition at line 912 of file ZDCPulseAnalyzer.cxx.
932 bool haveFirst =
false;
933 unsigned int lastUsed = 0;
971 std::ostringstream pedMessage;
991 std::ostringstream baselineMsg;
992 baselineMsg <<
"Delayed samples baseline correction = " <<
m_baselineCorr << std::endl;
998 for (
size_t isample = 0; isample <
nSamples; isample++) {
1009 std::for_each(
m_samplesSub.begin(),
m_samplesSub.end(), [ = ] (
float & adcUnsub) {return adcUnsub -= m_preSample;} );
1086 if (derivPresampleSig < -5) {
1092 if (!useSample[isample])
continue;
1094 float sampleSig = -
m_samplesSub[isample]/(std::sqrt(2.0)*noiseSig);
1097 if ((sampleSig > 5 && sigRatio > 0.02) || sigRatio > 0.5) {
1106 for (
int isample = loopStart; isample <= loopLimit; isample++) {
1107 if (!useSample[isample])
continue;
1149 if (!useSample[isample])
continue;
1180 float derivSig = deriv/(std::sqrt(2)*noiseSig);
1189 if (std::abs(deriv2ndTest) > 0.15) {
1202 if (deriv2ndSig > 5 && deriv2ndTest < -0.1) {
1213 std::ostringstream ostrm;
1214 ostrm <<
"Post pulse found, m_maxSampleEvt = " <<
m_maxSampleEvt;
1234 std::ostringstream ostrm;
1235 ostrm <<
"Pulse fit successful with chisquare = " <<
m_fitChisq;
1253 for (
unsigned int ipow = 0; ipow < t0CorrParams.size(); ipow++) {
1262 bool failFixedCut = m_fitTimeCorr < minT0Corr || m_fitTimeCorr > maxT0Corr;
1272 double timeResolution = 0;
1284 if (failFixedCut)
m_badT0 =
true;
◆ ArmSumInclude()
bool ZDCPulseAnalyzer::ArmSumInclude |
( |
| ) |
const |
|
inline |
◆ BadChisq()
bool ZDCPulseAnalyzer::BadChisq |
( |
| ) |
const |
|
inline |
◆ BadT0()
bool ZDCPulseAnalyzer::BadT0 |
( |
| ) |
const |
|
inline |
◆ Calculate2ndDerivative()
std::vector< float > ZDCPulseAnalyzer::Calculate2ndDerivative |
( |
const std::vector< float > & |
inputData, |
|
|
unsigned int |
step |
|
) |
| |
|
staticprivate |
◆ CalculateDerivative()
std::vector< float > ZDCPulseAnalyzer::CalculateDerivative |
( |
const std::vector< float > & |
inputData, |
|
|
unsigned int |
step |
|
) |
| |
|
staticprivate |
◆ CombinedPulsesFCN()
void ZDCPulseAnalyzer::CombinedPulsesFCN |
( |
int & |
numParam, |
|
|
double * |
, |
|
|
double & |
f, |
|
|
double * |
par, |
|
|
int |
flag |
|
) |
| |
|
staticprivate |
Definition at line 34 of file ZDCPulseAnalyzer.cxx.
47 float delayBaselineAdjust =
par[0];
51 for (
int isample = 0; isample <
nSamples; isample++) {
61 double pull = (histValue - funcVal) / histError;
69 for (
int isample = 0; isample <
nSamples; isample++) {
78 double pull = (histValue - funcVal) / histError;
◆ DoAnalysis()
bool ZDCPulseAnalyzer::DoAnalysis |
( |
bool |
repass | ) |
|
|
private |
Definition at line 796 of file ZDCPulseAnalyzer.cxx.
798 float deriv2ndThreshHG = 0;
799 float deriv2ndThreshLG = 0;
836 double invNLCorr = 1.0;
898 float invNLCorr = 1.0;
◆ DoFit()
void ZDCPulseAnalyzer::DoFit |
( |
| ) |
|
|
private |
Definition at line 1303 of file ZDCPulseAnalyzer.cxx.
1313 if (ampInitial < fitAmpMin) ampInitial = fitAmpMin * 1.5;
1334 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1352 int fitStatus = result_ptr;
1358 if (fitStatus != 0 && result_ptr->Edm() > 0.001)
1368 if ((
int) constrFitResult_ptr != 0) {
1378 if ((
int) unconstrFitResult_ptr != 0) {
1385 if ((
int) constrFit2Result_ptr != 0) {
1392 result_ptr = constrFit2Result_ptr;
1396 result_ptr = unconstrFitResult_ptr;
1402 m_fitHist->GetListOfFunctions()->Clear();
◆ DoFitCombined()
void ZDCPulseAnalyzer::DoFitCombined |
( |
| ) |
|
|
private |
Definition at line 1435 of file ZDCPulseAnalyzer.cxx.
1445 if (ampInitial < fitAmpMin) ampInitial = fitAmpMin * 1.5;
1471 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1476 TFitter* theFitter =
nullptr;
1500 size_t numFitPar = theFitter->GetNumberTotalParameters();
1502 theFitter->GetMinuit()->fISW[4] = -1;
1507 theFitter->GetMinuit()->fISW[4] = -1;
1510 theFitter->GetMinuit()->mnexcm(
"SET NOWarnings",
nullptr,0,ierr);
1512 else theFitter->GetMinuit()->fISW[4] = 0;
1517 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1518 theFitter->ReleaseParameter(0);
1521 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1522 theFitter->FixParameter(0);
1526 double arglist[100];
1529 int status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1531 double fitAmp = theFitter->GetParameter(1);
1535 double chi2, edm, errdef;
1538 theFitter->GetStats(
chi2, edm, errdef, nvpar, nparx);
1543 if (
status || fitAmp < fitAmpMin * 1.01 || edm > 0.01){
1548 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1549 theFitter->FixParameter(0);
1553 if (fitAmp < fitAmpMin * 1.01) {
1559 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1563 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1568 theFitter->ReleaseParameter(0);
1576 theFitter->ReleaseParameter(0);
1577 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1582 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1583 theFitter->FixParameter(0);
1584 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1592 fitAmp = theFitter->GetParameter(1);
1596 if (fitAmp < fitAmpMin * 1.01) {
1600 if (!
s_quietFits) theFitter->GetMinuit()->fISW[4] = -1;
1602 std::vector<double> funcParams(numFitPar - 1);
1603 std::vector<double> funcParamErrs(numFitPar - 1);
1611 for (
size_t ipar = 1; ipar < numFitPar; ipar++) {
1612 funcParams[ipar - 1] = theFitter->GetParameter(ipar);
1613 funcParamErrs[ipar - 1] = theFitter->GetParError(ipar);
1621 theFitter->GetStats(
chi2, edm, errdef, nvpar, nparx);
1640 theFitter->ExecuteCommand(
"Cal1fcn", arglist, 1);
◆ dump()
void ZDCPulseAnalyzer::dump |
( |
| ) |
const |
Definition at line 1726 of file ZDCPulseAnalyzer.cxx.
1737 std::ostringstream message1;
1738 message1 <<
"samplesSub ";
1744 std::ostringstream message3;
1745 message3 <<
"samplesDeriv2nd ";
◆ dumpSetting()
void ZDCPulseAnalyzer::dumpSetting |
( |
| ) |
const |
◆ dumpTF1()
void ZDCPulseAnalyzer::dumpTF1 |
( |
const TF1 * |
func | ) |
const |
Definition at line 1754 of file ZDCPulseAnalyzer.cxx.
1756 std::string
message =
"Dump of TF1: " + std::string(func->GetName());
1759 unsigned int npar = func->GetNpar();
1760 for (
unsigned int ipar = 0; ipar < npar; ipar++) {
1761 std::ostringstream msgstr;
1763 double parMin = 0, parMax = 0;
1764 func->GetParLimits(ipar, parMin, parMax);
1766 msgstr <<
"Parameter " << ipar <<
", value = " << func->GetParameter(ipar) <<
", error = "
1767 << func->GetParError(ipar) <<
", min = " << parMin <<
", max = " << parMax;
◆ enableDelayed()
void ZDCPulseAnalyzer::enableDelayed |
( |
float |
deltaT, |
|
|
float |
pedestalShift, |
|
|
bool |
fixedBaseline = false |
|
) |
| |
◆ enablePostExclusion()
void ZDCPulseAnalyzer::enablePostExclusion |
( |
unsigned int |
maxSamplesExcl, |
|
|
unsigned int |
HGADCThresh, |
|
|
unsigned int |
LGADCThresh |
|
) |
| |
|
inline |
◆ enablePreExclusion()
void ZDCPulseAnalyzer::enablePreExclusion |
( |
unsigned int |
maxSamplesExcl, |
|
|
unsigned int |
HGADCThresh, |
|
|
unsigned int |
LGADCThresh |
|
) |
| |
|
inline |
◆ enableRepass()
void ZDCPulseAnalyzer::enableRepass |
( |
float |
peak2ndDerivMinRepassHG, |
|
|
float |
peak2ndDerivMinRepassLG |
|
) |
| |
◆ enableTimeSigCut()
void ZDCPulseAnalyzer::enableTimeSigCut |
( |
bool |
AND, |
|
|
float |
sigCut, |
|
|
std::string |
TF1String, |
|
|
const std::vector< double > & |
parsHG, |
|
|
const std::vector< double > & |
parsLG |
|
) |
| |
Definition at line 388 of file ZDCPulseAnalyzer.cxx.
397 std::string timeResHGName =
"TimeResFuncHG_" +
m_tag;
398 std::string timeResLGName =
"TimeResFuncLG_" +
m_tag;
400 TF1* funcHG_p =
new TF1(timeResHGName.c_str(), TF1String.c_str(), 0,
m_HGOverflowADC);
401 TF1* funcLG_p =
new TF1(timeResLGName.c_str(), TF1String.c_str(), 0,
m_LGOverflowADC);
403 if (parsHG.size() !=
static_cast<unsigned int>(funcHG_p->GetNpar()) ||
404 parsLG.size() !=
static_cast<unsigned int>(funcLG_p->GetNpar())) {
409 funcHG_p->SetParameters(&parsHG[0]);
410 funcLG_p->SetParameters(&parsLG[0]);
◆ ExcludeEarlyLG()
bool ZDCPulseAnalyzer::ExcludeEarlyLG |
( |
| ) |
const |
|
inline |
◆ ExcludeLateLG()
bool ZDCPulseAnalyzer::ExcludeLateLG |
( |
| ) |
const |
|
inline |
◆ Failed()
bool ZDCPulseAnalyzer::Failed |
( |
| ) |
const |
|
inline |
◆ FillHistogram()
void ZDCPulseAnalyzer::FillHistogram |
( |
const std::vector< float > & |
samples, |
|
|
float |
noiseSig |
|
) |
| const |
|
inlineprivate |
◆ FitFailed()
bool ZDCPulseAnalyzer::FitFailed |
( |
| ) |
const |
|
inline |
◆ fitMinimumAmplitude()
bool ZDCPulseAnalyzer::fitMinimumAmplitude |
( |
| ) |
const |
|
inline |
◆ ForceLG()
bool ZDCPulseAnalyzer::ForceLG |
( |
| ) |
const |
|
inline |
◆ GetAmpError()
float ZDCPulseAnalyzer::GetAmpError |
( |
| ) |
const |
|
inline |
◆ GetAmplitude()
float ZDCPulseAnalyzer::GetAmplitude |
( |
| ) |
const |
|
inline |
◆ GetAmpNoNonLin()
float ZDCPulseAnalyzer::GetAmpNoNonLin |
( |
| ) |
const |
|
inline |
◆ GetBkgdMaxFraction()
float ZDCPulseAnalyzer::GetBkgdMaxFraction |
( |
| ) |
const |
|
inline |
◆ GetChisq()
float ZDCPulseAnalyzer::GetChisq |
( |
| ) |
const |
|
inline |
◆ GetCombinedGraph()
std::shared_ptr< TGraphErrors > ZDCPulseAnalyzer::GetCombinedGraph |
( |
| ) |
const |
Definition at line 1818 of file ZDCPulseAnalyzer.cxx.
1824 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(2 *
m_Nsample));
1827 for (
int ipt = 0; ipt <
m_fitHist->GetNbinsX(); ipt++) {
1828 theGraph->SetPoint(npts,
m_fitHist->GetBinCenter(ipt + 1),
m_fitHist->GetBinContent(ipt + 1));
1829 theGraph->SetPointError(npts++, 0,
m_fitHist->GetBinError(ipt + 1));
1832 for (
int iDelayPt = 0; iDelayPt <
m_delayedHist->GetNbinsX(); iDelayPt++) {
1834 theGraph->SetPointError(npts++, 0,
m_delayedHist->GetBinError(iDelayPt + 1));
1837 TF1* func_p = (TF1*)
m_fitHist->GetListOfFunctions()->Last();
1839 theGraph->GetListOfFunctions()->Add(
new TF1(*func_p));
1840 m_fitHist->GetListOfFunctions()->SetOwner (
false);
1843 theGraph->SetName(( std::string(
m_fitHist->GetName()) +
"combinaed").c_str());
1845 theGraph->SetMarkerStyle(20);
1846 theGraph->SetMarkerColor(1);
◆ GetdelayBS()
float ZDCPulseAnalyzer::GetdelayBS |
( |
| ) |
const |
|
inline |
◆ GetDelayedBaselineCorr()
float ZDCPulseAnalyzer::GetDelayedBaselineCorr |
( |
| ) |
const |
|
inline |
◆ GetDelayedBaselineShiftFit()
float ZDCPulseAnalyzer::GetDelayedBaselineShiftFit |
( |
| ) |
const |
|
inline |
◆ GetDelayedGraph()
std::shared_ptr< TGraphErrors > ZDCPulseAnalyzer::GetDelayedGraph |
( |
| ) |
const |
Definition at line 1900 of file ZDCPulseAnalyzer.cxx.
1906 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(
m_Nsample));
1909 for (
int iDelayPt = 0; iDelayPt <
m_delayedHist->GetNbinsX(); iDelayPt++) {
1911 theGraph->SetPointError(npts++, 0,
m_delayedHist->GetBinError(iDelayPt + 1));
1914 TF1* func_p = (TF1*)
m_fitHist->GetListOfFunctions()->Last();
1915 theGraph->GetListOfFunctions()->Add(func_p);
1916 theGraph->SetName(( std::string(
m_fitHist->GetName()) +
"delayed").c_str());
1918 theGraph->SetMarkerStyle(20);
1919 theGraph->SetMarkerColor(kBlue);
◆ GetFitAmplitude()
float ZDCPulseAnalyzer::GetFitAmplitude |
( |
| ) |
const |
|
inline |
◆ GetFitExpAmp()
float ZDCPulseAnalyzer::GetFitExpAmp |
( |
| ) |
const |
|
inline |
◆ GetFitPostAmp()
float ZDCPulseAnalyzer::GetFitPostAmp |
( |
| ) |
const |
|
inline |
◆ GetFitPostT0()
float ZDCPulseAnalyzer::GetFitPostT0 |
( |
| ) |
const |
|
inline |
◆ GetFitPreAmp()
float ZDCPulseAnalyzer::GetFitPreAmp |
( |
| ) |
const |
|
inline |
◆ GetFitPreT0()
float ZDCPulseAnalyzer::GetFitPreT0 |
( |
| ) |
const |
|
inline |
◆ GetFitPulls()
std::vector< float > ZDCPulseAnalyzer::GetFitPulls |
( |
| ) |
const |
Definition at line 418 of file ZDCPulseAnalyzer.cxx.
437 std::vector<float> pulls(
m_Nsample, -100);
440 const TF1* fit_p = (
const TF1*) dataHist_p->GetListOfFunctions()->Last();
442 for (
size_t ibin = 0; ibin <
m_Nsample ; ibin++) {
443 float t = dataHist_p->GetBinCenter(ibin + 1);
444 float fitVal = fit_p->Eval(
t);
446 float histErr = dataHist_p->GetBinError(ibin + 1);
447 float pull = (histVal - fitVal)/histErr;
◆ GetFitT0()
float ZDCPulseAnalyzer::GetFitT0 |
( |
| ) |
const |
|
inline |
◆ GetFitTau1()
float ZDCPulseAnalyzer::GetFitTau1 |
( |
| ) |
const |
|
inline |
◆ GetFitTau2()
float ZDCPulseAnalyzer::GetFitTau2 |
( |
| ) |
const |
|
inline |
◆ GetFitTMax()
float ZDCPulseAnalyzer::GetFitTMax |
( |
| ) |
const |
|
inline |
◆ GetFitTMin()
float ZDCPulseAnalyzer::GetFitTMin |
( |
| ) |
const |
|
inline |
◆ GetGraph()
std::shared_ptr< TGraphErrors > ZDCPulseAnalyzer::GetGraph |
( |
| ) |
const |
Definition at line 1852 of file ZDCPulseAnalyzer.cxx.
1858 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(
m_Nsample));
1861 for (
int ipt = 0; ipt <
m_fitHist->GetNbinsX(); ipt++) {
1862 theGraph->SetPoint(npts,
m_fitHist->GetBinCenter(ipt + 1),
m_fitHist->GetBinContent(ipt + 1));
1863 theGraph->SetPointError(npts++, 0,
m_fitHist->GetBinError(ipt + 1));
1866 TF1* func_p = (TF1*)
m_fitHist->GetListOfFunctions()->Last();
1867 theGraph->GetListOfFunctions()->Add(func_p);
1868 theGraph->SetName(( std::string(
m_fitHist->GetName()) +
"not_combinaed").c_str());
1870 theGraph->SetMarkerStyle(20);
1871 theGraph->SetMarkerColor(1);
◆ GetHistogramPtr()
const TH1* ZDCPulseAnalyzer::GetHistogramPtr |
( |
| ) |
const |
|
inline |
◆ GetMaxADC()
float ZDCPulseAnalyzer::GetMaxADC |
( |
| ) |
const |
|
inline |
◆ GetMaxADCSample()
int ZDCPulseAnalyzer::GetMaxADCSample |
( |
| ) |
const |
|
inline |
◆ GetMaxDelta()
float ZDCPulseAnalyzer::GetMaxDelta |
( |
| ) |
const |
|
inline |
◆ GetMinADC()
float ZDCPulseAnalyzer::GetMinADC |
( |
| ) |
const |
|
inline |
◆ GetMinADCSample()
int ZDCPulseAnalyzer::GetMinADCSample |
( |
| ) |
const |
|
inline |
◆ GetMinDelta()
float ZDCPulseAnalyzer::GetMinDelta |
( |
| ) |
const |
|
inline |
◆ GetMinDeriv2nd()
float ZDCPulseAnalyzer::GetMinDeriv2nd |
( |
| ) |
const |
|
inline |
◆ GetMinDeriv2ndIndex()
float ZDCPulseAnalyzer::GetMinDeriv2ndIndex |
( |
| ) |
const |
|
inline |
◆ GetPreExpAmp()
float ZDCPulseAnalyzer::GetPreExpAmp |
( |
| ) |
const |
|
inline |
◆ GetPresample()
float ZDCPulseAnalyzer::GetPresample |
( |
| ) |
const |
|
inline |
◆ GetPreSampleAmp()
float ZDCPulseAnalyzer::GetPreSampleAmp |
( |
| ) |
const |
|
inline |
◆ GetSamplesDeriv2nd()
const std::vector<float>& ZDCPulseAnalyzer::GetSamplesDeriv2nd |
( |
| ) |
const |
|
inline |
◆ GetSamplesSub()
const std::vector<float>& ZDCPulseAnalyzer::GetSamplesSub |
( |
| ) |
const |
|
inline |
◆ GetStatusMask()
unsigned int ZDCPulseAnalyzer::GetStatusMask |
( |
| ) |
const |
◆ GetT0Corr()
float ZDCPulseAnalyzer::GetT0Corr |
( |
| ) |
const |
|
inline |
◆ GetT0Sub()
float ZDCPulseAnalyzer::GetT0Sub |
( |
| ) |
const |
|
inline |
◆ getTimeSig()
float ZDCPulseAnalyzer::getTimeSig |
( |
| ) |
const |
|
inline |
◆ GetUndelayedGraph()
std::shared_ptr< TGraphErrors > ZDCPulseAnalyzer::GetUndelayedGraph |
( |
| ) |
const |
Definition at line 1876 of file ZDCPulseAnalyzer.cxx.
1882 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(
m_Nsample));
1885 for (
int ipt = 0; ipt <
m_fitHist->GetNbinsX(); ipt++) {
1886 theGraph->SetPoint(npts,
m_fitHist->GetBinCenter(ipt + 1),
m_fitHist->GetBinContent(ipt + 1));
1887 theGraph->SetPointError(npts++, 0,
m_fitHist->GetBinError(ipt + 1));
1890 TF1* func_p = (TF1*)
m_fitHist->GetListOfFunctions()->Last();
1891 theGraph->GetListOfFunctions()->Add(func_p);
1892 theGraph->SetName(( std::string(
m_fitHist->GetName()) +
"undelayed").c_str());
1894 theGraph->SetMarkerStyle(20);
1895 theGraph->SetMarkerColor(1);
◆ HaveData()
bool ZDCPulseAnalyzer::HaveData |
( |
| ) |
const |
|
inline |
◆ HavePulse()
bool ZDCPulseAnalyzer::HavePulse |
( |
| ) |
const |
|
inline |
◆ HGOverflow()
bool ZDCPulseAnalyzer::HGOverflow |
( |
| ) |
const |
|
inline |
◆ HGUnderflow()
bool ZDCPulseAnalyzer::HGUnderflow |
( |
| ) |
const |
|
inline |
◆ LGOverflow()
bool ZDCPulseAnalyzer::LGOverflow |
( |
| ) |
const |
|
inline |
◆ LGUnderflow()
bool ZDCPulseAnalyzer::LGUnderflow |
( |
| ) |
const |
|
inline |
◆ LoadAndAnalyzeData() [1/2]
bool ZDCPulseAnalyzer::LoadAndAnalyzeData |
( |
const std::vector< float > & |
ADCSamplesHG, |
|
|
const std::vector< float > & |
ADCSamplesLG |
|
) |
| |
Definition at line 548 of file ZDCPulseAnalyzer.cxx.
551 (*m_msgFunc_p)(
ZDCMsg::Fatal,
"ZDCPulseAnalyzer::LoadAndAnalyzeData:: Wrong LoadAndAnalyzeData called -- expecting both delayed and undelayed samples");
◆ LoadAndAnalyzeData() [2/2]
bool ZDCPulseAnalyzer::LoadAndAnalyzeData |
( |
const std::vector< float > & |
ADCSamplesHG, |
|
|
const std::vector< float > & |
ADCSamplesLG, |
|
|
const std::vector< float > & |
ADCSamplesHGDelayed, |
|
|
const std::vector< float > & |
ADCSamplesLGDelayed |
|
) |
| |
Definition at line 573 of file ZDCPulseAnalyzer.cxx.
577 (*m_msgFunc_p)(
ZDCMsg::Fatal,
"ZDCPulseAnalyzer::LoadAndAnalyzeData:: Wrong LoadAndAnalyzeData called -- expecting only undelayed samples");
599 for (
size_t isample = 0; isample <
m_Nsample; isample++) {
600 float ADCHG = ADCSamplesHG[isample];
601 float ADCLG = ADCSamplesLG[isample];
◆ MakeCombinedFitter()
std::unique_ptr< TFitter > ZDCPulseAnalyzer::MakeCombinedFitter |
( |
TF1 * |
func | ) |
|
|
staticprivate |
Definition at line 1671 of file ZDCPulseAnalyzer.cxx.
1673 TVirtualFitter::SetDefaultFitter(
"Minuit");
1675 size_t nFitParams = func->GetNpar() + 1;
1676 std::unique_ptr<TFitter>
fitter = std::make_unique<TFitter>(nFitParams);
1678 fitter->GetMinuit()->fISW[4] = -1;
1679 fitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1681 for (
size_t ipar = 0; ipar < nFitParams - 1; ipar++) {
1682 double parLimitLow, parLimitHigh;
1684 func->GetParLimits(ipar, parLimitLow, parLimitHigh);
1685 if (std::abs(parLimitHigh / parLimitLow - 1) < 1
e-6) {
1686 double value = func->GetParameter(ipar);
1690 fitter->SetParameter(ipar + 1, func->GetParName(ipar), func->GetParameter(ipar), 0.01, lowLim, highLim);
1691 fitter->FixParameter(ipar + 1);
1694 double value = func->GetParameter(ipar);
1695 if (
value >= parLimitHigh)
value = parLimitHigh * 0.99;
1696 else if (
value <= parLimitLow)
value = parLimitLow * 1.01;
1698 double step =
std::min((parLimitHigh - parLimitLow)/100., (
value - parLimitLow)/100.);
1700 fitter->SetParameter(ipar + 1, func->GetParName(ipar),
value,
step, parLimitLow, parLimitHigh);
◆ obtainDelayedBaselineCorr()
float ZDCPulseAnalyzer::obtainDelayedBaselineCorr |
( |
const std::vector< float > & |
samples | ) |
|
|
staticprivate |
Definition at line 1977 of file ZDCPulseAnalyzer.cxx.
1987 float minScore = 1.0e9;
1988 unsigned int minIndex = 0;
1991 float deriv = derivVec[
idx];
1992 float prevDeriv = derivVec[
idx - 1];
1994 float derivDiff = deriv - prevDeriv;
1996 float deriv2nd = deriv2ndVec[
idx];
2002 float score = (deriv*deriv + 2*derivDiff*derivDiff +
2003 0.5*deriv2nd*deriv2nd);
2005 if (
score < minScore) {
2016 if (minIndex<2 or (minIndex+1) >=
nsamples){
2017 throw std::out_of_range(
"minIndex out of range in ZDCPulseAnalyzer::obtainDelayedBaselineCorr");
2019 float sample0 =
samples[minIndex - 2];
2020 float sample1 =
samples[minIndex - 1];
2021 float sample2 =
samples[minIndex];
2022 float sample3 =
samples[minIndex + 1];
2026 float baselineCorr = (0.5 * (sample1 - sample0 + sample3 - sample2) -
2027 0.25 * (sample3 - sample1 + sample2 - sample0));
2029 if (minIndex % 2 != 0) baselineCorr =-baselineCorr;
2031 return baselineCorr;
◆ PostPulse()
bool ZDCPulseAnalyzer::PostPulse |
( |
| ) |
const |
|
inline |
◆ preExpTail()
bool ZDCPulseAnalyzer::preExpTail |
( |
| ) |
const |
|
inline |
◆ PrePulse()
bool ZDCPulseAnalyzer::PrePulse |
( |
| ) |
const |
|
inline |
◆ PSHGOverUnderflow()
bool ZDCPulseAnalyzer::PSHGOverUnderflow |
( |
| ) |
const |
|
inline |
◆ QuietFits()
static bool ZDCPulseAnalyzer::QuietFits |
( |
| ) |
|
|
inlinestatic |
◆ ReanalyzeData()
bool ZDCPulseAnalyzer::ReanalyzeData |
( |
| ) |
|
◆ repassPulse()
bool ZDCPulseAnalyzer::repassPulse |
( |
| ) |
const |
|
inline |
◆ Reset()
void ZDCPulseAnalyzer::Reset |
( |
bool |
reanalyze = false | ) |
|
|
private |
◆ ScanAndSubtractSamples()
bool ZDCPulseAnalyzer::ScanAndSubtractSamples |
( |
| ) |
|
|
private |
Definition at line 637 of file ZDCPulseAnalyzer.cxx.
642 (*m_msgFunc_p)(
ZDCMsg::Verbose,
"Dumping all samples before subtraction: ");
644 std::ostringstream dumpStringHG;
645 dumpStringHG <<
"HG: ";
647 dumpStringHG << std::setw(4) <<
val <<
" ";
655 std::ostringstream dumpStringLG;
656 dumpStringLG <<
"LG: " << std::setw(4) << std::setfill(
' ');
658 dumpStringLG << std::setw(4) <<
val <<
" ";
673 for (
size_t isample = 0; isample <
m_NSamplesAna; isample++) {
754 std::ostringstream dumpStringUseHG;
755 dumpStringUseHG <<
"HG: ";
757 dumpStringUseHG <<
val <<
" ";
761 std::ostringstream dumpStringUseLG;
762 dumpStringUseLG <<
"LG: ";
764 dumpStringUseLG <<
val <<
" ";
776 if (m_lastHGOverFlowSample < 2 && m_lastHGOverFlowSample > -1) {
791 (*m_msgFunc_p)(
ZDCMsg::Verbose,
"ZDCPulseAnalyzer:: " +
m_tag +
": ScanAndSubtractSamples done");
◆ set2ndDerivStep()
void ZDCPulseAnalyzer::set2ndDerivStep |
( |
size_t |
step | ) |
|
|
inline |
◆ SetADCOverUnderflowValues()
void ZDCPulseAnalyzer::SetADCOverUnderflowValues |
( |
int |
HGOverflowADC, |
|
|
int |
HGUnderflowADC, |
|
|
int |
LGOverflowADC |
|
) |
| |
◆ SetCutValues()
void ZDCPulseAnalyzer::SetCutValues |
( |
float |
chisqDivAmpCutHG, |
|
|
float |
chisqDivAmpCutLG, |
|
|
float |
deltaT0MinHG, |
|
|
float |
deltaT0MaxHG, |
|
|
float |
deltaT0MinLG, |
|
|
float |
deltaT0MaxLG |
|
) |
| |
◆ SetDefaults()
void ZDCPulseAnalyzer::SetDefaults |
( |
| ) |
|
|
private |
◆ SetFitMinMaxAmp()
void ZDCPulseAnalyzer::SetFitMinMaxAmp |
( |
float |
minAmpHG, |
|
|
float |
minAmpLG, |
|
|
float |
maxAmpHG, |
|
|
float |
maxAmpLG |
|
) |
| |
◆ SetFitOPtions()
static void ZDCPulseAnalyzer::SetFitOPtions |
( |
const std::string & |
fitOptions | ) |
|
|
inlinestatic |
◆ SetFitTimeMax()
void ZDCPulseAnalyzer::SetFitTimeMax |
( |
float |
tmax | ) |
|
◆ SetForceLG()
void ZDCPulseAnalyzer::SetForceLG |
( |
bool |
forceLG | ) |
|
|
inline |
◆ SetGainFactorsHGLG()
void ZDCPulseAnalyzer::SetGainFactorsHGLG |
( |
float |
gainFactorHG, |
|
|
float |
gainFactorLG |
|
) |
| |
◆ SetNoiseSigmas()
void ZDCPulseAnalyzer::SetNoiseSigmas |
( |
float |
noiseSigHG, |
|
|
float |
noiseSigLG |
|
) |
| |
|
inline |
◆ SetNonlinCorrParams()
void ZDCPulseAnalyzer::SetNonlinCorrParams |
( |
float |
refADC, |
|
|
float |
refScale, |
|
|
const std::vector< float > & |
paramsHG, |
|
|
const std::vector< float > & |
paramsLG |
|
) |
| |
|
inline |
Definition at line 457 of file ZDCPulseAnalyzer.h.
459 std::string HGParamsStr =
"HG coefficients = ", LGParamsStr =
"LG coefficients = ";
464 (*m_msgFunc_p)(
ZDCMsg::Info, (
"Setting non-linear parameters for module: " +
m_tag +
", reference ADC = " +
◆ SetPeak2ndDerivMinTolerance()
void ZDCPulseAnalyzer::SetPeak2ndDerivMinTolerance |
( |
size_t |
tolerance | ) |
|
|
inline |
◆ SetQuietFits()
static void ZDCPulseAnalyzer::SetQuietFits |
( |
bool |
quiet | ) |
|
|
inlinestatic |
◆ SetSaveFitFunc()
static void ZDCPulseAnalyzer::SetSaveFitFunc |
( |
bool |
save | ) |
|
|
inlinestatic |
◆ SetTauT0Values()
void ZDCPulseAnalyzer::SetTauT0Values |
( |
bool |
fixTau1, |
|
|
bool |
fixTau2, |
|
|
float |
tau1, |
|
|
float |
tau2, |
|
|
float |
t0HG, |
|
|
float |
t0LG |
|
) |
| |
◆ SetTimingCorrParams()
void ZDCPulseAnalyzer::SetTimingCorrParams |
( |
TimingCorrMode |
mode, |
|
|
float |
refADC, |
|
|
float |
refScale, |
|
|
const std::vector< float > & |
HGT0CorrParams, |
|
|
const std::vector< float > & |
LGT0CorrParams |
|
) |
| |
|
inline |
◆ SetupFitFunctions()
void ZDCPulseAnalyzer::SetupFitFunctions |
( |
| ) |
|
|
private |
◆ UpdateFitterTimeLimits()
void ZDCPulseAnalyzer::UpdateFitterTimeLimits |
( |
TFitter * |
fitter, |
|
|
ZDCFitWrapper * |
wrapper, |
|
|
bool |
prePulse |
|
) |
| |
|
private |
Definition at line 1709 of file ZDCPulseAnalyzer.cxx.
1711 double parLimitLow, parLimitHigh;
1714 func_p->GetParLimits(1, parLimitLow, parLimitHigh);
1716 fitter->SetParameter(2, func_p->GetParName(1), func_p->GetParameter(1), 0.01, parLimitLow, parLimitHigh);
1721 func_p->GetParLimits(parIndex, parLimitLow, parLimitHigh);
1722 fitter->SetParameter(parIndex + 1, func_p->GetParName(parIndex), func_p->GetParameter(parIndex), 0.01, parLimitLow, parLimitHigh);
◆ UseLowGain()
bool ZDCPulseAnalyzer::UseLowGain |
( |
| ) |
const |
|
inline |
◆ m_2ndDerivStep
size_t ZDCPulseAnalyzer::m_2ndDerivStep {1} |
|
private |
◆ m_ADCSamplesHG
std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesHG |
|
private |
◆ m_ADCSamplesHGSub
std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesHGSub |
|
private |
◆ m_ADCSamplesLG
std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesLG |
|
private |
◆ m_ADCSamplesLGSub
std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesLGSub |
|
private |
◆ m_ADCSSampSigHG
std::vector<float> ZDCPulseAnalyzer::m_ADCSSampSigHG |
|
private |
◆ m_ADCSSampSigLG
std::vector<float> ZDCPulseAnalyzer::m_ADCSSampSigLG |
|
private |
◆ m_adjTimeRangeEvent
bool ZDCPulseAnalyzer::m_adjTimeRangeEvent {} |
|
private |
◆ m_ampError
float ZDCPulseAnalyzer::m_ampError {} |
|
private |
◆ m_amplitude
float ZDCPulseAnalyzer::m_amplitude {} |
|
private |
◆ m_ampNoNonLin
float ZDCPulseAnalyzer::m_ampNoNonLin {} |
|
private |
◆ m_backToHG_pre
bool ZDCPulseAnalyzer::m_backToHG_pre {} |
|
private |
◆ m_badChisq
bool ZDCPulseAnalyzer::m_badChisq {} |
|
private |
◆ m_badT0
bool ZDCPulseAnalyzer::m_badT0 {} |
|
private |
◆ m_baselineCorr
float ZDCPulseAnalyzer::m_baselineCorr {} |
|
private |
◆ m_bkgdMaxFraction
float ZDCPulseAnalyzer::m_bkgdMaxFraction {} |
|
private |
◆ m_chisqDivAmpCutHG
float ZDCPulseAnalyzer::m_chisqDivAmpCutHG {} |
|
private |
◆ m_chisqDivAmpCutLG
float ZDCPulseAnalyzer::m_chisqDivAmpCutLG {} |
|
private |
◆ m_defaultCombinedFitter
std::unique_ptr<TFitter> ZDCPulseAnalyzer::m_defaultCombinedFitter |
|
private |
◆ m_defaultFitTMax
float ZDCPulseAnalyzer::m_defaultFitTMax {} |
|
private |
◆ m_defaultFitTMin
float ZDCPulseAnalyzer::m_defaultFitTMin {} |
|
private |
◆ m_defaultFitWrapper
std::unique_ptr<ZDCFitWrapper> ZDCPulseAnalyzer::m_defaultFitWrapper |
|
private |
◆ m_defaultT0Max
float ZDCPulseAnalyzer::m_defaultT0Max {} |
|
private |
◆ m_defaultT0Min
float ZDCPulseAnalyzer::m_defaultT0Min {} |
|
private |
◆ m_delayedBaselineShift
float ZDCPulseAnalyzer::m_delayedBaselineShift {} |
|
private |
◆ m_delayedDeltaT
float ZDCPulseAnalyzer::m_delayedDeltaT {} |
|
private |
◆ m_delayedHist
std::unique_ptr<TH1> ZDCPulseAnalyzer::m_delayedHist |
|
mutableprivate |
◆ m_delayedPedestalDiff
float ZDCPulseAnalyzer::m_delayedPedestalDiff {} |
|
private |
◆ m_deltaTSample
float ZDCPulseAnalyzer::m_deltaTSample {} |
|
private |
◆ m_enablePostExcl
bool ZDCPulseAnalyzer::m_enablePostExcl {false} |
|
private |
◆ m_enablePreExcl
bool ZDCPulseAnalyzer::m_enablePreExcl {false} |
|
private |
◆ m_enableRepass
bool ZDCPulseAnalyzer::m_enableRepass {false} |
|
private |
◆ m_ExcludeEarly
bool ZDCPulseAnalyzer::m_ExcludeEarly {} |
|
private |
◆ m_ExcludeLate
bool ZDCPulseAnalyzer::m_ExcludeLate {} |
|
private |
◆ m_expAmplitude
float ZDCPulseAnalyzer::m_expAmplitude {} |
|
private |
◆ m_fail
bool ZDCPulseAnalyzer::m_fail {} |
|
private |
◆ m_firstHGOverFlowSample
int ZDCPulseAnalyzer::m_firstHGOverFlowSample {} |
|
private |
◆ m_fitAmpError
float ZDCPulseAnalyzer::m_fitAmpError {} |
|
private |
◆ m_fitAmplitude
float ZDCPulseAnalyzer::m_fitAmplitude {} |
|
private |
◆ m_fitAmpMaxHG
float ZDCPulseAnalyzer::m_fitAmpMaxHG {} |
|
private |
◆ m_fitAmpMaxLG
float ZDCPulseAnalyzer::m_fitAmpMaxLG {} |
|
private |
◆ m_fitAmpMinHG
float ZDCPulseAnalyzer::m_fitAmpMinHG {} |
|
private |
◆ m_fitAmpMinLG
float ZDCPulseAnalyzer::m_fitAmpMinLG {} |
|
private |
◆ m_fitChisq
float ZDCPulseAnalyzer::m_fitChisq {} |
|
private |
◆ m_fitExpAmp
float ZDCPulseAnalyzer::m_fitExpAmp {} |
|
private |
◆ m_fitFailed
bool ZDCPulseAnalyzer::m_fitFailed {} |
|
private |
◆ m_fitFunction
std::string ZDCPulseAnalyzer::m_fitFunction |
|
private |
◆ m_fitHist
std::unique_ptr<TH1> ZDCPulseAnalyzer::m_fitHist |
|
mutableprivate |
◆ m_fitMinAmp
bool ZDCPulseAnalyzer::m_fitMinAmp {} |
|
private |
◆ m_fitNDoF
float ZDCPulseAnalyzer::m_fitNDoF {} |
|
private |
◆ m_fitPostAmp
float ZDCPulseAnalyzer::m_fitPostAmp {} |
|
private |
◆ m_fitPostT0
float ZDCPulseAnalyzer::m_fitPostT0 {} |
|
private |
◆ m_fitPostT0lo
float ZDCPulseAnalyzer::m_fitPostT0lo {} |
|
private |
◆ m_fitPreAmp
float ZDCPulseAnalyzer::m_fitPreAmp {} |
|
private |
◆ m_fitPreT0
float ZDCPulseAnalyzer::m_fitPreT0 {} |
|
private |
◆ m_fitPulls
std::vector<float> ZDCPulseAnalyzer::m_fitPulls |
|
private |
◆ m_fitTau1
float ZDCPulseAnalyzer::m_fitTau1 {} |
|
private |
◆ m_fitTau2
float ZDCPulseAnalyzer::m_fitTau2 {} |
|
private |
◆ m_fitTCorr2nd
float ZDCPulseAnalyzer::m_fitTCorr2nd {} |
|
private |
◆ m_fitTime
float ZDCPulseAnalyzer::m_fitTime {} |
|
private |
◆ m_fitTimeCorr
float ZDCPulseAnalyzer::m_fitTimeCorr {} |
|
private |
◆ m_fitTimeSub
float ZDCPulseAnalyzer::m_fitTimeSub {} |
|
private |
◆ m_fitTMax
float ZDCPulseAnalyzer::m_fitTMax {} |
|
private |
◆ m_fitTMin
float ZDCPulseAnalyzer::m_fitTMin {} |
|
private |
◆ m_fixPrePulse
bool ZDCPulseAnalyzer::m_fixPrePulse {} |
|
private |
◆ m_fixTau1
bool ZDCPulseAnalyzer::m_fixTau1 {} |
|
private |
◆ m_fixTau2
bool ZDCPulseAnalyzer::m_fixTau2 {} |
|
private |
◆ m_forceLG
bool ZDCPulseAnalyzer::m_forceLG {false} |
|
private |
◆ m_gainFactorHG
float ZDCPulseAnalyzer::m_gainFactorHG {} |
|
private |
◆ m_gainFactorLG
float ZDCPulseAnalyzer::m_gainFactorLG {} |
|
private |
◆ m_gainHG
float ZDCPulseAnalyzer::m_gainHG {} |
|
private |
◆ m_haveData
bool ZDCPulseAnalyzer::m_haveData {} |
|
private |
◆ m_haveNonlinCorr
bool ZDCPulseAnalyzer::m_haveNonlinCorr {false} |
|
private |
◆ m_havePulse
bool ZDCPulseAnalyzer::m_havePulse {} |
|
private |
◆ m_HGOverflow
bool ZDCPulseAnalyzer::m_HGOverflow {} |
|
private |
◆ m_HGOverflowADC
int ZDCPulseAnalyzer::m_HGOverflowADC {} |
|
private |
◆ m_HGT0CorrParams
std::vector<float> ZDCPulseAnalyzer::m_HGT0CorrParams |
|
private |
◆ m_HGUnderflow
bool ZDCPulseAnalyzer::m_HGUnderflow {} |
|
private |
◆ m_HGUnderflowADC
int ZDCPulseAnalyzer::m_HGUnderflowADC {} |
|
private |
◆ m_initialExpAmp
float ZDCPulseAnalyzer::m_initialExpAmp {} |
|
private |
◆ m_initializedFits
bool ZDCPulseAnalyzer::m_initializedFits {false} |
|
private |
◆ m_initialPostPulseT0
float ZDCPulseAnalyzer::m_initialPostPulseT0 {} |
|
private |
◆ m_initialPrePulseAmp
float ZDCPulseAnalyzer::m_initialPrePulseAmp {} |
|
private |
◆ m_initialPrePulseT0
float ZDCPulseAnalyzer::m_initialPrePulseT0 {} |
|
private |
◆ m_lastHGOverFlowSample
int ZDCPulseAnalyzer::m_lastHGOverFlowSample {} |
|
private |
◆ m_LGOverflow
bool ZDCPulseAnalyzer::m_LGOverflow {} |
|
private |
◆ m_LGOverflowADC
int ZDCPulseAnalyzer::m_LGOverflowADC {} |
|
private |
◆ m_LGT0CorrParams
std::vector<float> ZDCPulseAnalyzer::m_LGT0CorrParams |
|
private |
◆ m_LGUnderflow
bool ZDCPulseAnalyzer::m_LGUnderflow {} |
|
private |
◆ m_maxADCValue
float ZDCPulseAnalyzer::m_maxADCValue {} |
|
private |
◆ m_maxDelta
float ZDCPulseAnalyzer::m_maxDelta {} |
|
private |
◆ m_maxSampl
int ZDCPulseAnalyzer::m_maxSampl {} |
|
private |
◆ m_maxSampleEvt
unsigned int ZDCPulseAnalyzer::m_maxSampleEvt {} |
|
private |
◆ m_maxSamplesPostExcl
unsigned int ZDCPulseAnalyzer::m_maxSamplesPostExcl {0} |
|
private |
◆ m_maxSamplesPreExcl
unsigned int ZDCPulseAnalyzer::m_maxSamplesPreExcl {0} |
|
private |
◆ m_minADCValue
float ZDCPulseAnalyzer::m_minADCValue {} |
|
private |
◆ m_minDelta
float ZDCPulseAnalyzer::m_minDelta {} |
|
private |
◆ m_minDeriv2nd
float ZDCPulseAnalyzer::m_minDeriv2nd {} |
|
private |
◆ m_minDeriv2ndIndex
int ZDCPulseAnalyzer::m_minDeriv2ndIndex {} |
|
private |
◆ m_minDeriv2ndSig
float ZDCPulseAnalyzer::m_minDeriv2ndSig |
|
private |
◆ m_minSampl
int ZDCPulseAnalyzer::m_minSampl {} |
|
private |
◆ m_minSampleEvt
unsigned int ZDCPulseAnalyzer::m_minSampleEvt {} |
|
private |
◆ m_msgFunc_p
◆ m_noiseSigHG
float ZDCPulseAnalyzer::m_noiseSigHG {} |
|
private |
◆ m_noiseSigLG
float ZDCPulseAnalyzer::m_noiseSigLG {} |
|
private |
◆ m_nominalT0HG
float ZDCPulseAnalyzer::m_nominalT0HG {} |
|
private |
◆ m_nominalT0LG
float ZDCPulseAnalyzer::m_nominalT0LG {} |
|
private |
◆ m_nominalTau1
float ZDCPulseAnalyzer::m_nominalTau1 {} |
|
private |
◆ m_nominalTau2
float ZDCPulseAnalyzer::m_nominalTau2 {} |
|
private |
◆ m_nonLinCorrParamsHG
std::vector<float> ZDCPulseAnalyzer::m_nonLinCorrParamsHG |
|
private |
◆ m_nonLinCorrParamsLG
std::vector<float> ZDCPulseAnalyzer::m_nonLinCorrParamsLG |
|
private |
◆ m_nonLinCorrRefADC
float ZDCPulseAnalyzer::m_nonLinCorrRefADC {500} |
|
private |
◆ m_nonLinCorrRefScale
float ZDCPulseAnalyzer::m_nonLinCorrRefScale {100} |
|
private |
◆ m_Nsample
unsigned int ZDCPulseAnalyzer::m_Nsample {} |
|
private |
◆ m_NSampleAna
unsigned int ZDCPulseAnalyzer::m_NSampleAna {0} |
|
private |
◆ m_NSamplesAna
unsigned int ZDCPulseAnalyzer::m_NSamplesAna {} |
|
private |
◆ m_peak2ndDerivMinRepassHG
float ZDCPulseAnalyzer::m_peak2ndDerivMinRepassHG {} |
|
private |
◆ m_peak2ndDerivMinRepassLG
float ZDCPulseAnalyzer::m_peak2ndDerivMinRepassLG {} |
|
private |
◆ m_peak2ndDerivMinSample
size_t ZDCPulseAnalyzer::m_peak2ndDerivMinSample {} |
|
private |
◆ m_peak2ndDerivMinThreshHG
float ZDCPulseAnalyzer::m_peak2ndDerivMinThreshHG {} |
|
private |
◆ m_peak2ndDerivMinThreshLG
float ZDCPulseAnalyzer::m_peak2ndDerivMinThreshLG {} |
|
private |
◆ m_peak2ndDerivMinTolerance
size_t ZDCPulseAnalyzer::m_peak2ndDerivMinTolerance {1} |
|
private |
◆ m_pedestal
int ZDCPulseAnalyzer::m_pedestal {} |
|
private |
◆ m_postAmplitude
float ZDCPulseAnalyzer::m_postAmplitude {} |
|
private |
◆ m_postExclHGADCThresh
unsigned int ZDCPulseAnalyzer::m_postExclHGADCThresh {0} |
|
private |
◆ m_postExclLGADCThresh
unsigned int ZDCPulseAnalyzer::m_postExclLGADCThresh {0} |
|
private |
◆ m_postPulse
bool ZDCPulseAnalyzer::m_postPulse {} |
|
private |
◆ m_preAmplitude
float ZDCPulseAnalyzer::m_preAmplitude {} |
|
private |
◆ m_preExclHGADCThresh
unsigned int ZDCPulseAnalyzer::m_preExclHGADCThresh {0} |
|
private |
◆ m_preExclLGADCThresh
unsigned int ZDCPulseAnalyzer::m_preExclLGADCThresh {0} |
|
private |
◆ m_preExpFitWrapper
◆ m_preExpSig
float ZDCPulseAnalyzer::m_preExpSig |
|
private |
◆ m_preExpTail
bool ZDCPulseAnalyzer::m_preExpTail {} |
|
private |
◆ m_prePulse
bool ZDCPulseAnalyzer::m_prePulse {} |
|
private |
◆ m_prePulseCombinedFitter
std::unique_ptr<TFitter> ZDCPulseAnalyzer::m_prePulseCombinedFitter |
|
private |
◆ m_prePulseFitWrapper
◆ m_prePulseSig
float ZDCPulseAnalyzer::m_prePulseSig |
|
private |
◆ m_preSample
float ZDCPulseAnalyzer::m_preSample {} |
|
private |
◆ m_preSampleAmp
float ZDCPulseAnalyzer::m_preSampleAmp {} |
|
private |
◆ m_preSampleIdx
unsigned int ZDCPulseAnalyzer::m_preSampleIdx {} |
|
private |
◆ m_PSHGOverUnderflow
bool ZDCPulseAnalyzer::m_PSHGOverUnderflow {} |
|
private |
◆ m_repassPulse
bool ZDCPulseAnalyzer::m_repassPulse {} |
|
private |
◆ m_samplesDeriv2nd
std::vector<float> ZDCPulseAnalyzer::m_samplesDeriv2nd |
|
private |
◆ m_samplesSub
std::vector<float> ZDCPulseAnalyzer::m_samplesSub |
|
private |
◆ m_T0CutHighHG
float ZDCPulseAnalyzer::m_T0CutHighHG {} |
|
private |
◆ m_T0CutHighLG
float ZDCPulseAnalyzer::m_T0CutHighLG {} |
|
private |
◆ m_T0CutLowHG
float ZDCPulseAnalyzer::m_T0CutLowHG {} |
|
private |
◆ m_T0CutLowLG
float ZDCPulseAnalyzer::m_T0CutLowLG {} |
|
private |
◆ m_t0CutSig
float ZDCPulseAnalyzer::m_t0CutSig {} |
|
private |
◆ m_tag
std::string ZDCPulseAnalyzer::m_tag |
|
private |
◆ m_timeCutMode
unsigned int ZDCPulseAnalyzer::m_timeCutMode {0} |
|
private |
◆ m_timeResFuncHG_p
std::unique_ptr<const TF1> ZDCPulseAnalyzer::m_timeResFuncHG_p {} |
|
private |
◆ m_timeResFuncLG_p
std::unique_ptr<const TF1> ZDCPulseAnalyzer::m_timeResFuncLG_p {} |
|
private |
◆ m_timeSig
float ZDCPulseAnalyzer::m_timeSig {} |
|
private |
◆ m_timingCorrMode
unsigned int ZDCPulseAnalyzer::m_timingCorrMode {NoTimingCorr} |
|
private |
◆ m_timingCorrRefADC
float ZDCPulseAnalyzer::m_timingCorrRefADC {500} |
|
private |
◆ m_timingCorrScale
float ZDCPulseAnalyzer::m_timingCorrScale {100} |
|
private |
◆ m_tmax
float ZDCPulseAnalyzer::m_tmax {} |
|
private |
◆ m_tmin
float ZDCPulseAnalyzer::m_tmin {} |
|
private |
◆ m_useDelayed
bool ZDCPulseAnalyzer::m_useDelayed {false} |
|
private |
◆ m_usedPresampIdx
int ZDCPulseAnalyzer::m_usedPresampIdx {} |
|
private |
◆ m_useFixedBaseline
bool ZDCPulseAnalyzer::m_useFixedBaseline {} |
|
private |
◆ m_useLowGain
bool ZDCPulseAnalyzer::m_useLowGain {} |
|
private |
◆ m_useSampleHG
std::vector<bool> ZDCPulseAnalyzer::m_useSampleHG |
|
private |
◆ m_useSampleLG
std::vector<bool> ZDCPulseAnalyzer::m_useSampleLG |
|
private |
◆ s_combinedFitFunc
TF1 * ZDCPulseAnalyzer::s_combinedFitFunc = nullptr |
|
staticprivate |
◆ s_combinedFitTMax
float ZDCPulseAnalyzer::s_combinedFitTMax = 1000 |
|
staticprivate |
◆ s_combinedFitTMin
float ZDCPulseAnalyzer::s_combinedFitTMin = -0.5 |
|
staticprivate |
◆ s_delayedFitHist
TH1 * ZDCPulseAnalyzer::s_delayedFitHist = nullptr |
|
staticprivate |
◆ s_fitOptions
std::string ZDCPulseAnalyzer::s_fitOptions = "" |
|
staticprivate |
◆ s_pullValues
std::vector< float > ZDCPulseAnalyzer::s_pullValues |
|
staticprivate |
◆ s_quietFits
bool ZDCPulseAnalyzer::s_quietFits = true |
|
staticprivate |
◆ s_saveFitFunc
bool ZDCPulseAnalyzer::s_saveFitFunc = false |
|
staticprivate |
◆ s_undelayedFitHist
TH1 * ZDCPulseAnalyzer::s_undelayedFitHist = nullptr |
|
staticprivate |
The documentation for this class was generated from the following files:
virtual float GetAmplitude() const =0
std::unique_ptr< ZDCFitWrapper > m_defaultFitWrapper
unsigned int m_NSampleAna
const ShapeFitter * fitter
std::unique_ptr< ZDCPrePulseFitWrapper > m_prePulseFitWrapper
std::vector< bool > m_useSampleHG
std::vector< float > m_ADCSamplesLG
std::vector< float > m_samplesSub
unsigned int m_NSamplesAna
ZDCMsg::MessageFunctionPtr m_msgFunc_p
std::vector< float > m_LGT0CorrParams
constexpr double tolerance
float m_peak2ndDerivMinThreshLG
float m_nonLinCorrRefScale
unsigned int m_timeCutMode
static std::unique_ptr< TFitter > MakeCombinedFitter(TF1 *func)
float m_delayedPedestalDiff
virtual void ConstrainFit()=0
virtual float GetTime() const =0
std::unique_ptr< TFitter > m_defaultCombinedFitter
std::unique_ptr< TH1 > m_delayedHist
bool ScanAndSubtractSamples()
bool AnalyzeData(size_t nSamples, size_t preSample, const std::vector< float > &samples, const std::vector< bool > &useSamples, float peak2ndDerivMinThresh, float noiseSig, const std::vector< float > &toCorrParams, float maxChisqDivAmp, float minT0Corr, float maxT0Corr)
bool ExcludeLateLG() const
virtual std::shared_ptr< TF1 > GetWrapperTF1()
float m_delayedBaselineShift
static TH1 * s_delayedFitHist
std::vector< float > m_samplesDeriv2nd
virtual float GetTau2() const =0
static bool s_saveFitFunc
static TF1 * s_combinedFitFunc
static float s_combinedFitTMin
bool PSHGOverUnderflow() const
std::vector< bool > m_useSampleLG
std::string m_fitFunction
unsigned int m_preExclHGADCThresh
std::vector< float >::const_iterator SampleCIter
std::vector< float > m_fitPulls
virtual void UnconstrainFit()=0
def save(self, fileName="./columbo.out")
unsigned int m_postExclHGADCThresh
virtual float GetAmpError() const =0
float m_peak2ndDerivMinRepassHG
float m_initialPrePulseAmp
float m_peak2ndDerivMinRepassLG
virtual TF1 * GetWrapperTF1RawPtr() const
static void CombinedPulsesFCN(int &numParam, double *, double &f, double *par, int flag)
std::vector< float > m_nonLinCorrParamsLG
unsigned int m_minSampleEvt
double chi2(TH1 *h0, TH1 *h1)
unsigned int m_maxSampleEvt
std::vector< float > m_ADCSamplesHG
virtual float GetBkgdMaxFraction() const =0
const TH1 * GetHistogramPtr() const
unsigned int m_preExclLGADCThresh
static float obtainDelayedBaselineCorr(const std::vector< float > &samples)
std::vector< float > m_ADCSamplesHGSub
std::vector< float > m_ADCSSampSigLG
static std::vector< float > Calculate2ndDerivative(const std::vector< float > &inputData, unsigned int step)
unsigned int m_preSampleIdx
std::string to_string(const DetectorType &type)
bool ExcludeEarlyLG() const
void Initialize(float initialAmp, float initialT0, float ampMin, float ampMax)
static std::string s_fitOptions
virtual float GetTau1() const =0
std::unique_ptr< const TF1 > m_timeResFuncLG_p
std::unique_ptr< ZDCPreExpFitWrapper > m_preExpFitWrapper
double GetBinContent(int) const
size_t m_peak2ndDerivMinSample
int m_lastHGOverFlowSample
size_t m_peak2ndDerivMinTolerance
std::vector< float > m_ADCSSampSigHG
bool DoAnalysis(bool repass)
void FillHistogram(const std::vector< float > &samples, float noiseSig) const
void Reset(bool reanalyze=false)
float m_peak2ndDerivMinThreshHG
unsigned int m_maxSamplesPostExcl
void dumpTF1(const TF1 *) const
std::vector< float > m_ADCSamplesLGSub
int m_firstHGOverFlowSample
static TH1 * s_undelayedFitHist
bool fitMinimumAmplitude() const
unsigned int m_timingCorrMode
unsigned int m_maxSamplesPreExcl
float m_initialPostPulseT0
std::unique_ptr< TFitter > m_prePulseCombinedFitter
std::unique_ptr< TH1 > m_fitHist
std::unique_ptr< const TF1 > m_timeResFuncHG_p
std::vector< float > m_nonLinCorrParamsHG
static float s_combinedFitTMax
unsigned int m_postExclLGADCThresh
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
float m_initialPrePulseT0
std::vector< float > m_HGT0CorrParams
static std::vector< float > s_pullValues
static std::vector< float > CalculateDerivative(const std::vector< float > &inputData, unsigned int step)