Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches

Detailed Description

This example display only points in web browser.

#include "TRandom.h"
#include "TParticle.h"
namespace REX = ROOT::Experimental;
{
prop->SetMagFieldObj(new REX::REveMagFieldDuo(350, 3.5, -2.0));
prop->SetMaxR(300);
prop->SetMaxZ(600);
prop->SetMaxOrbs(6);
// Default is kHelix propagator.
// prop->SetStepper(REX::REveTrackPropagator::kRungeKutta);
double v = 0.5;
double m = 5;
for (int i = 0; i < N_Tracks; i++) {
auto p = new TParticle();
int pdg = 11 * (r.Integer(2) > 0 ? 1 : -1);
p->SetPdgCode(pdg);
p->SetProductionVertex(r.Uniform(-v, v), r.Uniform(-v, v), r.Uniform(-v, v), 1);
p->SetMomentum(r.Uniform(-m, m), r.Uniform(-m, m), r.Uniform(-m, m) * r.Uniform(1, 3), 1);
auto track = new REX::REveTrack(p, 1, prop);
track->MakeTrack();
track->SetMainColor(kBlue);
track->SetName(Form("RandomTrack_%d", i));
trackHolder->AddElement(track);
}
}
void tracks()
{
auto eveMng = REX::REveManager::Create();
auto trackHolder = new REX::REveElement("Tracks");
eveMng->GetEventScene()->AddElement(trackHolder);
eveMng->Show();
}
@ kBlue
Definition Rtypes.h:67
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h prop
R__EXTERN TRandom * gRandom
Definition TRandom.h:73
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2570
REveMagFieldDuo Interface to magnetic field with two different values depending on radius.
REveTrackPropagator Calculates path of a particle taking into account special path-marks and imposed ...
REveTrack Track with given vertex, momentum and optional referece-points (path-marks) along its path.
Definition REveTrack.hxx:40
Description of the dynamic properties of a particle.
Definition TParticle.h:26
This is the base class for the ROOT Random number generators.
Definition TRandom.h:28
Namespace for ROOT features in testing.
Definition TROOT.h:100
TMarker m
Definition textangle.C:8
Author
Alja Mrak-Tadel

Definition in file tracks.C.