FairRoot/PandaRoot
detectors/lmd/eventdisplay.C
Go to the documentation of this file.
1 void eventdisplay(TString storePath="/panda/pandaroot/macro/lmd/testPixelNewGeo/mom_15/")
2 {
3  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
4  gSystem->Load("libEve");
5  gSystem->Load("libEventDisplay");
6  gSystem->Load("libPndEventDisplay");
7  gSystem->Load("libSds");
8  gSystem->Load("libLmd");
9 
10 
11  TString parFile = storePath+"/Lumi_Params_0.root";
12  TString inSimuFile = storePath+"/Lumi_MC_0.root";
13  // TString inSimuFile = storePath+"/Lumi_MC_pp_4Pi_copy.root";
14  //Lumi_MC_pp_4Pi_copy.root
15  TString recoFile = storePath+"/Lumi_reco_0.root";
16  TString trackingCandFile = storePath+"/Lumi_TCand_0.root";
17  TString trackingFile = storePath+"/Lumi_Track_0.root";
18  // TString trackingGeaneFile = storePath+"/Lumi_Geane_0.root";
19  TString outFile = storePath+"/EVEout.root";
20 
21  FairRunAna *fRun= new FairRunAna();
22  fRun->SetInputFile(inSimuFile.Data());
23  fRun->AddFriend(recoFile.Data());
24  fRun->AddFriend(trackingCandFile.Data());
25  fRun->AddFriend(trackingFile.Data());
26  // fRun->AddFriend(trackingGeaneFile.Data());
27  fRun->SetOutputFile(outFile.Data());
28 
29  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
30  FairParRootFileIo* parInput1 = new FairParRootFileIo();
31  parInput1->open(parFile.Data());
32  rtdb->setFirstInput(parInput1);
33 
34  FairEventManager *fMan= new FairEventManager();
35 
36  FairMCTracks *Track = new FairMCTracks ("GeoTracks");
37  fMan->AddTask(Track);
38  FairMCPointDraw *MvdPoints = new FairMCPointDraw ("LMDPoint",kBlue,kFullSquare);
39  fMan->AddTask(MvdPoints);
40  FairHitDraw *stripHits = new FairHitDraw("LMDHitsPixel");
41  fMan->AddTask(stripHits);
42 
43  // cout<<"And now we try draw reconstructed tracks"<<endl;
44  // // /// Try to draw reconstructed tracks --------
45  // PndTrackDraw* TrkRec = new PndTrackDraw("GeoTracks");
46  // fMan->AddTask(TrkRec);
47  // // ///------------------------------------------
48  // fRun->Init();
49  fMan->Init();
50 
52  TGeoNode *N= gGeoManager->GetTopNode();
53  gGeoManager->DefaultColors(); // repair buggy coloring
54  TEveGeoTopNode *TNod=new TEveGeoTopNode(gGeoManager, N);
55  //TNod->SetVisLevel(3); // mandatory to see the Mvd
56  // TNod->SetVisLevel(9);
57  TNod->SetVisLevel(20);
58  gEve->AddGlobalElement(TNod);
59  gEve->FullRedraw3D(kTRUE);
61 
62  // /// Show projections -----------------------------
63  // // camera
64  // TEveScene* s = gEve->SpawnNewScene("Projected Event");
65  // gEve->GetDefaultViewer()->AddScene(s);
66  // TGLViewer* v = gEve->GetDefaultGLViewer();
67  // v->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
68  // TGLOrthoCamera* cam = (TGLOrthoCamera*) v->CurrentCamera();
69  // cam->SetZoomMinMax(0.2, 20);
70 
71  // // projections
72  // TEveProjectionManager* mng =
73  // new TEveProjectionManager(TEveProjection::kPT_RPhi);
74  // s->AddElement(mng);
75  // TEveProjectionAxes* axes = new TEveProjectionAxes(mng);
76  // axes->SetTitle("TEveProjections demo");
77  // s->AddElement(axes);
78  // gEve->AddToListTree(axes, kTRUE);
79  // gEve->AddToListTree(mng, kTRUE);
80  // gEve->Redraw3D(kTRUE);
81  // ///---------------------------------------------
82 
83 }
TString outFile
Definition: hit_dirc.C:17
TString storePath
TGeoManager * gGeoManager
TString inSimuFile
FairRunAna * fRun
Definition: hit_dirc.C:58
FairMCTracks * Track
Definition: drawEveTracks.C:8
TString parFile
Definition: hit_dirc.C:14
FairMCPointDraw * MvdPoints
Definition: drawEveTracks.C:9
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
std::string recoFile
FairEventManager * fMan
Definition: drawEveTracks.C:7