- Int_t N = stack->GetNtrack();
- for (Int_t i=0; i<N; ++i) {
- TParticle* p = stack->Particle(i);
- Double_t pT = p->Pt();
- if (pT<min_pt || pT>max_pt) continue;
-
- ++count;
- Reve::Track* track = new Reve::Track(p, i, rnrStyle);
- //PH The line below is replaced waiting for a fix in Root
- //PH which permits to use variable siza arguments in CINT
- //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
- //PH track->SetName(Form("%s [%d]", p->GetName(), i));
- char form[1000];
- sprintf(form,"%s [%d]", p->GetName(), i);
- track->SetName(form);
- gReve->AddRenderElement(cont, track);
+ Int_t N = stack->GetNtrack();
+ for (Int_t i=0; i<N; ++i)
+ {
+ if(stack->IsPhysicalPrimary(i))
+ {
+ TParticle* p = stack->Particle(i);
+ Double_t pT = p->Pt();
+ if (pT<min_pt || pT>max_pt) continue;
+
+ ++count;
+ Reve::Track* track = new Reve::Track(p, i, rnrStyle);
+
+ //PH The line below is replaced waiting for a fix in Root
+ //PH which permits to use variable siza arguments in CINT
+ //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
+ //PH track->SetName(Form("%s [%d]", p->GetName(), i));
+ char form[1000];
+ sprintf(form,"%s [%d]", p->GetName(), i);
+ track->SetName(form);
+ track->SetRnrStyle(rnrStyle);
+ gReve->AddRenderElement(cont, track);
+ }