Introduction: the Work-Flow for Resonance Analysis

The package for resonance analysis (or "rsn package") has been implemented in order to cope with all available data formats: ESD, AOD and MC (= montecarlo events only). Anyway, all ongoing work (local debugging, tests in AliEn) has been carried on with ESD or MC data due to the unavailability of default AOD's. The work-flow for resonance study actually consists in two separate steps (this solution is temporary, when all parameters will be tuned, the possibility to run the entire analysis in a single step will be added):

  1. track selection: that consists in converting the input data (ESD/AOD/MC) into an "internal" lighter format named AliRsnEvent, which also allows to organize tracks with respect to their PID;
  2. analysis: that consists in reading the AliRsnEvent's and produce invariant mass histograms.

The Classes

Reading and converting source events: AliRsnReader

This object converts ESD, AOD or MC events into AliRsnEvent's. For each type of input, a different conversion method is implemented:

Bool_t FillFromESD (AliRsnEvent *target, AliESDEvent *src, AliMCEvent *mc=0)
Bool_t FillFromAOD (AliRsnEvent *target, AliAODEvent *src, AliMCEvent *mc=0)
Bool_t FillFromMC (AliRsnEvent *target, AliMCEvent *mc)

In all cases, the first argument is the target AliRsnEvent object where data will be stored and the second argument is the data source to be read. In the methods which deal with reconstructed data (ESD and AOD) the third argument can provide the reference Montecarlo event related with it, in order to retrieve MC info. All these methods return kTRUE if successful, and kFALSE when they fail. AliRsnReader can also reject fake tracks or resolve the pairs of split tracks (= tracks with the same GEANT label) in favor of the best one (= smaller chi2). These features can be switched on with two flag-setting methods:

void SetRejectFakes(Bool_t value = kTRUE)
void SetCheckSplit(Bool_t value = kTRUE)
When dealing with data without MC, these flags will have no effect on data reading.

Particle identification: AliRsnPID

This object contains the procedures needed to perform particle identification (PID) on the tracks already converted in the internal format. In the whole package, the PID is recognized according to an enumeration defined here (AliRsnPID::EType), which consists in a set of constants named after all kinds of available particles:

In order for this object to work properly, one must specify the PID method to be used by means of AliRsnPID::SetMethod(). It accepts one of the values defined in the enumeration AliRsnPID::EMethod, which are:

In the specific case of a realistic PID, it is fundamental to specify the prior probabilities which will used for all PID operations. These will be stored as local data-members of this object. The method to do this is:
void SetPriorProbability(EType type, Double_t prob)
which uses the internal enumeration to assign the probability to a particle type. Moreover, in this case one has to define two cuts: These values are set with the following methods:
void SetMinProb(Double_t value)
void SetMaxPt(Double_t value)

The AliRsnPID class provides also some static methods to retrieve the name (short or long), the PDG code and the invariant mass of all particles included in the enumeration:

static Int_t PDGCode(EType pid)
static const char * ParticleName(EType pid, Bool_t shortName = kTRUE)
static Double_t ParticleMass(EType pid)

Reading events from source: AliRsnReaderTask

This task inherits from AliAnalysisTask and contains all the standard methods required to perform the (ESD/AOD/MC)-to-AliRsnEvent conversion in all available computing environments (local, AliEn, CAF). It essentially contains two pointer data-members: one to an AliRsnReader object and another to an AliRsnPID one, which are then used to perform the true work. The user has to create and configure both them and pass them to the task by means of the following methods:

void SetReader(AliRsnReader *reader)
void SetPID (AliRsnPID *pid)

The following code gives an example:

// create readerTask
AliRsnReaderTask *task = new AliRsnReaderTask("AliRsnReaderTask");

// Reader settings
AliRsnReader *reader = new AliRsnReader();
task->SetReader(reader);

// PID settings
AliRsnPID *pid = new AliRsnPID;
pid->SetMethod(AliRsnPID::kPerfect);
task->SetPID(pid);

Of course, this procedure must then be completed with the necessary code to initialize an AliAnalysisTask to read a TChain of objects.