AliPhysics  8ea70a2 (8ea70a2)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
The EMCAL core framework

The EMCAL framework consists of

Writing an analysis using the AliAnalysisTaskEmcal

Using the EMCAL containers

EMCAL containers are used to handle arrays of objects (particles, clusters, jets) shared among different tasks within the input ESD or AOD event via an easy interface hiding the direct access from the user. Each task can handle several containers as needed. Once they are defined, the AliAnalysisTaskEmcal will automatically connect them to the content they are supposed to handle, so the content can be used from that moment on. Normally EMCAL containers are defined in the add macro of the task.

  • In the add task users tasks need to create a container which can connect to the array inside the input event. It is important that the name provided matches the name of the content in the input event.
      AliParticleContainer *cont = task->AddParticleContainer("tracks");
      cont->SetName("MyTrackContainer");
      
    If one likes, one can apply also kinematical cuts
      ...
      cont->SetMinPt(0.5);
      cont->SetEtaRange(-0.8, 0.8);
      ...
      
  • In the user task one needs to get the container from the task. Afterwards one can iterate over the content
      ...
      AliParticleContainer *trackcont = GetParticleContainer("MyTrackContainer");
      trackcont->ResetCurrentID(-1);
      AliVParticle *track;
      while((track = trackcont->GetNextAcceptParticle())){
    Do something with the particle
      }
      
    The loop is done only on particles surviving the kinematical selection.

Using the virtual track selection

Track selection is normally applied in the track selection task as part of the framework. In case a more strict track selection needs to be applied, users should use the virtual track selection. The virtual track selection provides an interface handling the track selection in a seemless way both for ESDs and AODs. The selection criteria have to be implemented by the user.

AliEmcalTrackSelectionESD *sel = new AliEmcalTrackSelectionESD;
sel->AddTrackCuts(AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kTRUE, 1));

Inside the task the virtual track selection can be used in two ways: Either one checks for every track separate, via the function IsTrackAccepted, or one requests a TObjArray of all accepted tracks via GetAcceptedTracks. Everything needed at this step is provided by AliEmcalTrackSelection, the virtual base class.