# Presentation: 541294

## Status of LAr OO Reconstruction S. Rajagopalan(H. Ma, S. Qian, J. Schwindling) ATLAS Software WeekMay 12, 2000

- S. Rajagopalan,  Software Week,  12 May 2000

## The PASO Effort

- NEW OO design and implementation
- Three major “packages”:
**Cell Reconstruction**
**Cluster Reconstruction**
**Analysis**
- Emphasis on separation between “algorithm” and “data” objects.
- Framework like qualities to manage the creation and management of algorithm & data objects (since no such services are available in paso)
- Tested for Barrel/Endcap calorimeters only
**generic design & should be extensible to other calorimeters.**
- Performance Studies
- Not all use-cases implemented.

- S. Rajagopalan,  Software Week,  12 May 2000

## PASO Effort (2)

- Cell Reconstruction:
**Use of ‘RD Event Model’ to read in Geant3 calorimeter digits**
**Creation of calibrated Cell Objects from digits **
**Sampling weights**
- Cluster Reconstruction:
**Implemented the Sliding Window Algorithm as in ATRECON****	**
**Other Algorithms being implemented**
**Energy & Position Corrections:**
- Out of cone, Eta/Phi modulations, Crack corrections, S-Shape

- S. Rajagopalan,  Software Week,  12 May 2000

## PASO Effort (3)

- Analysis Program
**Wrapped Fortran code to generate standard PAW ntuples**
**Use of HTL to print/dump histograms and write into Objectivity**
- Code available now in CVS repository:
**offline/LArCalorimeter/LArRec/LArPaso**
**NOT tagged**
- Testing
**Data Sample: single particles (fixed E, ********),   H --> ******
**Extensive comparison with ATRECON **
**Results look very good**

- S. Rajagopalan,  Software Week,  12 May 2000

## Comparisons (1)

- S. Rajagopalan,  Software Week,  12 May 2000

## Comparison (2)

- S. Rajagopalan,  Software Week,  12 May 2000

## Timing Studies

- Preliminary timing studies on HP using single photons (from Jerome):

- S. Rajagopalan,  Software Week,  12 May 2000

## The new Framework

- We have successfully integrated with the new “Gaudi” framework.
**Four days at Berkeley (April 4 - 7) **( H. Ma,  SR,  T. Wenaus)
- We reported on our experience at the last Architecture workshop **(4/17)**
- The goal was to take a working PASO code and make it functional under the new framework.  No attempt to optimize the design to match our requirements.
- The LAr component was a part of the tutorial. Hopefully helpful!    The tutorial will be documented and released to allow others to go through the exercise as well.

- S. Rajagopalan,  Software Week,  12 May 2000

## Wrapping your code in ‘Gaudi’

- PASO

- LArReconstructor
- (singleton)

- S. Rajagopalan,  Software Week,  12 May 2000

## LArRec. in “Gaudi”

- S. Rajagopalan,  Software Week,  12 May 2000

## Cell Reconstruction in “Gaudi”

**CellMaker :** A “Gaudi” algorithm that packages together a desired set of CellBuilders and CellCorrections.
- Declare CellBuilders/Corrections as Properties (jobOptions.txt).
- Instantiate them as sub-algorithms in CellMaker and execute.
- CellBuilder **‘finds’** the event in the transient store to access calorimeter digits.
- Generate an ObjectVector (container class) and register in the transient event store.
- CellBuilder generates LArCell objects : declared as ContainedObjects.
- CellCorrections modify the created objects in transient store.
- Extensive use of Property and Message Service Features.

- S. Rajagopalan,  Software Week,  12 May 2000

## Clustering/Ntuples in “Gaudi”

- Adopt the same strategy for the Clustering
**ClusterBuilder and ClusterCorrections declared as sub-algorithms**
- ClusterBuilder ‘finds’ the CellContainer from the transient store
- Perform clustering and create LArCluster Objects (contained objects)
- Register clusters in the transient store
- Histogramming Service:
**Successfully incorporated the Gaudi ntuple service and got rid of the wrapped fortran ntuples**
**Retrieval of quantities to ntuple from the transient store**
- We successfully tested the entire chain by the end of Day 3 at LBL : from reading Geant3 TDR data to generating standard paw-ntuples.

- S. Rajagopalan,  Software Week,  12 May 2000

## Comments

- The integration effort went very smoothly
**Defining data and algorithm objects in PASO helped**
**Excellent help from  Charles, Craig, David, Paolo**
- The framework like components we had in PASO diasappeared or were replaced.
- How much did we have to change:
**Algorithms/Sub-Algorithms/DataObjects ~ 10 lines**
**Private Algorithms : no changes**
**Ntuples:  Completely modified to use Gaudi Services**
- Added features that were not otherwise available : run time specification
- Several comments on the integration effort which we discussed these during the Architecture Workshop

- S. Rajagopalan,  Software Week,  12 May 2000

## Containers

- Collections in PASO maintained by “manager” classes with some limited intelligence:
**Given an identifier, return pointer to the corresponding cell object**
- Use of ObjectList and ObjectVector in Gaudi.
**No desired intelligence.   Get around this by:**
- Need an ObjectMap

-   ObjectVector

- LArContainer

*intelligence*

- S. Rajagopalan,  Software Week,  12 May 2000

## Dependency on “strings”

**jobOptions.txt:**
- ApplicationMgr.TopAlg(“Cell/c1”, “Cell/c2”, “Cluster/Z”)
- c1.container = “bob”
- c2.container = “bill”
- z.needcontainer = “bob”
**Class Cell:**
*initialize():*  	declareProperty(“container”, _string)
*execute():*	registerObject(ptr, _string)
**Class Cluster:**
*initialize():*	declareProperty(“needcontainer”, _string)
*execute():* 	retrieveObject(_string, ptr)

- S. Rajagopalan,  Software Week,  12 May 2000

## Access to Transient Store

- Heavy dependency on strings
- Chances of making mistakes (typogarphical?) are high.
- jobOptions file becomes too long and unmanageable
- Access by types + some use of selection methods highly desirable.
**Store LArCellContainer by its type and “keys” that you can select on.**
**Clustering algorithm finds objects of type LArCellContainer ****	****and specifying a selection criteria.**
**Should be able to browse the store for all instances of LArCellContainer**
- Modifications to transient event store. Should this be allowed?

- S. Rajagopalan,  Software Week,  12 May 2000

## Communication between algorithms?

- What is in the transient store?
**Persistable Objects**
**Objects required for commnication between packages**
- We allow some localized communication between algorithms that are not “Gaudi algorithms” (do not inherit from Algorithm).  We however restrict this communication to algorithms within a package.
- But :
- Gaudi requires you to be an “algorithm” or a “sub-algorithm” to communicate to the transient event store.
- The use of “Property” and “Message” services is also currently limited to these algorithms and sub-algorithms.

- S. Rajagopalan,  Software Week,  12 May 2000

## Few other details

- Need a SetProperty that accepts non-atomic types...
**sub_algorithm->setProperty(Identifier)**
- Using SmartPointers : Remember to dereference them!
**SmartDataPtr<Event>   m_event(eventDataService(),”/Event”);**
**if (m_event)**
- SmartDataPtr<LArContainer>   cell(m_event,m_string);
- Compatibility with PASO or running in some simplified mode?
**Should not be excessive overhead to do something simple.**

- S. Rajagopalan,  Software Week,  12 May 2000

## Conclusion

- Integration with Gaudi went very smoothly : 3 composite algorithms
- Complete testing (including timing/memory issues)
- Need to work with other efforts:
**FCAL and HEC**
**Tile Calorimeter**
**Test Beam**
- Incorporating other features in ATRECON:
**Pile up, noise**
**Optimization of algorithms**
- Documentation : See LAr Software Page --> Reconstruction
- Need more feedback:  Other Users?   Reviews?**  **

- S. Rajagopalan,  Software Week,  12 May 2000