Athena Tutorial: Liquid Argon Example ATHENA The ATLAS Control Framework Tutorial: Liquid Argon Example Based on original by S. Rajagopalan BNL.

Slides:



Advertisements
Similar presentations
Container Classes A container class is a data type that is capable of holding a collection of items. In C++, container classes can be implemented as.
Advertisements

More loops Horstmann Ch 7 continued.. The do-loop continue- condition ? loop-body statements next statement false true WHILE-LOOP continue- condition?
GLAST LAT Offline SoftwareWorkshop - SLAC, Jan , 2001 TDS objects and Converters. (Transient Data Store) Ian Gable Software Workshop Jan 2001.
29-Jun-15 Java Concurrency. Definitions Parallel processes—two or more Threads are running simultaneously, on different cores (processors), in the same.
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
C++ / G4MICE Course Session 3 Introduction to Classes Pointers and References Makefiles Standard Template Library.
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
CSE 332: C++ templates This Week C++ Templates –Another form of polymorphism (interface based) –Let you plug different types into reusable code Assigned.
CMSC 202 Lesson 23 Templates II. Warmup Write the templated Swap function _______________________________ void Swap( ________ a, ________ b ) { _______________.
Data Structures Using C++ 2E
A Computer Science Tapestry 1 Recursion (Tapestry 10.1, 10.3) l Recursion is an indispensable technique in a programming language ä Allows many complex.
Iteration. Adding CDs to Vic Stack In many of the programs you write, you would like to have a CD on the stack before the program runs. To do this, you.
Athena and HEC Test Beam Reconstruction Tutorial October 12, 2001 CERN N. Kanaya, M. Marino, S. Rajagopalan, M. Wielers.
Ian Ross Rose-Hulman Institute of Technology Mentor: Dr. Richard Teuscher University of Toronto ATLAS Group ATLAS Calorimeter: Cosmic Ray Commissioning.
Java Quiz Bowl A fun review of the Java you should know from CMPT 201 If you don’t know the answers - this week is for you to study up!
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.
1 Advanced Issues on Classes Part 3 Reference variables (Tapestry pp.581, Horton 176 – 178) Const-reference variables (Horton 176 – 178) object sharing:
M.Frank LHCb/CERN Using Shared Libraries ã The traditional way ã How to build shared images? ã Benefits ã Process configuration ã Fortran.
Looping and Counting Lecture 3 Hartmut Kaiser
Use of Gaudi in Reconstruction Weidong Li 23/06/2004.
Combined HEC/EMEC testbeam data can be read and analyzed within the ATLAS Athena framework A “cookbook” gives an introduction for how to access the data.
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.
Jose A. Hernando Trigger Gaudies Reconstruction Tools & Algorithms Inspectors MC & Data Algorithms Template preserved container Jose A. Hernando.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Stacks.
Lecture 3 Classes, Structs, Enums Passing by reference and value Arrays.
1 Moore Packages, Repackaging and Design Status Michela Biglietti Univ. of Naples INFN/Naples Gabriella Cataldi INFN/Lecce.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Argonne Jamboree January 2010 Esteban Fullana AOD example analysis.
Status of the LAr OO Reconstruction Srini Rajagopalan ATLAS Larg Week December 7, 1999.
GAUDI Muon Software  Algorithms : Muon Digitization MuonL0Trigger MuonIdentification  Detector Description Database  Transient Detector Store  Detector.
S. Rajagopalan, BNLATLAS software week, 2/15/00 LAr OO Reconstruction People: H. Ma, S. Rajagopalan, J. Schwindling –+ help/advise from several others.
Combined HEC/EMEC testbeam data can be read and analyzed within the ATLAS Athena framework A “cookbook” gives an introduction for how to access the data.
Tutorial: Examples (09may00 - ATLAS Software LBNL) May 2000 Prototype Framework Tutorial: Examples Paolo Calafiura, Charles Leggett HCG/NERSC/LBNL.
Session 7 Introduction to Inheritance. Accumulator Example a simple calculator app classes needed: –AdderApp - contains main –AddingFrame - GUI –CloseableFrame.
Gaudi Framework Tutorial, April Creating Objects and Writing Data.
Trigger LVL1/LVL2 Makers. CERN, december 2001 Gabriella Cataldi-INFN Lecce Trigger (Level 2) Makers: MooiPatTrackSegmentMaker MooiPatTrackMaker MooTrigClusters.
Advanced Athena Tutorial ADL/StoreGate ADL Exercises CERN, May/Mai 5, 2002.
25th Nov, 1999 LHCb Event Data Model Pavel Binko, LHCb / CERN 1 LHCb Software Week LHCb Event Data Model Pavel Binko LHCb / CERN.
Gaudi Framework Tutorial, Getting started with Gaudi and building tools.
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.
Gaudi Framework Tutorial, Algorithm Tools: what they are and how to use them.
Peter ClarkeATLAS software week / Berkley 9-13 May 2000ATLFAST status report Status of ATLFAST integration into Gaudi P.Clarke H.Phillips E. Richter-Was.
Athena StoreGate Tutorial: May 30, Objectives Learn how to access data objects using StoreGate How to record/retrieve by TYPE Optionally using keys.
ATLAS Physics Analysis Framework James R. Catmore Lancaster University.
Joe Foster 1 This talk extends the one I gave in 2006 called Visualizing Data with ROOT. –
Cuby tutorial Github :
CMSC 202 Computer Science II for Majors. CMSC 202UMBC Topics Templates Linked Lists.
Starting Analysis with Athena (Esteban Fullana Torregrosa) Rik Yoshida High Energy Physics Division Argonne National Laboratory.
Check of Calibration Hits in the Atlas simulation. Assignment of DM energy to CaloCluster. G.Pospelov Budker Institute of Nuclear Physics, Novosibirsk,
An AOD analysis example Esteban Fullana Torregrosa High Energy Physics Division Argonne National Laboratory.
AOD example analysis Argonne Jamboree January 2010
Test 2 Review Outline.
“Algorithm Tools” what they are, how to get them and how to use them
Writing Physics Tools Schedule: Timing Topic 20 minutes Lecture
Primitive Data, Variables, Loops (Maybe)
Tuesday, February 20, 2018 Announcements… For Today… 4+ For Next Time…
Stack Lesson xx   This module shows you the basic elements of a type of linked list called a stack.
Announcements Final Exam on August 17th Wednesday at 16:00.
Remembering lists of values lists
Announcements Final Exam on December 25th Monday at 16:00.
Raw Event Conversion Service in BOSS framework
Introduction to Athena
CMPE212 – Reminders Quiz 1 marking done. Assignment 2 due next Friday.
LVL2 Missing Et Trigger Status
Web Design & Development Lecture 6
SPL – PS3 C++ Classes.
Accessing Event Data Schedule: Timing Topic 20 minutes Lecture
Presentation transcript:

Athena Tutorial: Liquid Argon Example ATHENA The ATLAS Control Framework Tutorial: Liquid Argon Example Based on original by S. Rajagopalan BNL

Athena Tutorial: Liquid Argon Example Example 6: LAr Reconstruction A stripped down version of the LAr Reconstruction that works in PASO is available The goal is to modify the code to make it work in the new framework Files: –LArG3CellBuilder.cxx, LArG3CellBuilder.h –** LArG3Escale.cxx, LArG3Escale.h –LArCellContainer.cxx, LArCellContainer.h –LArCell.cxx, LArCell.h –LArPrint.cxx, LArPrint.h ** (You don’t have to touch this, but see last slide)

Athena Tutorial: Liquid Argon Example Example 6 The Paso Code PASOLArG3Cell Builder LArCell Container LArCellLArPrintEvent new execute() new AddCell() accept(collector) current_event() execute(LArCellContainer*) iterators energy() digit loop Event Loop

Athena Tutorial: Liquid Argon Example Example 6 The Gaudi Equivalent Components Gaudi Algorithms: LArG3CellBuilder LArPrint Gaudi Container: LArCellContainer : public ObjectVector Contained Object: LArCell : public ContainedObject Use the Transient Event Store to access and store Event data & LArCellContainer

Athena Tutorial: Liquid Argon Example Example 6 Access through TDS Transient Data Store Digit Event LArG3CellBuilder LArCellContainer Cell LArPrint

Athena Tutorial: Liquid Argon Example Example 6 LArG3CellBuilder Header File: Declare as Gaudi Algorithm string m_cell_container_name // private Property Cxx file: Include necessary header files In initialize(): declareProperty(“LArCellContainer”,m_cell_container_name) Register the container class in TDS Get pointer to event (Not from EventManager) SmartDataPtr m_event(eventSvc(), “/Event”); Check the event pointer! Push_back LArCell into LArCellContainer Use the Message Service

Athena Tutorial: Liquid Argon Example Example 6 Accessing the digits Once you have the pointer to the event in TDS, access to digit information is exactly the same as in PASO. Hence NO changes to this part of the code is required. Setup a vector of ranges: Range lar_em_range(lar_em);// lar_em is an Identifier ranges.push_back(lar_em_range); Setup a Visitor object: CollectDetectorVisitor collector(ranges); m_event -> accept(collector); det_vector::const_iterator FDet = collector.detectors_begin(); det_vector::const_iterator LDet = collector.detectors_end(); Loop over your regions/digits: for(; FDet != LDet; ++FDet) { digit_vector::const_iterator FDigit = (*FDet)->digits_begin(); digit_vector::const_iterator LDigit = (*LDet)->digits_end(); for (; FDigit != LDigit; ++FDigit) { float energy = (*FDigit) -> energy(); } }

Athena Tutorial: Liquid Argon Example Example 6 LArCellContainer Header File: Inherit from : public ObjectVector Remove unnecessary lines AddCell is not required No need to maintain a private list Can remove methods to get size/iterators But you can add your private methods Cxx File: Remove almost everything. Leave empty constructor/destructor. There is nothing to do - but you can put in some intelligence here if you want.

Athena Tutorial: Liquid Argon Example Example 6 LArCell Header File: Inherit from : public ContainedObject Remember to add the magic lines: static const CLID CLID_LArCell = ; static const CLID& classID() {return CLID_LArCell;} virtual const CLID& clID() const {return CLID_LArCell; } Cxx File No changes!

Athena Tutorial: Liquid Argon Example Example 6 LArPrint Header File: Declare as a Gaudi Algorithm Replace void execute(LArCellContainer*) withStatusCode execute(); string m_cell_container_name; // private Cxx File Get Pointer to Event (and check it!) Get Pointer to LArCellContainer SmartDataPtr container(m_event,m_cell_container_name); Get the begin/end iterator of the container LArCellContainer::iterator first=container->begin() Print the cell information out (already done)

Athena Tutorial: Liquid Argon Example Example 6 Link & Run From the build area: gmake install From the run area: Check your jobOptions.txt There is a ZEBRA.P pointing to a data file E = 50 GeV, single photons, eta = 0.3 There is of course a atlas.datback To Run: example Watch the total Energy, Eta, & Phi print!

Athena Tutorial: Liquid Argon Example Example 6 For the more challenged Make LArG3Escale a sub-algorithm of LArG3CellBuilder. LArG3Escale must inherit from Algorithm. Introduce an initialize() method in LArG3CellBuilder and create a sub-algorithm. You may set sub-algorithm properties here. Execute the sub-algorithm. Use the Gaudi ntuple service in LArPrint and write out ntuples of the basic cell quantities.

Athena Tutorial: Liquid Argon Example Header files to add LArG3CellBuilder & LArPrint.h: Gaudi/Algorithm/Algorithm.h LArCell.h: Gaudi/Kernel/ContainedObject.h LArCellContainer.h: LHCbEvent/TopLevel/ObjectVector.h LArG3CellBuilder.cxx & LArPrint.cxx ZebraTDRCnv/ZebraTDREvent.h Gaudi/MessageSvc/MsgStream.h Gaudi/Kernel/AlgFactory.h Gaudi/Interfaces/IService.h Gaudi/DataSvc/SmartDataPtr.h Gaudi/Interfaces/IDataProviderSvc.h LHCbEvent/TopLevel/ObjectVector.h Gaudi/JobOptionsSvc/PropertyMgr.h