Presentation is loading. Please wait.

Presentation is loading. Please wait.

I. BelikovALICE Offline Week, CERN, 12 June 20031 ESD Classes and the Combined Reconstruction What is the ESD ? Two new classes AliESD and AliESDtrack.

Similar presentations


Presentation on theme: "I. BelikovALICE Offline Week, CERN, 12 June 20031 ESD Classes and the Combined Reconstruction What is the ESD ? Two new classes AliESD and AliESDtrack."— Presentation transcript:

1 I. BelikovALICE Offline Week, CERN, 12 June 20031 ESD Classes and the Combined Reconstruction What is the ESD ? Two new classes AliESD and AliESDtrack. What do we gain when using these classes ? Examples of the “high level” reconstruction and analysis code. Status of the ESD and the combined reconstruction. How it will evolve. outline

2 I. BelikovALICE Offline Week, CERN, 12 June 20032 ESD Classes and the Combined Reconstruction ESD stands for “Event Summary Data” ( or, according to S.Sedykh, “Enormously Strange Data” :) In principal it is the output of the “massive reconstruction” and the input for the “massive physical data analysis”. It contains only the “real” things like tracks, V0s, kinks, cascades and probably does not have to contain “imaginary” stuff like resonances, charm etc. Two problems with the ESD : What to put in and how to arrange necessary interrelations between the different kinds of data within the ESD. How to generate it. By means of some separate procedure at the very end of the reconstruction ? Or “on flight”, by means of the reconstruction routines themselves ? What is the ESD ?

3 I. BelikovALICE Offline Week, CERN, 12 June 20033 ESD Classes and the Combined Reconstruction Contains all the information needed for the physical analysis. All the reconstruction steps can communicate each with another via this object kept in the RAM. Serves as the “I/O quantum” for the reconstruction and for the physical analysis as well. Class AliESD : //run number, event number etc //trigger info etc … //container of ESD tracks, //container of kinks, //container of V0s, //container of cascades … Two new classes AliESD and AliESDtrack. Interrelations between ESD tracks, kinks etc are trivial to implement ! (see the examples below)

4 I. BelikovALICE Offline Week, CERN, 12 June 20034 ESD Classes and the Combined Reconstruction Contained by the ESD, contains all the information we are going to cut on and so during the physical analysis. Can serve for the accumulation and exchange of the tracking information between the barrel detectors (basis for the combined tracking/PID), if provides (in some way) access to the associated clusters. Class AliESDtrack : //reconstruction status flags … //general track properties (length, time, combined PID…) … //”running”/final params (“external”) … //params at the outermost measured point (“external”) //params at the innermost measured point (“external”) … //detector related info (ITS,TPC,TRD…) (chi2, num.of clusters, dE/dx…) Two new classes AliESD and AliESDtrack (Global flags: time/length, combined PID etc Detector specific flags: “in”, “out”, “refit”, PID etc)

5 I. BelikovALICE Offline Week, CERN, 12 June 20035 ESD Classes and the Combined Reconstruction Very simple file structure : Just one file (AliESD.root) for all the detectors and all the reconstruction steps. This file may (or may not) contain several events, which can be controlled from the level of macros. Very simple data structure within the file: Just a sequence of ROOT objects of AliESD class. No anymore any horizontal dependency between the detectors (even via the I/O, because there is no any “I/O” since everything is kept in the RAM). No anymore ugly “naming conventions” on the tree/branch names (because there is simply no anymore trees/branches etc). Matching between the pieces of the same track becomes really trivial (simply because everything needed is now contained within the same object). No look-up tables anymore. This is a solid basis for the combined tracking/PID. The skeleton of the physical data analysis loop becomes clear (and very clean), probably for the very first time in ALICE ! What do we gain when using these classes ?

6 I. BelikovALICE Offline Week, CERN, 12 June 20036 ESD Classes and the Combined Reconstruction //The pointer(s) to the file(s) with the clusters is(are ) to be provided by “somebody” (NewIO ? AliEn ?) … //Create instances of the ITS,TPC, TRD etc trackers, PID makes, V0 finders etc… for (Int_t n=0; n<nev; n++) { //loop over events Int_t rc=0; AliESD *event=new AliESD(); //create an empty ESD objects … //Load clusters (preferably for all the detectors, if possible) //From now on “everybody” will add something to or modify something in shared ESD object ! rc+=tpcTracker.Clusters2Tracks(event); // no rc+=itsTracker.Clusters2Tracks(event); // problem //stand alone ITS tracker Clusters2Tracks(event); // to match rc+=v0Vertexer.Tracks2Vertices(event); // pieces … // of rc+=itsTracker.PropagateBack(event); // the same rc+=tpcTracker.PropagateBack(event); // track … rc+=tpcPID.MakePID(event); //here is the “single detector PID” … //to the TRD, to TOF and RICH //and then back all the way back to the primary vertex … AliESDpid::MakePID(event); //here is the “combined PID” if (rc==0 ) { // “somebody” writes out the prepared ESD object and decides whether to close old and open new output file event->Write(…); //or ESD is able to it “himself” ! } else { … //something bad has happended… } } // end of the loop over events Example of “high level” reconstruction code.

7 I. BelikovALICE Offline Week, CERN, 12 June 20037 ESD Classes and the Combined Reconstruction TFile *f=new TFile(“AliESD.root”) //The pointer to the file is to be given by “somebody” (NewIO ? AliEn ?) TKey *key=0; TIter next(f->GetListOfKeys()); while (key=(Tkey*)next()) { //loop over ESD objects Int_t i; AliESD *event=(AliESD*)key->ReadObj(); //this is how an ESD objects can read “himself” … //select run, event number etc… if (event->GetTrigger() != … ) continue; //select the trigger … //select whatever else Int_t ntracks=event->GetNumberOfTracks(); for (i=0; i<ntracks; i++) { //loop over ESD tracks (the same for kinks, V0s etc) AliESDtrack *track=event->GetTrack(i); if (track->GetStatus()==…) { //select tracks with the proper status … //do whatever you want with the selected tracks } … AliESDcascade *casc=event->GetCascade(13); //retrieve the 13 th cascade decay Int_t iv0=casc->GetV0index(); //and find AliESDv0 *v0=event->GetV0(iv0); //the associated V0 Int_t ip=v0->GetPositiveIndex(), in=v0->GetNegativeIndex(); //together with its AliESDtrack *ptrack=event->GetTrack(ip); //positive daughter track AliESDtrack *ntrack=event->GetTrack(in); //and negative daughter track … } Example of “high level” data analysis code.

8 I. BelikovALICE Offline Week, CERN, 12 June 20038 ESD Classes and the Combined Reconstruction There is always some price to pay If you need to modify only one track from a given event, you will have to read in and then to write out the whole event. If you need to do it for 10**7 events, you will have to rewrite 10**7 events… :(

9 I. BelikovALICE Offline Week, CERN, 12 June 20039 ESD Classes and the Combined Reconstruction  AliESDtrack and AliESD are “fully” implemented. ESD filled with the ESD tracks.  The following reconstruction steps are fully rewritten in terms of the ESD classes. ITS: “in”, “out”, “refit inwards” TPC (the oldest): “in”, “out” TRD: “out”  This gives us a continuous chain (compiled code + macros) TPCin -> ITSin -> ITSout -> TPCout -> TRDout that works with the “ESD oriented communication”.  First implementation of the combined ITS/TPC/TRD PID. Status of the ESD and the combined reconstruction

10 I. BelikovALICE Offline Week, CERN, 12 June 200310 ESD Classes and the Combined Reconstruction  Two possible “philosophies” in the reconstruction development:  Let’s first get it working for 90% of cases, then try to adapt the schema to the rest preferably without changing the design (maybe even “by force”).  We should design everything in such a way that all 100% of the cases we expect to deal with are somehow treated by the schema from the very beginning.  The “ESD based” combined reconstruction schema follows the first philosophy.  This schema has now been proved to satisfy most of our requirements. But it relies on the assumption that the reconstruction in a detector is purely “internal business of this detector”. In some cases such an approximation can be not so good.  To deal with such cases (mainly in the TPC) we will put some additional information (pointers to detector specific tracks, list of associated “helix” objects or/and whatever) on top of the “ESD record” (with “!” sign in the comment at the corresponding line in the *.h file).  And then the “newest” TPC reconstruction will be rewritten in terms of the “improved communication via ESD” and eventually replace the “oldest” one in the default reconstruction chain. How it will evolve…


Download ppt "I. BelikovALICE Offline Week, CERN, 12 June 20031 ESD Classes and the Combined Reconstruction What is the ESD ? Two new classes AliESD and AliESDtrack."

Similar presentations


Ads by Google