C++ Basics

Start presentation

Slide 1: Why C++ for experimental physicists?

  • C++ is a statically typed general-purpose multiparadigm programming language. It supports procedural programming, data abstraction, object-oriented programming, and generic programming.

  • C++ is widely available and used, it is the fastest OO language.

  • C++ knowledge is a prerequisite to use important toolkits and frameworks of experimental physics like
    • ROOT and applications based on it like VMC or Go4
    • Geant4
    • ...

  • We concentrate on features of C++, which are important to use and to extend ROOT and Geant4.

Slide 2: Classes of Software

  • Application Programs

  • Libraries, Toolkits
    • Applications will use classes from one or more libraries of predefined functions and classes.

  • Frameworks
    • A set of cooperating classes that make up a reusable design for a specific class of software.

  • Frameworks

Slide 3: ROOT an Object-Oriented Data Analysis Framework

ROOT is written in C++.

C++ knowledge is a prerequisite to understand most of the ROOT documentation.

C++ is used in ROOT for
  • the Command Line (Root commands are interpreted by CINT, a C++ interpreter)

  • Macros (interpreted by CINT)
    • to collect commands
    • to extend ROOT with new functions
    • to extend ROOT with new classes
  • Shared Libraries (compiled by a C++ compiler)
    • to extend ROOT with new functions
    • to extend ROOT with new classes
  • Applications (compiled by a C++ compiler)
    • to use ROOT to built applications

Slide 4: Geant4 an Object-Oriented Simulation Toolkit.

Geant4 is used for the simulation of the passage of particles through matter.

Geant4 is written in C++.

To customize Geant4 to an experiment three C++ classes must be provided:
  • for defining a virtual reality of the setup,
  • for defining all particles and physics processes,
  • for generating the primary particles.
Five optional user classes may be used to modify the default behaviour:
  • for actions at the beginning and end of every run,
  • for actions at the beginning and end of every event,
  • for customising access to the track stacks,
  • for actions at the creation and completion of every track,
  • for customising behaviour at every step.


slideshow generated with SlideShowPlugin. Template: CppSlideTemplate

-- PeterMalzacher - 14 Mar 2005
Topic revision: r4 - 2005-03-15, PeterMalzacher
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)