TWiki> ALICE Web>AliceCommonAnalysis (revision 1)EditAttach
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

I
nt_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.

-- LeeBarnby - 16 Mar 2009

Edit | Attach | Print version | History: r5 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 16 Mar 2009 - 16:46:32 - LeeBarnby
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback