Use of Gaudi in Reconstruction Weidong Li 23/06/2004.

Slides:



Advertisements
Similar presentations
K A Assamagan Analysis Tutorial – December 19, Tucson, 2004 Overview of ATLAS Software and the Athena Framework (extracted from an earlier talk by S. R.
Advertisements

Gaudi Framework Tutorial, April Accessing Event Data.
15 March, 2000LHCb Computing1 Software Review Panel LHCb Answers to Architecture, Data Model and Program Infrastructure Pere Mato for the LHCb Collaboration.
Peter van Gemmeren (ANL): ANL Analysis Jamboree The ATLAS Data Model.
26 April 2005Steve Armstrong1 High Level Trigger Software Tutorial Steve Armstrong Brookhaven National Laboratory 26 April 2005 ATLAS Trigger/DAQ Week.
LAr Athena Tutorial – November 2, 2004 Software Tutorial (Minimally modified transparencies from Offline Software Tutorial of Srini R., Hong M., David.
Gaudi Framework Tutorial, April Introduction.
M.Frank LHCb/CERN - In behalf of the LHCb GAUDI team Data Persistency Solution for LHCb ã Motivation ã Data access ã Generic model ã Experience & Conclusions.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
Browsing Data with GaudiPython Disclaimers: 1.I am an apprentice! 2.The porpoise: we think GaudiPython could be quite useful for a LHCb physicist… Browsing.
1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.
Overview of LHCb applications and software environment LHCb software tutorial - March
Athena and HEC Test Beam Reconstruction Tutorial October 12, 2001 CERN N. Kanaya, M. Marino, S. Rajagopalan, M. Wielers.
As of 28 Juni 2005Getting Starged with GEM - Shuei Yamada 1 Getting Started with GEM Shuei YAMADA ICEPP, University of Tokyo What is GEM? Before you start.
CERN Tutorial, September Job Options and Printing.
Job Options and Printing 1 LHCb software tutorial - September 2011.
The report on the current situation of the BESIII framework zhangxiaomei maqiumei 10/3/2004.
Event Data History David Adams BNL Atlas Software Week December 2001.
GLAST Gaudi Code Review, 10 Sept. 2002, H. Kelly, 2-1 GLAST Event Data Model and Persistency.
Introduction to the HARP Software reconstructed drift chamber triplets (MC data)
Introduction to Gaudi LHCb software tutorial - September
How to run simulation job in BOSS Deng ziyan
M.Frank LHCb/CERN Using Shared Libraries ã The traditional way ã How to build shared images? ã Benefits ã Process configuration ã Fortran.
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
CMT Christian Arnault – CMT tutorial – dec CMT Tutorial How to use CMT in Atlas Christian Arnault
Gaudi Framework Tutorial, April Algorithm Tools: what they are, how to write them, how to use them.
Gaudi Framework Tutorial, April Job Options and Printing.
9-13/9/03 Atlas Overview WeekPeter Sherwood 1 Atlfast, Artemis and Atlantis What, Where and How.
M.Frank LHCb/CERN Random Numbers in GAUDI ã Requirements ã Interface ã Usage.
1 Moore Packages, Repackaging and Design Status Michela Biglietti Univ. of Naples INFN/Naples Gabriella Cataldi INFN/Lecce.
Argonne Jamboree January 2010 Esteban Fullana AOD example analysis.
Weidong Li January 7, 2004 BES III Software Meeting Status Report: BESF software development environment Weidong Li.
Bologna Tutorial, April Job Options and Printing.
10/2/2000LHCb Computing, CHEP Use of Configuration Management tool in LHCb software J. Harvey, P. Mato, F. Ranjard CERN (Switzerland)
Tutorial: Examples (09may00 - ATLAS Software LBNL) May 2000 Prototype Framework Tutorial: Examples Paolo Calafiura, Charles Leggett HCG/NERSC/LBNL.
Analysis Tools Tutorial: Demonstration/Example/Exercise Ketevi A. Assamagan CERN, September 20 th, 2004.
CERN Tutorial, February Introduction to Gaudi.
Gaudi Framework Tutorial, April Creating Objects and Writing Data.
1 April 2, 2004, Athena tutorial, FZU, PragueZdeňka Broklová SCT Simulation for CTB Status and HowTos Zdenka Broklova, Carlos Escobar, Peter Kodys.
BESIII Offline Software Development Environment Ma qiumei * Development environment * Configuration & management tool * Software development.
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
CERN Tutorial, September Overview of LHCb applications and software environment.
Introduction to the Athena Software Hong Ma BNL Athena Tutorial USATLAS Software Workshop.
Athena Tutorial: Liquid Argon Example ATHENA The ATLAS Control Framework Tutorial: Liquid Argon Example Based on original by S. Rajagopalan BNL.
27/02/04 ATLAS weekTileCal Athena tutorial, part 21 TileCal Athena tutorial Part 2: Reading GEANT hits from ZEBRA and POOL Reading HLT and testbeam ByteStream.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Prototype GEANT4 Service for ATHENA framework ATLAS Software Workshop Dec 3.
Gaudi Framework Tutorial, Algorithm Tools: what they are and how to use them.
Bologna Tutorial, June Overview of LHCb applications and software environment.
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
Athena StoreGate Tutorial: May 30, Objectives Learn how to access data objects using StoreGate How to record/retrieve by TYPE Optionally using keys.
Starting Analysis with Athena (Esteban Fullana Torregrosa) Rik Yoshida High Energy Physics Division Argonne National Laboratory.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Transient Conditions/Detector Store using StoreGate ATLAS Software Workshop.
An AOD analysis example Esteban Fullana Torregrosa High Energy Physics Division Argonne National Laboratory.
AOD example analysis Argonne Jamboree January 2010
“Algorithm Tools” what they are, how to get them and how to use them
Configuration and Build System
GLAST Gaudi Review T. Burnett H.Kelly 10 Sept 02 Gaudi code review
Writing Physics Tools Schedule: Timing Topic 20 minutes Lecture
LHCb Software Tutorial
Introduction to Gaudi LHCb software tutorial - December 2010.
Marco Cattaneo, CERN February 2000
SW Architecture SG meeting 22 July 1999 P. Mato, CERN
Tag based analysis Ziyan DENG.
Data Persistency Solution for LHCb
Raw Event Conversion Service in BOSS framework
Introduction to Athena
Converting ATLAS Events Into XML Files Janice Drohan (UCL)
2 Getting Started.
Introduction to Gaudi Schedule: Timing Topic 20 minutes Lecture
Accessing Event Data Schedule: Timing Topic 20 minutes Lecture
Presentation transcript:

Use of Gaudi in Reconstruction Weidong Li 23/06/2004

Video Lectures  Video Lectures in my machine: IP address:  Gaudi Tutorials GaudiAthena AthenaRec  C++ Tutorial C++ training  Software Engineering Software training

Reconstruction Dataflow MDC Tracking Calorimeter Clustering Electron/photon Identification Transient Event Data Store MDC digits Tracks Calorimeter Digits Tracks, Showers Calorimeter showers Electron/photon Electrons/photons Real dataflow Apparent dataflow Tracks Showers MDC digits

Algorithm  Users write concrete Algorithms derived from base class Algorithm  Implements - at least - three methods in addition to the constructor and destructor initialize(), execute(), finalize()  execute is called once per physics event Concrete Algorithm EventDataSvc IDataProviderSvc IHistogramSvc IMessageSvc IAlgorithm IProperty Obj_B DetectorDataSvc HistogramSvc MessageSvc ApplicationMgr ISvcLocator Obj_A ParticlePropertySv c IParticlePropertySvc

Algorithm’s Properties  Algorithm’s properties can be declared in the constructor: MdcHough::MdcHough(const std::string& name, ISvcLocator* pSvcLocator) : Algorithm(name, pSvcLocator) { // Declare the properties declareProperty("FittingMethod", m_fittingMethod = 2); declareProperty("ConfigFile", m_configFile = "MDCConfig.xml"); }  Algorithm’s properties are configured through jobOption file: MdcHough. FittingMethod = 3; MdcHough. ConfigFile = "MDCConfig.xml";

Accessing Services  Within the Algorithm services are readily accessible.  The most common are: msgSvc( ) [or messageService( )] eventSvc( )[or eventDataService( )] histoSvc( )[or histogramDataService( )] ntupleSvc( )[or ntupleService( )] detSvc( )[or detDataService( )] service (…)generalized access to Services serviceLocator( )  Other registered services are accessible once their header file is included in the Algorithm

Retrieving Event Data (1) StatusCode MdcHough::execute() { // Part 1: Get the event header, print out event and run number SmartDataPtr eventHeader(eventSvc(),"/Event"); if (!eventHeader) { log << MSG::FATAL << "Could not find Event Header" << endreq; return( StatusCode::FAILURE); } //Part 2: Print out MDC digi SmartDataPtr mdcDigiCol(eventSvc(),"/Event/Digi/MdcDigiCol"); OR DataObject * mdcDigiCol; StatusCode sc = eventSvc()->retrieveObject("/Event/Digi/MdcDigiCol“, mdcDigiCol);

Retrieving Event Data (2) if (!mdcDigiCol) { log << MSG::FATAL << "Could not find event" << endreq; return( StatusCode::FAILURE); } MdcDigiCol::iterator iter = mdcDigiCol->begin(); for (;iter != mdcDigiCol->end(); iter++, digiId++) { } return StatusCode::SUCCESS; }

Algorithm (1) Retrieve object Unsuccessful if requested object is not present (3) Request load Persistency Service Converter (4) Request creation Conversion Service Request dispatcher Objy, ROOT,.. Data Store Data Service (2) Search in Store (5) Register Loading from Data Store

Storing Data Object MdcDigiCol * mdcDigiCol = new MdcDigiCol(); StatusCode sc = eventSvc()-> registerObject("/Event/Digi/MdcDigiCol“, mdcDigiCol);

Service class IMdcGeomSvc : virtual public IInterface { public: virtual const MdcGeoWire * const Wire(unsigned id) = 0; virtual const MdcGeoLayer * const Layer(unsigned id) = 0; virtual const MdcGeoSuper * const SuperLayer(unsigned id) = 0; virtual void Dump() = 0; }; class IMdcGeomSvc : virtual public IInterface { public: virtual const MdcGeoWire * const Wire(unsigned id) = 0; virtual const MdcGeoLayer * const Layer(unsigned id) = 0; virtual const MdcGeoSuper * const SuperLayer(unsigned id) = 0; virtual void Dump() = 0; }; #include “MDCGeomSvc/IMdcGeomSvc.h” ClientAlgotihm::myMethod() { IMdcGeomSvc* mdcGeomSvc; service(“MdcGeomSvc”, mdcGeomSvc ); mdcGeomSvc -> Dump(); } #include “MDCGeomSvc/IMdcGeomSvc.h” ClientAlgotihm::myMethod() { IMdcGeomSvc* mdcGeomSvc; service(“MdcGeomSvc”, mdcGeomSvc ); mdcGeomSvc -> Dump(); } IMdcGeomSvc.h ClientAlgoritm.cpp

Patterns for libraries Patterns for libraries  Helper packages These packages create a shared library that is designed to be linked against. library XxxCode apply_pattern installed_library Or apply_pattern installed_library =*.cxx  Algorithm and Service packages a) component_library - for simple component libraries b) dual_use_library - for Algorithms or Services that are capable of being inherited from.  A package that uses the dual_use_library pattern creates two separate shared libraries libXxxAlgs.so which contains the component factories and needs to be setup at run-time in the job options file, and libXxxAlgsLib.so which is a linkable shared library containing the component code which allows inheritance.

Component Library #include “GaudiKernel/DeclareFactoryEntries.h” DECLARE_FACTORY_ENTRIES ( ) { DECLARE_ALGORITH( MyAlgorithm ) DECLARE_SERVICE( MyService ) } #include “GaudiKernel/DeclareFactoryEntries.h” DECLARE_FACTORY_ENTRIES ( ) { DECLARE_ALGORITH( MyAlgorithm ) DECLARE_SERVICE( MyService ) } #include “GaudiKernel/LoadFactoryEntries.h” LOAD_FACTORY_ENTRIES ( ) #include “GaudiKernel/LoadFactoryEntries.h” LOAD_FACTORY_ENTRIES ( ) _load.cxx Your components need to be added here Substitute with your package name _entries.cxx

Setup Environment  Set CVSROOT setenv CVSROOT /bes/bes  Setup CMT source /bes/tool/CMT/v1r14p /mgr/setup.csh  Set CVSIGNORE setenv CVSIGNORE 'setup.* cleanup.* *.make Makefile Linux* *~' # set the SITEROOT set SITEROOT "/bes/sw/boss" # set the offset in cvs repository set CMTCVSOFFSET "BossCvs" # Setup the CMT search path for work area, distribution area and Gaudi area macro WorkArea "${HOME}/work" macro home_dir "${HOME}" path_remove CMTPATH "${home_dir}" path_prepend CMTPATH "$(WorkArea)" /home/liwd/setupCVS.csh/home/liwd/setupCMT.csh/home/liwd/BossEnv/requirements

Job Options // Event Persistency Service and Conversion Service ApplicationMgr.DLLs += {"AsciiFileCnv"}; ApplicationMgr.ExtSvc += { "EvtPersistencySvc/EventPersistencySvc" }; ApplicationMgr.ExtSvc += { "AsciiFileCnvSvc","AsciiFileEventSelector/EventSelector"}; EventPersistencySvc.CnvServices = { "AsciiFileCnvSvc" }; // Reconstruction Algorithm and Geometry Service ApplicationMgr.DLLs += {"MdcDummyAlg", "MdcGeomSvc"}; ApplicationMgr.TopAlg = { "MdcDummy" }; ApplicationMgr.ExtSvc += { "MdcGeomSvc" }; MessageSvc.OutputLevel = 2; ApplicationMgr.EvtMax = 2; /home/liwd/work/TestRelease/TestRelease /run/jobOptions_MDCHough.txt/home/liwd/work/TestRelease/TestRelease /run/Ascii.txt

Running Job (1)  Get TestRelease cmt co TestRelease  Modify TestRelease requirements file to list the packages being checked out emacs TestRelease/ /cmt/requirements & And add this line to the requirements file use MdcDummyAlg MdcDummyAlg-* Reconstruction /home/liwd/work/TestRelease/TestRelease /requirements

Running Job (2)  Building MdcDummyAlg cd TestRelease/ /cmt source setup.sh cmt broadcast cmt config cmt broadcast gmake  From /run directory boss.exe jobOptions_MdcDummy.txt

谢谢大家!