Presentation is loading. Please wait.

Presentation is loading. Please wait.

StdHepC++ L. Garren Presented by M. Fischler

Similar presentations


Presentation on theme: "StdHepC++ L. Garren Presented by M. Fischler"— Presentation transcript:

1 StdHepC++ L. Garren Presented by M. Fischler
Fermi National Accelerator Laboratory USA

2 What is StdHep? From event generators StdHep To simulation packages
Lund, Pythia, Isajet, Herwig, … Produce events in some form StdHep To simulation packages Consume events in some form Geant3, MCFast, … Packages can conform to StdHep formats directly, but StdHep also has interfaces to package formats

3 What Does StdHep Do? Standardized Fortran Monte Carlo output
HEPEVT common block PDG particle numbering scheme C++ requires a similar standard Analysis moving to C++ C++ Monte Carlo generators Events and particles are natural C++ objects StdHepC++ Initial interface much like HEPEVT common block Translation routines Major rewrite under way

4 5 Key Classes in StdHepC++
All classes are in StdHep namespace StdHep::ParticleData StdHep::Particle StdHep::Collision StdHep::Event StdHep::Run

5 Run is logically a sequence of
Event is a set of Collision has a specially structured container of Particle has methods to refer to common ParticleData may come from standard reference or be application specific

6 StdHep::Particle Volatile particle information Particle ID status code
color generated mass helicity momentum (CLHEP LorentzVector) creation vertex (CLHEP LorentzVector) decay vertex (CLHEP LorentzVector)

7 (volatile Particle information continued)
mother secondmother index to the first daughter index to the last daughter Method to access appropriate StdHep::ParticleData Mother and daughter entries deliberately designed to be compatible with HEPEVT common block Ideally, information about the particle tree should (will) be decoupled from the Particle class

8 StdHep::Collision A Collision is a single beam interaction
collision number input I/O stream for bookkeeping purposes number of Particles in the collision vector of pointers to Particles method to get Particle Conceptually, Collision is a special sort of container of Particles

9 StdHep::Event Each beam crossing may have several interactions. Therefore an Event is a collection of Collisions. event number number of Collisions vector of pointers to Collisions method to get Collision method to get Particle Conceptually, Event is special sort of container of Collisions

10 StdHep::Run Collects event-independent information Logically refers to a sequence of Events number of Events to generate number of Events generated number of Events written to I/O nominal center-of-mass energy cross section random number seeds I/O methods

11 Taking Advantage of C++ and O-O
The classes described (particularly Particle) have some data which ought to be decoupled StdHep::Particle mother secondmother index to the first daughter index to the last daughter These implement a type of aggregation, with special relationship properties The C++ std library defines semantics for containers - stick with those semantics!

12 A Collision is a DAG <Particle>
Directed Acyclic Graph of Particles templated class, works as a std::container but augmented with parent/child relations a parent may have any number of children a child may have more than one parent each parent or child (Particle) is a node on the graph Acyclic: there is at most one relation between two nodes there cannot be a closed directed cycle

13 The DAG class Looks and feels like other container classes
iterators; same sorts of loop constructs; … Also embodies parent/child relationships Removes parent/child information from Particle Provides natural methods for traversing the particle tree in various ways Including the concept of two isomorphic graphs of different types of objects Allows for disconnected nodes

14 How DAG Will be Used class Particle {…};
class Collision : public DAG <Particle> { /* plus any not-per-particle data and methods */ }; DAG has methods to insert/delete a Particle, assign parent/child, and provide iterators dereferencing a DAG::iterator gives you a Particle Nodelist<Particle> ordered list of some iterators associated with a DAG provides clean std syntax for loops over daughters, etc.

15 Some examples of DAG methods
Constructors empty relations induce from another DAG fill from Nodelist in some other DAG itp = dag.insert(p); itp = dag.insertChild(p, itm); Nodelist<T>-returning methods: Nodelist<Particle> children (itp) Nodelist<Particle> parents (itp)

16 Conclusion There is a strong need for C++ standard Monte Carlo generator interface. StdHepC++ is a natural object-oriented implementation of such an interface. At present we have working examples which integrate StdHepC++ with the Fortran versions of Herwig, Pythia, Isajet. On the other side, StdHepC++ provides event blocks readable by MCFast and Geant3, and will have an interface to Geant4.


Download ppt "StdHepC++ L. Garren Presented by M. Fischler"

Similar presentations


Ads by Google