60 for (
Int_t i=0; i<npoints; ++i)
61 ps->SetNextPoint(
r.Uniform(-s,s),
r.Uniform(-s,s),
r.Uniform(-s,s));
63 ps->SetMarkerColor(color);
64 ps->SetMarkerSize(3+
r.Uniform(1, 7));
65 ps->SetMarkerStyle(4);
76 ps1->SetName(
"Points_1");
77 ps1->SetTitle(
"Points_1 title");
79 pntHolder->AddElement(ps1);
82 ps2->SetName(
"Points_2");
83 ps2->SetTitle(
"Points_2 title");
84 pntHolder->AddElement(ps2);
86 event->AddElement(pntHolder);
105 int N_Tracks = 10 +
r.Integer(20);
106 for (
int i = 0; i < N_Tracks; i++)
110 int pdg = 11 * (
r.Integer(2) > 0 ? 1 : -1);
117 if (i % 4 == 3) track->SetLineStyle(2);
118 track->SetMainColor(
kBlue);
119 track->SetName(
Form(
"RandomTrack_%d", i));
120 track->SetTitle(
Form(
"RandomTrack_%d title", i));
121 trackHolder->AddElement(track);
124 event->AddElement(trackHolder);
134 int N_Jets = 5 +
r.Integer(5);
135 for (
int i = 0; i < N_Jets; i++)
138 jet->SetTitle(
Form(
"Jet_%d title", i));
140 jet->AddEllipticCone(
r.Uniform(-3.5, 3.5),
r.Uniform(0,
TMath::TwoPi()),
141 r.Uniform(0.02, 0.2),
r.Uniform(0.02, 0.3));
142 jet->SetFillColor(
kPink - 8);
143 jet->SetLineColor(
kViolet - 7);
145 jetHolder->AddElement(jet);
147 event->AddElement(jetHolder);
161 b1->SetMainColor(
kCyan);
166 b1->SetNSegments(40);
233 std::chrono::time_point<std::chrono::system_clock>
fPrevTime;
238 std::condition_variable
fCV;
244 std::chrono::milliseconds ms(100);
255 for (
auto &ie : scene->RefChildren()) {
269 std::unique_lock<std::mutex> lock{
fMutex};
274 if (
fCV.wait_for(lock,
fDeltaTime) != std::cv_status::timeout) {
275 printf(
"autoplay not timed out \n");
277 printf(
"exit thread post wait\n");
286 REX::REveManager::ChangeGuard ch;
296 static std::mutex autoplay_mutex;
297 std::unique_lock<std::mutex> aplock{autoplay_mutex};
299 std::unique_lock<std::mutex> lock{
fMutex};
317 printf(
"Quit ROOT\n");
318 REX::REveManager::QuitRoot();
329 eveMng = REX::REveManager::Create();
332 eventMng->SetName(
"EventManager");
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
std::condition_variable fCV
std::chrono::duration< double > fDeltaTime
std::chrono::time_point< std::chrono::system_clock > fPrevTime
std::thread * fTimerThread
void autoplay_scheduler()
virtual void AddElement(REveElement *el)
Add el to the list of children.
virtual void DestroyElements()
Destroy all children of this element.
REveMagFieldDuo Interface to magnetic field with two different values depending on radius.
REveScene * GetEventScene() const
REveScene * GetGlobalScene() const
REveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
REveViewer * SpawnNewViewer(const char *name, const char *title="")
Create a new GL viewer.
REveScene * GetWorld() const
void Show(const RWebDisplayArgs &args="")
Show eve manager in specified browser.
REveProjectionManager Manager class for steering of projections and managing projected objects.
virtual REveElement * ImportElements(REveElement *el, REveElement *ext_list=nullptr)
Recursively import elements and apply projection to the newly imported objects.
void AddCommand(const std::string &name, const std::string &icon, const REveElement *element, const std::string &action)
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.
REveViewer Reve representation of TGLViewer.
void SetCameraType(ECameraType t)
virtual void AddScene(REveScene *scene)
Add 'scene' to the list of scenes.
Description of the dynamic properties of a particle.
void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
void SetPdgCode(Int_t pdg)
Change the PDG code for this particle.
void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz, Double_t t)
This is the base class for the ROOT Random number generators.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
REX::REveScene * rPhiGeomScene
REX::REveScene * rPhiEventScene
REX::REveProjectionManager * mngRhoZ
REX::REveManager * eveMng
REX::REveViewer * rhoZView
REX::REveScene * rhoZEventScene
void createProjectionStuff()
REX::REveViewer * rphiView
REX::REveProjectionManager * mngRhoPhi
REX::REveScene * rhoZGeomScene
void projectScenes(bool geomp, bool eventp)
REX::REvePointSet * getPointSet(int npoints=2, float s=2, int color=28)
constexpr Double_t TwoPi()