61 ps->SetNextPoint(
r.Uniform(-s,s),
r.Uniform(-s,s),
r.Uniform(-s,s));
63 ps->SetMarkerColor(color);
64 ps->SetMarkerSize(8 +
r.Uniform(1, 8));
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 ps2->SetAlwaysSecSelect(
true);
85 pntHolder->AddElement(ps2);
87 event->AddElement(pntHolder);
106 int N_Tracks = 10 +
r.Integer(20);
107 for (
int i = 0;
i < N_Tracks;
i++)
111 int pdg = 11 * (
r.Integer(2) > 0 ? 1 : -1);
118 if (
i % 4 == 3) track->SetLineStyle(2);
119 track->SetMainColor(
kBlue);
120 track->SetName(
Form(
"RandomTrack_%d",
i));
121 track->SetTitle(
Form(
"RandomTrack_%d title",
i));
122 trackHolder->AddElement(track);
125 event->AddElement(trackHolder);
135 int N_Jets = 5 +
r.Integer(5);
136 for (
int i = 0;
i < N_Jets;
i++)
139 jet->SetTitle(
Form(
"Jet_%d\n pT = %.2f",
i,
r.Uniform(1, 40)));
141 jet->AddEllipticCone(
r.Uniform(-3.5, 3.5),
r.Uniform(0,
TMath::TwoPi()),
142 r.Uniform(0.02, 0.2),
r.Uniform(0.02, 0.3));
143 jet->SetFillColor(
kPink - 8);
144 jet->SetLineColor(
kBlack);
146 jetHolder->AddElement(jet);
148 event->AddElement(jetHolder);
162 b1->SetMainColor(
kCyan);
163 b1->SetNSegments(80);
164 b1->SetMainTransparency(70);
165 eveMng->GetGlobalScene()->AddElement(b1);
169 b1->SetNSegments(40);
203 for (
auto &ie :
eveMng->GetGlobalScene()->RefChildren())
214 for (
auto &ie :
eveMng->GetEventScene()->RefChildren())
218 mngRhoZ ->SetCurrentDepth(depth);
242 std::chrono::time_point<std::chrono::system_clock>
fPrevTime;
247 std::condition_variable
fCV;
253 std::chrono::milliseconds ms(100);
261 auto scene =
eveMng->GetEventScene();
262 scene->DestroyElements();
273 std::unique_lock<std::mutex> lock{
fMutex};
278 if (
fCV.wait_for(lock,
fDeltaTime) != std::cv_status::timeout) {
279 printf(
"autoplay not timed out \n");
281 printf(
"exit thread post wait\n");
300 static std::mutex autoplay_mutex;
301 std::unique_lock<std::mutex> aplock{autoplay_mutex};
303 std::unique_lock<std::mutex> lock{
fMutex};
321 printf(
"Quit ROOT\n");
336 eventMng->SetName(
"EventManager");
337 eveMng->GetWorld()->AddElement(eventMng);
339 eveMng->GetWorld()->AddCommand(
"QuitRoot",
"sap-icon://log", eventMng,
"QuitRoot()");
341 eveMng->GetWorld()->AddCommand(
"NextEvent",
"sap-icon://step", eventMng,
"NextEvent()");
343 eveMng->GetWorld()->AddCommand(
"Autoplay",
"sap-icon://refresh", eventMng,
"Autoplay()");
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
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
std::condition_variable fCV
std::chrono::duration< double > fDeltaTime
std::chrono::time_point< std::chrono::system_clock > fPrevTime
std::thread * fTimerThread
void autoplay_scheduler()
REveMagFieldDuo Interface to magnetic field with two different values depending on radius.
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
REveProjectionManager Manager class for steering of projections and managing projected objects.
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.
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.
ROOT::Experimental::REveManager * eveMng
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()