diff --git a/TrigScint/include/TrigScint/Firmware/hitproducer.h b/TrigScint/include/TrigScint/Firmware/hitproducer.h index 49687e206..fad178164 100644 --- a/TrigScint/include/TrigScint/Firmware/hitproducer.h +++ b/TrigScint/include/TrigScint/Firmware/hitproducer.h @@ -3,10 +3,12 @@ #include "objdef.h" +#ifdef TS_NOT_EMULATION void copyHit1(Hit One, Hit Two); void copyHit2(Hit One, Hit Two); void hitproducer_ref(ap_uint<14> FIFO[NHITS][5], Hit outHit[NHITS], ap_uint<8> Peds[NHITS]); +#endif void hitproducer_hw(ap_uint<14> FIFO[NHITS][5], Hit outHit[NHITS], ap_uint<8> Peds[NHITS]); diff --git a/TrigScint/include/TrigScint/TrigScintFirmwareHitProducer.h b/TrigScint/include/TrigScint/TrigScintFirmwareHitProducer.h index 58a481ee9..463a2b1d5 100644 --- a/TrigScint/include/TrigScint/TrigScintFirmwareHitProducer.h +++ b/TrigScint/include/TrigScint/TrigScintFirmwareHitProducer.h @@ -52,9 +52,6 @@ class TrigScintFirmwareHitProducer : public framework::Producer { */ private: - /// Class to set the verbosity level. - // TODO: Make use of the global verbose parameter. - bool verbose_{false}; /// Name of the input collection containing the sim hits std::string inputCollection_; diff --git a/TrigScint/src/TrigScint/Firmware/hitproducer_hw.cxx b/TrigScint/src/TrigScint/Firmware/hitproducer_hw.cxx index d20347362..f9b2e43f9 100644 --- a/TrigScint/src/TrigScint/Firmware/hitproducer_hw.cxx +++ b/TrigScint/src/TrigScint/Firmware/hitproducer_hw.cxx @@ -7,6 +7,7 @@ void hitproducer_hw(ap_uint<14> FIFO[NHITS][5], Hit outHit[NHITS], ap_uint<8> Peds[NHITS]) { +#ifdef TS_NOT_EMULATION #pragma HLS ARRAY_PARTITION variable = FIFO complete #pragma HLS ARRAY_PARTITION variable = amplitude complete #pragma HLS ARRAY_PARTITION variable = Peds complete @@ -66,6 +67,7 @@ void hitproducer_hw(ap_uint<14> FIFO[NHITS][5], Hit outHit[NHITS], #pragma HLS INTERFACE ap_fifo depth = 16 port = FIFO[49] #pragma HLS PIPELINE +#endif // The QIE11 card takes an analogue SiPM PE count // and converts electron counts from it via a piecewise diff --git a/TrigScint/src/TrigScint/TrigScintFirmwareHitProducer.cxx b/TrigScint/src/TrigScint/TrigScintFirmwareHitProducer.cxx index 53cd5a947..86af1ea9b 100644 --- a/TrigScint/src/TrigScint/TrigScintFirmwareHitProducer.cxx +++ b/TrigScint/src/TrigScint/TrigScintFirmwareHitProducer.cxx @@ -19,21 +19,16 @@ void TrigScintFirmwareHitProducer::configure( testCollection_ = ps.getParameter("test_collection"); inputPassName_ = ps.getParameter("input_pass_name"); outputCollection_ = ps.getParameter("output_collection"); - verbose_ = ps.getParameter("verbose"); sample_of_interest_ = ps.getParameter("sample_of_interest"); - if (verbose_) { - ldmx_log(info) << "In TrigScintFirmwareHitProducer: configure done!"; - ldmx_log(info) << "\nPedestal: " << pedestal_ << "\nGain: " << gain_ + ldmx_log(debug) << "In TrigScintFirmwareHitProducer: configure done!"; + ldmx_log(debug) << "\nPedestal: " << pedestal_ << "\nGain: " << gain_ << "\nMEV per MIP: " << mevPerMip_ << "\nPE per MIP: " << pePerMip_ << "\ninput collection: " << inputCollection_ << "\ntest collection: " << testCollection_ << "\nAre we testing: " << doTest_ << "\nInput pass name: " << inputPassName_ - << "\nOutput collection: " << outputCollection_ - << "\nVerbosity: " << verbose_; - } - + << "\nOutput collection: " << outputCollection_; return; } @@ -43,13 +38,11 @@ void TrigScintFirmwareHitProducer::produce(framework::Event &event) { // purpose is to emulate existing reconstruction software in firmware for // triggering. I will more fully explain the operation and choices made in // hitproducer_hw in hitproducer_hw - if (verbose_) { - const auto rechits{event.getCollection(testCollection_, + const auto rechits{event.getCollection(testCollection_, inputPassName_)}; - for (const auto &hit : rechits) { - ldmx_log(debug) << "Analysis barID: " << hit.getBarID() - << ", PE Number: " << hit.getPE(); - } + for (const auto &hit : rechits) { + ldmx_log(debug) << "Analysis barID: " << hit.getBarID() + << ", PE Number: " << hit.getPE(); } const auto digis{event.getCollection( inputCollection_, inputPassName_)}; @@ -75,10 +68,8 @@ void TrigScintFirmwareHitProducer::produce(framework::Event &event) { std::vector trigScintHits; for (int i = 0; i < NHITS; i++) { if (outHit[i].Amp >= 3) { - if (verbose_) { - ldmx_log(debug) << "Firmware barID: " << outHit[i].bID - << ", PE Number: " << outHit[i].Amp; - } + ldmx_log(debug) << "Firmware barID: " << outHit[i].bID + << ", PE Number: " << outHit[i].Amp; ldmx::TrigScintHit hit; hit.setModuleID(outHit[i].mID); hit.setBarID(outHit[i].bID);