TWiki
>
ALICE Web
>
AliceCommonAnalysis
(revision 2) (raw view)
Edit
Attach
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 <pre><verbatim> AliMCEvent* mcEvent = MCEvent(); AliStack* stack = mcEvent->Stack();</verbatim> </pre> One should then begin a loop over the MC tracks <pre><verbatim>Int_t nPrim = stack->GetNprimary(); for (Int_t iMc = 0; iMc < nPrim; ++iMc) {</verbatim></pre><verbatim>... </verbatim><pre><verbatim> } </verbatim> </pre> Inside this loop you have the choice of doing _one_ of the following <literal>if (stack->IsPhysicalPrimary(iMc))<br></br><br></br> { TParticle* particle = stack->Particle(iMc);</literal><br /><literal>TParticlePDG* partPDG = particle->GetPDG();</literal><br /><literal> if (partPDG->Charge()!=0) {</literal><br /><literal> fHistEtaMC->Fill(particle->Eta());</literal><br /><literal> }</literal> <literal> } </literal> or <literal>if (AliPWG0Helper::IsPrimaryCharged(particle,nPrim,kFALSE))<br></br><br></br> {<br></br><br></br> fHistEtaMC->Fill(particle->Eta()); }</literal> 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. [[http://aliceinfo.cern.ch/static/aliroot-new/PWG0/AliPWG0Helper.cxx][AliPWG0Helper::IsPrimaryCharged()]] [[http://aliceinfo.cern.ch/static/aliroot-new/html/roothtml/AliStack.html#AliStack:IsPhysicalPrimary][AliStack::IsPhysicalPrimary() ]] -- Main.LeeBarnby - 16 Mar 2009
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 16 Mar 2009
-
_47C_61UK_47O_61eScience_47OU_61Birmingham_47L_61ParticlePhysics_47CN_61lee_32barnby
?
ALICE
Log In
ALICE Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
ALICE
ATLAS
BILPA
CALICE
Computing
General
LHCb
LinearCollider
Main
NA62
Publish
Sandbox
TWiki
Welcome
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback