void ProcessVisualize() { TEveManager::Create(); TEvePointSetArray *evp = new TEvePointSetArray("Event points", "Event points"); TEvePointSetArray *chp = new TEvePointSetArray("Chamber points", "Chamber points"); evp->SetMarkerColor(kGreen); evp->InitBins("Event cause", 8, 0.5, 8.5); chp->SetMarkerColor(kCyan); chp->InitBins("Nothing", 1, -0.5, 0.5); TEveTrackList *list = new TEveTrackList(); list->SetLineColor(kMagenta); list->SetName("Incident tracks"); TEveTrackPropagator* prop = list->GetPropagator(); prop->SetMaxR(2000); prop->SetMaxZ(4000); int j = 0; BOOST_FOREACH(event_t &e, vis_result) { evp->Fill(e.i1.x, e.i1.y, e.i1.z, e.event_cause); chp->Fill(e.inc.a(0), e.inc.a(1), e.inc.a(2), 0); chp->Fill(e.l.a(0), e.l.a(1), e.l.a(2), 0); chp->Fill(e.r.a(0), e.r.a(1), e.r.a(2), 0); if ((++j % 1000) == 0) { TEveTrack *track = make_track(e.inc, prop); track->SetLineColor(list->GetLineColor()); list->AddElement(track); track = make_track(e.l, prop); track->SetLineColor(list->GetLineColor()); list->AddElement(track); track = make_track(e.r, prop); track->SetLineColor(list->GetLineColor()); list->AddElement(track); } }
void pythia_display() { if (g_pythia != 0) { Warning("pythia_display()", "Already initialized."); return; } #ifndef G__WIN32 // libPythia6 is a static library on Windoze if (gSystem->Load("libPythia6") < 0) { Error("pythia_display()", "Could not load 'libPythia6', make sure it is available!"); return; } #endif gSystem->Load("libEGPythia6"); if (gROOT->LoadMacro("MultiView.C+") != 0) { Error("pythia_display()", "Failed loading MultiView.C in compiled mode."); return; } //======================================================================== //======================================================================== // Create an instance of the Pythia event generator ... g_pythia = new TPythia6; TPythia6& P = * g_pythia; P.SetMSEL(0); // full user controll; P.SetMSUB(102, 1); // g + g -> H0 //P.SetMSUB(123, 1); // f + f' -> f + f' + H0 //P.SetMSUB(124, 1); // f + f' -> f" + f"' + H0 P.SetPMAS(6, 1, 175); // mass of TOP P.SetPMAS(25, 1, 180); // mass of Higgs P.SetCKIN(1, 170.0); // range of allowed mass P.SetCKIN(2, 190.0); P.SetMSTP(61, 0); // switch off ISR P.SetMSTP(71, 0); // switch off FSR P.SetMSTP(81, 0); // switch off multiple interactions P.SetMSTP(111, 0); // Switch off fragmentation // Force h0 -> ZZ for (Int_t i = 210; i <= 288; ++i) P.SetMDME(i, 1, 0); P.SetMDME(225, 1, 1); // Force Z -> mumu for (Int_t i = 174; i <= 189; ++i) P.SetMDME(i, 1, 0); P.SetMDME(184, 1, 1); P.Initialize("cms", "p", "p", 14000); //======================================================================== // Create views and containers. //======================================================================== TEveManager::Create(); TEveElementList *fake_geom = new TEveElementList("Geometry"); TEveGeoShape *b; b = new TEveGeoShape("Barell 1"); b->SetShape(new TGeoTube(kR_min, kR_max, kZ_d)); b->SetMainColor(kCyan); b->SetMainTransparency(80); fake_geom->AddElement(b); b = new TEveGeoShape("Barell 2"); b->SetShape(new TGeoTube(2*kR_min, 2*kR_max, 2*kZ_d)); b->SetMainColor(kPink-3); b->SetMainTransparency(80); fake_geom->AddElement(b); gEve->AddGlobalElement(fake_geom); gMultiView = new MultiView; gMultiView->ImportGeomRPhi(fake_geom); gMultiView->ImportGeomRhoZ(fake_geom); gEve->GetBrowser()->GetTabRight()->SetTab(1); gTrackList = new TEveTrackList("Pythia Tracks"); gTrackList->SetMainColor(kYellow); gTrackList->SetMarkerColor(kRed); gTrackList->SetMarkerStyle(4); gTrackList->SetMarkerSize(0.5); gEve->AddElement(gTrackList); TEveTrackPropagator* trkProp = gTrackList->GetPropagator(); trkProp->SetMagField(kMagField); trkProp->SetMaxR(2*kR_max); trkProp->SetMaxZ(2*kZ_d); //======================================================================== //======================================================================== pythia_make_gui(); pythia_next_event(); gEve->Redraw3D(kTRUE); }