FairRoot/PandaRoot
macro/detectors/hyp/eventDisplay.C
Go to the documentation of this file.
1 
2 
4 {
5  // Load basic libraries
6  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
7  rootlogon();
8  gSystem->Load("libEve");
9  gSystem->Load("libEventDisplay");
10  //gSystem->Load("libHypGe");
11  //gSystem->Load("librazhyp");
12  gSystem->Load("libHyp");
13  //gSystem->Load("libTof");
14 
15  // ----- Reconstruction run -------------------------------------------
16  FairRunAna *fRun= new FairRunAna();
17  //fRun->SetInputFile("points.x3872.jpsipipi.phsp.root");
18  // fRun->SetInputFile("../qa/lhetrack/points_tpccombi.root");
19  fRun->SetInputFile("sim_PiRec.root");//sim_pidC.root");
21  // fRun->SetInputFile("../drc/testrun1.root");
22  // fRun->SetInputFile("../dsk/sim_dsk.g4native.root");
23  fRun->SetOutputFile("tst.root");
24  // fRun->LoadGeometry();
25 
26 
27 
28  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
29  FairParRootFileIo* parInput1 = new FairParRootFileIo();
30  // parInput1->open("../drc/testparams.root");
31  parInput1->open("piRecparams.root");
32  //../hyp/SimG41TCIPAxxbGparams.root");//params_with_vis.root");
33 
34  rtdb->setFirstInput(parInput1);
35 
36 
37  FairEventManager *fMan= new FairEventManager();
38  FairMCTracks *Track = new FairMCTracks ("Monte-Carlo Tracks");
39  // FairMCPointDraw *MvdPoints = new FairMCPointDraw ("MVDPoint",kBlue, kFullSquare);
40 // FairMCPointDraw *EMCPoints = new FairMCPointDraw ("EmcPoint",kOrange, kFullSquare);
41  //FairMCPointDraw *TofPoint = new FairMCPointDraw ("TofPoint",kYellow, kFullSquare);
42  //FairMCPointDraw *TofSciFPoint= new FairMCPointDraw ("TofSciFPoint",kTeal, kFullSquare);
43  FairMCPointDraw *MuoPoint = new FairMCPointDraw ("HypPoint",kAzure, kFullSquare);
44  // FairMCPointDraw *PndDrcPoint = new FairMCPointDraw ("PndDrcPoint",kViolet, kFullSquare);
45 // FairMCPointDraw *PndDchPoint = new FairMCPointDraw ("PndDchPoint",kPink, kFullSquare);
46  //FairMCPointDraw *PndTpcPoint = new FairMCPointDraw ("PndTpcPoint",kCyan, kFullSquare);
47  // FairMCPointDraw *PndSTTPoint = new FairMCPointDraw ("STTPoint",kMagenta, kFullSquare);
48 
49 
50  fMan->AddTask(Track);
51 
52  // fMan->AddTask(MvdPoints);
53 // fMan->AddTask(EMCPoints);
54  //fMan->AddTask(TofPoint);
55  //fMan->AddTask( TofSciFPoint);
56  fMan->AddTask( MuoPoint);
57  // fMan->AddTask( PndDrcPoint);
58 // fMan->AddTask( PndDchPoint);
59  //fMan->AddTask( PndTpcPoint);
60  // fMan->AddTask( PndSTTPoint);
61 
62  fMan->Init();
63  char str[80];
64  char str1[80];
65  char str2[80];
66  char str3[80];
67 
68  TGeoNode* trk;
69  TGeoNode* trl;
70  TGeoNode* trab;
71  TGeoNode* trsi;
72 
73  std::cout<<" gGeoM "<<gGeoManager<<std::endl;
74  int k;
75  gGeoManager->SetVisLevel(0);
76 
77  TGeoVolume* top = gGeoManager->GetTopVolume();
78  //gGeoManager->SetVisLevel(4);
79 
80 // the secondary target (detetctor volume) consist of 4 blocks
81 // denominated by "stg0%d ", each of this block acts as a mother volume
82 // contains 20 layers which also mother volume for a double layer "stglay%d_1".
83 // the double layer is composed by one silicon and one absorber layers
84 // These are the "real" detector volumes,
85 // the names of these volumes are given by "stglAb%d_1" and "stglSi%d_1".
86 /*
87  for(int i=0;i<4;i++)
88  {
89 
90 
91  sprintf(str,"stg0%d_1",i+1);
92  std::cout<<" name "<<str<<std::endl;
93 
94  TGeoNode* trk = top->FindNode(str);
95  cout<<" tr "<<trk<<endl;
96 
97  for(int j=0;j<20;j++){
98  if(i==0) k = j;
99  if(i==1) k = j+20;
100  if(i==2) k = j+40;
101  if(i==3) k = j+60;
102 
103  sprintf(str1,"stglay%d_1",k);
104  TGeoNode* trl = trk->GetVolume()->FindNode(str1);
105  //cout<<" trl "<<trl<<" name "<<str1<<endl;
106 
107 
108  sprintf(str2,"stglAb%d_1",k);
109  TGeoNode* tra = trl->GetVolume()->FindNode(str2);
110  //cout<<" tra "<<tra<< " same "<<str2<<endl;
111  tra->GetVolume()->SetLineColor(kYellow);
112  sprintf(str3,"stglSi%d_1",k);
113  TGeoNode* trs = trl->GetVolume()->FindNode(str3);
114  //cout<<" tra "<<tra<< " same "<<str2<<endl;
115  trs->GetVolume()->SetLineColor(kMagenta);
116  //fMan->AddGlobalElement(tra[k]);
117  }
118  }
119 */
120 
121 }
TGeoManager * gGeoManager
TGeoVolume * top
FairRunAna * fRun
Definition: hit_dirc.C:58
FairMCTracks * Track
Definition: drawEveTracks.C:8
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
GFTrack * trk
Definition: checkgenfit.C:13
FairEventManager * fMan
Definition: drawEveTracks.C:7