26
Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

Embed Size (px)

DESCRIPTION

US CMS EMU CSC SW – Slide 310-Jun-2002 Where we are CMS has a ‘complete’ simulation from PYTHIA- generated events to reconstructed muon tracks. è Detector description from (compact) ‘tz’ files (GEANT3) + parameters + some algorithmic (FORTRAN). è Uses the GEANT3-tracking part of CMSIM to generate ‘hits’ in ‘sensitive detector’ (CSC layers) è Save (expanded) det description (binary rz file) + GEANT ‘hits’ (binary fz file). è Read by ORCA – C++-based ‘Digitization’ simulation + ‘Reconstruction’ software. è ORCA is ‘at least as good’ as CMSIM o Current release is ORCA_6_1_1 o Most CSC digitization code ported from CMSIM. o Much of the CSC code has been ‘improved’ and ‘developed’. è Caveats: o ‘Known’ deficiencies in current code (see later). o OSCAR – to replace remnant CSMIM with GEANT4. Digitization! o DDD – Data Description Database – to replace ‘tz’ etc.

Citation preview

Page 1: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

Endcap Muon CSC Software Update

Tim Cox (UC Davis)

US CMS EMU Meeting, CERN Jun-2002

Page 2: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 210-Jun-2002

TopicsTopics• Where we are

The overall picture of the offline software (CSC Perspective!)• Where we know we need work

Detector Geometry Digitization simulation Clusterization (1st stage reconstruction) Track-segment Building (2nd stage reconstruction) Track-Finding and Fitting (3rd stage reconstruction) Technical (software) quality

• Progress in ORCA in general OSCAR (GEANT-level OO simulation) DDD (Data Description Database) Persistency (Objectivity is on the way out) Visualization (IGUANA)

o Several typical event displays

Page 3: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 310-Jun-2002

Where we areWhere we are• CMS has a ‘complete’ simulation from PYTHIA-

generated events to reconstructed muon tracks. Detector description from (compact) ‘tz’ files (GEANT3) +

parameters + some algorithmic (FORTRAN). Uses the GEANT3-tracking part of CMSIM to generate ‘hits’

in ‘sensitive detector’ (CSC layers) Save (expanded) det description (binary rz file) + GEANT

‘hits’ (binary fz file). Read by ORCA – C++-based ‘Digitization’ simulation +

‘Reconstruction’ software. ORCA is ‘at least as good’ as CMSIM

o Current release is ORCA_6_1_1o Most CSC digitization code ported from CMSIM.o Much of the CSC code has been ‘improved’ and ‘developed’.

Caveats:o ‘Known’ deficiencies in current code (see later).o OSCAR – to replace remnant CSMIM with GEANT4. Digitization!o DDD – Data Description Database – to replace ‘tz’ etc.

Page 4: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 410-Jun-2002

Detector GeometryDetector Geometry• Detector Geometry

Constant -width strips to be implementedo Why is this non-trivial? Because this model must be matched to

the current detector geometry from CSMIM tz file. There we have the coordinates of the corners of the trapezoidal ‘active gas volume’ of each layer. The current approach to modelling strips is taken from CMSIM: just divide the trapezoidal top and bottom edge into equal number of slices and join them.

Better treatment of wire groups, considering the variable numbers of wires.

o We’re taking a fixed number of wires per group, for each chamber type ME11, 12, 13, 21, 22, 31, 32, 41, 42.

Realistic treatment of the ME11 strip-splitting. o Following CMSIM, we’re treating ME1A and ME11 as independent

chambers– in particular, we’re ignoring the fact that the wires can cross from one region to the other.

Geometrical and other parameterso Some of these things are out-of-date, particularly in ME11. We

have some new values but integrating them into the detector description needs work. (Richard B.)

o Lots of things which should be in the DDD so we ‘want’ it!

Page 5: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 510-Jun-2002

Digitization & ClusterizationDigitization & Clusterization• Digitization

Gas ionization simulationo What we have: Ported from CMSIM.o What it is: GEANT3 hits to ‘clusters’ of electron/ion pairs.o Problems: FORTRAN, uses hacked GEANT3 routines & data tables, is it

even right? (e.g. no. of ionization clusters? Stan Durkin, Petr Moissenz)o Plan: Hope for improved algorithm from Petr M.o Short term: move to C++, extract GEANT3 tables stand-alone.

Electron drift simulationo What we have: Ported from CMSIMo What it is: parameterized drift path length and time, and position along

anode wire. High and low B filed cases.o Problems: Some asymmetric distributions where none expected?o Plan: Implement recent MAGBOLZ-based results from Petr M.o Difficulties: So far only for ME11

• Clusterization Building a ‘RecHit’ from clusters of strips (and wires).

o How to handle overlapping hits, edge effects, etc. ? We have improved covariance matrix calculations.

Page 6: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 610-Jun-2002

Brief Summary of CSC RecHitsBrief Summary of CSC RecHits

• One RecHit is created at every crossing of a 3-strip cluster and a wiregroup Timing must match within 2 bunch crossings Can create ghost RecHits

• Strip cluster position is fitted using the known charge distribution (Gatti) Gets resolution of 0.23 mm (0.12 in ME1/1)

o Strip widths are 3-16 mm.

Rick Wilkinson

Page 7: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 710-Jun-2002

RecHit ResolutionsRecHit Resolutions

Resolution (m)

Pull width

ME 1/1A 105 1.17

ME 1/23 187 1.16

ME 234/1 210 1.17

ME 234/2 237 1.36

Not clear:• Why a bit worse than our CMS note• Why ME234/2 is worse than ME234/1

Rick Wilkinson

Page 8: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 810-Jun-2002

Track BuildingTrack Building• Track Segment Building

Used as ‘seeds’ for Track Finding.o Trouble in presence of showers.

• Track-finding and fitting Couples Inner Tracker, Barrel Drift Tubes, Endcap CSCs (and

maybe RPCs) Use ‘CommonDet’ and ‘CommonReco’ packages to share a

common interface Requires different functionality from basic geometry

o ‘Navigability’ – if you have a track at some point in the detector in which neighboring detectors can it also be?

o So use a ‘Reconstruction Geometry’ too – group the chambers.o Trap: As fallen into by Alignment SW people, group chambers, but

the underlying layers ‘have’ the positional geometry, and it only goes one way, from layers to chamber. Doesn’t get transferred back to layers if one ‘moves’ the chambers. Must be fixed.

See Rick Wilkinson’s contribution to San Diego CMS Software Tutorial

o http://cmsdoc.cern.ch/orca/Tutorials/2002-05-SanDiego/MuonTutorial.pdf

Page 9: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 910-Jun-2002

Segment Building AlgorithmSegment Building Algorithm

• Start with the first and last RecHit in the chamber First hit = leftmost one in layer 1 Last hit = rightmost one in layer 6

o Does this introduce a bias? Towards low pT?o Would starting from consecutive hits handle multiple scattering

better?• Try to add one hit per layer

Update line fit after add Replace if a better hit found Cuts are -match within 2.5 mm, 2 < 100 Demand 4 hits to make a segment

• Slightly tighter than the cuts in 6_0_1, but efficiency still good, as you’ll see soon.

Rick Wilkinson (w. thanks to A. Khanov)

Page 10: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1010-Jun-2002

EfficiencyEfficiency

• Demand segment has four hits• Overall 98% efficient when 6 layers are hit, for

50 GeV pT muons• Inefficiency mostly comes from showering!

For the 94% of chambers with 9 or fewer RecHits, efficiency = 99.6%

• 10% of chambers have 4 or 5 layers hit. Efficiencies are: 94% overall 96% when no showering

• For pT 5 muons, 99.1% efficient when 6 layers are hit

Rick Wilkinson

Page 11: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1110-Jun-2002

Software QualitySoftware Quality• Technical Improvements

Maintenance and development headaches in the software arising from

o Coupling together too many classeso Cyclic dependencies between packages (e.g. if Muon depends on

CommonReco which depends on Muon then it’s an iterative pain to create new software releases.)

o Memory (mis)handling–leaks, uninitialized variables, attempting to destroy alread- destroyed variables.

Generally C++, with an OO mindset, makes it much easier to compartmentalize things, so changes (improvements, additions) are not quite as inconceivable as they might have been

o E.g. Rick’s changes to allow ME1A wire digis without strip digis, and ganged-strip digis.

Debugging can be difficulto Maybe because we’re not so expert (yet)o Or maybe because using OO enables more complex code to be

created in the first place!

Page 12: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1210-Jun-2002

OSCAROSCAR• OSCAR

Now in advanced development: OO replacement for early stages of CMSIM, based on GEANT4.

o Improvements in physics simulation,o But… verification & validation problematico Has been based on CMSIM geometry… trouble for Endcap CSCs

since GEANT4 didn’t allow LH coordinate systems. Now fixed since GEANT4 introduced some sort of RH-based reflections (Pedro Arce, CERN/Madrid)

o Muon-related comparisons between CMSIM and OSCAR (Arno Straessner , CERN)…They don’t look unreasonable (see next slide).

o RPC geometry and hit-comparisons in both Barrel and Endcap have been made by Pawel Zych (Warsaw).

Page 13: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1310-Jun-2002

OSCAR+ORCA L1 Trig SimOSCAR+ORCA L1 Trig SimA. Straessner OSCAR=red, CMSIM=black

Page 14: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1410-Jun-2002

DDDDDD• DDD

Data Description Database (see Michael Case’s talk) Interacts on 3 fronts

o Must do at least as well as tz-level descriptiono Must be accessible from OSCARo Must be accessible from ORCA – need interface in ORCA

Why XML?o Effectively a generic replacement for home-grown one-off text-file

descriptions of things.o XML has a lot of strengths on top of that (e.g. you can buy a book

on it!)o Human-readable (at least as well as tz files…)o Problem: switching from primary tz version to XML version.

Machine translation is a mess (cf. F2C); at some point humans have to do the hard work.

o Pay-off: More easily maintainable, and extensible, in the long-term.

EMU CSC SW has many parameters which should go in!

Page 15: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1510-Jun-2002

PersistencyPersistency• Persistency

CMS were moving away from the idea of Objectivity as the ‘solution’ for persistent storage.

Due to some sort of CERN IT division ‘mistake’, this is happening sooner than expected

o No more Objectivity licensingo Can use current licensing (RedHat 6.1 only)o No support

Right now it looks like ROOT will be the path of least resistance

o Already significant work in untangling Objectivity from the framework underlying ORCA (COBRA)

o This entailed some changes to code all subdetector groups have in ORCA, for the ORCA_6 release earlier in the year.

Page 16: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1610-Jun-2002

VisualizationVisualization• Visualisation/Visualization

IGUANA (Lucas Taylor, Ianna Osborne, Lassi Tuura – North Eastern)

o Whole-CMS detector and event display.They’ll try to implement a view of whatever detector-

related quantities one gives them. For the Endcap Muon CSCs we have

ChambersSimHits–hits from GEANT3SimTracks–the simulated trackRecHits–hist reconstructed in CSCsTrack segments–track stubs from least squares fit of hits in

(6) layersRecTracks–fully-reconstructed muon tracks

o It works!o Potentially wonderfulo See some sample pictures

Ianna O. also integrating the Florida test-bench visualization into ORCA.

Page 17: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1710-Jun-2002

Rec muon track CSCs + absorberRec muon track CSCs + absorber

Page 18: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1810-Jun-2002

Rec muon CSCs only shownRec muon CSCs only shown

Page 19: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 1910-Jun-2002

No detector: Sim muon track + hitsNo detector: Sim muon track + hits

Page 20: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 2010-Jun-2002

No detector: muon hits + track segsNo detector: muon hits + track segs

Page 21: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 2110-Jun-2002

Rec muon track in CSCsRec muon track in CSCs

Page 22: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 2210-Jun-2002

No detector: Sim muon track + hitsNo detector: Sim muon track + hits

Page 23: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 2310-Jun-2002

Rec muon track in CSCsRec muon track in CSCs

Page 24: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 2410-Jun-2002

No detector: Sim muon track + hitsNo detector: Sim muon track + hits

Page 25: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 2510-Jun-2002

No detector: muon hits + track segsNo detector: muon hits + track segs

Page 26: Endcap Muon CSC Software Update Tim Cox (UC Davis) US CMS EMU Meeting, CERN Jun-2002

US CMS EMU CSC SW – [email protected] Slide 2610-Jun-2002

No detector: Rec muon trackNo detector: Rec muon track