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):
- 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; - 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 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 SetCheckSplit(Bool_t value = kTRUE)
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:
kElectron,kMuon,kPion,kKaon,kProton: identified particle types;kUnknown: for particles which are not assigned a proper PID;kTypes: the total number of available types (useful for lists).
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:
kNone: no is PID performed, and all tracks are tagged as "unidentified";kPerfect: tracks are identified according to the informations from Montecarlo, in order to simulate a 100% PID efficiency;kRealistic: uses the PID weights and prior probabilities to make Bayesian combinations to evaluate particle PID probability; in this case, the track is identified as the particle type corresponding to the largest probability.
- a cut on the final probability, so that each particle for which the maximum probability is smaller than this cut will be labeled as "unknown";
- a cut on the maximum transverse momentum for which the PID information is accepted.
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 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 SetPID (AliRsnPID *pid)
The following code gives an example:
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.