28
A n d r e a s M o r s c h C E R N / A L I C E 3 r d L H C C o m p u t i n g W o r k s h o p M a r s e i l l e , S e p t e m b e r 3 0 , 1 9 9 9 Base Classes for Simulation The ALICE Simulation Strategy Andreas Morsch ALICE Offline Group For the ALICE Collaboration 3rd LHC Computing Workshop Marseille, September 30, 1999

Andreas Morsch CERN/ALICE 3rd LHC Computing WorkshopMarseille, September 30, 1999 Base Classes for Simulation The ALICE Simulation Strategy Andreas Morsch

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Base Classes for Simulation

The ALICE Simulation Strategy

Andreas Morsch

ALICE Offline Group

For the ALICE Collaboration

3rd LHC Computing Workshop

Marseille, September 30, 1999

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Outline

Setting the scene • Goals and Priorities

• AliRoot Framework

Base Class Interfaces to Simulation Components• MC Base Class and Geant4 Application Status in this context

• Segmentation Base Class

• Event Generator Base Class

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Global Strategy Clear distinction between immediate and long-term

requirements. Assure coherence of the whole simulation process:

• Event generation

• Particle Tracking

• Signal Generation

• Digitisation

• Fast simulation

Maximum (re)use of existing code and knowledge (people):• Geant3 based simulation code

• Users come with FORTRAN+PAW+CERNLIB background

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Immediate Requirements

Simulations needed for• Technical Design Reports

• Detector design optimisation

• Proof of principle for new physics analysis ideas

• Integration of new detectors

Profit from OO design as early as possible Allow for evolution

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Long Term Goals

Comparison between Geant3 and Geant4 using the same geometry and data structure is mandatory (QA)

Smooth transition to Geant4 with maximum reuse of Geant3 based simulation (user-) code

Possible integration of other tracking codes (fast simulators, FLUKA?, ...)

Use MC interface class to hide implementation specific features Define G3 and G4 geometries from the same code.

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

AliRootAliRoot is the ALICE off-line framework for simulation, reconstruction, and analysis. Except for Geant3 and some remaining legacy code, this framework is based on OO design and written in C++. It uses the ROOT system as a foundation.

Framework helps people to move into OO• CINT C++ scripting language

• persistent=transient object

• …

Keeps entropy low and allows to speak a common language.

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

ROOT provides

• I/O (transient=persistent)• C++ Scripting Language • Container Classes• Automatic Documentation• GUI Classes• Graphic Tools• Histograming Tools• ….

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Base Classes Representing

Simulation Components

Physics Signals

Fast Simulation

Detector Simulation

Hits ooDigits ooReconstruction

Phy

sics

Per

form

ance

Fea

sibi

lity

Stu

dies

Detector Performance

Reconstruction Optimisation

Event-Generators

Detector Classes

Segmentation

MC

Particle Stack

Example: Fast Simulation

Example: Digitisation Cluster Finder

Tracking Codes

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

MC Base Class and Run Control

AliMC interface class • Geometry definition methods

• Material and Tracking Media Definitions

• Physics Process Control

• Generic access functions to information during tracking

AliRun• Run Control

• Event Control

• Owner of …• Particle Stack

• Detector list

• Primary particle Generator

• Magnetic Field Map

• I/O control:• kinematics tree

• hits

• digits

• reconstruction objects

Instantiation during run time using CINT:

new TGeant3(“C++ Interface to Geant3”);TGeant3 *geant3 = (TGeant3*) gMC;

new TGeant4(“C++ Interface to Geant4”);TGeant4 *geant4 = (TGeant4*) gMC;

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

New Tracking Schema

Detector Version StepManagerAdd the hit

GUSTEP

FLUKA Step

Geant4StepManager

Disk I/OObjyRoot

AliRun::StepManager

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

AliMC Implementations TGeant3 up and running TGeant4 in development TFluka on the wishlist

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Geant3->Geant4 Starting Idea

• Reuse the Geant4 g3tog4 package for implementation of geometry methods of the MC interface.

g3tog4 completely re-implemented • bugs fixed

• missing parts have been added

• reflection symmetry still missing in G4

ROOT output of hits for direct comparison G3/G4. No results from tracking yet.

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

ALICE G4 Simulation Prototype

Components

Stand-Alone

Seen through AliMC

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

More examples for the use interface classes in

AliRoot Segmentation of Muon Chambers (CPC+CSC)

• detector response simulation

• digitisation

• clustering

• visualisation

Event generators• slow simulation

• fast simulation

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Alice Muon Arm Segmentation base class was developed out of the need to simulate CPCs and CsC with segmentation schemas changing from chamber to chamber, radially … and with time.

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

ALICE Muon-Arm Class Design

AliMUONsegmentation

AliMUONchamber

TObject

AliMUONresponse

AliDetector

AliMUON

Segmentation Behaviour:

• Local to global Transformation• Global to local Transformation• Iterators• Next Neighbours• Generic access functions to geometrical structure•….

Reflects the physical structure of the detector ...

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Clients of the Segmentation Class

AliMUONresponseAliMUONsegmentation

AliMUONHitMap

Stepmanager

Signal GenerationCondition

Cluster Generation

Digitisation Rawcluster Finder

Space Point Reconstruction

Hits Pad Hits

Digits RawClusters SpacePoints

Simulation and Reconstruction functional and ready for performance tests

Event Display Analysis

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Hits and Pad Hits

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Hits and PadHits

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Hit Reconstruction

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Event Generator Base Class

Purpose:• Generate particles to be tracked and put them on the stack.

Interaction with the gAlice global object:• gAlice->SetGenerator(this) registers the generator object to be

used for the run. The generator created first is used.

• gAlice->SetTrack(...) puts particle in the stack.

In a more general framework AliGenerator can be used to write primary particle event files or as input to fast physics simulation.

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

AliGenerator Member Functions

Member Functions ...• Generation (Init(), Generate())

• Set and get number of particles/event

• Set kinematic selection (momentum, pT, phi, theta, y)

• Set vertex position and smearing (sigma, per event, per track)

• Set child and parent weight

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Event Generator Implementations

External Generators (Pythia) External Event Files Parameterisations (y, pT, particle

cocktail) Boundary Sources as interface to

FLUKA Testing Tools: Particle Guns, ...

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Interface to FLUKA:AliGenFLUKASource

FLUKA

AliRoot

ALIFE Boundary Source

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Application: AliGenCocktail:

AliGenCocktail:public AliGenerator

Tlist

AliGenCocktailEntry

GeneratorEvents Generatedfirst/last in stackbiasingweight

AliGenerator

A fast physics cocktail simulation tool:

An dr ea s M

or sc h CE

RN

/AL

ICE

3 rd LH

C C

ompu ti n g W

o rk s ho pMa rs e ill e, S

e pt embe r 3 0, 1 9 99

Summary ALICE uses ROOT based OO frame-work for

simulation and reconstruction (AliRoot) AliMC abstract interface class allows:

• Integration of Geant3 based simulation code

• Test of Geant4 under the same conditions (Geometry, signal generation, output data structures)

Base classes representing simulation related concepts produce synergy effects inside our framework.

… and could be reused in other architectures