Status of the Analysis Framework Andreas Morsch ALICE

  • Slides: 22
Download presentation
Status of the Analysis Framework Andreas Morsch ALICE Offline Week 10/10/2007

Status of the Analysis Framework Andreas Morsch ALICE Offline Week 10/10/2007

Why Organized Analysis ? • Most efficient way for many analysis tasks to read

Why Organized Analysis ? • Most efficient way for many analysis tasks to read and process the full data set. – In particular if resources are sparse. – Optimise CPU/IO ratio • But also – Helps to develop a common well tested framework for analysis. – Develops common knowledge base and terminology. – Helps documenting the analysis procedure and makes results reproducible.

Acceptance and Efficiency Correction Services Monte Carlo Truth ESD/AOD TASK 1 TASK 2 TASK

Acceptance and Efficiency Correction Services Monte Carlo Truth ESD/AOD TASK 1 TASK 2 TASK … TASK N AOD

Design Goals • Flexible task and data container structure • User code independent of

Design Goals • Flexible task and data container structure • User code independent of computing schema (interactive: local, PROOF or batch: GRID) • Input data: ESD, AOD, MC Truth – Access using common interface • Output data: – AOD – But also user histograms, containers for efficiency calculations – Transparent handling of memory resident and file resident data in distributed environment

Implementation • Analysis train/taxi similar to PHENIX • Based on the existing Ali. Analysis.

Implementation • Analysis train/taxi similar to PHENIX • Based on the existing Ali. Analysis. Manager/Task framework (A. and M. Gheata) • Ali. VEvent. Handler interface for transparent optional additional event loop managements • Ali. VEvent, Ali. VParticle, … for transparent data access

Ali. Analysis… Framework • Data-oriented model composed of independent tasks – Task execution triggered

Ali. Analysis… Framework • Data-oriented model composed of independent tasks – Task execution triggered by data readiness • Parallel execution and event loop done via TSelector functionality CONT 0 CONT 1 INPUT 0 INPUT 1 Ali. Analysis. Task – Mandatory for usage with PROOF OUTPUT 0 • Analysis execution performed on event-by-event basis. – Optional post event loop execution. CONT 2 A. Gheata

Ali. Analysis + Optional Data Services Ali. Virtual. Event. Handler Ali. Analysis. Manager Ali.

Ali. Analysis + Optional Data Services Ali. Virtual. Event. Handler Ali. Analysis. Manager Ali. Virtual. Event. Handler TChain Ali. MCEvent. Handler Ali. Analysis. Task Ali. AODHandler Ali. VEvent Ali. ESDEvent (Ali. AODEvent) Comment: One could symmetrise the design by “hiding” the TChain mechanism Ali. ESDtrack inside an input handler. Ali. MCEvent Ali. AODEvent Ali. VParticle Ali. MCParticle Ali. AODtrack

Common ESD Access Handling void Ali. Analysis. Task. XYZ: : Connect. Input. Data(Option_t* option)

Common ESD Access Handling void Ali. Analysis. Task. XYZ: : Connect. Input. Data(Option_t* option) { // Connect the input data f. Chain = (TChain*) Get. Input. Data(0); f. ESD = new Ali. ESDEvent(); f. ESD->Read. From. Tree(f. Chain); . . . } void Ali. Analysis. Task. XYZ: : Exec(Option_t* option) { // For data produced without Ali. ESDEvent Ali. ESD* old = f. ESD->Get. Ali. ESDOld(); if (old) f. ESD->Copy. From. Old. ESD(); } Attention: - PDC 06 Data (v 4 -04) needs specially patched ESD. par or lib. ESD. so - FMD branch has to be switched off

What about AOD or Kinematics Analysis ? • Same schema works for AOD analysis

What about AOD or Kinematics Analysis ? • Same schema works for AOD analysis – TChain contains AOD files – User connects Ali. AODEvent to chain • … and even for Kinematics – Add galice. root files to TChain – This “triggers” correct loop over files – Obtain Ali. MCEvent from the manager as usual. (Ch. Klein-Bösing)

Common AOD Access Handling Ali. Analysis. Manager Ali. Virtual. Event. Handler Ali. AODEvent Ali.

Common AOD Access Handling Ali. Analysis. Manager Ali. Virtual. Event. Handler Ali. AODEvent Ali. AODHandler* aod. Handler = new Ali. AODHandler(); aod. Handler->Set. Output. File. Name("aod. root"); Ali. Analysis. Manager *mgr = new Ali. Analysis. Manager(‘Analysis Train’, ‘Test’); mgr->Set. Event. Handler(aod. Handler); Ali. Analysis. Data. Container *coutput 1 = mgr->Create. Container(‘AODTree’, TTree: : Class(), Ali. Analysis. Manager: : k. Output. Container, "default");

User Analysis Code: Output Data void Ali. Analysis. Task. XYZ: : Create. Output. Objects()

User Analysis Code: Output Data void Ali. Analysis. Task. XYZ: : Create. Output. Objects() { // Create the output container // // Default AOD Ali. AODHandler* handler = (Ali. AODHandler*) ((Ali. Analysis. Manager: : Get. Analysis. Manager())>Get. Event. Handler()); f. AOD = handler->Get. AOD(); f. Tree. A = handler->Get. Tree(); f. Jet. Finder->Connect. AOD(f. AOD); }

Common Kinematics Input • Before via class Ali. Analysis. Task. RL – Many dependences

Common Kinematics Input • Before via class Ali. Analysis. Task. RL – Many dependences outside analysis – Requires implementation of specific MC analysis tasks. • Now – Transparent usage of MC information via Ali. MCEvent combining • Kinematics Tree • Tree. E (Event Headers) • Track References

Ali. Analysis. Manager Ali. Virtual. Event. Handler Ali. VEvent Ali. MCEvent. Handler* mc. Handler

Ali. Analysis. Manager Ali. Virtual. Event. Handler Ali. VEvent Ali. MCEvent. Handler* mc. Handler = new Ali. MCEvent. Handler(); Ali. Analysis. Manager *mgr = new Ali. Analysis. Manager(‘Analysis Train’, ‘Test’); mgr->Set. MCtruth. Event. Handler(mc. Handler);

User Analysis Code: MC truth void Ali. Analysis. Task. XYZ: : Exec(Option_t* option )

User Analysis Code: MC truth void Ali. Analysis. Task. XYZ: : Exec(Option_t* option ) { // During Analysis Ali. MCEvent* mc = mgr->Get. MCEvent. Handler()->MCEvent(); Int_t ntrack = mc->Get. Number. Of. Tracks(); for (Int_t i = 0; i < ntrack; i++) { Ali. VParticle* particle = mc->Get. Track(i); Double_t pt = particle->Pt(); } }

Some words on Track. References • TParticle written in Tree. K carries only limited

Some words on Track. References • TParticle written in Tree. K carries only limited information about the transport MC truth. – Only properties at production point – Some MC truth is not stored • On the other hand Ali. Hit contains MC truth but also depends on detector acceptance and response – Some MC truth is lost • Solution Ali. Track. Reference in tree Tree. TR – Particle information at user defined reference plane crossings – Used in ITS, TPC, TRD, TOF, MUON, FRAME To be discussed: Are the present Track References useful for efficiency and acceptance studies ? ?

Problems with the previous implementation • Track reference information spread over branches – One

Problems with the previous implementation • Track reference information spread over branches – One branch per detector • Tree. TR has structure different from Tree. K – Tree. K: one entry per particle • Primaries and secondaries – Tree. TR: one entry per primary • Information about one particle has to be collected from several branches.

Present Implementation • One branch for track references instead of several. – Detectors identified

Present Implementation • One branch for track references instead of several. – Detectors identified by new data member f. Detector. Id. • Synchronize Tree. K and TR – Reorder the tree in a post-processor after simulation of each event – Executed automatically on the flight when old data is read Ali. MCEvent • Header • Particles • Track Refs Tree. K Tree. E Tree. TR

Ali. VParticle Ali. MCParticle • Wraps TParticle • Should also provide the Track. Reference

Ali. VParticle Ali. MCParticle • Wraps TParticle • Should also provide the Track. Reference and vertex information – What is here the commonality with Ali. ESDtrack and Ali. AODtrack ? • Technical problem: – Ali. MCParticle is created on the flight and has to be buffered in Ali. MCEvent – No problem for TParticle part (Ali. Stack already contains the mechanism), but what about Ali. Track. Reference which is stored per particle inside a TClones. Array ?

ESD Filter Ali. Analysis. Task Ali. Analysis. Filter. Task Ali. Filter TList Ali. Cuts

ESD Filter Ali. Analysis. Task Ali. Analysis. Filter. Task Ali. Filter TList Ali. Cuts Is. Selected(TObject *) UInt_t interpreted as a bit-field storing filter information Bit n 0/1 => Filter n no/yes Prototype ! Requirements of the Effeciency and Acceptance Framework are being discussed.

Test. Train Ali. Filter Ali. Cuts ESDtrack. Cuts ESD Ali. Analysis. Task ESDfilter Ali.

Test. Train Ali. Filter Ali. Cuts ESDtrack. Cuts ESD Ali. Analysis. Task ESDfilter Ali. Analysis. Task Jets Ali. AODTrack Ali. AODJet

Next Steps (from July Offline Week) • Collect, integrate, assemble and test existing analysis

Next Steps (from July Offline Week) • Collect, integrate, assemble and test existing analysis tasks (started but not finished) • Collect requirements on – AOD (done, M. Oldenburg) – Cuts for filters (tracks, V 0, Kinks) (ongoing, R. Vernet) – Number of ESD reading cycles (>1 for flow analysis) • Define possible interactions with efficiency calculation framework (done, see Silvia’s talk) • MC information handling – Kinematics, reference hits (almost done)

Other requirements • Event merging, for example Pythia+HIJING • Event mixing – Both should

Other requirements • Event merging, for example Pythia+HIJING • Event mixing – Both should be relatively easy to implement using the VEvent. Handler • For PROOF, possibility to connect Trees to files and merge mechanism for file resident objects. – Now a show stopper. Tests are only possible on relatively small event samples.