implementation of muon shield optimisation
play

Implementation of muon shield optimisation Oliver Lantwin [ - PowerPoint PPT Presentation

Implementation of muon shield optimisation Oliver Lantwin [ oliver.lantwin@cern.ch ] 11th SHiP Collaboration Meeting, cern 8th June 2017 Introduction Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 2/16 Give overview of


  1. Implementation of muon shield optimisation Oliver Lantwin [ oliver.lantwin@cern.ch ] 11th SHiP Collaboration Meeting, cern 8th June 2017

  2. Introduction Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 2/16 ▶ Give overview of implementation ▶ Touch on technologies used ▶ Outlook onto challenges and plans

  3. Implementation: Summary Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 3/16 ▶ Runs on Skygrid at Yandex ▶ Use FairShip for all simulations and geometry

  4. olantwin/FairShip:optimisation_shield Figure: Geometry used to understand (for me at least), and to modify without breaking anything Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 4/16 ▶ Replace the entire geometry: ▶ Bare minimum geometry besides shield ▶ Sensitive plane instead of trackers at z T1 ▶ Many changes to the way ShipMuonShield is created to make it easier ▶ Add logic to allow initialisation of ShipMuonShield from a ROOT -file

  5. results in non-negligible start-up time of jobs Skygrid Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 5/16 ▶ Cluster of 1600 cpu cores available for use by SHiP ▶ Jobs are run in Docker containers: ▶ Idea: Job that takes a given input and reproducibly produces a given output in a functional way → easy to troubleshoot and test ▶ Optimised for long-running jobs, e.g. large mc productions, as use of Docker

  6. branch maintained by me ( olantwin/ship-shield ) SHiP Docker containers install FairShip on cluster throughout SHiP Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 6/16 ▶ Container image based on CentOS 7 ▶ Usable for general purpose FairShip work ▶ Great for reproducibly running studies ▶ Can track exactly which software runs ▶ Special version with olantwin/FairShip:optimisation_shield ▶ Use Docker container to ensure FairShip is set up correctly, no need to ▶ We could use Docker for archiving analyses and testing software

  7. Optimisation algorithm used scikit-optimize as the latter can handle integral parameters. Return to Gaussian-process implementation for now. Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 7/16 ▶ Bayesian optimisation library for the scientific python stack ▶ Considered both Gaussian-process-based and tree-based algorithms,

  8. Overall architecture Start of optimisation 11th SHiP Collaboration Meeting, cern Oliver Lantwin (icl) containers, one long-lived process for everything else No Yes Optimisation done Finishing conditions reached? Calculate geometry weight and length in FairShip Combine geometry information with results of simulation Set up simulation in FairShip Create parameter file Optimisation algorithm chooses next parameter vector 8/16 1600 × run muon background simulation for fraction of muon sample 1600 × analyse simulation of muon sample fraction Figure: Flow chart of optimisation process; red blocks run in a short-lived Docker

  9. Preparation job. proved to be unreliable many physically allowed magnets are very large) Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 9/16 1 1600 × #totalmuons per ▶ Split muon sample into input files for the jobs: ▶ Download input files from eos and store locally on the cluster ▶ Optimisation does not use eos at all any more, as polling for files etc. ▶ Define physical bounds of magnet parameters (maybe too generous, as

  10. Translating the parameter vector to the geometry (and back) How do 56 numbers turn into a geometry configuration? shipDet_conf.py , geometry_config.py and ShipMuonShield.cxx , which were all modified to parse information needed from this file. this parameter vector from the geometry. Can initialise and reconstruct arithmetic errors we achieve perfect closure equivalent? Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 10/16 ▶ Create ROOT -file with a TVectorD of 56 double s and pass it to ▶ Use pytest to implement a closure test and algorithm to reconstruct completely random geometries within bounds → within floating point ▶ pytest a joy to use. We should use it more to prevent code breaking! C +,

  11. Simulation FairRunSim ), which can not be created more than once per process 11th SHiP Collaboration Meeting, cern Oliver Lantwin (icl) subprocess/thread if necessary and deleting/retrieving them does not seem to work in Python… 11/16 side-effects full simulation), but set aside for now function, as it is impossible to import run_simScript without ▶ Stripped down version of run_simScript.py in a self-contained ▶ Use TGeant4 with the SHiP-default set of physics processes enabled ▶ Investigated using more basic physics processes as well (in addition with a ▶ Use -.FollowMuon option in FairShip to ▶ discard any non-muons, muons simulated with full fidelity ▶ keep information about muon tracks in muon shield ▶ Annoyance/Problem: FairRoot uses some C +, singletons (e.g. → Workaround: Only one simulation per process, use

  12. Extracting geometry measurements 1. Initialise geometry in FairShip 2. Use TGeo to extract shape of muon shield, measure exact length as seen by simulation 3. Have TGeo calculate weight of muon shield (exclude supports) Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 12/16

  13. Analysis function 11th SHiP Collaboration Meeting, cern Oliver Lantwin (icl) Signal acceptance (from geometry, approximated via length of magnet) In the simulation process: Cost function 13/16 In the steering process: Results passed back by the software managing the cluster ▶ Create histograms for offline checks of optimisation ▶ Select muons in acceptance (see next slide) ▶ Return sum of muon penalty weights (1 float per job) ▶ Combine geometry measurements and simulation results in cost ∝ W × (1 + ∑ χ 2 µ ) A HNL W := Muon shield mass (from geometry) χ 2 µ := χ 2 of muon hits in bending plane (from simulation) A HNL :=

  14. 14/16 magnet 11th SHiP Collaboration Meeting, cern Oliver Lantwin (icl) χ 2 √ χ 2 ( x / cm ) = 1 − ( x + 300)/560 chi2(x) 1 0.8 0.6 0.4 0.2 − − − 300 200 100 0 100 200 Figure: χ 2 as a function of x [cm] for µ − ▶ for µ + flip sign of x as it’s supposed to be on the other side of the ▶ defined only for -300 < x < 260 cm (~dimensions of tracking station) ▶ Cut on | y | < 5 m

  15. Challenges Performance currently limited by constant costs: 11th SHiP Collaboration Meeting, cern Oliver Lantwin (icl) constant costs as much as possible? Possible solutions: Figure: Cluster usage for optimisation iterations or impossible run (and also to initialise the geometry) 15/16 ▶ Need to initialise a new FairRoot simulation for every single simulation ▶ Partially because of the singleton issue mentioned above ▶ Partially because updating the geometry in FairRoot is either complicated ▶ Starting up and retrieving results from Docker containers ▶ Try several configurations in parallel in order to make simulation time dominant? → needs to be supported by algorithm ▶ Reuse Docker containers (and ideally processes) for simulation to avoid

  16. Planned changes restart/replay, multiple simultaneous evaluations (maybe not possible) can muons; full Geant4 processes vs. subset; etc.) Oliver Lantwin (icl) 11th SHiP Collaboration Meeting, cern 16/16 ▶ Move to scikit-optimize ask-and-tell interface to allow for ▶ Once ready, move to Skoltech version of Bayesian Optimisation, which ▶ Predict multiple configurations ▶ Handle different fidelity of observations (e.g. full statistics vs. resampled

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend