EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eventDisplay.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eventDisplay.C
1 
2 //
3 // Simulated data file browser;
4 //
5 
7 {
8  // Create visualization manager;
9  auto fMan = new EicEventManager();
10  fMan->SetInputFile("simulation.root");
11 
12  // Want just tracks and calorimeter hits;
13  fMan->AddTask(new FairMCTracks ("Monte-Carlo Tracks"));
14  fMan->AddTask(new FairMCPointDraw("FhacMoCaPoint", kRed, kFullSquare));
15 
16  // Initialize and run visualization manager; tune vis.properties a bit;
17  fMan->Init();
18  setColors();
19  fMan->Run();
20 
21  //
22  // Once graphics window starts up, in ROOT browser follow the sequence:
23  // "Fair Event Manager" -> "Info" -> increment "Current Event";
24  //
25 } // eventDisplay()
26 
27 
28 void setColors()
29 {
30  TIter next( gGeoManager->GetListOfVolumes() );
31 
32  // Make cells bit transparent (to see showers);
33  while ((volume=(TGeoVolume*)next())) {
34  TString name = volume->GetName();
35 
36  if (name.BeginsWith("FhacQuadrant"))
37  volume->SetVisibility(kFALSE);
38  else if (name.BeginsWith("FhacTower"))
39  volume->SetTransparency(70);
40  } //while
41 } // setColors()
42