FairRoot/PandaRoot
macro/detectors/mvd/BonnTS/HCal/eventDisplay.C
Go to the documentation of this file.
1 
2 
4 {
5  //-----User Settings:-----------------------------------------------
6  TString SimEngine ="TGeant3";
7  TString InputFile ="HCalMC.root";
8  TString ParFile ="HCalMC_Params.root";
9  //------------------------------------------------------------------
10 
11 
12 // Load basic libraries
13  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
14  rootlogon();
15  gSystem->Load("libEve");
16  gSystem->Load("libEventDisplay");
17 
18  // ----- Reconstruction run -------------------------------------------
19  FairRunAna *fRun= new FairRunAna();
20  fRun->SetInputFile(InputFile.Data());
21  fRun->SetOutputFile("tst.root");
22 
23  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
24  FairParRootFileIo* parInput1 = new FairParRootFileIo();
25  parInput1->open(ParFile.Data());
26  rtdb->setFirstInput(parInput1);
27  FairEventManager *fMan= new FairEventManager();
28 
29 
30  //----------------------Traks and points -------------------------------------
31  FairMCTracks *Track = new FairMCTracks ("Monte-Carlo Tracks");
32  FairMCPointDraw *MvdPoints = new FairMCPointDraw ("MVDPoint",kBlue, kFullSquare);
33 
34 
35  fMan->AddTask(Track);
36  fMan->AddTask(MvdPoints);
37 
38  fMan->Init();
39 
40  gGeoManager->DefaultColors(); // repair buggy coloring
41 
42  // Draw with Eve (browsable paths, modify displaying...):
43  TEveManager::Create();
44  TGeoNode *N= gGeoManager->GetTopNode();
45  TEveGeoTopNode *TNod=new TEveGeoTopNode(gGeoManager, N);
46  TNod->SetVisLevel(10); // mandatory to see the Mvd
47  gEve->AddGlobalElement(TNod);
48  gEve->FullRedraw3D(kTRUE);
49 
50 }
TGeoManager * gGeoManager
FairRunAna * fRun
Definition: hit_dirc.C:58
int eventDisplay(TString inFile="sim.root", TString parFile="simparams.root", TString outid="n")
FairMCTracks * Track
Definition: drawEveTracks.C:8
FairMCPointDraw * MvdPoints
Definition: drawEveTracks.C:9
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
FairEventManager * fMan
Definition: drawEveTracks.C:7