Download presentation
Presentation is loading. Please wait.
Published byRobert Simpson Modified over 9 years ago
1
LoKi & Bender User Friendly Physics Analysis Tools Vanya BELYAEV Vanya BELYAEV NIKHEF, Amsterdam, Vanya BELYAEV on leave from ITEP/Moscow
2
Trivia (I) The modern HEP experiment in the coming “LHC-epoch” are large and enormously difficult & complicated The modern HEP experiment in the coming “LHC-epoch” are large and enormously difficult & complicated Many different& sophisticated techniques for particle/jet detection and identification Many different& sophisticated techniques for particle/jet detection and identification &simulation &simulation Many different reconstruction techniques and methods Many different reconstruction techniques and methods Many physicists & Software engineers work hard on the software development Many physicists & Software engineers work hard on the software development In parallel … In parallel … Huge data samples ( ≥ 10 10 /year) are expected Huge data samples ( ≥ 10 10 /year) are expected 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 2
3
Trivia (II) Complexity of the problem demands the outstanding powerfulness of the software, and (unavoidably) the complexity Complexity of the problem demands the outstanding powerfulness of the software, and (unavoidably) the complexity C++ “de-facto” standard of the sofware for LHC epoch C++ “de-facto” standard of the sofware for LHC epoch No real alternative for reconstruction & simulation task No real alternative for reconstruction & simulation task (almost) no generic way to make these tasks “simple” (almost) no generic way to make these tasks “simple” Should it be the only one option for physics analysis? 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 3
4
Trivia (III) What bad in usage of C++ for physics analysis? What bad in usage of C++ for physics analysis? C++ is not something very simple C++ is not something very simple Some initial learning period is required: Some initial learning period is required: learning curve is non-trivial, and does take time learning curve is non-trivial, and does take time C++ requires some discipline & training C++ requires some discipline & training C++ offers many non-trivial ways for solution of many difficult problems C++ offers many non-trivial ways for solution of many difficult problems Often a great fun for young students… Often a great fun for young students… What about the senior physicists? 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 4
5
Trivia (IV) The practice shows that as concern the epoche of C++ dominance many experienced senior physicists are cut off from the real physics analysis The practice shows that as concern the epoche of C++ dominance many experienced senior physicists are cut off from the real physics analysis Few exceptions are also obvious: Few exceptions are also obvious: “ Hi, Bill! Would you be so kind to prepare HBOOK- ntuple with the variables for me around tomorrow lunchtime?” “ Hi, Bill! Would you be so kind to prepare HBOOK- ntuple with the variables for me around tomorrow lunchtime?” Is it the only way to reuse their great physics experience? Is it the only way to reuse their great physics experience? Are there some other exceptions? Are there some other exceptions? 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 5
6
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 6 Counterexample? KAL by genius Hartwig Albrecht Script-like file Script-like file All technical details are well hidden from end-users All technical details are well hidden from end-users Transparent physical content of the code Transparent physical content of the code Looping, histograms, N- tuples, MC truth - at most 1 line! Looping, histograms, N- tuples, MC truth - at most 1 line! Typical analysis program ~ 50- 70 lines Typical analysis program ~ 50- 70 lines All senior persons, including the spokesman successfully participated in physics analysis All senior persons, including the spokesman successfully participated in physics analysis HYPOTH E+ MU+ PI+ 5 K+ PROTON IDENT PI+ PI+ IDENT K+ K+ IDENT E+ E+ IDENT PROTON PROTON IDENT MU+ MU+ SELECT K- pi+ IF P > 2 THEN IF P > 2 THEN SAVEFITM D0 DMASS 0.040 CHI2 4 SAVEFITM D0 DMASS 0.040 CHI2 4 ENDIF ENDIFENDSEL SELECT D0 pi+ PLOT MASS L 2.0 H 2.1 NB 100 @ PLOT MASS L 2.0 H 2.1 NB 100 @ TEXT ‘ mass D0 pi+ ‘ TEXT ‘ mass D0 pi+ ‘ENDSEL GO 1000
7
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 7 Is the goal achievable with C++ ? Majority (but me) is convinced that C++ features (verbosity, static nature etc) do not allow to use it as friendly language for physics analysis Majority (but me) is convinced that C++ features (verbosity, static nature etc) do not allow to use it as friendly language for physics analysis TrackPattern PiMinus = pi_minus.with ( pt > 0.1 & p > 1 ) ; TrackPattern PiPlus = pi_plus.with ( pt > 0.1 & p > 1 ) ; TwoProngDecay kShort = K0S.decaysTo ( PiMinus & PiPlus ) ; kShort.with ( vz > 0 ) ; kShort.with ( pt > 0.1 ) ; GPattern package by Thorsten Glebe (HERA-B) GPattern package by Thorsten Glebe (HERA-B) Native C++ Native C++ Easy, readable and very efficient Easy, readable and very efficient
8
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 8 LoKi Try to merge the best ideas: LoKi KAL by Hartwig Albrecht KAL by Hartwig Albrecht ‘1-line’ semantics ‘1-line’ semantics Predefined variables Predefined variables GPattern and GCombiner by Thorsten Glebe GPattern and GCombiner by Thorsten Glebe Cuts and patterns Cuts and patterns select ( “K-”, ID == “K-” && CL > 0.01 && P > 5 * GeV ) ; select ( “PI+”, ID == “pi+” && CL > 0.01 && P > 5 * GeV ) ; for ( Loop D0 = loop( “K- PI+”, “D0” ) ; D0 ; ++D0 ) { if( P( D0 ) > 10 * GeV ) { D0->save( “D0” ) ; } if( P( D0 ) > 10 * GeV ) { D0->save( “D0” ) ; } } for ( Loop Dstar = loop( “D0 PI+”, “D*+” ) ; Dstar ; ++Dstar ) { plot ( “Mass of D0 pi+”, M(Dstar) / GeV, 2.0, 2.1, 100 ) ; plot ( “Mass of D0 pi+”, M(Dstar) / GeV, 2.0, 2.1, 100 ) ; } HepChooser and HepCombiner from obsolete CLHEP HepChooser and HepCombiner from obsolete CLHEP Combinations, loops Combinations, loops Loki by Andrei Alexandresku Loki by Andrei Alexandresku Functions, name and spirit Functions, name and spirit
9
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 9 LoKi LoKi : major design ideas Compact, easy to read and transparent code Compact, easy to read and transparent code Hide all technicalities Hide all technicalities Implement all ‘everyday idioms’ as 1-line functions Implement all ‘everyday idioms’ as 1-line functions Locality: Locality: Declare, create and use the objects only ‘locally’ Declare, create and use the objects only ‘locally’ 1 analysis = 1 short file 1 analysis = 1 short file High CPU performance High CPU performance Reuse of the most modern C++ techniques Reuse of the most modern C++ techniques Paradigm of templated compile time metaprogramming Paradigm of templated compile time metaprogramming Lets compiler to “write” the code Lets compiler to “write” the code Implement everything as reusable components Implement everything as reusable components LoKi functions are compatible with Loki, STL, boost, CLHEP LoKi functions are used with cuts, other functions, histograms, tuples, MC truth, etc Weak coupling with concrete Event model, tools, etc Weak coupling with concrete Event model, tools, etc Extendable Extendable
10
Compactness of the code Important for readability Important for readability Important for debugging Important for debugging Number of simple errors (typos) is proportional to the overall number of lines Number of simple errors (typos) is proportional to the overall number of lines Number of non-trivial errors also grows with the code length Number of non-trivial errors also grows with the code length There many models, but clearly: There many models, but clearly: the first derivative is positive : E’ > 0 the first derivative is positive : E’ > 0 the second derivative is also positive: E’’ > 0 the second derivative is also positive: E’’ > 0 Some people claims also the E n ≥ 0 Some people claims also the E n ≥ 0 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 10
11
Locality “Typical” physics analysis code does not follow the concept of locality “Typical” physics analysis code does not follow the concept of locality Declaration & usage of variables often goes in the different places or event different compiling units Declaration & usage of variables often goes in the different places or event different compiling units True also for “good old FORTRAN” True also for “good old FORTRAN” C++ allows to eliminate some part of non-locality C++ allows to eliminate some part of non-locality And (with proper design) it allows to eliminate practically all non-locality: And (with proper design) it allows to eliminate practically all non-locality: for( Loop B0 = loop ( “pi+ pi-” ), B0, ++B ){…} for( Loop B0 = loop ( “pi+ pi-” ), B0, ++B ){…} 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 11
12
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 12 Compactness & Locality One PPT slide == One screen of the code 1 PPT slide of cut description 1 page A4 of C++ code
13
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 13 Compact code. Code metrics SelectionSLOCPerson-month Cost [k$] 2.6 k 6.573 3620.89 1.1 k 2.330 1.5 k 3.640 1.4 k 3.438 3.2 k 8.091 5301.214 1.0 k 2.330 LoKi1280.32 COCOMO model : SLOCCount by David A.Wheeler, 2k+4
14
The basics select/filter the particles with certain properties select/filter the particles with certain properties Functors: functions and predicates Functors: functions and predicates Loop over multy-particle combinations, e.g. all pairs in the event Loop over multy-particle combinations, e.g. all pairs in the event Easy creation of virtual particles (on-demand) Easy creation of virtual particles (on-demand) Optionally apply various kinematical constraints Optionally apply various kinematical constraints Easy histograms & n-tuples (local!) Easy histograms & n-tuples (local!) “Save” interesting particles/combinations for the subsequent detailed analysis “Save” interesting particles/combinations for the subsequent detailed analysis MC-truth match MC-truth match 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 14
15
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 15 selection/filterinig Simple selection of particles (vertices, MC-pargticles, etc) according to kinematical and/or topological criteria Simple selection of particles (vertices, MC-pargticles, etc) according to kinematical and/or topological criteria select(“Kaon”, ID==“K-” || ID==“K+” ) ; select(“Pi+”, ID==“pi+” && CL>0.01 && PT>100*MeV ); const Vertex* pv = … ; select(“MyMu”, ID==“mu+” && IPCHI2(point(pv))>4); all kaons (no cuts) Positive pions with Confidence Level in excess of 1% and pT > 100 MeV/c2 Positive muons with 2 IP with respect to the primary vertex in excess of 4
16
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 16 LoKi : functions and cuts Large set (>150) of predefined functions Simple properties of particles Simple properties of particles P,PT,PX,M,CL,ID,Q,LV01,M12,DMASS,DMCHI2,…. P,PT,PX,M,CL,ID,Q,LV01,M12,DMASS,DMCHI2,…. Simple properties of Vertices Simple properties of Vertices VCHI2,VTYPE,VX,VZ,VDOF,VPRONGS,VTRACKS,… VCHI2,VTYPE,VX,VZ,VDOF,VPRONGS,VTRACKS,… Topological properties of Particles and Vertices Topological properties of Particles and Vertices IP,IPCHI2,VDCHI2,VDTIME,VDSIGN,DDANG,… IP,IPCHI2,VDCHI2,VDTIME,VDSIGN,DDANG,… Operations with Functions – other Functions Operations with Functions – other Functions + - * / sin cos tan abs pow min max … + - * / sin cos tan abs pow min max … sin(PT)/acos(PY/PZ)+min(abs(PX),abs(PY)) > 100 Cuts/predicates are formed from functions
17
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 17 LoKi : multiparticle loops Loops over particle combinations, selects combinations according to kinematical and topological criteria for( Loop D0 = loop( “K- pi+ pi+ pi-”, “D0”) ; D0 ; ++D0 ) { if( PT( D0 ) > 1 * GeV && VCHI2( D0 ) 1 * GeV && VCHI2( D0 ) < 49 ) { plot( “K- pi+ pi+ pi- mass”, M(D0)/GeV, 1.5, 2.0, 200 ); plot( “K- pi+ pi+ pi- mass”, M(D0)/GeV, 1.5, 2.0, 200 ); Cut dm = abs( DMASS(“D0”) ) < 30 * MeV ; Cut dm = abs( DMASS(“D0”) ) < 30 * MeV ; if( dm( D0 ) ) { D0->save(“D0”) ; } if( dm( D0 ) ) { D0->save(“D0”) ; } }} simple loop over all K- + + - combinations Require pT of combination in excess of 1 GeV/c and 2 VX < 49 Book and fill (1 action!) the histogram Save the combinations with | M|<30 MeV/c2
18
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 18 LoKi : Histograms Histograms are local & booked on-demand Histograms are local & booked on-demand No need for pre-booking! No need for pre-booking! Include variants for effective implicit loops Include variants for effective implicit loops for( Loop D0 = loop( “K- pi+”, “D0”) ; D0 ; ++D0 ) { plot( “K- pi+ mass”, M(D0)/GeV, 1.7, 2.0, 150 ); plot( “K- pi+ mass”, M(D0)/GeV, 1.7, 2.0, 150 );} plot( loop( “K- pi+”, “D0” ), “(2)K-pi+ mass”, M12 / GeV, 1.7, 2.0, 150 ) ; plot( select(“Kaons”, ID == “K-” ), “PT of kaons “, PT /GeV, 0, 5, 100 ); Book and fill the histogram Make a loop, book and fill the histogram Select particle, make a loop, book and fill the histogram
19
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 19 LoKi : N-tuples N-Tuples are local & booked on-demand: No need for pre-booking of N-Tuple and its items N-Tuples are local & booked on-demand: No need for pre-booking of N-Tuple and its items Include variants for effective implicit loops Include variants for effective implicit loops Both ROOT and HBOOK are supported as persistency: the C++ code is neutral with respect to the N-Tuple actual persistency Both ROOT and HBOOK are supported as persistency: the C++ code is neutral with respect to the N-Tuple actual persistency Tuple tuple = ntuple(“My N-Tuple for K- pi+ combinations”); for( Loop D0 = loop( “K- pi+”, “D0”) ; D0 ; ++D0 ) { tuple -> column( “M”, M(D0)/GeV); tuple -> column( “M”, M(D0)/GeV); tuple -> column( “PT”,PT(D0)/GeV); tuple ->fill(“PX,PY,PZ”, PX(D0)/GeV, PY(D0)/GeV, PZ(D0)/GeV); tuple ->fill(“PX,PY,PZ”, PX(D0)/GeV, PY(D0)/GeV, PZ(D0)/GeV); tuple->write() ; tuple->write() ;} Book N-tuple Fill columns one-by-one Fill few columns at once Commit N-Tuple row
20
What else is needed? Easy “formal” match to MC-truth. Easy “formal” match to MC-truth. The simple and naïve questions The simple and naïve questions What MC particle matches to this RC particle? What MC particle matches to this RC particle? What RC particle matches to this MC particle? What RC particle matches to this MC particle? Unfortunately they are not formal enough and therefore not so well defined for all cases, require a lot of “if”s and “artificial” cutoffs. Unfortunately they are not formal enough and therefore not so well defined for all cases, require a lot of “if”s and “artificial” cutoffs. Reformulate: Does this MC-particle directly or indirectly (through daughters) makes the contribution to the given RC-particle? Reformulate: Does this MC-particle directly or indirectly (through daughters) makes the contribution to the given RC-particle? Formal, well-defined, recursive & applicable for all case Formal, well-defined, recursive & applicable for all case One matches a bit more, but one looses nothing One matches a bit more, but one looses nothing Some final filtering is required Some final filtering is required Easy to code & very efficient: Easy to code & very efficient: just around O(10+10) (recursive) lines just around O(10+10) (recursive) lines 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 20
21
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 21 LoKi : MC matching MCRange mcD0s = finder->findDecays(“D0 -> K- pi+”); Cut mccut = MCTRUTH( mcTruth(), mcD0s ); for( Loop D0 = loop( “K- pi+”, “D0” ) ; D0 ; ++D0 ) { if( mccut( D0 ) ) if( mccut( D0 ) ) { plot(“mass of true D0->K- pi+”, plot(“mass of true D0->K- pi+”, M(D0)/GeV,1.7,2.0,150); M(D0)/GeV,1.7,2.0,150); }} Create MC cut Does this D0 matches to one of the MC truth D0 ? Find MC decays
22
What else is missing? What could be added? What could be added? What can be improved? What can be improved? Locality: one still needs at least one more “unit”: come job-configuration file (e.g. the list of input data files, name of the output file with histograms & n-tuples, output DST, etc…) Locality: one still needs at least one more “unit”: come job-configuration file (e.g. the list of input data files, name of the output file with histograms & n-tuples, output DST, etc…) Compilation time… Compilation time… What is missing? What is missing? Interactivity! Interactivity! Solution? Go to Python! 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 22
23
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 23 Python Why Python ? Python is a language with the special emphasize for fast prototyping and development Python is a language with the special emphasize for fast prototyping and development Scripting and interactivity combined in a natural way Scripting and interactivity combined in a natural way Easy integration with the third party software Easy integration with the third party software Availability of external packages Availability of external packages visualization, statistical analysis visualization, statistical analysis ROOT, HippoDraw, Panoramix, PyX, GNUplot ROOT, HippoDraw, Panoramix, PyX, GNUplot Event display Event display Panoramix Panoramix Bookkeeping data base Bookkeeping data base Interface to GRID Interface to GRID GANGA GANGA and many others and many others
24
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 24 Python in LHCb DaVinci C++ Analysis Application Gaudi Services, Algorithms & Application Control LoKi Physics Analysis ToolKit Event Model Bender Python Analysis Application GaudiPython Bender Dictionaries Externals: Visualization, Event Display, etc
25
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 25 (Gaudi)Python The generic package for Gaudi & Python bindings Access to major Gaudi Components Access to major Gaudi Components Services, algorithms and tools Services, algorithms and tools Application Configuration Application Configuration Algorithm schedule Algorithm schedule Configuration of all components Configuration of all components “Dynamic” reconfiguration is possible “Dynamic” reconfiguration is possible The technique LCG dictionaries for C++/Python binding LCG dictionaries for C++/Python binding
26
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 26 Bender = LoKi+Python+ Bender = LoKi+Python+ … LCG dictionaries for C++/Python binding LCG dictionaries for C++/Python binding A bit of raw Boost also A bit of raw Boost also >95% of LoKi ’s C++ functionality is available in Python >95% of LoKi ’s C++ functionality is available in Python Non-trivial due to heavy templated nature of LoKi Non-trivial due to heavy templated nature of LoKi Situation improves with PyLCG evolution Situation improves with PyLCG evolution The mixture of C++ and Python is possible The mixture of C++ and Python is possible C++ algorithm with Python cuts (“ LoKiHybrid ”) C++ algorithm with Python cuts (“ LoKiHybrid ”) The bulk of actual computations in C++ The bulk of actual computations in C++ Minimal Python -related penalty Minimal Python -related penalty The conversion between existing Python Bender ’s and C++ LoKi ’ s algorithms is simple in both directions: The conversion between existing Python Bender ’s and C++ LoKi ’ s algorithms is simple in both directions: Semantics is very similar Semantics is very similar
27
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 27 Physics analysis Functions and cuts Functions and cuts Selection of particles Selection of particles Looping over combinations Looping over combinations Saving/retrieve of interesting combinations, Saving/retrieve of interesting combinations, Vertex/Mass-Vertex/Direction/Lifetime fits Vertex/Mass-Vertex/Direction/Lifetime fits cut = (ID ==‘D+’) & (P > 5*GeV ) & (PT > 2*GeV ) k = self.select( tag = ‘K+’, cuts = ( ‘K+’ == ID ) & ( PT > 0.5 * GeV ) cuts = ( ‘K+’ == ID ) & ( PT > 0.5 * GeV ) for phi in self.loop(formula=‘K+ K-’, pid=‘phi(1020)’) : m = M( phi ) / GeV p = P( phi ) / GeV
28
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 28 Histos & N-Tuples Histograms Histograms N-Tuples N-Tuples h1 = self.plot ( “ phi mass ”, M( phi ), 1000, 1050 ) tup = self.nTuple( ”Phi NTuple”) tup = self.nTuple( ”Phi NTuple”) tup.column ( “ID”, ID(phi) ) tup.column ( “ID”, ID(phi) ) tup.column ( “p”, P (phi) ) tup.column ( “p”, P (phi) ) tup.column ( “pt”, PT(phi) ) tup.column ( “pt”, PT(phi) ) tup.write() tup.write()
29
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 29 Histo Histo visualization The histogram visualization can be done through The histogram visualization can be done through ROOT ROOT native ROOT through Python prompt native ROOT through Python prompt rootPlotter from PI through AIDA pointer rootPlotter from PI through AIDA pointer Panoramix/LaJoconde Panoramix/LaJoconde Directly through AIDA pointer Directly through AIDA pointer HippoDraw HippoDraw hippoPlotter from PI through AIDA pointer hippoPlotter from PI through AIDA pointer Few lines “common interface” for trivial plotting exist Few lines “common interface” for trivial plotting exist The interactive analysis of Gaudi N-Tuples is possible in Bender with ROOT persistency and ROOT module directly The interactive analysis of Gaudi N-Tuples is possible in Bender with ROOT persistency and ROOT module directly
30
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 30 Everything Everything can be combined Bender/Python prompt Panoramix PI/ROOT ROOT HippoDraw
31
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 31 Panoramix Event Display: Panoramix The integrated analysis and visualization of statistical and event data is possible The integrated analysis and visualization of statistical and event data is possible
32
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 32 Result from Bender.Main import * class Dstar(Algo): def analyse( self) : self.select ( ‘K-’, (‘K-’ ==ID)&(PT>1*GeV) ) self.select ( ‘pi+’, (‘pi+’==ID)&(P >3*GeV) ) dmass = ABSDM(“D0”) < 30 * MeV for D0 in self.loop ( ‘K- pi+’, ‘D0’ ) : If ( VCHI2(D0) < 4 ) & dmass( D0 ) : D0.save(‘D0’) tup = self.nTuple ( “D*+ N-Tuple ” ) for Dst in self.loop ( ‘D0 pi+’, ‘D*(2010)+’ ) : dm = M(Dst)-M1(Dst) dm = M(Dst)-M1(Dst) h1 = self.plot( “Delta mass for D*+”, dm, 130 * MeV, 170 * MeV ) tup.column ( ‘M’, M(Dst) / GeV ) tup.column ( ‘DM’, dm / GeV ) tup.column ( ‘p’, P (Dst) / GeV ) tup.column ( ‘pt’, PT(Dst) / GeV ) tup.write () return SUCCESS
33
The life is not perfect Bender has a lot of nice features. But it also has some clear disadvantage: Bender has a lot of nice features. But it also has some clear disadvantage: Some CPU penalty is practically unavoidable Some CPU penalty is practically unavoidable but could be minimized with careful design. but could be minimized with careful design. the weak points are well identified and could be avoided the weak points are well identified and could be avoided some external optimizers, like Psyco could be helpful some external optimizers, like Psyco could be helpful But a bid dangerous to use e.g. in Online/Trigger applications But a bid dangerous to use e.g. in Online/Trigger applications 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 33
34
Solution? “Hybrid” When the problem is identified, one has 95% of the solution in the hand. Lets use “Hybrid”! When the problem is identified, one has 95% of the solution in the hand. Lets use “Hybrid”! “hybrid” solution for selection criteria for Online/Trigger application: “hybrid” solution for selection criteria for Online/Trigger application: describe the selection criteria in a friendly way using Python strings describe the selection criteria in a friendly way using Python strings reuse of LoKi&Bender concepts reuse of LoKi&Bender concepts convert Python into C++ at initialization phase convert Python into C++ at initialization phase use the constructed C++ objects in C++ algorithms/tools use the constructed C++ objects in C++ algorithms/tools No penalty due to Python No penalty due to Python 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 34
35
Configuration of Trigger 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 35
36
Hybrid The “hybrid” approach allows the implementation of very efficient and powerful “hybrid” factories: The “hybrid” approach allows the implementation of very efficient and powerful “hybrid” factories: Expressions, parameters, units, functions, …. Expressions, parameters, units, functions, …. The approach combines the great CPU performance of C++ with the great flexibility of Python The approach combines the great CPU performance of C++ with the great flexibility of Python The hybrid approach allows to define all cuts in “easy- and-friendly” way The hybrid approach allows to define all cuts in “easy- and-friendly” way The preliminary testing with interactivity ( GaudiPython or Bender ) is possible and recommended The preliminary testing with interactivity ( GaudiPython or Bender ) is possible and recommended The same uniform semantics as for LoKi/C++ and Bender/Python The same uniform semantics as for LoKi/C++ and Bender/Python 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 36
37
Summary The powerful and simultaneously User friendly physics analysis is reality (in LHCb) The powerful and simultaneously User friendly physics analysis is reality (in LHCb) LoKi: The powerful C++ Tool kit LoKi: The powerful C++ Tool kit Bender: The interactive python-based environment for the physics analysis Bender: The interactive python-based environment for the physics analysis Many physicists in LHCb use them Many physicists in LHCb use them Including the senior physicists Including the senior physicists including the spokesman including the spokesman Also the useful hybrid product as a result: it is not very user friendly, but rather simple, formal, save and efficient. Also the useful hybrid product as a result: it is not very user friendly, but rather simple, formal, save and efficient. The base for in High Level Trigger The base for in High Level Trigger 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 37
38
More information Savannah portals for LoKi and Bender: Savannah portals for LoKi and Bender: http://savannah.cern.ch/Loki http://savannah.cern.ch/Loki http://savannah.cern.ch/Loki http://savannah.cern.ch/Loki http://savannah.cern.ch/Bender http://savannah.cern.ch/Bender http://savannah.cern.ch/Bender http://savannah.cern.ch/Bender 13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 38
39
13 May'2k+8 NIKHEF Colloquium Vanya BELYAEV 39 LoKi Bender Loki is a god of wit and mischief in Norse mythology Loki is a god of wit and mischief in Norse mythology Lo ops & Ki nematics Lo ops & Ki nematics Ostap Suleiman Berta Maria Bender -bei The cult-hero of books by I.Il’f & E.Petrov: “The 12 chairs”, “The golden calf” The cult-hero of books by I.Il’f & E.Petrov: “The 12 chairs”, “The golden calf” The title: “ The great schemer” The title: “ The great schemer” Attractive & brilliant cheater Attractive & brilliant cheater Essential for successful and good physics analysis
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.