Base Classes for Simulation

nostalgicisolatedΛογισμικό & κατασκευή λογ/κού

4 Νοε 2013 (πριν από 4 χρόνια και 4 μέρες)

97 εμφανίσεις

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

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

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

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

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.


AliRoot

AliRoot
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.




ROOT provides



I/O (transient=persistent)



C++ Scripting Language



Container Classes



Automatic Documentation



GUI Classes



Graphic Tools



Histograming Tools



….

Base Classes Representing
Simulation Components

Physics Signals

Fast Simulation

Detector
Simulation

Hits


o

Digits


o

Reconstruction

Physics Performance

Feasibility Studies

Detector Performance

Reconstruction Optimisation

Event
-
Generators

Detector Classes

Segmentation

MC

Particle Stack

Example: Fast Simulation

Example: Digitisation


Cluster Finder

Tracking Codes

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;


New Tracking Schema

Detector Version StepManager

Add the hit

GUSTEP

FLUKA Step

Geant4

StepManager

Disk I/O

Objy

Root

AliRun::StepManager

AliMC Implementations



TGeant3


up and running



TGeant4


in development



TFluka


on the wishlist

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.



ALICE G4 Simulation Prototype

Components

Stand
-
Alone

Seen through AliMC

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

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.


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 ...

Clients of the Segmentation Class

AliMUONresponse

AliMUONsegmentation

AliMUONHitMap

Stepmanager

Signal Generation

Condition

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

Hits and Pad Hits

Hits and PadHits

Hit Reconstruction

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.


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

Event Generator
Implementations


External Generators (Pythia)


External Event Files


Parameterisations (y, pT, particle
cocktail)


Boundary Sources as interface to
FLUKA


Testing Tools: Particle Guns, ...

Interface to FLUKA:

AliGenFLUKASource

FLUKA

AliRoot

ALIFE

Boundary Source

Application: AliGenCocktail:

AliGenCocktail:

public AliGenerator

Tlist



AliGenCocktailEntry

Generator

Events Generated

first/last in stack

biasing

weight

AliGenerator

A fast physics cocktail simulation tool:

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