# Presentation: 922825

## Report on the recent Muon Software workshop

- S. Spagnolo for the Muon Group
- Muon software meeting, 30 April 2002

## Agenda of the workshop

- 17 April 2002 09:00-09:15  Introduction: Goals of the workshop
- 17 April 2002 09:15-11:50  Detector Description/Geometry Model
- 17 April 2002 11:00-15:00  Event Data Model
- 17 April 2002 13:50-17:00  Reconstruction Event Model
- 17 April 2002 17:00-17:20  Muon Spectrometer package restructuring
- 17 April 2002 18:30-19:00  Muon sw deliverables for DC1 phase 2
- 18 April 2002 09:00-14:00  Moore Workshop
- 18 April 2002 17:00-19:00  ATLAS Tracking EDM Session
- 19 April 2002 11:00-13:00  Closeout

**define deliverables for DC1, phase 2, i.e. Sept.-Dec. 2002**

- Goal of the workshop

- _Transparencies of talks in_
- http://documents.cern.ch/AGE/current/fullAgenda.php?ida=a02589

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Main items of the workshop

- A new geometry model (following BN L workshop)
- Toward the new event data model: raw data view and reconstruction view
- Status of the muon software: planning for restructuring and deliverables for DC1 – phase 2

- S. Goldfarb, discussion

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

- S. Rajagopalan, D. Adams, A. Nisati,
- L. Pontecorvo, A. Poppleton, discussion

- J.Shank, S.S., G. Stavropoulos,
- M. Biglietti, G. Cataldi, discussion

## Current geometry model and data flow in the Muon-sw

***Athena***

**Excel**
**Spreadsheets**

**Parameter**
**Book**

**Technical**
**Drawings**

**GEANT3**
**Simulation**

**AGE**
**Structures**

**Common**
**Blocks**

**FADS/Goofy**

**AMDB**
***ASCII File***

**Muonbox**
**Reconstruction**

**GEANT4**
**Simulation**

**Moore**
**Reconstruction**

**MuonDetDescr**
**Interface**

**zebra**

**graphics**

**graphics**

**graphics**

**Current geometry model and data flow in the Muon-sw**

**graphics**

**zebra**

**graphics**

**objy**

- from S. Goldfarb

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Why a new geometry model                   (or shoortcomings of the present model) ?

-             applications with different interfaces to the clients.
-             Geometry changes affect the interfaces, not the applications
-             disentangle geometry description from event management

- AGDD status in the muon-sw: far from having a full translation of AMDB
-                                                interface to GEANT4 trivial
-                                                no path from AGDD to GEANT3  simulation
-                                                no path to applications (Muonbox, Moore)

- Automatic DetDescr
- (C++ classes) from
- XML files

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

- Why a _new geometry model_                   (or shoortcomings of the present model) ?

## 9-10 Apr. 2002 BN L - The ATLAS Detector Description WorkshopA path for a coherent model for  Detector Description in the experiment has been defined (based on the CDF geometry model) 

-                                                generate a single, common transient geometry model
-                                               (hierarchical tree a la GEANT4)

- Reconstruction API: identifier  detector element
-                                        hold info like shape, size, material, position, orientation, location
-                                                in the hierarchy tree, construction and condition parameters

- High level geometry services (propagation, scattering) fall into the scope of the reconstruction

- Primary numbers: define geometry hierarchy and digitization,
-                             material definition and identifier dictionary

- Geometry Model: geometry manager + geometry builders
-                             readout geometry, material builders,
-                             alignment updates

- Main components

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

- 9-10 Apr. 2002 BN L - The ATLAS Detector Description WorkshopA path for a coherent model for  Detector Description in the experiment has been defined (based on the CDF geometry model)

## Goal: move to the new geometry model and to the new event data model          at the same time  (DC1 phase 2, DC2 – fall 2002)

- How ?

- Primary data  MySQL (P. Nevski);  AthenaSvc for MySQL done;
-                                 Version selection service to be done;
- 		 a working version by end of May

- Geometry model  Athena interf. (D. Quarrie, P. Calafiura, J. Boudreau)
-                                        G3/G4 (A. Dell’Acqua, J. Boudreau, P. Nevski)
-                                        conditional data (J. Boudreau, M. Shapiro, C. Leggett)
-                                        XML build (C. Arnault, S. Bentvelsen, J. Boudreau)
-                                        detector specific prototype (SCT, TRT, EM-endcap);
-                               a working group set-up for the MuonSpectrometer
-                               (D.  Adams, S.Goldfarb, J.F. Laporte, G.Stavropouls, )

- Unclear points: - where does AGDD enter the play ?
-                           (layer between MySQL and the CDF C++ classes or
-                           XML gets built from the geometry model)
-                          - how much of MuonDetDescr can be reshuffled in the muon
-                            implementation of the new geometry model ?
-                          - a scale caveat (20K volumes in CDF while 2.5M in ATLAS)

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

- Goal: move to the new geometry model and to the new event data model          at the same time  (DC1 phase 2, DC2 – fall 2002)

## Muon AGDD Package in Athena 

- from M. Paniccia

- Displayed with
- PERSINT

- The end-cap toroids described with compact AGDD

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Toward the new event data model

- Hardware side:
- The data format must be defined
- at the ROD/ROB level and at the
- DAQ level.
- MDT: data-format documented and
-             trained in the H8 test beam;
- RPC: defined, documentation close
-           to appear
- TGC: documetation available
- CSC: work going on in BNL

**Toward the new event data model**

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

- from
- S. Rajagopalan

- from L. Nisati

## A real implementation: reconstruction data model and geometry model in H8 beam test data 

- MDTMultiLayer a collection of MDTHits in the same multilayer, where tracks are ~ straight lines. Its geometrical definition is given by GeoMDTMultiLayer,  a collection of GeoMDTTubes pointing to tube specific calibration constants (t0, r-t relations ...). Primary numbers for the geometry description from AMDB / Identifier scheme close to the final approved scheme
- From  MDTHits in one or more MDTMultiLayers, Tracks  are built as collections of MDTHits within one MDTMultiLayer or one chamber (a pair of MDTMultiLayers).
- Eventually Tracks from more than one chamber are merged into a TrackCollection

- Performance: rate of 300 Hz on a 800 MHZ linux machine for single track events.   The algorithm will run as 3rd level trigger, besides of being monitoring tool, in the next beam tests.
- Planning to move to the Athena framework and integrate with existing reconstruction packages

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

**A real implementation: **reconstruction data model and geometry model in H8 beam test data

- from L. Pontecorvo

## Event Data Model: Reconstruction Data (and algorithms)

- Transient components of the Muon Reconstruction Software

- from D. Adams

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

**Event Data Model:** **Reconstruction Data **(and algorithms)

## DATA

-                  can be predicted from a TrackFit

- XDigit: concrete digit (identifier + data)

- TrackFit: fit result (one point on the track, a surface where the 5 track parameters are
-                 given along with the covariance matrix)

- TrackState: data corresponding to a TrackFit (XRecoHit collection, missed active layers,
-                     fit quality, kinks)

- TrackSegment: collection of TrackStates; return TrackFit at any surface; holds a pointer
-                          to a Fitter

- XSurface: concrete surface where the XRecoHit or the TrackFit parameters are defined

**DATA**

**Algorithms**

- Propagator: propagates a TrackFit to a generic Surface

- Finder: uses RecoHits to build TrackSegments

- Fitter: uses TrackSegments to build TrackFits

- A persistent representation is needed only for Xdigit and TrackSegment

- A persistent representation is needed only for Xdigit and TrackSegment

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Package organizationand status

**Generic**

**Identifier**

**Detector**

**Description**

**MuonBase**

**Muon**

**Surface**

**Muon**

**Identifiers**

**MuonDigit**

**Container**

**Muon**

**RecoHit**

**MuonPtr**

**MuonLinear**

**Algebra**

**XXXLinear**

**Algebra**

**Propagator1**

**Fitter1**

**Finder1**

**Fitter2**

**Finder2**

**Propagator2**

- External

- Tracking

- Muon

- specific

- ATLAS

- Implemented for MDT (already in CVS); input doesn’t come yet from an identifier dictiorary

- Implemented for MDT (already in CVS)

- Package holding all the abstract classes
- of the structure and the TrackFit class
- (a simple version exists, not in CVS)

- Plan to wrap existing
- finders and fitters
- into this generic structure

- A package helping memory management

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

**Package organization****and status**

## iPatTrack  a track fitting package in ID and Muon System now                 an implementation of Finder, Fitter, Propagator tomorrow ?

- 2 packages contain families of data classes
- iPatTrackParameters (4 classes)
- iPatTrack (~8 classes - plus some legacy classes)
- 2 algorithmic packages
- iPatTrajectory  (5 classes) swim TrackParameters through Atlas magnetic fields (choice of parametrisation or RungeKutta integration)
- iPatTrackFitter  produce FitQuality and fitted TrackParameters at various positions along the track trajectory

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

**iPatTrack**  a track fitting package in ID and Muon System now                 an implementation of Finder, Fitter, Propagator tomorrow ?

## Tracking in Inner Detector and Muon Spectrometer

- The requirements leading to the muon tracking packages are shared with the inner detector
- Muon and inner detector can benefit from sharing the development effort
- A common output track class would facilitate the exchange of data between these groups and to other groups
- We should strive to find common solutions
- A first step: Muon-ID meeting (18-Apr-2002)
-               a combined w.g. set up: D.Adams, S. Amstrong ???

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Package Restructuring

- following a proposal from D.Quarrie and D. Rousseau
- to separate data objects and algorithms in the existing packages:
- Algorithms depends on data object (output in TDS)
- Data dependency on algorithms is minimal
- reduce overall dependencies,
- data objects can be easily shared by different algorithmic objects

- XXXAlgs 	Algorithms
- XXXCode 	Algorithmic code used by Algorithms
- XXXData 	ADL files and transient data
- XXXNaiveObjy 	Converters and NaiveObjy persistent classes
- XXXROOT 	Converters and ROOT persistent classes

- Subsequent package organization

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

- We’ll follow this plan
- in Moore
- (exchange intermediate
- objects through StoreGate)
- in MuonDetDescr
- and MuonEvent
- (isolate ZEBRA dependent
- code)

- from J. Shank

## Moore Restructuring

- from M. Biglietti

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

- done,
- in CVS

## Moore Restructuring

- AthenaAlgorithm

**MooMakeCrudeRZSegments**

**MooMakeFineRZSegments**

**MooMakeiPatTracks**

**StepOne**

**StepTwo**

**StepOne**

**StepTwo**

**StepOne**

**StepTwo**

- MooiPat
- abstract base classes

- StepOne – StepTwo modules are very similar:
- same task/interface; differences in I/O transient objects, value of external parameters** ******** **use inheritance

- A proposal
- under study

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Moore Restructuring

- Separation between Transient Data and Algorithms allows for various reconstruction paths selected by job_option
- An example: PhiSegments and RZSegments from LVL2 input

- from G. Cataldi

- MooMakeL2PhiSegments

- MooMakeL2iPatTracks

- MooMakeL2FineRZSegments

- MooMakeL2CrudeRZSegments

- RPC_Digits

- MDT_Digits

- PhiSegments

- CrudeRZSegments

- FineRZSegments

- MooiPatFinalTracks

- MooiPat Package

- MooStatistics Package

- MooMakeNtuple

- MooNtuple

- An alternative reconstruction path

- done,
- in CVS

## Moore Performance

- simulated according to
- Layout O

- P**T****rec****/**P**T****gen**

- Track finding in Barrel and End-caps for Layout M

- P**T**** / **GeV

- p**T**** = **100 GeV

- from G. Stavropoulos

- No background

- In samples with correlated background
- # tracks/event increases by ~15%
- RMS of p**rec**/p**gen **increases by ~10%
-         for tracks with p**T** = 20 GeV

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Moore Performance in physics events:  H  4 

- from M. Paniccia

- _Solid line_: Invariant mass of
- the 4 generated muons
- at beam spot

- _Dotted line_: Invariant mass of the 4 reconstructed muons;
- track parameters are given at
- their first measured point

- Invariant mass /GeV

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Layout O and G3 Decoding in Athena

- Current status:

- MDT tube positions  OK for all stations except BOH and BOG

- RPC gas gap positions  OK for all stations, including new extra chambers

- TGC gas gap positions  OK for all stations at z>0
- (needs to verify the z symmetry of the descriptors and of the Geant 3 coding)

- Changes to MuonEvent and MuonDetDescr are “transparent”
- to reconstruction applications ?
- Yes for Moore,  no for Muonbox in ATHENA (it uses MuonEvent but gets  its own
-                                                                           geometry description by reading amdb_simrec)

- from S.S.

- CSC description  Work going on in BNL (K. Assamagan)
-                            descriptors are ready, need to get CSC digit collections
-                            from the event and to get a decoding of the Geant3 digits

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week

## Deliverables for DC1 - phase 2

- Reconstruction Data Model: the new Digit package will be ready (BNL);
-                                             the internal evaluation and
-                                             development of the new proposal will follow
-                                             the time scale of the Geometry Model

- Geometry Model: by the next sw-meeting (end of May) we’ll know
-                            the progress in the evaluation of the impact of
-                            the new geometry model;
-                            by the July muon-sw-workshop we’ll define the
-                            plan for DC1-2;

- Moore: restructured by DC1-2
-             accounting for dead material
-             handling Layout P

- S. Spagnolo, CERN 30 Apr. 2002, Muon Week