New DetSim module David Adams BNL January 14, 2016 DUNE collaboration Far detector simulation and reconstruction.

Slides:



Advertisements
Similar presentations
Digital Filtering Performance in the ATLAS Level-1 Calorimeter Trigger David Hadley on behalf of the ATLAS Collaboration.
Advertisements

Adding electronic noise and pedestals to the CALICE simulation LCWS 19 – 23 rd April Catherine Fry (working with D Bowerman) Imperial College London.
Peter Chochula, January 31, 2006  Motivation for this meeting: Get together experts from different fields See what do we know See what is missing See.
CSC1016 Coursework Clarification Derek Mortimer March 2010.
Checking the Acd hardware veto setting The hardware veto is generated in the front-end electronics Discriminator with coarse and fine settings Both are.
Aki Hecht Seminar in Databases (236826) January 2009
28 Feb 2006Digi - Paul Dauncey1 In principle change from simulation output to “raw” information equivalent to that seen in real data Not “reconstruction”,
1Calice-UK Cambridge 9/9/05D.R. Ward David Ward Compare Feb’05 DESY data with Geant4 and Geant3 Monte Carlos. Work in progress – no definitive conclusions.
29 Mar 2007Tracking - Paul Dauncey1 Tracking/Alignment Status Paul Dauncey, Michele Faucci Giannelli, Mike Green, Anne-Marie Magnan, George Mavromanolakis,
An offline look at TIF data David Stuart UC Santa Barbara May 2, 2007.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Fundamentals of Python: From First Programs Through Data Structures
Fundamentals of Python: First Programs
CFT Offline Monitoring Michael Friedman. Contents Procedure  About the executable  Notes on how to run Results  What output there is and how to access.
JAS3 + AIDA LC Simulations Workshop SLAC 19 th May 2003.
CS1Q Computer Systems Lecture 8
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
1 A ROOT Tool for 3D Event Visualization in ATLAS Calorimeters Luciano Andrade José de Seixas Federal University of Rio de Janeiro/COPPE.
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4.
Event Data History David Adams BNL Atlas Software Week December 2001.
Status report from T2K-SK group Task list of this group discussion about NEUT Kaneyuki, Walter, Konaka We have just started the discussion.
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
G.Corti, P.Robbe LHCb Software Week - 19 June 2009 FSR in Gauss: Generator’s statistics - What type of object is going in the FSR ? - How are the objects.
Using JAS3 for LCD Analysis Tony Johnson 20 th May 2003.
JANA and Raw Data David Lawrence, JLab Oct. 5, 2012.
NA62 Trigger Algorithm Trigger and DAQ meeting, 8th September 2011 Cristiano Santoni Mauro Piccini (INFN – Sezione di Perugia) NA62 collaboration meeting,
1 Behaviour of the Silicon Strip Detector modules for the Alice experiment: simulation and test with minimum ionizing particles Federica Benedosso Utrecht,
Dec.11, 2008 ECL parallel session, Super B1 Results of the run with the new electronics A.Kuzmin, Yu.Usov, V.Shebalin, B.Shwartz 1.New electronics configuration.
David Adams ATLAS Virtual Data in ATLAS David Adams BNL May 5, 2002 US ATLAS core/grid software meeting.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
Online Reconstruction 1M.Ellis - CM th October 2008.
David Adams ATLAS DIAL: Distributed Interactive Analysis of Large datasets David Adams BNL August 5, 2002 BNL OMEGA talk.
12 October 2001, M. LefebvreHEC-Athena Tutorial: HEC beam test primer1 HEC Beam Test Primer Production modules of the HEC have been tested in particle.
1 Project designed and created by M. Shajith Kumar.
Feature Extractor: overview and history of recent changes Dmitry Chirkin, UW Madison Goal: Given an ATWD or FADC waveform, determine arrival times of some.
Why A Software Review? Now have experience of real data and first major analysis results –What have we learned? –How should that change what we do next.
LHCb VELO Upgrade Strip Chip Option: Data Processing Algorithms Giulio Forcolin, Abdul Afandi, Chris Parkes, Tomasz Szumlak* * AGH-Krakow Part I: LCMS.
STAR Analysis Meeting, BNL – oct 2002 Alexandre A. P. Suaide Wayne State University Slide 1 EMC update Status of EMC analysis –Calibration –Transverse.
T. Lari – INFN Milan Status of ATLAS Pixel Test beam simulation Status of the validation studies with test-beam data of the Geant4 simulation and Pixel.
1 Level 1 Pre Processor and Interface L1PPI Guido Haefeli L1 Review 14. June 2002.
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
LKr readout and trigger R. Fantechi 3/2/2010. The CARE structure.
1 S, Fedele, Student Presentations, 2004/08/04S Amazing Title Slide Reworking the CES Cluster Reconstruction Algorithm By: Steve Fedele Advisor: Pavel.
06/2006I.Larin PrimEx Collaboration meeting  0 analysis.
Muon Persistency Persistent Analysis Objects Muon Persistency Norbert Neumeister µ-PRS meeting February 10, 2004.
STAR Simulation. Status and plans V. Perevoztchikov Brookhaven National Laboratory,USA.
Comparison of MC and data Abelardo Moralejo Padova.
Calibration algorithm and detector monitoring - TPC Marian Ivanov.
Tau31 Tracking Efficiency at BaBar Ian Nugent UNIVERSITY OF VICTORIA Sept 2005 Outline Introduction  Decays Efficiency Charge Asymmetry Pt Dependence.
AliRoot survey: Reconstruction P.Hristov 11/06/2013.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Quiz 3 next week. See next slide. Both versions of assignment 3 are posted. Due today.
BEACH 04J. Piedra1 SiSA Tracking Silicon stand alone (SiSA) tracking optimization SiSA validation Matthew Herndon University of Wisconsin Joint Physics.
Event Mixing Rob Kutschke, Fermilab Software and Simulation Meeting October 5, 2011 Mu2e-doc-1874-v1.
Default zero suppression in simulation David Adams BNL November 18, 2015 DUNE 35-ton simulation, reconstruction and analysis Updated 15:50 EST.
AliRoot survey: Calibration P.Hristov 11/06/2013.
New zero suppression in simulation: current status David Adams BNL November 25, 2015 DUNE 35-ton simulation, reconstruction and analysis.
MAUS Status A. Dobbs CM43 29 th October Contents MAUS Overview Infrastructure Geometry and CDB Detector Updates CKOV EMR KL TOF Tracker Global Tracking.
New zero suppression in simulation: current status David Adams BNL November 30, 2015 DUNE DAQ Updated: 13:20 EST.
TPC data David Adams BNL March 23, 2016 DUNE 35t sim/reco.
L1Calo Databases ● Overview ● Trigger Configuration DB ● L1Calo OKS Database ● L1Calo COOL Database ● ACE Murrough Landon 16 June 2008.
11 Sep 2007Tracking - Paul Dauncey1 Tracking Code Paul Dauncey, Imperial College London.
Rainer Stamen, Norman Gee
NUMBER SYSTEMS.
Digital Logic & Design Dr. Waseem Ikram Lecture 02.
OptiSystem applications: BER analysis of BPSK with RS encoding
Issues with Simulating High Luminosities in ATLAS
Design of Digital Filter Bank and General Purpose Digital Shaper
Digital Logic & Design Lecture 02.
Commissioning of the ALICE-PHOS trigger
Presentation transcript:

New DetSim module David Adams BNL January 14, 2016 DUNE collaboration Far detector simulation and reconstruction

Introduction Motivation I wanted to add simulation of the 35-ton ZS to our simulation o ZS = zero suppression Found the DetSim module code to be rather convoluted o 1500 lines, many different actions and options o Many corresponding fcl parameters Code duplicated between 35-ton and FD modules Also wanted to be able to use the new ZS code in other contexts o E.g. apply to data from real detector either to save space or to test the online algorithm o Or even in studies outside the art framework My effort Wrote new ZS as an art service Moved existing module code into services o Different services for different actions (add noise, ZS, compress, …) Wrote new module that carries out each action via a service interface o So new action (e.g. my ZS) can be plugged in at the fcl level D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, 20162

Goals Goals for the new code Comprehensibility (make SW easy to understand) o Non-expert user should be able to look at job configuration and understand what is done and what parameters are used – And then modify actions or parameters for a subsequent run o Easy to find the code corresponding to a give action in the configuration – And then easy to understand what that code is doing Modularity o Make it easy to replace an action with an alternative implementation – At natural and fine granularity so user does not have to cut and paste a lot of irrelevant code – Ideal development environment would not require user to check out and build code other than his or her own Portability (use SW in other frameworks) o Convenient if code and configuration can be used in other frameworks – Standalone main or root scripts for analysis – Other full frameworks to allow for future migration of the production FW D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, 20163

Art framework primer DUNE and many other experiments use the art framework Modularity provided by modules and services o Both configured at initialization time by art from fcl Module is a class o art loops over events and calls each module once for each event o Module has means to retrieve data from the current event o And (if it is a Producer) to write data to that event – art Analyzer is similar but does not write to the event o Probably not easy or sensible to use a module outside the art FW – One would just be duplicating art Service is a class o Called by producers or other services o Accessed with handle specifying type (either interface or full type) – Only one instance is available for each type o It is possible to use services and (service handles) outside the art FW – Still depend on art libraries for configuration and handle – See D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, 20164

Old DetSim module fcl parameters daq: { CollectionCalibPed: 500 CollectionCalibPedRMS: 0.01 CollectionPed: 500 CollectionPedRMS: 0.01 CompressionType: "ZeroSuppression" DriftEModuleLabel: "largeant" FractHorizGapUCollect: 0.1 FractHorizGapUMiss: 0.8 FractHorizGapVCollect: 0.1 FractHorizGapVMiss: 0.8 FractHorizGapZMiss: 0.8 FractUUCollect: 0.5 FractUUMiss: 0.2 FractUVCollect: 0.1 FractUVMiss: 0.2 FractVUCollect: 0.5 FractVUMiss: 0.2 FractVVCollect: 0.1 FractVVMiss: 0.2 FractVertGapUCollect: 0.1 FractVertGapUMiss: 0.8 FractVertGapVCollect: 0.1 FractVertGapVMiss: 0.8 FractVertGapZMiss: 0.8 FractZUMiss: 0.2 FractZVMiss: 0.2 InductionCalibPed: 1800 InductionCalibPedRMS: 0.01 InductionPed: 1800 InductionPedRMS: 0.01 LowCutoffU: 7.5 LowCutoffV: 7.5 LowCutoffZ: 7.5 NearestNeighbor: 25 NeighboringChannels: 3 NoiseArrayPoints: 1000 NoiseFactU: 0.05 NoiseFactV: 0.05 NoiseFactZ: 0.05 NoiseModel: 1 NoiseWidthU: 2000 NoiseWidthV: 2000 NoiseWidthZ: 2000 PedestalOn: "false" SaveEmptyChannel: "true" SimCombs: "false" SimStuckBits: "false" StuckBitsOverflowProbHistoName: "pCorrFracOverflowVsInputLsbCell" StuckBitsProbabilitiesFname: "ADCStuckCodeProbabilities35t/output_produceDcScanSummar yPlots_ _coldTest_0p1to1p4_step0p0010.root" StuckBitsUnderflowProbHistoName: "pCorrFracUnderflowVsInputLsbCell" ZeroThreshold: 5 module_type: "SimWireDUNE” } D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, 20165

DetSim module flow The old module is DetSimDUNE35t Input is SimChannel data product o GEANT energy deposit for each channel, tick and particle o Includes drift attenuation and diffusion Output is raw data product in LArSoft format o ADC count fore each tick and bin o Assigned threshold for each channel o Flag indicating if and how the ADC data is zero-suppressed and/or compressed Calculations take place in loop over channels Output product is constructed The new module is DetSimDUNE Same except code inside loop over channels is moved to services And a few minor mods D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, 20166

Old DetSim module channel loop Calculations in loop over channels: ADC signal is extracted from SimChannel for the channel o There is an option to create extra signal for the “combs” o Rather complicated; 35 ton specific SignalShapingServiceDUNE35t adds electronics response o Separate call uses collection response for extra signal Noise is calculated Combined and converted from floating signal to 12-bit integer count Pedestal and pedestal fluctuations are added o Pedestals and RMS (for fluctuations) are fcl parameters Conversion from floating signal to 12-bit integer count is repeated Zero suppression, compression and stuck bits are applied o Some of the code is in raw.cxx o Complicated ring buffers to allow ZS to take nearby channels into account D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, Denotes service imp.

New DetSim module channel loop Service calls in loop over channels SimChannelExtractService extracts signals from SimChannel o Signal shaping is included in this service o Extract signal from combs is handled in the service ChannelNoiseService is used to add noise to the signal PedestalAdditionService adds pedestal and pedestal noise o Pedestal values and RMS taken from IDetPedestalProvider Conversion from floating signal to 12-bit integer count AdcDistortionService called to distort ADC signal o E.g. to add stuck bits AdcSuppressService used to generate vectors of retained ticks AdcCompressService uses ADC vector and retention vectors to build the compressed data vector for each channel Notation In the above, green (XXX) denotes an art service interface D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, Denotes service interface

High-level fcl The module is included as usual in the list of producers: Override default service fcl parameters: D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, producers: { rns: { module_type: "RandomNumberSaver" } } physics.producers.daq.NoiseOn: true physics.producers.daq.PedestalOn: true physics.producers.daq.SuppressOn: true physics.producers.daq.DistortOn: false

High-level fcl (2) Map service interface names to services: The module and service names are defined in the fcl prolog I.e. everything prefixed with ” These are defined in dunetpc/dune/DetSim/detsimmodules_dune.fcl o Included before all the above with Following slides show these definitions D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, #include "detsimmodules_dune.fcl"

Module default fcl Following is the default configuration for the new module Much simpler than the old version Old fcl parameters aremoved to the new services o Choice of service for each service interface o Options for each chosen service Examples on following pages D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, dune_detsim: { module_type: "SimWireDUNE" SimChannelLabel: "largeant" NoiseOn: false PedestalOn: false SuppressOn: false DistortOn: false } Module class name Input data product name Action flags

SimChannel extraction service fcl SimChannel extraction services produce the initial wire signal I.e. convert the SimChannel into electrons collected for for each tick on each wire There is a generic implementation that should work for any detector: And a more-sophisticated version that includes charge collected on the combs but only works for the 35-ton detector: D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, scxgeneric: { service_provider: GenericSimChannelExtractService } FractVertGapUCollect: 0.1 FractVertGapUMiss: 0.8 FractVertGapVCollect: 0.1 FractVertGapVMiss: 0.8 FractVertGapZMiss: 0.8 FractZUMiss: 0.2 FractZVMiss: 0.2 } scx35t: { service_provider: Dune35tSimChannelExtractService FractHorizGapUCollect: 0.1 FractHorizGapUMiss: 0.8 FractHorizGapVCollect: 0.1 FractHorizGapVMiss: 0.8 FractHorizGapZMiss: 0.8 FractUUCollect: 0.5 FractUUMiss: 0.2 FractUVCollect: 0.1 FractUVMiss: 0.2 FractVUCollect: 0.5 FractVUMiss: 0.2 FractVVCollect: 0.1 FractVVMiss: 0.2

Noise service fcl The noise services add noise to signals What was previously noise option 1 is now And noise option 2 is D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, chnoiseold: { service_provider: ExponentialChannelNoiseService NoiseFactU: 0.05 NoiseFactV: 0.05 NoiseFactZ: 0.05 NoiseWidthU: 2000 NoiseWidthV: 2000 NoiseWidthZ: 2000 LowCutoffU: 7.5 LowCutoffV: 7.5 LowCutoffZ: 7.5 NoiseArrayPoints: 1000 OldNoiseIndex: true } chnoisewhite: { service_provider: WhiteChannelNoiseService }

Pedestal addition service fcl There is a new service to add pedestal to the signal Pedestal and RMS is obtained from IDetPedestalService It also adds pedestal noise scaling the RMS for each channel o Parameter NoiseScale can be set to zero to turn off the noise D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, padprovided: { service_provider: ProvidedPedestalAdditionService NoiseScale: 1.0 }

ADC distortion service fcl ADC distortion services can change the digitized signal At present, the only option is to add stuck bits: D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, stuckbits: { service_provider: StuckBitAdcDistortionService StuckBitsOverflowProbHistoName: "pCorrFracOverflowVsInputLsbCell" StuckBitsProbabilitiesFname: "ADCStuckCodeProbabilities35t/ output_produceDcScanSummaryPlots_ _ coldTest_0p1to1p4_step0p0010.root" StuckBitsUnderflowProbHistoName: "pCorrFracUnderflowVsInputLsbCell" }

ZS service fcl There are a few default options for zero suppression The ZS from the old module is (almost) reproduced by: New ZS for default noise (2.5 ADC counts, left) and two options for twice that level (center, right): D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, zslegacy: { service_provider: Legacy35tZeroSuppressService AdcThreshold: 10.0 TickRange: 10 MinTickGap: 2 SuppressStickyBits: true } zsonline: { service_provider: Dune35tZeroSuppressService NS: 5 NL: 15 ND: 5 NT: 3 TS: 3 TL: 7 TD: 5 }... NS: 5 NL: 15 ND: 5 NT: 3 TS: 6 TL: 14 TD: 10 }... NS: 5 NL: 15 ND: 5 NT: 3 TS: 6 TL: 10 TD: 10 } Gives inefficiency

Compression service fcl Finally, a compression service is applied Using the vector of accepted channels generated by ZS The only option at present replaces suppressed values with zero o Value of “zero” is configurable Plan to add another implementation that uses the old compression format D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14, cmpreplace: { service_provider: ReplaceCompressService Zero: 0 }

Production with the new module Proposal for future production Switch to the new module Keep options almost the same as present production o No combs o Noise model 1 with the same parameters o Same fixed pedestals and RMS o No distortion (stuck bits) o Switch to new ZS o Switch to reimplementation of old compression when available Following pages use the above and compare Old module New module with old ZS New module with new ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Muon in z-plane: old module D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Muon in z-plane: new module, old ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Muon in z-plane: new module, new ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Muon in v-plane: old module D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Muon in v-plane: new module, old ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Muon in v-plane: new module, new ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Electron in z-plane: old module D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Electron in z-plane: new module, old ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Electron in z-plane: new module, new ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Electron in v-plane: old module D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Electron in v-plane: new module, old ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Electron in v-plane: new module, new ZS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Summary of comparison of old and new Compare old module with new module Done by eye o Using preceding plots and others for five events Central part (i.e. peak) of signals are nearly identical Almost all differences near the edges come from different acceptances of the ZS algorithms o Different algorithms should give different results o Default tuning of the new ZS has greater acceptance o Re-implementation of the old ZS does not give identical results – Small defect in old alg is fixed in the new implementation – Different handling of sticky bits (off in new)? There are (very) few bins where the old and new have different non- suppressed values o Could be because old algorithm integerized twice D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Release status The new DetSim module is in dunetpc release First appeared in v04_31_00_01 Bugs fixed in v04_32_00 (current release) Physical layout Service interfaces are in dune/DuneInterface Utilities, default fcl and old modules are in dune/DetSim Services are in dune/DetSim/Service New module is in dune/DetSim/Module D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Future developments Services should obtain random seeds from SeedService Four services now need random numbers At present seeds are hardwired in Have requested this functionality be added to LArSoft Demonstrate the new DetSim service can be used for FD Simulation of comb signal is missing latest improvements Lost in an update of DetSim module before I started Restore these in the dedicated service (Tom) New organization should ensure this problem does not happen again Add service to implement the old compression format Move service and module tests from dunezs to dunetpc Add ZS option to also save neighboring channels Best to do by iterating over ROPs before channels in DetSim module Need ROP iterator from larsoft Fix noise dependence on readout window size (old defect) And make normalization parameter equal to RMS D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Far future developments Enable use of DetSim module outside of art Move remaining module code to a service/tool that runs outside art o With art module wrapper so we can continue to run in art Need to understand how to read and write event data outside art Switch from services to tools Tools would have names with scope beyond the fcl prolog o Name could be used in data provenance record Tools could have multiple instances in one job o E.g. use (slightly) different pedestals for simulation and reconstruction DetSim module (and other tool users) could be configured with the names of the tools it uses o Instead of depending on high-level mapping of interface to service D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,

Summary/conclusions New DetSim module has been released More modular than the old version o And thus comprehensible and extensible o New option for ZS has been added – Use for accurate simulation of 35-ton DAQ – And starting point for FD studies Should be able to use new module for both 35-ton and FD simulation o And so discard the existing code duplication Results are similar to old o With improvement in more accurate ZS description Need a couple additions to recover full functionality old module o Add compression module to reproduce old data format o Enable ZS to save for neighboring channels D. Adams, BNL New Detsim module DUNE collaboration: FD sim/reco January 14,