59 for (
Int_t i = 0; i < npoints; ++i)
60 ps->SetNextPoint(
r.Uniform(-s, s),
r.Uniform(-s, s),
r.Uniform(-s, s));
62 ps->SetMarkerColor(color);
64 ps->SetMarkerStyle(4);
75 ps1->SetName(
"Points_1");
76 ps1->SetTitle(
"Points_1 title");
78 pntHolder->AddElement(ps1);
81 ps2->SetName(
"Points_2");
82 ps2->SetTitle(
"Points_2 title");
83 ps2->SetAlwaysSecSelect(
true);
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++) {
109 int pdg = 11 * (
r.Integer(2) > 0 ? 1 : -1);
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++) {
137 jet->SetTitle(
Form(
"Jet_%d\n pT = %.2f", i,
r.Uniform(1, 40)));
139 jet->AddEllipticCone(
r.Uniform(-3.5, 3.5),
r.Uniform(0,
TMath::TwoPi()),
r.Uniform(0.02, 0.2),
140 r.Uniform(0.02, 0.3));
141 jet->SetFillColor(
kPink - 8);
142 jet->SetLineColor(
kBlack);
144 jetHolder->AddElement(jet);
146 event->AddElement(jetHolder);
160 b1->SetMainColor(
kCyan);
161 b1->SetNSegments(80);
162 b1->SetMainTransparency(70);
163 eveMng->GetGlobalScene()->AddElement(b1);
167 b1->SetNSegments(40);
202 for (
auto &ie :
eveMng->GetGlobalScene()->RefChildren()) {
211 for (
auto &ie :
eveMng->GetEventScene()->RefChildren()) {
214 mngRhoZ->SetCurrentDepth(depth);
240 std::condition_variable
fCV;
245 std::chrono::milliseconds ms(100);
253 auto scene =
eveMng->GetEventScene();
254 scene->DestroyElements();
265 std::unique_lock<std::mutex> lock{
fMutex};
270 if (
fCV.wait_for(lock,
fDeltaTime) != std::cv_status::timeout) {
271 printf(
"autoplay not timed out \n");
273 printf(
"exit thread post wait\n");
292 static std::mutex autoplay_mutex;
293 std::unique_lock<std::mutex> aplock{autoplay_mutex};
295 std::unique_lock<std::mutex> lock{
fMutex};
313 printf(
"Quit ROOT\n");
328 eventMng->SetName(
"EventManager");
329 eveMng->GetWorld()->AddElement(eventMng);
331 eveMng->GetWorld()->AddCommand(
"QuitRoot",
"sap-icon://log", eventMng,
"QuitRoot()");
333 eveMng->GetWorld()->AddCommand(
"NextEvent",
"sap-icon://step", eventMng,
"NextEvent()");
335 eveMng->GetWorld()->AddCommand(
"Autoplay",
"sap-icon://refresh", eventMng,
"Autoplay()");
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
std::condition_variable fCV
std::chrono::duration< double > fDeltaTime
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)
Namespace for ROOT features in testing.
constexpr Double_t TwoPi()