#include <ZDCTriggerSim.h>
|
| ZDCTriggerSimFADC (const std::array< unsigned int, 4096 > &sideALUT, const std::array< unsigned int, 4096 > &sideCLUT, const std::array< unsigned int, 256 > &inCombLUT, const std::array< std::array< unsigned int, 4 >, 2 > &negDeriv2ndThresh, unsigned int minSampleAna, unsigned int maxSampleAna, unsigned int baselineDelta) |
|
virtual unsigned int | simLevel1Trig (const ZDCTriggerSim::SimDataCPtr &inputData) override |
|
auto | getMaxNegDeriv2nds () const |
|
auto | getMaxADCs () const |
|
auto | getBaselines () const |
|
SimStack::const_iterator | stackBottom () const |
|
SimStack::const_reverse_iterator | stackTop () const |
|
void | dump (std::ostream &strm) const |
|
|
std::array< std::array< unsigned int, 4 >, 2 > | m_deriv2ndThresholds |
|
unsigned int | m_minSampleAna {} |
|
unsigned int | m_maxSampleAna {} |
|
unsigned int | m_baselineDelta {} |
|
std::array< std::array< int, 4 >, 2 > | m_maxNegDeriv2nd {} |
|
std::array< std::array< unsigned int, 4 >, 2 > | m_maxADC {} |
|
std::array< std::array< unsigned int, 4 >, 2 > | m_baseline {} |
|
SimStack | m_stack |
|
std::array< unsigned int, 4096 > | m_LUTA {} |
|
std::array< unsigned int, 4096 > | m_LUTC {} |
|
std::array< unsigned int, 256 > | m_combLUT {} |
|
Definition at line 304 of file ZDCTriggerSim.h.
◆ SimStack
◆ ZDCTriggerSimFADC()
ZDCTriggerSimFADC::ZDCTriggerSimFADC |
( |
const std::array< unsigned int, 4096 > & |
sideALUT, |
|
|
const std::array< unsigned int, 4096 > & |
sideCLUT, |
|
|
const std::array< unsigned int, 256 > & |
inCombLUT, |
|
|
const std::array< std::array< unsigned int, 4 >, 2 > & |
negDeriv2ndThresh, |
|
|
unsigned int |
minSampleAna, |
|
|
unsigned int |
maxSampleAna, |
|
|
unsigned int |
baselineDelta |
|
) |
| |
|
inline |
◆ CalculateNeg2ndDerivatives()
std::vector< unsigned int > ZDCTriggerSimFADC::CalculateNeg2ndDerivatives |
( |
const std::vector< unsigned int > & |
samples, |
|
|
unsigned int |
step |
|
) |
| |
|
protected |
Definition at line 193 of file ZDCTriggerSim.cxx.
195 std::vector<unsigned int> der2ndVec(
step, 0);
199 if (diff2nd > 0) der2ndVec.push_back(0);
200 else der2ndVec.push_back(-diff2nd);
203 der2ndVec.insert(der2ndVec.end(),
step, 0);
◆ doSimStage()
void ZDCTriggerSimFADC::doSimStage |
( |
| ) |
|
|
overrideprotectedvirtual |
Implements ZDCTriggerSimBase.
Definition at line 100 of file ZDCTriggerSim.cxx.
102 if (
ptr->getNumData() != 24*8 ||
ptr->getNumBits() != 12)
103 throw std::logic_error(
"Invalid input data in ZDCTriggerSimModuleAmpls");
105 unsigned int sampleIdx = 0;
107 std::vector<unsigned int> moduleAmplitudes;
111 for (
size_t side : {0, 1}) {
112 for (
size_t module : {0, 1, 2, 3}) {
113 std::vector<unsigned int> FADCsamples;
115 bool adcOverflow =
false;
122 for (
size_t i = 0;
i < 24;
i++) {
123 unsigned int ADC =
ptr->getValueTrunc(sampleIdx++);
129 FADCsamples.push_back(
ADC);
140 moduleAmplitudes.push_back(4095);
149 bool havePulse =
false;
150 unsigned int maxAmp = 0;
152 unsigned int maxNeg2ndDeriv = 0;
155 if (negDeriv2nd.at(sampleTest) > maxNeg2ndDeriv) maxNeg2ndDeriv = negDeriv2nd.at(sampleTest);
165 if (FADCsamples.at(sampleTest) > maxAmp) maxAmp = FADCsamples.at(sampleTest);
170 moduleAmplitudes.push_back(std::max<int>(
int(maxAmp -
baseline), 0));
175 moduleAmplitudes.push_back(0);
◆ dump()
void ZDCTriggerSimBase::dump |
( |
std::ostream & |
strm | ) |
const |
|
inherited |
◆ getBaselines()
auto ZDCTriggerSimFADC::getBaselines |
( |
| ) |
const |
|
inline |
◆ getMaxADCs()
auto ZDCTriggerSimFADC::getMaxADCs |
( |
| ) |
const |
|
inline |
◆ getMaxNegDeriv2nds()
auto ZDCTriggerSimFADC::getMaxNegDeriv2nds |
( |
| ) |
const |
|
inline |
◆ simLevel1Trig()
◆ stackBottom()
SimStack::const_iterator ZDCTriggerSimBase::stackBottom |
( |
| ) |
const |
|
inlineinherited |
◆ stackClear()
void ZDCTriggerSimBase::stackClear |
( |
| ) |
|
|
inlineprotectedinherited |
◆ stackPush()
◆ stackTop()
SimStack::const_reverse_iterator ZDCTriggerSimBase::stackTop |
( |
| ) |
const |
|
inlineinherited |
◆ stackTopData()
◆ m_baseline
std::array<std::array<unsigned int, 4>, 2> ZDCTriggerSimFADC::m_baseline {} |
|
private |
◆ m_baselineDelta
unsigned int ZDCTriggerSimFADC::m_baselineDelta {} |
|
private |
◆ m_combLUT
std::array<unsigned int, 256> ZDCTriggerSimCombLUT::m_combLUT {} |
|
privateinherited |
◆ m_deriv2ndThresholds
std::array<std::array<unsigned int, 4>, 2> ZDCTriggerSimFADC::m_deriv2ndThresholds |
|
private |
◆ m_LUTA
std::array<unsigned int, 4096> ZDCTriggerSimAllLUTs::m_LUTA {} |
|
privateinherited |
◆ m_LUTC
std::array<unsigned int, 4096> ZDCTriggerSimAllLUTs::m_LUTC {} |
|
privateinherited |
◆ m_maxADC
std::array<std::array<unsigned int, 4>, 2> ZDCTriggerSimFADC::m_maxADC {} |
|
private |
◆ m_maxNegDeriv2nd
std::array<std::array<int, 4>, 2> ZDCTriggerSimFADC::m_maxNegDeriv2nd {} |
|
private |
◆ m_maxSampleAna
unsigned int ZDCTriggerSimFADC::m_maxSampleAna {} |
|
private |
◆ m_minSampleAna
unsigned int ZDCTriggerSimFADC::m_minSampleAna {} |
|
private |
◆ m_stack
The documentation for this class was generated from the following files:
ZDCTriggerSimModuleAmpls(const std::array< unsigned int, 4096 > &sideALUT, const std::array< unsigned int, 4096 > &sideCLUT, const std::array< unsigned int, 256 > &inCombLUT)