There are a few things which are common across several analysis which we would like to share or discuss.
Primary track selection in MC
Basically one would like a way to select in the Monte Carlo the final-state long-lived particles coming from the interation vertex and remove any others eg intermediate particles which the generator kept track of (q,g), weak decay daughters, products of secondary interactions. There are (at least) two ways to do this using only methods from
AliRoot? .
Both methods require that your analysis task obtains a pointer both the the
AliMCEvent? and
AliStack? objects. Eg
AliMCEvent* mcEvent = MCEvent();
AliStack* stack = mcEvent->Stack();
One should then begin a loop over the MC tracks
Int_t nPrim = stack->GetNprimary();
for (Int_t iMc = 0; iMc < nPrim; ++iMc)
{
...
}
Inside this loop you have the choice of doing
one of the following
if (stack->IsPhysicalPrimary(iMc))
{ TParticle* particle = stack->Particle(iMc);
TParticlePDG* partPDG = particle->GetPDG();
if (partPDG->Charge()!=0) {
fHistEtaMC->Fill(particle->Eta());
}
}
or
if (AliPWG0Helper::IsPrimaryCharged(particle,nPrim,kFALSE))
{
fHistEtaMC->Fill(particle->Eta());
}
The above examples are not complete, they just fill a simple <Η> histogram (if you try both together remember to change the name of the second histogram). All of the methods used have online documentation.
AliPWG0Helper::IsPrimaryCharged()
AliStack::IsPhysicalPrimary()
--
LeeBarnby - 16 Mar 2009