1 / 35

RAT Simulation and Analysis Tool

R.A.T. is a versatile simulation and analysis tool used by multiple collaborations for studying particle propagation, detector optics, and data acquisition in various experiments. It features reusable code, integration with GEANT4, ROOT, GLG4sim, and SNOMAN, and provides a user-friendly interface and comprehensive documentation.

rbrackett
Download Presentation

RAT Simulation and Analysis Tool

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RAT Simulation and Analysis Tool (Most slides stolen from Stan Seibert)

  2. Brief Happy Life • Created by Stan Seibert as first full `hit-level’ Monte Carlo for Braidwood • Quickly adopted by Collaboration as primary simulation and analysis tool • Many contributions from KSU, Oxford, Chicago, Columbia, MIT • Being used now for DEAP/CLEAN, SNO+, CLEAR, possibly other expts.

  3. Design Goals • Complete simulation of particle propagation, detector optics, and DAQ across all energy regimes • Reuse as many ideas and as much code from others as possible. • Break down analysis into small tasks that can be implemented by many people. • Design for production analysis of both Monte Carlo and real data. • Provide easy, understandable documentation for users and programmers

  4. Reuse is good! • GEANT4 - Monte Carlo simulation of detectors and physical processes • ROOT - Object I/O to disk or over network. • GLG4sim - Generic Liquid Scintillator GEANT4simulation, written and maintained by Glenn Horton-Smith from the KamLAND collaboration. • SNOMAN - SNOMonte Carlo and ANalysis. Provided design inspiration, but no code.

  5. Monte Carlo Features • Generate single and multiparticle events, and interleave events of different types • Includes optical, EM, and hadronic processes. • Includes PMT and DAQ simulations (experiment-dependent) • Several event visualization options (they keep getting better)

  6. Seibert

  7. Code Distribution • Distributed and running at ~20(?) Institutions, a few different collaborations • Development ongoing at nearly all • Various scientific linux versions, MAC-OS, BULinux… • `RatCage’ provides out-of-the-box installation Seibert

  8. How it all fits together: RAT GLG4sim GEANT4 ROOT CLHEP

  9. The Concept Event Data Structures Event Loop Gsim Trigger Fit To Disk . . . Processors Event Producer

  10. Seibert

  11. User Interface • Command Line • Macro files to control settings: /glg4debug/glg4param omit_muon_processes 1.0 /glg4debug/glg4param omit_hadronic_processes 1.0 /run/initialize /rat/proc/simpledaq /rat/proc count /rat/procset update 5 /rat/proc outroot /rat/procset file "test.root" /generator/add combo gun:point /generator/gun gamma 0 0 0 1.022 /run/beamOn 100

  12. Seibert

  13. Detector Geometry: Config SNOMAN GDML All C++ All Text Files • Using text files, you can: • Add arbitrary new volumes of predefined shapes • Control materials, dimensions • Repetition of volumes in simple ways • Must write some C++ to: • Make arbitrary new shapes • Repeated volumes with fancy layouts GLG4sim RAT

  14. Detector Geometry • Detector materials and geometric construction loaded from RATDB • User-editable without writing new code (within limits) • Override parameters in macros J. Nikkel

  15. Seibert

  16. NOTE: RATDB now being updated to use MINOS-style database

  17. Seibert

  18. The Event Data Structure RAT_DS RAT_MC RAT_MCParticle RAT_MCParticle RAT_MCTrigger RAT_MCTrigger RAT_MCPMT RAT_MCPMT RAT_MCPMT RAT_EV RAT_EV RAT_EV RAT_PMT RAT_PMT RAT_PMT RAT_PosFit RAT_PosFit RAT_EFit RAT_EFit (Abridged)

  19. Seibert

  20. Seibert

  21. DAQ Simulation Generate PMT pulses from photoelectrons Decide if channel is above threshold Integrate and sample Front End Trigger Sum up “trigger pulses” from channels above threshold Compute NHIT triggers Event Builder Populate detector events with (eventually digitized) samples DEAP/CLEAN version has full Waveform digitization

  22. Event Generators e+ • Single particle “gun” • Directed or isotropic • Inverse beta decay and ES electrons • Calibration sources (e.g. LEDs) • Arbitrary events from HEPEVT format text file e+ p  n +many more

  23. “User” Processors • Users can write new processors and link them into a custom version of RAT • No need for each user to have their own copy of RAT source • Turning a user processor into an “official” processor for inclusion in source tree is very easy. • See user/ directory in RAT tree for skeleton processor to edit.

  24. Store entire events to ROOT files. Reload events from disk back into the event loop. Send events through the network between RAT processes. Prune unneeded parts to save space. I/O Options

  25. Default Plane RATDB Time Plane DAQ: lockout: 390, nhit_width: 10, … • Parameters, material properties, other “constants” • Organize integers, floats/doubles, strings, and arrays into “tables of fields” • Validity ranges • Users can override the database in their macro files • Multiple backends possible (SQL?), only text file for now User Plane Table GEO[av]: type: “sphere”, mother: “buffer”, … Fields NOTE: RATDB now being updated to use MINOS-style database …

  26. Seibert

  27. Infrastructure • Unit testing with CxxTest http://cxxtest.sourceforge.net/ • Website: • User-updatable manuals, howtos, FAQs • Browse syntax-highlighed source code • Timeline of source code changes with diffs • Bug tracking • Build testing results for Linux, Solaris, Mac OS X

  28. Automated Build Testing

  29. Verification with SNO E.W. Beier

  30. // A 100 kton light water Cherenkov detector // The centre of the inner vessel is at 0,0,0 in the world coordinate frame // Largely to blame: Andy Mastbaum, mastbaum@lanl.gov // -------- THE WORLD! :D { name: "GEO", index: "world", valid_begin: [0, 0], valid_end: [0, 0], mother: "", // world volume has no mother type: "box", size: [70000.0, 70000.0, 70000.0], // mm, half-length material: "rock", color: [0.67, 0.29, 0.0], invisible: 1, } A 100kTon H2O Detector {name: "GEO", index: "target_water", valid_begin: [0, 0], valid_end: [0, 0], optimize: 0, // toggle voxel optmization: fast start, slow per event mother: "vessel", type: "tube", r_max: 23500.0, size_z: 60000.0, position: [0.0, 0.0, 0.0], rotation: [0.0, 0.0, 0.0], material: "lightwater_sno", color: [0.6, 0.9, 1.0, 0.01], invisible: 1,}

  31. // 50 kiloPMTs, 400 around, stacked uniformly 125 PMTs high. // Tons of clearance vertically, circumferentially, you get 14.2" arc length per PMT { name: "PMTlocations", valid_begin : [0, 0], valid_end : [0, 0], mother: "target_water", type: "pmtarray", optimize: 0, pmt_type: "r5912", sensitive_detector: "/mydet/pmt/inner", orientation: "point", orient_point: [0.0, 0.0, 0.0], x : [23033.94, 23030.10, 23021.58, 23007.37, 22987.49, 22961.94, 22930.72… y : [ 0.00, 361.79, 723.48, 1085.00, 1446.25, 1807.14, 2167.59… z : [-29523.84, -29523.84, -29523.84, -29523.84, -29523.84, -29523.84, -29523.84… } A 100kTon H2O Detector

  32. Some example 5 MeV electron Cherenkov vertices A 100kTon H2O Detector A. Mastbaum

  33. Considerations • Upsides • RAT is flexible and is nearly `fully functional’ simulation • Also has lots of data-ready infrastructure • Generic enough that could turn into our own package • Distribution and QC are already-solved problems • (Most `annoyances’ already taken care of) • Very nice set of simple analysis tools already exist • Very well set up to test detector geometries, DAQs • Very easy to get going quickly and add code, do analysis • Support from other collaborations would be very helpful

  34. Considerations • Downsides • Currently no ~GeV simulations have been run • Still needs interface to NUANCE or similar xs simulation • And anything else beyond GEANT4 • No `high energy’ analysis tools (e.g., reconstruction) • Currently would be very slow: need to voxelize PMTs, etc. • Would have to support without much effort from Seibert unless LANL low E group gets involved

  35. Considerations • Recommendations • Worth exploring now • More worthwhile to think as a long-term solution • Should ask Deap/Clean and/or SNO+ for code • Would jumpstart simulation/analysis development • But need some 50%+ people to work on it

More Related