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

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()); } }


if (AliPWG0Helper::IsPrimaryCharged(particle,nPrim,kFALSE))


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.



Pros and cons. The AliPWG0Helper? method needs fewer lines of user code but requires the PWG0base par file in order to run on CAF. The AliStack? method needs more user coding, including retrieval of TParticle and TParticlePDG? objects, but works from the standard par file AF-v4-16. I have checked that the methods select the same number of tracks for 200000 events from LHC09a4 production on CAF (over 10^7 particles).

-- LeeBarnby - 16 Mar 2009

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 17 Mar 2009 - _47C_61UK_47O_61eScience_47OU_61Birmingham_47L_61ParticlePhysics_47CN_61lee_32barnby?
This site is powered by the TWiki collaboration platform Powered by Perl 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