Inner Detector/Tracking Tools Edward Moyse, CERN PH-ATC 13 May 2005 UK ID Software Training 1
Introduction In the previous talk I covered some aspects of the EDM, and some of the Algorithms involved in tracking In this talk I will cover some of the more general tools that are provided and give a more concrete example of what is going on inside one of them (TrkSummaryTool) Hopefully this will lead in to the more practical section this afternoon 13 May 2005 UK ID Software Training 2
Tools What do we mean by tools and why do we want them? Many algorithms may want to do the same sort of thing in slightly different ways. Common tools allow these frequent tasks to be solved once, and the functionality shared Above all, it makes hard problems easier, by pooling expertise AlgTools are owned by ToolSvc of Athena, and can be accessed by multiple Algorithms, configured by joboptions etc. offer a lot of flexibility. 13 May 2005 UK ID Software Training 3
What exists? In 10.2.0: TrkEventCnvTools-00-02-00 TrkExtrapolation-AtlasOffline-00-00-00 TrkExHelixPropagator-01-01-04 TrkExRungeKuttaPropagator-01-00-13 TrkExSTEP_Propagator-00-00-02 TrkExSlPropagator-02-01-06 TrkExTools-02-03-03 TrkExUtils-01-02-09 TrkFitter-AtlasOffline-00-00-00 TrkDistributedKalmanFilter-00-00-13 TrkFitterUtils-01-02-02 TrkKalmanFitter-01-05-06 TrkRefitAlg-00-00-07 TrkMagneticField-AtlasOffline-00-00-00 TrkMagFieldTools-00-00-11 TrkMagFieldUtils-00-00-08 TrkTools-AtlasOffline-00-00-00 TrkAmbiguityProcessor-00-03-01 TrkLegacyCnvTools-00-01-07 TrkParticleCreator-00-06-00 TrkRIO_OnTrackCreator-00-05-01 TrkTrackSummaryTool-00-12-03 VxBilloirTools-02-00-02 Extrapolators Fitters Magnetic field Misc 13 May 2005 UK ID Software Training 4
What exists? In 10.2.0: InDetRecTools-AtlasOffline-00-00-00 InDetLegacyCnvTools-00-08-00 InDetRecToolInterfaces-00-00-03 InDetTrackSummaryHelperTool-00-03-00 SiClusterOnTrackTool-01-00-00 SiClusterizationTool-01-02-00 SiDetElementsRoadTool_xk-00-00-02 SiSpacePointTool-01-03-01 SiSpacePointsSeedTool_xk-00-00-05 SiZvertexTool_xk-00-00-04 TRT_DriftCircleOnTrackTool-00-00-14 TRT_DriftCircleTool-01-01-04 TRT_DriftFunctionTool-00-00-06 and more! 13 May 2005 UK ID Software Training 5
13 May 2005 UK ID Software Training 6
Track Fitting Interface / legacy ITrkFitter Base Class provides interface for Fitting of PrepRawData sets (hit level) Fitting of RIO_onTrack sets (persistified tracks) Fitting of SpacePoints (Trigger) Refitting of Trk::Track collections Adding Hit to a Trk::Track TrkLegacyCnvTool To convert from various old track representations to the common track class. Inside the Tracking repository only base class implementations are given, the actual implementations are placed in the corresponding detector repositories: ID family: xkalmantotracktool ipattotracktool MS family: MooreToTrackTool, MuonboyToTrackTool 13 May 2005 UK ID Software Training 7 A. Salzburger ATLAS Software Workshop, 23/09/2004
Track Extrapolation / Propagator Propagator Base Class Three different Propagators inherit from the Propagator base class, are currently available and did undergo a first debugging cycle TWiki: TrackExtrapolationValidation package The propagation to any arbitrary Surfaces (StraightLine-/Cylinder-/Plane-/ DiscSurface) can be done. TrkExSlPropagator and TrkExRungeKuttaPropagator (showed good agreement) have been used for fitting/refitting CTB 2004 (simulated) data, TrkExHelixPropagator is in preparation to do so. The steering of the Propagator is done by a python class: Include ( `TrkExTools/PropagatorSetup.py`) myprop = PropagatorSetup(`Trk::HelixPropagator`, `mhx`, [`PropCovNumerically`, \ `UseStraightLinePropagator`]) 13 May 2005 UK ID Software Training 8 A. Salzburger ATLAS Software Workshop, 23/09/2004
Overview Extrapolation New scheme, new features, new functionality First tests Inner Detector RTF Prototype Motivation and description (Igor) Cvs repository (Igor) Fitting Lessons to be learned from the CTB 2004 (Thijs) KalmanFitter and ReFitting (Wolfgang) ReFitting exercise with single electrons (Eva, Vacho) Expanding the tools to the MuonSystem (Steven, Wolfgang) Status for 10.0.0 / Outlook What will be in 10.0.0 Following development An overall view 13 May 2005 UK ID Software Training 9 ATLAS Software Workshop, 24/02/2005 A. Salzburger, et al.
Extrapolation I : the new scheme (from 9.1.0 to 9.4.0) Surfaces TrackParameters TrackParameters ATHENA ALGTOOL IExtrapolator ATHENA ALGTOOL INavigator ATHENA ALGTOOL StraightLinePropagator HelixPropagator RungeKuttaPropagator STEP_Propagator IPropagator ATHENA ALGTOOL IMaterial Effects Updator IGeometry Builder TrackingGeometry ATHENA ALGTOOL 13 May 2005 UK ID Software Training 10 ATLAS Software Workshop, 24/02/2005 A. Salzburger, et al.
Extrapolation II : first tests InnerDetector/InDetExample/InDetExtrapolationExample/LayerMappingNtuple Blind extrapolation through the SiliconDetector, recording points for a material update DC2 Layout TrackingGeometry Is automatically adopted to GeoModel Rome-Initial Layout Problems with Endcaps! Understood, but not solved now! 13 May 2005 UK ID Software Training 11 ATLAS Software Workshop, 24/02/2005 A. Salzburger, et al.
Track Extrapolation / Propagator / Visualizaion 13 May 2005 UK ID Software Training 12 A. Salzburger ATLAS Software Workshop, 23/09/2004
Combined Tracking MS Validation on Tracking Classes First validations have been started for the TrkSurface implementation in the Muon System. A SurfaceSystem has been added to HitDisplay to visualize and cross check against GeoModel description. Correct Surface description of MS will allow to use TrkParameters and therefor use the common tracking tools! Refitting! -> MaterialAccessService First Snapshot (22.09.2004)! Probably different local frame definition Geant4 (depth, locx, locy) TrkSurfaces (locx, locy, depth) This is under investigation! 13 May 2005 UK ID Software Training 13 A. Salzburger ATLAS Software Workshop, 23/09/2004
RIO_OnTrackCreation (PrepRawData > RIO_OnTrack) IRIO_OnTrackCreator Base The IRIO_OnTrackCreator base class provides the interface for the RIO_OnTrackCreation of the tracking detectors. Within the migration of PrepRawData to the Detector subpackages there s no dependency left on ID/Muon. Childs (ID family): SiClusterOnTrackCreationTool - PixelCluster: copies information from PrepRawData to RIO_OnTrack - SCT_Cluster: corrects error dependent on η value in the SCT endcaps, rotates the error frame from stereo frame to module frame TRTDriftCirlceOnTrackCreationTool - resolves the sign of the drift radius (left/right solution), - adds z-coordinate from predicted position - calibration, sagging (at this level / already at PrepRawData level for pattern rec.)? Childs (MS family): MuonClusterOnTrackTool MuonDriftCircleOnTrackTool TWiki page: TrkRIO_OnTrackCreator 13 May 2005 UK ID Software Training 14 A. Salzburger ATLAS Software Workshop, 23/09/2004
ParticleCreatorTool & TrackSummary ParticleCreatorTool Trk::Track TrackParticle Saves (if necessary fills) information of Trk::Track, to be taken as an Interface between Reconstruction and PhysicsAnalysis for Tracking: Perigee TrackSummary If the information is at first stage not accessible through the given track, it calls the appropriate AlgTools to obtain this information: TrkExtrapolator extrapolate(trk::track, Trk:PerigeeSurface) TrkSummaryTool Fills HitInformation into a class called Trk::TrackSummary 13 May 2005 UK ID Software Training 15 A. Salzburger ATLAS Software Workshop, 23/09/2004
Inner Detector RTF Prototype I : motivation and description (Igor, modified) RTF restructuring timeline Birth of Trk::Track in 7.5.0 Trk::Track is common track class in 10.0.0 xkalman ipatrec New reconstruction Non-developers view of time 13.01. 2003 28.02. 2005 = TODAY(+/- 4d) (we see the light at the end of the tunnel!) Existing reconstruction is the set of black New reconstruction: boxes where input and output is set Reconstruction tools should standard classes like clusters, space points, share common interfaces, use tracks. User can only choose one of them for standard EDM, DD and as much his job. as possible standard classes and tools This will give us the chance to actually compare different strategies, implementations for performance, time and memory consumption etc.!!! 13 May 2005 UK ID Software Training 16 ATLAS Software Workshop, 24/02/2005 A. Salzburger, et al.
Inner Detector RTF Prototype II : existing and non-existing (Igor) InnerDetector/ InDetRecEvent/SiSacePointsSeed/ contains interface class InDet::SiSpacePointsSeed InDetRecTools/InDetRecToolInterfaces/ contains base abstract class InDet::ISiSpacePointsSeedMaker base abstract class InDet::ISiZvertexMaker InDetRecTools/SiSpacePointsSeedTool_xk/ contains class InDet::SiSpacePointsSeedMaker_ATLxk class InDet::SiSpacePointsSeedMaker_CTBxk InDetRecTools/SiZvertexTool_xk/ contains class InDet::SiZvertex_xk Simple channel SiSPSeededTrackFinder InDetAmbiguitySolver TrackExtensionToTRT TrackReFitter VerticesFinder missing: RoadMaker (coll. of DetEl.) The idea is not to re-write xkalman in the new scheme, but to try to achieve the same functionality and performance within the new structure (same strategies and implementation might be use though if feasable). This is open for both, HLT and offline contributers, eventual necessary interface changes will be adopted in an iterative way. 13 May 2005 UK ID Software Training 17 ATLAS Software Workshop, 24/02/2005 LocalReconstruction A. Salzburger, et al.
How do I use a tool? Tools must be retrieved from the ToolSvc. To do this, you pass the type of the tool, and the pointer to fill. For example (normally in the initialize() method of an Algorithm, or even another AlgTool): Type QuickTime and a TIFF (LZW) decompressor are needed to see this picture. TIFF (LZW) decompressor are needed to see this picture. Pointer 13 May 2005 UK ID Software Training 18
Why is this useful? Pointer: Correctly written AlgTools should provide an interface (which is what you should retrieve) I.e. IMyAlgTool The point of this is that any concrete implementation of an AlgTool can be used, for instance just by changing joboptions. For example, suppose we have: TIFF (LZW) decompressor are needed to see this picture. We now have the luxury of retrieving any of the various extrapolators using the following code: sc = toolsvc()->retrievetool(m_type, m_extrapolator); Where m_type can be set at run-time, via joboptions This provides independence from concrete implementation (they fail to compile, you aren t affected) This allows easy comparison of different tools Retrieve one fitter, and compare performance with another, all without recompiling simply by changing text file. Allows us to have common tracking tool, which retrieves InDet and Muon specific tools, without compile-time dependencies on either. 13 May 2005 UK ID Software Training 19
How do I know the type/pointer? So how do you do this in your own code? Correctly written AlgTools should provide an interface (which is the pointer you should retrieve) I.e. ITrackSummaryHelperTool * IAlgTool Interface ITrackSummaryHelperTool AlgTool InDetTrackSummaryHelperTool Concrete implementation (usually one of many) 13 May 2005 UK ID Software Training 20
How do I know the type/pointer? So how do you do this in your own code? The type is the type of the concrete class you re interested in so in this case. IAlgTool Interface ITrackSummaryHelperTool AlgTool InDetTrackSummaryHelperTool MuonTrackSummaryHelperTool Concrete implementations Note that the namespace is part of the type! 13 May 2005 UK ID Software Training 21
Configuring Tool through jobopts Simple example - set TrkTrackSummaryTool to be VERBOSE TrackSummaryTool=Algorithm( "ToolSvc.Trk::TrkTrackSummaryTool" ) TrackSummaryTool.OutputLevel=VERBOSE; For more info: https://uimon.cern.ch/twiki/bin/view/atlas/howtosetalgtooloutputlev el To see what properties are available to be configured this way (for an AlgTool OR an Algorithm) look in the constructor of the class, for lines like: declareproperty("doholesontrack",m_doholes); TrackSummaryTool=Algorithm( "ToolSvc.Trk::TrkTrackSummaryTool" ) TrackSummaryTool.doHolesOnTrack =True; 13 May 2005 UK ID Software Training 22
Identifiers etc. One other key part of technology that you will need to understand, is the concept of Identifiers and ID helpers. Used extensively throughout ID EDM Hopefully most of you have at least heard of the before, but Identifiers are supposed to uniquely identify each (active) part of the ATLAS detector, so each pixel has a different Identifier for example. IdentifierHashs are unique only within a given sub-detector To work out what an Id corresponds to we use the InDetIdentifier package, and the specific technology-based helper tools (from doxygen) : PixelID This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating compact Identifier objects and IdentifierHash or hash ids. And it also allows decoding of these ids SCT_ID This is an Identifier helper class for the SCT subdetector. This class is a factory for creating compact Identifier objects and IdentifierHash or hash ids. And it also allows decoding of these ids SiliconID This is an Identifier helper class for both the Pixel and SCT subdetectors. This class defines identifier hashes which span BOTH the pixels and the scts TRT_ID This is an Identifier helper class for the TRT subdetector. This class is a factory for creating compact Identifier objects and IdentifierHash or hash ids. And it also allows decoding of these ids 13 May 2005 UK ID Software Training 23
An Example Will now use Doxygen to show you examples of how this all fits together. Will take as an example, the TrkTrackSummaryTool (responsible for making TrackSummary objects from a passed Track) http://atlas.web.cern.ch/atlas/groups/software/oo/dist/nightli es/rel/latest_doxygen/installarea/doc/trktracksummarytool/html /index.html Introduction to Doxygen Look at initialize() method Shows how to retrieve tools and ID helpers Look at createsummary(..) Shows how to use various Tools 13 May 2005 UK ID Software Training 24