DataPrep Status DUNE 35-ton simulaDon and reconstrucDon - - PowerPoint PPT Presentation

dataprep status
SMART_READER_LITE
LIVE PREVIEW

DataPrep Status DUNE 35-ton simulaDon and reconstrucDon - - PowerPoint PPT Presentation

DataPrep Status DUNE 35-ton simulaDon and reconstrucDon David Adams BNL July 27, 2016 IntroducDon Developing new DataPrep module Extracts raw data


slide-1
SLIDE 1

DataPrep ¡Status ¡

David ¡Adams ¡ BNL ¡ July ¡27, ¡2016 ¡

DUNE ¡35-­‑ton ¡simulaDon ¡and ¡ reconstrucDon ¡

slide-2
SLIDE 2

IntroducDon ¡

Developing ¡new ¡DataPrep ¡module ¡

  • Extracts ¡raw ¡data ¡from ¡larsoK ¡container ¡and ¡prepares ¡for ¡use ¡in ¡reco ¡
  • Writes ¡prepared ¡data ¡(float ¡signal ¡for ¡each ¡Dck) ¡as ¡recob::Wire ¡
  • Consolidate ¡the ¡exisDng ¡35t, ¡FD ¡and ¡protoDUNE ¡modules ¡
  • CalWireDUNEXXX ¡where ¡XXX ¡= ¡35t, ¡10kt, ¡ ¡Dphase, ¡… ¡
  • New ¡code ¡follow ¡the ¡TSI ¡(Tool-­‑Service-­‑Interface) ¡model ¡
  • Algorithmic ¡code ¡resides ¡in ¡art ¡services ¡
  • Services ¡inherit ¡a ¡service ¡interface ¡that ¡declares ¡all ¡methods ¡

– Or ¡at ¡least ¡those ¡that ¡are ¡public ¡and ¡intended ¡for ¡normal ¡use ¡

  • Clients ¡(such ¡as ¡StandardRawDigitPrepService) ¡find ¡the ¡service ¡via ¡the ¡

interface ¡name ¡

– So ¡that ¡alternate ¡service ¡implementaDons ¡can ¡be ¡plugged ¡in ¡at ¡run ¡Dme ¡

  • (Tool ¡is ¡a ¡proposed ¡art ¡extension ¡that ¡will ¡enable ¡use ¡of ¡mulDple ¡named ¡

instances ¡of ¡a ¡service ¡or ¡service ¡interface) ¡

  • Work ¡is ¡tracked ¡as ¡a ¡Redmine ¡issue ¡
  • h]ps://cdcvs.fnal.gov/redmine/issues/12701 ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

2 ¡

slide-3
SLIDE 3

Data ¡preparaDon ¡

There ¡are ¡many ¡steps ¡to ¡prepare ¡data ¡

  • Extract ¡from ¡larsoK ¡RawDigit ¡container ¡
  • Uncompress, ¡int-­‑to-­‑float, ¡subtract ¡pedestals ¡
  • Flag ¡under/overflows ¡and ¡stuck ¡bits ¡
  • MiDgaDon ¡
  • E.g. ¡interpolaDon ¡for ¡stuck ¡bits ¡
  • Early ¡signal ¡finding ¡(to ¡aid ¡in ¡noise ¡removal) ¡
  • Noise ¡removal ¡
  • Pedestal ¡adjustment ¡
  • DeconvoluDon ¡
  • ROI ¡building ¡(signal ¡finding) ¡
  • Construct ¡output ¡data ¡product ¡(recob::Wire) ¡
  • And ¡associaDons ¡to ¡digits ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

3 ¡

slide-4
SLIDE 4

Internal ¡data ¡representaDon ¡

Struct ¡AdcChannelData ¡carries ¡raw ¡and ¡prepared ¡data ¡

  • Between ¡DataPrep ¡tools ¡
  • Also ¡provides ¡convenient ¡interface ¡for ¡use ¡analysis ¡
  • See ¡dunetpc/dune/DuneInterface/AdcChannelData.h ¡
  • Struct ¡member ¡are ¡listed ¡in ¡table ¡on ¡following ¡page ¡

Container ¡AdcChannelDataMap ¡is ¡used ¡for ¡mulDple ¡channels ¡

  • Type ¡is ¡map<short, ¡AdcChannelData> ¡(index ¡is ¡channel ¡number) ¡

Typedefs ¡are ¡in ¡AdcTypes.h, ¡e.g. ¡

  • AdcIndex ¡= ¡unsigned ¡int ¡
  • AdcROI ¡= ¡std::pair<AdcIndex, ¡AdcIndex> ¡
  • AdcFlag ¡(see ¡later ¡slide) ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

4 ¡

slide-5
SLIDE 5

Internal ¡data ¡representaDon ¡(2) ¡

AdcChannelData ¡members: ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

5 ¡

Type ¡ Name ¡ Meaning ¡ unsigned ¡int ¡ channel ¡ Channel ¡number ¡ float ¡ pedestal ¡ Assumed ¡pedestal ¡ vector<short> ¡ raw ¡ Raw ¡count ¡for ¡each ¡Dck ¡ vector<float> ¡ samples ¡ Corrected ¡count ¡for ¡each ¡Dck ¡ vector<AdcFlag> ¡ flags ¡ Status ¡for ¡each ¡Dck ¡ vector<bool> ¡ signal ¡ Indicates ¡is ¡each ¡Dck ¡holds ¡“signal” ¡ vector<AdcRoi> ¡ rois ¡ ROI ¡representaDon ¡of ¡signal ¡ const ¡raw::RawDigit* ¡ digit ¡ Raw ¡digit ¡from ¡which ¡this ¡data ¡is ¡derived ¡ const ¡recob::Wire* ¡ wire ¡ Wire ¡corresponding ¡to ¡this ¡data ¡ AdcIndex ¡ digitIndex ¡ Index ¡of ¡digit ¡in ¡digit ¡container ¡ AdcIndex ¡ wireIndex ¡ Index ¡of ¡wire ¡in ¡wire ¡container ¡

slide-6
SLIDE 6

Internal ¡data ¡representaDon ¡(3) ¡

AdcFlag ¡specifies ¡the ¡state ¡for ¡each ¡Dck ¡

  • Type ¡is ¡short ¡
  • Intended ¡for ¡use ¡by ¡noise ¡removal, ¡calibraDon ¡and ¡monitoring ¡tools ¡
  • Recognized ¡values ¡are ¡listed ¡in ¡table ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

6 ¡

Variable ¡name ¡ Value ¡ Meaning ¡ AdcGood ¡ 0 ¡ OK ¡ AdcUnderflow ¡ 1 ¡ Raw ¡count ¡is ¡underflow ¡(0) ¡ AdcOverFlow ¡ 2 ¡ Raw ¡count ¡is ¡overflow ¡(4095) ¡ AdcStuckOff ¡ 3 ¡ Raw ¡low ¡six ¡bits ¡are ¡all ¡0 ¡ AdcStuckOn ¡ 4 ¡ Raw ¡low ¡six ¡bit ¡are ¡all ¡1 ¡ AdcSetFixed ¡ 5 ¡ Corrected ¡count ¡set ¡to ¡fixed ¡value ¡(e.g. ¡0) ¡ AdcInterpolated ¡ 6 ¡ Corrected ¡count ¡interpolated ¡from ¡other ¡Dcks ¡ AdcExtrapolated ¡ 7 ¡ Corrected ¡count ¡extrapolated ¡from ¡other ¡Dcks ¡

slide-7
SLIDE 7

Services ¡

Following ¡slides ¡describe ¡the ¡DataPrep ¡services ¡

  • Provide ¡the ¡DataPrep ¡flow ¡
  • Exchange ¡and ¡update ¡AdcChannelData ¡objects ¡
  • Service ¡interfaces ¡are ¡in ¡dunetpc/dune/DuneInterface/XXXService.h ¡
  • XXXService ¡is ¡interface ¡class ¡name ¡
  • Service ¡implementaDons ¡in ¡dunetpc/dune/DataPrep/Service ¡
  • Service ¡XXXService ¡has ¡header ¡XXXService.h ¡

– Not ¡needed ¡because ¡access ¡is ¡always ¡via ¡interface? ¡

  • Source ¡file ¡for ¡service ¡is ¡ ¡XXXService_service.cc ¡

– Naming ¡convenDon ¡required ¡by ¡use ¡of ¡cetbuildtools ¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

7 ¡

slide-8
SLIDE 8

StandardRawDigitPrepService ¡

Interface: ¡RawDigitPrepService ¡

  • Input: ¡Raw ¡digit ¡vector ¡
  • Output: ¡AdcChannelDataMap ¡

This ¡high-­‑level ¡service ¡provides ¡the ¡data ¡prep ¡flow ¡

  • Calls ¡the ¡other ¡data ¡prep ¡services ¡(via ¡interfaces) ¡
  • Configurable ¡via ¡FCL ¡
  • Steps ¡can ¡be ¡skipped ¡
  • Choice ¡of ¡type ¡and ¡configuraDon ¡for ¡each ¡low-­‑level ¡service ¡

Data ¡prep ¡module ¡is ¡a ¡thin ¡wrapper ¡around ¡service ¡

  • Extract ¡raw ¡digits ¡
  • Call ¡this ¡service ¡
  • Build ¡wire-­‑digit ¡associaDons ¡
  • Record ¡wires ¡and ¡associaDons ¡in ¡event ¡

Service ¡disDnct ¡from ¡module ¡can ¡be ¡used ¡outside ¡art ¡FW ¡

  • E.g. ¡a ¡Root ¡event ¡display ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

8 ¡

slide-9
SLIDE 9

StandardRawDigitPrepService ¡(2) ¡

Flow: ¡

  • Loop ¡over ¡Raw ¡digits ¡
  • Add ¡AdcChannelData ¡object ¡to ¡output ¡map ¡
  • Fill ¡with ¡RawDigitExtractService ¡
  • Patch ¡bad ¡Dcks ¡with ¡AdcMiDgaDonService ¡
  • Find ¡signals ¡with ¡AdcSignalFindingService ¡

– This ¡is ¡“early ¡signal ¡finding,” ¡, ¡i.e. ¡before ¡noise ¡removal ¡and ¡dconvoluDon ¡ – This ¡informaDon ¡may ¡be ¡used ¡during ¡noise ¡removal ¡

  • Do ¡noise ¡removal ¡with ¡AdcNoiseRemovalService ¡
  • Deconvolute ¡signal ¡
  • Adjust ¡pedestals ¡with ¡value ¡obtained ¡from ¡PedestalEvaluaDonService ¡
  • Build ¡ROIs ¡(final ¡signal ¡finding) ¡
  • Issue: ¡ROI ¡building ¡requires ¡signal ¡finding ¡on ¡deconvoluted ¡data. ¡It ¡would ¡

be ¡nice ¡to ¡have ¡tools ¡(rather ¡than ¡just ¡services) ¡so ¡the ¡same ¡interface ¡but ¡ different ¡implementaDons ¡can ¡be ¡used ¡here ¡and ¡for ¡early ¡signal ¡finding ¡

  • Build ¡wires ¡

¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

9 ¡

slide-10
SLIDE 10

StandardRawDigitPrepService ¡(3) ¡

ConfiguraDon: ¡

  • Note: ¡Other ¡services ¡follow ¡the ¡same ¡convenDon ¡for ¡LogLevel. ¡
  • In ¡a ¡world ¡with ¡tools, ¡replace ¡the ¡DoXXX ¡flags ¡with ¡tool ¡names. ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

10 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ LogLevel ¡ 0: ¡No ¡log ¡messages ¡ 1: ¡Log ¡messages ¡only ¡during ¡iniDalizaDon ¡ 2+: ¡Log ¡messages ¡for ¡every ¡event ¡ bool ¡ DoMiDgaDon ¡ Patch ¡bad ¡Dcks ¡ bool ¡ DoEarlySignalFinding ¡ Do ¡early ¡signal ¡finding ¡ bool ¡ DoNoiseRemoval ¡ Do ¡noise ¡removal ¡ bool ¡ DoDeconvoluDon ¡ Deconvolute ¡signal ¡ bool ¡ DoPedestalAdjustment ¡ Do ¡pedestal ¡adjustment ¡ bool ¡ DoROI ¡ Build ¡ROIs ¡ bool ¡ DoWires ¡ Build ¡wires ¡

slide-11
SLIDE 11

StandardRawDigitExtractService ¡

Interface: ¡RawDigitExtractService ¡

  • Input: ¡const ¡RawDigit& ¡
  • Output: ¡Data ¡for ¡AdcChannelData ¡
  • channel, ¡pedestal, ¡raw, ¡samples, ¡flags ¡

Table ¡gives ¡the ¡configuraDon ¡parameters ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

11 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ PedestalOpDon ¡ 1: ¡Take ¡pedestal ¡from ¡digit ¡ 2: ¡Take ¡pedestal ¡from ¡pedestal ¡provider ¡ bool ¡ FlagStuckOff ¡ Set ¡flag ¡if ¡bits ¡are ¡stuck ¡low ¡ bool ¡ FlagStuckOn ¡ Set ¡flag ¡if ¡bits ¡are ¡stuck ¡high ¡

slide-12
SLIDE 12

InterpolaDngAdcMiDgaDonService ¡

Interface: ¡AdcMiDgaDonService ¡

  • Input/output: ¡AdcChannelData ¡

Algorithm ¡

  • Samples ¡with ¡stuck ¡bits ¡(and ¡opDonally ¡under/overflows) ¡are ¡updated ¡

with ¡values ¡obtained ¡by ¡linear ¡interpolaDon ¡between ¡nearest ¡good ¡

  • neighbors. ¡

ConfiguraDon: ¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

12 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ LogLevel ¡ Per ¡convenDon ¡ bool ¡ SkipUnderflows ¡ If ¡true, ¡underflows ¡are ¡not ¡updated ¡ bool ¡ SkipOverflows ¡ if ¡true, ¡overflows ¡are ¡not ¡updated ¡ int ¡ MaxConsecuDveSamples ¡ Maximum ¡# ¡consecuDve ¡samples ¡to ¡update ¡ int ¡ MaxConsecuDveFlag ¡ AcDon ¡for ¡too ¡many ¡consecuDve ¡samples: ¡ 1: ¡Leave ¡sample ¡unchanged. ¡ 2: ¡Set ¡sample ¡to ¡zero. ¡

slide-13
SLIDE 13

AdcSuppressSignalFindingService ¡

Interface: ¡AdcSignalFindingService ¡

  • Input/output: ¡AdcChannelData& ¡

Algorithm: ¡

  • Uses ¡the ¡AdcSuppressService ¡interface ¡to ¡re-­‑use ¡the ¡signal-­‑finding ¡

suppression ¡services ¡developed ¡for ¡DetSim ¡

  • Legacy35tZeroSuppressService ¡– ¡The ¡code ¡from ¡the ¡old ¡DetSim ¡
  • Dune35tZeroSuppressService ¡– ¡SimulaDon ¡of ¡the ¡DUNE ¡35t ¡algorithm ¡

No ¡configuraDon ¡parameters ¡

  • Service ¡is ¡discovered ¡by ¡it ¡type ¡name ¡
  • Add ¡name ¡when ¡service ¡becomes ¡a ¡tool ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

13 ¡

slide-14
SLIDE 14

Dune35tNoiseRemovalService ¡

Interface: ¡AdcNoiseRemovalService ¡

  • Input/output: ¡AdcChannelDataMap& ¡

Algorithm: ¡

  • Channels ¡are ¡organized ¡into ¡groups ¡
  • OpDons ¡to ¡do ¡this ¡by ¡regulator ¡or ¡ASIC ¡
  • Also ¡separate ¡groups ¡for ¡the ¡three ¡wire ¡orientaDons ¡
  • The ¡BG ¡is ¡esDmated ¡as ¡median ¡of ¡all ¡signals ¡for ¡each ¡Dck ¡and ¡channel ¡
  • This ¡value ¡is ¡subtracted ¡from ¡all ¡corresponding ¡signals ¡
  • Same ¡algorithm ¡and ¡groups ¡as ¡the ¡old ¡FilterWF ¡service ¡
  • Used ¡in ¡35t ¡data ¡producDon ¡
  • Service ¡is ¡specific ¡to ¡35t ¡because ¡it ¡uses ¡35-­‑ton ¡channel ¡map ¡interface ¡
  • That ¡provides ¡regulator ¡and ¡ASIC ¡grouping ¡
  • Could ¡be ¡generalized ¡to ¡other ¡detectors ¡ ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

14 ¡

slide-15
SLIDE 15

Dune35tNoiseRemovalService ¡(2) ¡

ConfiguraDon: ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

15 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ LogLevel ¡ Per ¡convenDon ¡ int ¡ GroupingFlag ¡ 1: ¡By ¡regulator ¡(128 ¡channels) ¡ 2: ¡By ¡asic ¡(32 ¡channels) ¡ bool ¡ SkipStuckCodes ¡ Ignore ¡channels ¡with ¡stuck ¡bits ¡in ¡BG ¡esDmate ¡ bool ¡ SkipSignals ¡ Channels ¡idenDfied ¡as ¡“signal” ¡are ¡not ¡used ¡in ¡BG ¡est. ¡ bool ¡ CorrectStuckCodes ¡ If ¡true, ¡samples ¡with ¡stuck ¡codes ¡are ¡corrected ¡ int ¡ ShowGroups ¡ If ¡nonzero, ¡channel ¡grouping ¡is ¡displayed ¡in ¡log ¡ 1: ¡Organize ¡by ¡orientaDon ¡and ¡then ¡group ¡ 2: ¡Organize ¡by ¡group ¡and ¡then ¡orientaDon ¡ int ¡ ShowGroupsChannel ¡ Channel ¡type ¡used ¡when ¡groups ¡are ¡show: ¡ 0: ¡none ¡ 1: ¡online ¡ 2: ¡offline, ¡ 3,4: ¡offline ¡by ¡name ¡(z1, ¡z2 ¡or ¡z, ¡Z) ¡

slide-16
SLIDE 16

DuneDeconvoluDonService ¡

Interface: ¡AdcDeconvoluDonService ¡

  • Input/output: ¡AdcChannelData& ¡

Algorithm: ¡

  • Uses ¡SignalShapingServiceDUNE ¡which ¡folds ¡and ¡unfolds ¡the ¡signal ¡

with ¡one ¡provided ¡in ¡a ¡histogram ¡

  • Service ¡is ¡found ¡with ¡the ¡usual ¡service ¡handle ¡
  • Different ¡signals ¡for ¡each ¡view ¡(z, ¡u, ¡v) ¡

ConfiguraDon: ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

16 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ LogLevel ¡ Per ¡convenDon ¡

slide-17
SLIDE 17

MedianPedestalEvaluaDonService ¡

Interface: ¡PedestalEvaluaDonService ¡

  • Input: ¡const ¡AdcChannelData& ¡
  • Output: ¡4 ¡float*: ¡pedestal, ¡rms ¡and ¡error ¡for ¡each ¡

Algorithm: ¡

  • Evaluates ¡pedestal ¡as ¡median ¡value ¡in ¡input ¡samples ¡
  • OpDons ¡to ¡omit ¡samples ¡flagged ¡(under/overflow, ¡stuck ¡bits, ¡…) ¡or ¡

idenDfied ¡as ¡signal ¡

ConfiguraDon: ¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

17 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ LogLevel ¡ Per ¡convenDon ¡ bool ¡ SkipFlaggedSamples ¡ If ¡true, ¡flagged ¡samples ¡are ¡omi]ed ¡ bool ¡ SkipSignals ¡ if ¡true, ¡sample ¡idenDfied ¡as ¡signal ¡are ¡not ¡used ¡

slide-18
SLIDE 18

DuneRoiBuildingService ¡

Interface: ¡AdcRoiBuildingService ¡

  • Input/output: ¡AdcChannelData& ¡

Algorithm ¡

  • Copy ¡of ¡the ¡exisDng ¡35-­‑ton ¡ROI ¡builder ¡
  • Look ¡for ¡a ¡Dck ¡above ¡high ¡threshold ¡

– Threshold ¡in ¡sigma ¡from ¡signal ¡shaping ¡service ¡

  • Keep ¡it ¡all ¡following ¡Dcks ¡unDl ¡signal ¡falls ¡below ¡some ¡threshold ¡
  • Add ¡padding ¡below ¡and ¡above ¡each ¡selected ¡region ¡

ConfiguraDon: ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

18 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ LogLevel ¡ Per ¡convenDon ¡ float ¡ NSigmaStart ¡ High ¡threshold ¡ float ¡ NSigmaStop ¡ Low ¡threshold ¡ bool ¡ PadLow ¡ Number ¡of ¡Dcks ¡for ¡padding ¡below ¡ bool ¡ PadHigh ¡ Number ¡of ¡Dcks ¡for ¡padding ¡above ¡

slide-19
SLIDE 19

StandardAdcWireBuildingService ¡

Interface: ¡AdcWireBuildingService ¡ Algorithm: ¡

  • Construct ¡wires ¡from ¡channel ¡data ¡

ConfiguraDon ¡ ¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

19 ¡

Type ¡ Name ¡ Meaning ¡ int ¡ LogLevel ¡ Per ¡convenDon ¡

slide-20
SLIDE 20

Conclusions ¡

New ¡data ¡prep ¡service ¡is ¡under ¡development ¡

  • Intended ¡to ¡replace ¡the ¡mulDple ¡exisDng ¡CalWire ¡modules ¡
  • As ¡before, ¡input ¡is ¡raw::RawDigit ¡and ¡output ¡is ¡recob::Wire ¡
  • Most ¡code ¡moved ¡from ¡module ¡to ¡services ¡following ¡TSI ¡
  • Including ¡high-­‑level ¡service ¡that ¡calls ¡the ¡low-­‑level ¡services ¡
  • Module ¡will ¡call ¡the ¡high-­‑level ¡service ¡
  • Allowing ¡one ¡to ¡run ¡data ¡prep ¡outside ¡of ¡art ¡
  • Easy ¡to ¡plug ¡in ¡different ¡opDons ¡for ¡steps ¡in ¡data ¡prep ¡(e.g. ¡

deconvoluDon) ¡by ¡providing ¡a ¡new ¡service ¡and ¡changing ¡FCL ¡to ¡use ¡it ¡

  • Transient ¡data ¡class ¡AdcChannelData ¡introduced ¡
  • Used ¡to ¡exchange ¡data ¡between ¡data ¡prep ¡services ¡(and ¡user) ¡

Status ¡

  • Most ¡low ¡level ¡services ¡are ¡in ¡place ¡
  • Module ¡wrapper ¡almost ¡done ¡
  • Need ¡to ¡test ¡and ¡develop ¡FCL ¡for ¡FD ¡and ¡protoDUNE ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

20 ¡

slide-21
SLIDE 21

Conclusions ¡(2) ¡

Tools ¡

  • Tool ¡= ¡service ¡that ¡accessed ¡via ¡instance ¡name ¡instead ¡of ¡class ¡name ¡
  • Allows ¡us ¡to ¡use ¡mulDple ¡instances ¡of ¡a ¡“service” ¡type ¡in ¡a ¡job ¡
  • OO ¡programming ¡
  • In ¡many ¡cases ¡it ¡would ¡be ¡easier ¡if ¡we ¡had ¡tools ¡instead ¡of ¡services ¡
  • E.g. ¡different ¡services ¡acDng ¡on ¡AdcChannelData& ¡could ¡have ¡the ¡same ¡

interface ¡

  • E.g. ¡Re-­‑use ¡signal ¡finders ¡for ¡ROI ¡building ¡
  • Best ¡to ¡do ¡this ¡at ¡the ¡art ¡level ¡
  • Probably ¡small ¡change ¡in ¡art ¡code ¡
  • But ¡big ¡change ¡in ¡POV ¡(point ¡of ¡view)? ¡

¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

21 ¡

slide-22
SLIDE 22

Extra: ¡35 ¡ton ¡

My ¡interest ¡for ¡35-­‑ton ¡data ¡

  • Work ¡on ¡that ¡described ¡here ¡has ¡distracted ¡me ¡from ¡looking ¡at ¡the ¡

35-­‑ton ¡data ¡

  • I ¡would ¡like ¡to ¡understand ¡if ¡we ¡can ¡predict ¡the ¡“noise” ¡in ¡one ¡region ¡
  • f ¡the ¡detector ¡from ¡surrounding ¡regions ¡
  • So ¡we ¡can ¡use ¡sidebands ¡to ¡esDmate ¡the ¡noise ¡under ¡a ¡signal ¡
  • First ¡a]empt ¡(reported ¡here) ¡as ¡not ¡successful ¡
  • Need ¡a ¡different ¡noise ¡model? ¡
  • Or ¡is ¡it ¡not ¡possible ¡to ¡do ¡what ¡I ¡a]empt? ¡
  • Maybe ¡look ¡at ¡autocorrelaDon…? ¡
  • I ¡hope ¡to ¡get ¡back ¡to ¡this ¡soon. ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡35-­‑ton ¡sim/reco ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Data ¡prep ¡status ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡July ¡27, ¡2016 ¡

22 ¡