From 12a0c14e2654fa60f5b3f1cbbef4779967fc2b31 Mon Sep 17 00:00:00 2001 From: Mu2e Date: Fri, 13 Mar 2026 22:36:00 -0500 Subject: [PATCH 1/5] add a list of panels to skip --- DAQ/fcl/prolog.fcl | 1 + DAQ/src/StrawHitFilter_module.cc | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/DAQ/fcl/prolog.fcl b/DAQ/fcl/prolog.fcl index 646da59aff..ab7dcd711b 100644 --- a/DAQ/fcl/prolog.fcl +++ b/DAQ/fcl/prolog.fcl @@ -37,6 +37,7 @@ DAQ : { minEDep : 0.0006 ## in MeV debugMode : false debugBits : [ "bit0:0" ] + panelsToSkip : [ ] ## by default all panels are good fillHistograms : false } } diff --git a/DAQ/src/StrawHitFilter_module.cc b/DAQ/src/StrawHitFilter_module.cc index afbb5122eb..1a8ce057ca 100644 --- a/DAQ/src/StrawHitFilter_module.cc +++ b/DAQ/src/StrawHitFilter_module.cc @@ -27,6 +27,9 @@ #include #include +#include "Offline/ProditionsService/inc/ProditionsHandle.hh" +#include "Offline/TrackerConditions/inc/TrackerPanelMap.hh" + namespace mu2e { class StrawHitFilter : public art::EDFilter { public: @@ -40,6 +43,7 @@ namespace mu2e { fhicl::Atom maxDt {Name("maxDt" ), Comment("max abs(DT)")}; fhicl::Atom minEDep {Name("minEDep" ), Comment("min EDep")}; fhicl::Atom minNGoodHits {Name("minNGoodHits" ), Comment("minNStrawDigis")}; + fhicl::Sequence mnidToSkip {Name("mnidToSkip" ), Comment("a list of panels to skip")}; fhicl::Atom fillHistograms{Name("fillHistograms"), Comment("fill histogrms, default:false")}; }; @@ -75,6 +79,7 @@ namespace mu2e { float _maxDt; float _minEDep; int _minNGoodHits; + std::vector _mnidToSkip; // panels not to look at when searching for good hits int _fillHistograms; int _nevt; @@ -82,7 +87,9 @@ namespace mu2e { int _nsht; int _nshg; - const mu2e::StrawHitCollection* _shc; + const mu2e::StrawHitCollection* _shc; + ProditionsHandle _tpm_h; + const TrackerPanelMap* _trkPanelMap; const art::Event* _event; int _rn; @@ -98,6 +105,7 @@ namespace mu2e { _maxDt (conf().maxDt ()), _minEDep (conf().minEDep ()), _minNGoodHits (conf().minNGoodHits()), + _mnidToSkip (conf().mnidToSkip()), _fillHistograms (conf().fillHistograms()) { //----------------------------------------------------------------------------- @@ -194,6 +202,8 @@ namespace mu2e { _event = &ArtEvent; // should always be the first line + _trkPanelMap = &_tpm_h.get(_event->id()); + if (_debugMode) print_("-- START"); ++_nevt; @@ -216,6 +226,21 @@ namespace mu2e { for (int i = 0; i<_nsht; ++i) { const mu2e::StrawHit* sh = &_shc->at(i); + + int pln = sh->strawId().plane(); + int pnl = sh->strawId().panel(); + const TrkPanelMap::Row* tpm = _trkPanelMap->panel_map_by_offline_ind(pln,pnl); + int hit_mnid = tpm->mnid(); + + bool skip = false; + for (auto mnid: _mnidToSkip) { + if (hit_mnid == mnid) { + skip = true; + break; + } + } + if (skip) continue; + if (fabs(sh->dt()) > _maxDt ) continue; if (sh->energyDep() < _minEDep) continue; _nshg++; From 78c2f8e94fd40e66598dfbbe48a7e69ddc3c2af3 Mon Sep 17 00:00:00 2001 From: Mu2e Date: Sat, 14 Mar 2026 00:08:04 -0500 Subject: [PATCH 2/5] fix fcl --- DAQ/fcl/prolog.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DAQ/fcl/prolog.fcl b/DAQ/fcl/prolog.fcl index ab7dcd711b..fa5cc3bdd0 100644 --- a/DAQ/fcl/prolog.fcl +++ b/DAQ/fcl/prolog.fcl @@ -37,7 +37,7 @@ DAQ : { minEDep : 0.0006 ## in MeV debugMode : false debugBits : [ "bit0:0" ] - panelsToSkip : [ ] ## by default all panels are good + mnidToSkip : [ ] ## by default all panels are good fillHistograms : false } } From abf0b5cf0b345b097faf846d5fb50ff0a98d508a Mon Sep 17 00:00:00 2001 From: edcallaghan Date: Fri, 17 Apr 2026 11:48:11 -0500 Subject: [PATCH 3/5] add digi-level pmp and pedestal into straw hit, to propagate into ntuples --- .../StrawDigisFromArtdaqFragments_module.cc | 134 ++++++++++-------- RecoDataProducts/inc/StrawHit.hh | 17 ++- TrkHitReco/inc/StrawHitRecoUtils.hh | 5 +- TrkHitReco/src/StrawHitRecoUtils.cc | 10 +- TrkHitReco/src/StrawHitReco_module.cc | 7 +- 5 files changed, 103 insertions(+), 70 deletions(-) diff --git a/DAQ/src/StrawDigisFromArtdaqFragments_module.cc b/DAQ/src/StrawDigisFromArtdaqFragments_module.cc index 32629ee139..6bef4020ec 100644 --- a/DAQ/src/StrawDigisFromArtdaqFragments_module.cc +++ b/DAQ/src/StrawDigisFromArtdaqFragments_module.cc @@ -234,11 +234,11 @@ void mu2e::StrawDigisFromArtdaqFragments::print_(const std::string& Message, con } //----------------------------------------------------------------------------- -// HEX print of a fragment, the data has to be in 2-byte words +// HEX print of a fragment, the Mu2e data come in 2-byte words //----------------------------------------------------------------------------- void mu2e::StrawDigisFromArtdaqFragments::print_fragment(const artdaq::Fragment* Frag) { ushort* buf = (ushort*) (Frag->dataBegin()); - int nw = buf[0]/2; + int nw = Frag->dataSizeBytes()/2; int loc = 0; for (int i=0; i>(); if (debugMode_ > 0) { - std::string msg = std::format("n(fragments):{}",fragmentHandles.size()); + std::string msg = std::format("n_fragment_collections):{}",fragmentHandles.size()); print_(msg); } @@ -315,8 +315,13 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { // each artdaq fragment corresponds to a single DTC, or a plane // loop over them //----------------------------------------------------------------------------- - int nfrag = handle->size(); - for (int ifrag=0; ifragsize(); + + if (debugMode_) { + print_(std::format("-- next fragment collection with n_fragments:{}",n_fragments)); + } + + for (int ifrag=0; ifragat(ifrag); if (debugMode_ and (debugBit_[0] > 0)) { @@ -325,7 +330,10 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { frag->typeString(),sizeof(DTCLib::DTC_SubEventHeader))); print_fragment(frag); } - +//----------------------------------------------------------------------------- +// skip CFO fragment (type = 12) +//----------------------------------------------------------------------------- + if (frag->type() == mu2e::FragmentType::CFO) continue; uint8_t* fdata = (uint8_t*) (frag->dataBegin()); if (not missingDTCHeaders_) { //----------------------------------------------------------------------------- @@ -376,16 +384,36 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { // trust that but watch if it changes // so far, any corruptions we saw were contained withing the ROC payload, and nhits // was a reliable number +// 2026-03-20: don't store waveforms if only one packet per hit //----------------------------------------------------------------------------- mu2e::TrackerDataDecoder::TrackerDataPacket* h0; h0 = (mu2e::TrackerDataDecoder::TrackerDataPacket*) (roc_data+packet_size); +//----------------------------------------------------------------------------- +// don't expect zero ADC packets, the error seen was that one of the ROCs just +// doesn't send the second packet at all... work under that assumption +//----------------------------------------------------------------------------- + if (h0->NumADCPackets == 0) { + print_(std::format("ERROR: dtc_id:{} link_id:{} N(ADC packets) = 0, skip ROC data", + dtc_id,(int) rdh->linkID)); + + roc_data += (rdh->packetCount+1)*packet_size; + continue; + } nADCPackets_ = h0->NumADCPackets; nSamples_ = 3+12*nADCPackets_; np_per_hit_ = nADCPackets_+1; } uint32_t link_id = rdh->linkID; nhits = rdh->packetCount/(nADCPackets_+1); - +//----------------------------------------------------------------------------- +// there should not be more than 255 hits per ROC, if nhits>=255 it is a corruption, +// stop processing of the event +//----------------------------------------------------------------------------- + if (nhits > 255) { + print_(std::format("ERROR: nhits:{}, skip event",nhits)); + break; + } + const TrkPanelMap::Row* tpm(nullptr); if (not keyOnMnid_) { tpm = _trackerPanelMap->panel_map_by_online_ind(dtc_id,link_id); @@ -413,6 +441,11 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { int offset = (ihit*np_per_hit_+1)*packet_size; // in bytes hit_data = (mu2e::TrackerDataDecoder::TrackerDataPacket*) (roc_data+offset); + if (roc_data+offset >= last_address) { + print_(std::format("ERROR: dtc_id:{} link_id:{} roc_data:{} offset:{} last_address:{} , SKIPPING", + dtc_id, link_id, (void*) roc_data, offset, (void*) last_address)); + break; + } //----------------------------------------------------------------------------- // at this point, check consistency between the channel_id, dtc_id and link_id for a given run // panel ID is a derivative of the DTC ID and the link iD @@ -422,9 +455,9 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { uint16_t channel = static_cast(hit_data->StrawIndex); uint16_t chid = mu2e::StrawId(channel).straw(); // channel ID within the panel - if (chid > StrawId::_nstraws) { - print_(std::format("ERROR: hit with corrupted chid:{:04x} : straw:{} / dtc_id:{} link_id:{}, SKIPPING", - hit_data->StrawIndex, chid, dtc_id, link_id)); + if (chid >= StrawId::_nstraws) { + if (debugBit_[52] == 0) print_(std::format("ERROR: hit with corrupted chid:{:04x} : straw:{} / dtc_id:{} link_id:{}, SKIPPING", + hit_data->StrawIndex, chid, dtc_id, link_id)); continue; } @@ -436,7 +469,7 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { //----------------------------------------------------------------------------- // bad mnid. Likely, corrupted data block. For now, skip the hit data and proceed with the next hit //----------------------------------------------------------------------------- - print_(std::format("ERROR: corrupted mnid:{}, skip hit data",mnid)); + if (debugBit_[51] == 0) print_(std::format("ERROR: corrupted mnid:{}, skip hit data",mnid)); continue; } } @@ -450,28 +483,6 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { //----------------------------------------------------------------------------- digi_flag = mu2e::StrawDigiFlag::corrupted; } -// uint16_t panel_id; -// if (0 < minnesota_map_.count(mnid)){ -// panel_id = minnesota_map_[mnid]; -// } -// //----------------------------------------------------------------------------- -// // in case of a single channel ID error no need to skip the rest of the ROC data - -// // force geographical address and mark the produced digi -// //----------------------------------------------------------------------------- -// else{ -// print_(std::format("ERROR: hit chid:{:04x} inconsistent with the dtc_id:{} and link_id:{}\n", hit_data->StrawIndex, dtc_id, link_id)); -// mn_id = channel_map_[dtc_id][link_id]; -// if (mn_id == StrawDigisFromArtdaqFragments::invalid_minnesota_){ -// std::string msg = "encountered invalid PanelID"; -// throw cet::exception("StrawDigisFromArtdaqFragments") << msg << std::endl; -// } -// if (minnesota_map_.count(mn_id) < 1){ -// std::string msg = "undefined minnesota number in fallback mapping:" + std::to_string(mn_id); -// throw cet::exception("StrawDigisFromArtdaqFragments") << msg << std::endl; -// } -// panel_id = minnesota_map_[mn_id]; -// digi_flag = mu2e::StrawDigiFlag::corrupted; -// } if (hit_data->NumADCPackets != nADCPackets_) { int np = hit_data->NumADCPackets; @@ -507,35 +518,40 @@ void mu2e::StrawDigisFromArtdaqFragments::produce(art::Event& event) { auto digi = straw_digis->back(); digi.digiFlag() = digi_flag; //------------------------------------------------------------------------------ -// the corresponding waveform +// the corresponding waveform, store only if at least the second packet is present (nSamples_ = 15 or more) //----------------------------------------------------------------------------- if (saveWaveforms_) { - std::vector wf(nSamples_); - - wf[0] = hit_data->ADC00; - wf[1] = hit_data->ADC01(); - wf[2] = hit_data->ADC02; - - auto npackets = 0; - auto idx = 2; - auto adc_packet = (mu2e::TrackerDataDecoder::TrackerADCPacket*)((char*) hit_data + 16); // the packet size is 16 bytes - while (npackets < nADCPackets_) { - wf[++idx] = adc_packet->ADC0; - wf[++idx] = adc_packet->ADC1(); - wf[++idx] = adc_packet->ADC2; - wf[++idx] = adc_packet->ADC3; - wf[++idx] = adc_packet->ADC4(); - wf[++idx] = adc_packet->ADC5; - wf[++idx] = adc_packet->ADC6; - wf[++idx] = adc_packet->ADC7(); - wf[++idx] = adc_packet->ADC8; - wf[++idx] = adc_packet->ADC9; - wf[++idx] = adc_packet->ADC10(); - wf[++idx] = adc_packet->ADC11; - npackets++; - adc_packet++; + if (nSamples_ <= 3) { + print_(std::format("ERROR: nSamples:{}, do not store waveforms",nSamples_)); + } + else { + std::vector wf(nSamples_); + + wf[0] = hit_data->ADC00; + wf[1] = hit_data->ADC01(); + wf[2] = hit_data->ADC02; + + auto npackets = 0; + auto idx = 2; + auto adc_packet = (mu2e::TrackerDataDecoder::TrackerADCPacket*)((char*) hit_data + 16); // the packet size is 16 bytes + while (npackets < nADCPackets_) { + wf[++idx] = adc_packet->ADC0; + wf[++idx] = adc_packet->ADC1(); + wf[++idx] = adc_packet->ADC2; + wf[++idx] = adc_packet->ADC3; + wf[++idx] = adc_packet->ADC4(); + wf[++idx] = adc_packet->ADC5; + wf[++idx] = adc_packet->ADC6; + wf[++idx] = adc_packet->ADC7(); + wf[++idx] = adc_packet->ADC8; + wf[++idx] = adc_packet->ADC9; + wf[++idx] = adc_packet->ADC10(); + wf[++idx] = adc_packet->ADC11; + npackets++; + adc_packet++; + } + straw_digi_adcs->emplace_back(wf); } - straw_digi_adcs->emplace_back(wf); } } } diff --git a/RecoDataProducts/inc/StrawHit.hh b/RecoDataProducts/inc/StrawHit.hh index 66b80cb083..0b5d15817e 100644 --- a/RecoDataProducts/inc/StrawHit.hh +++ b/RecoDataProducts/inc/StrawHit.hh @@ -25,6 +25,8 @@ namespace mu2e { TrkTypes::TDCTimes _time; // (ns) TrkTypes::TOTTimes _tot; // (ns) float _energyDep; // (MeV) + float _digital_pmp; // adcs + float _digital_pedestal; // adcs public: @@ -32,7 +34,9 @@ namespace mu2e { _strawId(StrawId(-1)), _time{0.0,0.0}, _tot{0.0,0.0}, - _energyDep(0.){ + _energyDep(0.), + _digital_pmp(0.0), + _digital_pedestal(0.0){ } // Constructor for a hit that came from an unpacked digi, either @@ -40,9 +44,13 @@ namespace mu2e { StrawHit( StrawId strawId, TrkTypes::TDCTimes const& time, TrkTypes::TOTTimes const& tot, - float energyDep ): + float energyDep , + float digital_pmp, + float digital_pedestal): _strawId(strawId),_time(time),_tot(tot), - _energyDep(energyDep) { + _energyDep(energyDep), + _digital_pmp(digital_pmp), + _digital_pedestal(digital_pedestal){ } // Accessors @@ -53,6 +61,9 @@ namespace mu2e { float TOT(StrawEnd end=StrawEnd::cal) const { return _tot[end];} float energyDep() const { return _energyDep; } + float digitalPulseHeight() const { return _digital_pmp; } + float digitialPedestal() const { return _digital_pedestal; } + // Accept compiler generated versions of d'tor, copy c'tor, assignment operator. bool operator==(StrawHit const& other) const { return (_strawId==other._strawId&& diff --git a/TrkHitReco/inc/StrawHitRecoUtils.hh b/TrkHitReco/inc/StrawHitRecoUtils.hh index ea47dc6f16..941db3122c 100644 --- a/TrkHitReco/inc/StrawHitRecoUtils.hh +++ b/TrkHitReco/inc/StrawHitRecoUtils.hh @@ -3,6 +3,7 @@ #include #include +#include #include "Offline/RecoDataProducts/inc/CaloCluster.hh" #include "Offline/RecoDataProducts/inc/StrawDigi.hh" #include "Offline/RecoDataProducts/inc/StrawHit.hh" @@ -34,10 +35,10 @@ namespace mu2e { const CaloClusterCollection *caloClusters, double pbtOffset, StrawId const& sid, TrkTypes::TDCValues const& tdc, TrkTypes::TOTValues const& tot, - double pmp, + double pmp, double pedestal, TrackerStatus const& trackerStatus, StrawResponse const& srep, Tracker const& tt) const; - double peakMinusPedWF(TrkTypes::ADCWaveform const& adcData, StrawResponse const& srep, ADCWFIter& maxiter) const; + std::pair peakMinusPedWF(TrkTypes::ADCWaveform const& adcData, StrawResponse const& srep, ADCWFIter& maxiter) const; private: // algorith parameters diff --git a/TrkHitReco/src/StrawHitRecoUtils.cc b/TrkHitReco/src/StrawHitRecoUtils.cc index 1661c968fd..28634c2d5d 100644 --- a/TrkHitReco/src/StrawHitRecoUtils.cc +++ b/TrkHitReco/src/StrawHitRecoUtils.cc @@ -64,7 +64,7 @@ namespace mu2e { } } - double StrawHitRecoUtils::peakMinusPedWF(TrkTypes::ADCWaveform const& adcData, StrawResponse const& srep, ADCWFIter& maxiter) const { + std::pair StrawHitRecoUtils::peakMinusPedWF(TrkTypes::ADCWaveform const& adcData, StrawResponse const& srep, ADCWFIter& maxiter) const { auto wfstart = adcData.begin() + srep.nADCPreSamples(); auto pedestal = std::accumulate(adcData.begin(), wfstart, 0)/static_cast(srep.nADCPreSamples()); maxiter = wfstart; @@ -74,14 +74,16 @@ namespace mu2e { ++nextIter; } auto peak = *maxiter; - return (peak-pedestal); + auto pmp = peak - pedestal; + auto rv = std::make_pair(pmp, pedestal); + return rv; } bool StrawHitRecoUtils::createComboHit(EventWindowMarker const& ewm, size_t isd, std::unique_ptr const& chCol, std::unique_ptr const& shCol, const CaloClusterCollection* caloClusters, double pbtOffset, StrawId const& sid, TrkTypes::TDCValues const& tdc, TrkTypes::TOTValues const& tot, - double pmp, + double pmp, double pedestal, TrackerStatus const& trackerStatus, StrawResponse const& srep, Tracker const& tt) const { float minT = _minT; @@ -203,7 +205,7 @@ namespace mu2e { chCol->push_back(std::move(ch)); // optionally create legacy straw hit (for diagnostics and calibration) if(_writesh){ - StrawHit hit(sid,times,tots,energy); + StrawHit hit(sid,times,tots,energy,pmp,pedestal); shCol->push_back(std::move(hit)); } return true; diff --git a/TrkHitReco/src/StrawHitReco_module.cc b/TrkHitReco/src/StrawHitReco_module.cc index 1071e86aa4..093380b680 100644 --- a/TrkHitReco/src/StrawHitReco_module.cc +++ b/TrkHitReco/src/StrawHitReco_module.cc @@ -199,6 +199,7 @@ namespace mu2e { TrackerStatus const& trackerStatus = _trackerStatus_h.get(event.id()); double pmp(0.0); + double pedestal(0.0); for (size_t isd=0;isdat(isd).samples(); ADCWFIter maxiter; - pmp = _shrUtils.peakMinusPedWF(adcwf,srep,maxiter); + auto pair = _shrUtils.peakMinusPedWF(adcwf,srep,maxiter); + pmp = pair.first; + pedestal = pair.second; if(_diagLevel > 0)_maxiter->Fill( std::distance(adcwf.begin(),maxiter)); } _shrUtils.createComboHit(ewm, isd, chCol, shCol, caloClusters, pbtOffset, - digi.strawId(), digi.TDC(), digi.TOT(), pmp, + digi.strawId(), digi.TDC(), digi.TOT(), pmp, pedestal, trackerStatus, srep, tt); //flag straw and electronic cross-talk if(_flagXT){ From 6e3b1c96eb57abf7d2414c5424cb081611ccc301 Mon Sep 17 00:00:00 2001 From: edcallaghan Date: Fri, 17 Apr 2026 11:55:45 -0500 Subject: [PATCH 4/5] fix typo --- RecoDataProducts/inc/StrawHit.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoDataProducts/inc/StrawHit.hh b/RecoDataProducts/inc/StrawHit.hh index 0b5d15817e..530b6ed8c9 100644 --- a/RecoDataProducts/inc/StrawHit.hh +++ b/RecoDataProducts/inc/StrawHit.hh @@ -62,7 +62,7 @@ namespace mu2e { float energyDep() const { return _energyDep; } float digitalPulseHeight() const { return _digital_pmp; } - float digitialPedestal() const { return _digital_pedestal; } + float digitalPedestal() const { return _digital_pedestal; } // Accept compiler generated versions of d'tor, copy c'tor, assignment operator. bool operator==(StrawHit const& other) const { From 2cd256048f5034b19e2ea456699f505ca1d35dfd Mon Sep 17 00:00:00 2001 From: Mu2e Date: Fri, 17 Apr 2026 20:22:19 -0500 Subject: [PATCH 5/5] - in the trigger, disable individual straws --- DAQ/src/StrawHitFilter_module.cc | 35 +++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/DAQ/src/StrawHitFilter_module.cc b/DAQ/src/StrawHitFilter_module.cc index 1a8ce057ca..2449d27ecc 100644 --- a/DAQ/src/StrawHitFilter_module.cc +++ b/DAQ/src/StrawHitFilter_module.cc @@ -43,7 +43,7 @@ namespace mu2e { fhicl::Atom maxDt {Name("maxDt" ), Comment("max abs(DT)")}; fhicl::Atom minEDep {Name("minEDep" ), Comment("min EDep")}; fhicl::Atom minNGoodHits {Name("minNGoodHits" ), Comment("minNStrawDigis")}; - fhicl::Sequence mnidToSkip {Name("mnidToSkip" ), Comment("a list of panels to skip")}; + fhicl::Sequence channelsToSkip{Name("channelsToSkip"), Comment("a list of channels to skip")}; fhicl::Atom fillHistograms{Name("fillHistograms"), Comment("fill histogrms, default:false")}; }; @@ -54,6 +54,11 @@ namespace mu2e { TH1F* dt ; TH1F* edep; } _hist[2]; + // channels disabled from the trigger + struct Channel_t { + int mnid; + int straw; + }; using Parameters = art::EDFilter::Table; @@ -79,7 +84,7 @@ namespace mu2e { float _maxDt; float _minEDep; int _minNGoodHits; - std::vector _mnidToSkip; // panels not to look at when searching for good hits + std::vector _channelsToSkip; // channels not to look at when searching for good hits int _fillHistograms; int _nevt; @@ -105,7 +110,6 @@ namespace mu2e { _maxDt (conf().maxDt ()), _minEDep (conf().minEDep ()), _minNGoodHits (conf().minNGoodHits()), - _mnidToSkip (conf().mnidToSkip()), _fillHistograms (conf().fillHistograms()) { //----------------------------------------------------------------------------- @@ -120,6 +124,23 @@ namespace mu2e { sscanf(key,"bit%i:%i",&index,&value); _debugBit[index] = value; } +//----------------------------------------------------------------------------- +// parse channels to skip +//----------------------------------------------------------------------------- + int ndat = conf().channelsToSkip().size(); + for (int i=0; imnid, ch->straw); + } + _run_initialized = false; } @@ -233,12 +254,16 @@ namespace mu2e { int hit_mnid = tpm->mnid(); bool skip = false; - for (auto mnid: _mnidToSkip) { - if (hit_mnid == mnid) { + + int n_disabled_channels = _channelsToSkip.size(); + for (int i=0; imnid) and (sh->strawId().straw() == ch->straw)) { skip = true; break; } } + if (skip) continue; if (fabs(sh->dt()) > _maxDt ) continue;