Download presentation
Presentation is loading. Please wait.
Published byEdwina Logan Modified over 9 years ago
1
OO Implementation for the LHCb Rich Niko Neufeld Dietrich Liko
2
LHCb Software Week Tuesday, February 02, 2016 Introduction n Study of OO Implementation of a Reconstruction program n Based on Standalone Program by Roger Forty et al. n Present a comparison n Review Object Oriented features
3
LHCb Software Week Tuesday, February 02, 2016 Objective n Results of the FORTRAN u Physics u Resources n To be better then FORTRAN u Object Orientation F Modularity F Interfaces
4
LHCb Software Week Tuesday, February 02, 2016 UML Process n Specification using UML u Use cases n Development using UML case tool u Rational Rose n Iterative Development u Several internal iterations UML Unified Modeling Language by Booch, Jacobson & Rumbaugh
5
LHCb Software Week Tuesday, February 02, 2016 Program Specification n Technical Proposal n LHCb Note n FORTRAN Program n Summary with all information n Partial capture in use cases
6
LHCb Software Week Tuesday, February 02, 2016 One page on physics n Cherenkov Effect n Emission of Photons u Aerogel & Gas Radiator n Reflection of Photons n Observation of Photons u Quantum Efficiency u Detector Geometry
7
LHCb Software Week Tuesday, February 02, 2016 One page on algorithm n Local Likelihood n Global Likelihood u Very effective u CPU intensive n Other Algorithm possible u Average emission angle
8
LHCb Software Week Tuesday, February 02, 2016 Framework n OO Framework to implement reconstruction algorithms n Simulation also possible n Here the Global Likelihood will be implemented n Benchmark for usability
9
LHCb Software Week Tuesday, February 02, 2016 Use Cases n Question a Physicist might ask... u to a particle... u to a pixel... n Global Likelihood
10
LHCb Software Week Tuesday, February 02, 2016 Use cases
11
LHCb Software Week Tuesday, February 02, 2016 Detector
12
LHCb Software Week Tuesday, February 02, 2016 Detector Rich Radiator Reflector Detector Simplified UML Class Diagram Static relations of Classes
13
LHCb Software Week Tuesday, February 02, 2016 Event Track Pixel Track Extrapolation Track Segment Photon I should be called DetectorElement !
14
LHCb Software Week Tuesday, February 02, 2016 Other Entities PhotonSpectrum PixelID GeneratedPhoton
15
LHCb Software Week Tuesday, February 02, 2016 Lifetime n Present for all Events u Rich, Radiator, Reflector, Detector n Present for one Event u Tracks, TrackExtrapolations, Pixel, Photons n Temporary u Photon Spectrum, PixelID, Single Photon
16
LHCb Software Week Tuesday, February 02, 2016 Pixel id tube RecPixel signal globalPosition localPosition size Photon Detector But I am smart! Example trivial expensive calculations context questions The PhotonDetector does all the work for me ! I am not so smart...
17
LHCb Software Week Tuesday, February 02, 2016 Architecture Interface Detector Event Strategy Algorithm
18
LHCb Software Week Tuesday, February 02, 2016 Standalone Program n Minimal Environment n Contains its own Transient Event Model n Parameter Files n Histograms from CLHEP n Only for this test!
19
LHCb Software Week Tuesday, February 02, 2016
20
LHCb Software Week Tuesday, February 02, 2016
21
LHCb Software Week Tuesday, February 02, 2016
22
LHCb Software Week Tuesday, February 02, 2016 Optimisations n Since last presentation u two weeks ago u Program about a factor 2 slower n Profiling and Debugging u Allocation of STL container u operator[] u Algorithmic improvements
23
LHCb Software Week Tuesday, February 02, 2016 Technical Proposal 500 Events B background “Clean”
24
LHCb Software Week Tuesday, February 02, 2016 Results Difference in particle population, in particular for X particles: Different sample, small differences in the modeling of the inner edges Migration to Reduced Efficiency Reduced Purity 500 Events B background “Clean”
25
LHCb Software Week Tuesday, February 02, 2016 CPU Comparison 500 Mhz Pentium III G77 7.52 G++ 8.32 Sec/Event 7 8 9 100 Events B Background “Clean”
26
LHCb Software Week Tuesday, February 02, 2016 Kuck & Associates, Inc. n Commercial C++ compiler u Standard compliant u Templates u Patented optimization techniques u Precompiled headers u http://www.kai.com n Time-locked trial version for RH6.1
27
LHCb Software Week Tuesday, February 02, 2016 CPU Comparison 500 Mhz Pentium III G77 7.52 G++ 8.32 Sec/Event 7 8 9 KCC 7.32 100 Events B Background “Clean”
28
LHCb Software Week Tuesday, February 02, 2016 Summary n Outlined the development process n Show physics results n Show CPU comparisons n Why an OO program should be better ?
29
LHCb Software Week Tuesday, February 02, 2016 Track Segment Length length Aerogel Radiator Track
30
LHCb Software Week Tuesday, February 02, 2016 FORTRAN REAL FUNCTION DIST(POS,DIR) C A line is given by POS and DIS REAL POS(3), DIR(3) C Radiator wall is described by its z position REAL ZPOS(2) COMMON /RADIATOR/ ZPOS DIST = ACOS(DIR(3),VMOD(DIR,3))*(ZPOS(2)-ZPOS(1)) END
31
LHCb Software Week Tuesday, February 02, 2016 FORTRAN n Does what it should n Math is simple n Probably more complicated in praxis u walls not normal to z u more then one radiator n Some variables which are interpreted in the context n But your program works soon!
32
LHCb Software Week Tuesday, February 02, 2016 Sometimes later... u … you want to improve the program F More realistic tracks F More realistic radiators u But assumptions are not isolated F There will be other places which depend on these variables u You have to find all uses of the variables F In your program at n places F In other people programs at unknown places
33
LHCb Software Week Tuesday, February 02, 2016 Object Based n Assume two classes present u Plane u Ray (can intersect with plane) n My program has... u class Algorithm u dist method
34
LHCb Software Week Tuesday, February 02, 2016 Object Based class Algorithm { Plane Radiator[2]; virtual double dist(const Ray & track) const; } double Algorithm::dist(const Ray & track) const { return Radiator[1].intersect(track) - Radiator[0].intersect(track); }
35
LHCb Software Week Tuesday, February 02, 2016 Object Based n More compact n Probably more general n Math is done by somebody else But main critic remains If you want to improve the program, you have to find... n places in your own program unknown places in other programs
36
LHCb Software Week Tuesday, February 02, 2016 Object Oriented class Track { public: virtual double dist() const; virtual double intersect(const Plane & plane) const; virtual double intersect(……) const; private: Radiator * radiator_; } class Radiator { public: virtual double dist(const Track & track) const; }
37
LHCb Software Week Tuesday, February 02, 2016 Sequence Diagram RadiatorTrack dist intersect return dist Simplified UML Sequence Diagram dynamic relation of classes
38
LHCb Software Week Tuesday, February 02, 2016 Object Oriented n If one changes the Radiator... u One place to do the modifications n If one changes the Track... u Another single place to do the change n Implementation is hidden behind the interface n No dependency on the implementation details Visitor Pattern
39
LHCb Software Week Tuesday, February 02, 2016 Summarize n FORTRAN u does the job u difficult to maintain n Object Based C++ u does the job probably better u still difficult to maintain n Object Oriented C++ u dependencies are reduced
40
LHCb Software Week Tuesday, February 02, 2016 Our Program does not depend on... n Track implementation n Pixel implementation n General Detector Geometry n Photon radiation process n Mirror choice n Type of Photon Detector n Photon Detector Assembly Details n Reconstruction Strategy n …..
41
LHCb Software Week Tuesday, February 02, 2016 Integration to GAUDI n Algorithm is interfaced n Package is nearly ready n Release next week n Detailed documentation from the Rose Model available n We plan to include some “hand written” documentation for the release
42
LHCb Software Week Tuesday, February 02, 2016 Future in GAUDI n Next steps … u Detector Description u Other Algorithms u Photon Detector Implementation n Not addressed u Structure of a general LHCb reconstruction program
43
LHCb Software Week Tuesday, February 02, 2016 Final Summary n UML process for software development n Standalone program has similar performance as the TP n Pleasant surprise: you can do a lot OO for reconstruction applications n There is the promise for a program that will be easier to maintain n You can try it yourself in GAUDI
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.