FairRoot/PandaRoot
eventDisplay_llbar.C
Go to the documentation of this file.
1 
2 
4 {
5  //-----User Settings:-----------------------------------------------
6  TString FileName="LambdaLambdaBarPol_1-642GeV_1000events";
7 
8 
9  Bool_t enablePointDraw = kTRUE;
10  Bool_t enableHitDraw = kTRUE;
11  Bool_t enableTrackDraw = kTRUE;
12  //------------------------------------------------------------------
13 
14 
15 // Load basic libraries
16  gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
17  rootlogon();
18  gSystem->Load("libEve");
19  gSystem->Load("libEventDisplay");
20  gSystem->Load("libPndEventDisplay");
21 
22  PndFileNameCreator creator(FileName.Data());
23 
24 TString SimEngine = "TGeant3";
25 TString InputFile = creator.GetSimFileName();
26 TString DigiFile = creator.GetDigiFileName();
27 TString RecoFile = creator.GetRecoFileName();
28 TString ParFile = creator.GetParFileName();
29 TString AnaFile = creator.GetCustomFileName("ana");
30 
31 
32  // ----- Reconstruction run -------------------------------------------
33  FairRunAna *fRun= new FairRunAna();
34  fRun->SetInputFile(InputFile.Data());
35  fRun->SetOutputFile("tst.root");
36 
37  TFile* testFile;
38  testFile = new TFile(DigiFile.Data());
39  if (!testFile->IsZombie()){
40  fRun->AddFriend(DigiFile.Data());
41  }
42  else {
43  enableHitDraw = kFALSE;
44  }
45  testFile->Close();
46 
47  testFile = new TFile(RecoFile.Data());
48  if (!testFile->IsZombie()){
49  fRun->AddFriend(RecoFile.Data());
50  FairGeane *Geane = new FairGeane();
51  fRun->AddTask(Geane);
52  }
53  else {
54  enableTrackDraw = kFALSE;
55  }
56  testFile->Close();
57 
58  testFile = new TFile(AnaFile.Data());
59  if (!testFile->IsZombie()){
60  fRun->AddFriend(AnaFile.Data());
61  FairGeane *Geane = new FairGeane();
62  fRun->AddTask(Geane);
63  }
64  else {
65  }
66  testFile->Close();
67 
68  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
69  FairParRootFileIo* parInput1 = new FairParRootFileIo();
70  parInput1->open(ParFile.Data());
71  rtdb->setFirstInput(parInput1);
72  FairEventManager *fMan= new FairEventManager();
73 
74 
75  //----------------------Traks and points -------------------------------------
76  if (enablePointDraw) {
77  FairMCTracks *Track = new FairMCTracks ("Monte-Carlo Tracks");
78  FairMCPointDraw *MvdPoints = new FairMCPointDraw ("MVDPoint",kBlue, kFullSquare);
79  FairMCPointDraw *EMCPoints = new FairMCPointDraw ("EmcHit",kOrange, kFullSquare);
80  FairMCPointDraw *TofSciFPoint= new FairMCPointDraw ("SciTPoint",kTeal, kFullSquare);
81  FairMCPointDraw *MdtPoint = new FairMCPointDraw ("MdtPoint",kAzure, kFullSquare);
82  FairMCPointDraw *PndDrcBarPoint = new FairMCPointDraw ("DrcBarPoint",kGreen, kFullSquare);
83  FairMCPointDraw *PndDrcPDPoint = new FairMCPointDraw ("DrcPDPoint",kViolet, kFullSquare);
84  FairMCPointDraw *PndDskParticle = new FairMCPointDraw ("DskParticle",kYellow, kFullSquare);
85  FairMCPointDraw *PndDskFLGHit = new FairMCPointDraw ("PndDskFLGHit",kPink, kFullSquare);
86  FairMCPointDraw *PndSTTPoint = new FairMCPointDraw ("STTPoint",kMagenta, kFullSquare);
87  FairMCPointDraw *PndGEMPoint = new FairMCPointDraw ("GEMPoint",kRed, kFullSquare);
88  FairMCPointDraw *PndFTSPoint = new FairMCPointDraw ("FTSPoint",kMagenta, kFullSquare);
89  FairMCPointDraw *PndFtofPoint = new FairMCPointDraw ("FtofPoint",kGreen, kFullSquare);
90 
91  fMan->AddTask(Track);
92  fMan->AddTask(MvdPoints);
93  fMan->AddTask(EMCPoints);
94  fMan->AddTask( TofSciFPoint);
95  fMan->AddTask( MdtPoint);
96  fMan->AddTask( PndDrcBarPoint);
97  fMan->AddTask( PndDrcPDPoint);
98  fMan->AddTask( PndDskParticle);
99  fMan->AddTask( PndDskFLGHit);
100  fMan->AddTask( PndSTTPoint);
101  fMan->AddTask( PndGEMPoint);
102  fMan->AddTask( PndFTSPoint);
103  fMan->AddTask( PndFtofPoint);
104  }
105 
106  //--------------- Hits ----------------------
107 
108  if (enableHitDraw) {
109  FairHitDraw *MvdRecoHit = new FairHitDraw ("MVDHitsPixel");
110  FairHitDraw *MvdRecoStrip = new FairHitDraw ("MVDHitsStrip");
111  FairHitDraw *STTHits = new FairHitDraw ("STTHit");
112  PndSttIsochroneDraw* STTIsochrone = new PndSttIsochroneDraw("STTHit");
113  STTIsochrone->UseIsochroneTime();
114  FairHitDraw *SciTHit = new FairHitDraw("SciTHit");
115  FairHitDraw *MdtHit = new FairHitDraw("MdtHit");
116  FairHitDraw *DrcHit = new FairHitDraw("DrcHit");
117  FairHitDraw *DrcPDHit = new FairHitDraw("DrcPDHit");
118  FairHitDraw *GEMHit = new FairHitDraw("GEMHit");
119  FairHitDraw *FTSHit = new FairHitDraw("FTSHit");
120  FairHitDraw *FtofHit = new FairHitDraw("FtofHit");
121 
122  fMan->AddTask(MvdRecoHit);
123  fMan->AddTask(MvdRecoStrip);
124  fMan->AddTask(STTHits);
125  // fMan->AddTask(STTIsochrone);
126  fMan->AddTask(SciTHit);
127  fMan->AddTask(MdtHit);
128  fMan->AddTask(DrcHit);
129  fMan->AddTask(DrcPDHit);
130  fMan->AddTask(GEMHit);
131  fMan->AddTask(FTSHit);
132  fMan->AddTask(FtofHit);
133  }
134 
135  if (enableTrackDraw) {
136  PndTrackDraw* SttMvdTrack = new PndTrackDraw("SttMvdTrack");
137  PndTrackDraw* SttMvdGemTrack = new PndTrackDraw("SttMvdGemTrack");
138  PndTrackDraw* FtsIdealTrack = new PndTrackDraw("FtsIdealTrack");
139  PndTrackCandDraw* IdealTrackCand = new PndTrackCandDraw("PndIdealTrackCand");
140 
141  fMan->AddTask(SttMvdTrack);
142  fMan->AddTask(SttMvdGemTrack);
143  fMan->AddTask(FtsIdealTrack);
144  fMan->AddTask(IdealTrackCand);
145  }
146 
147 
148 
149 
150  fMan->Init();
151 
152 }
TString RecoFile
TString FileName
FairGeane * Geane
FairRunAna * fRun
Definition: hit_dirc.C:58
TString DigiFile
FairMCTracks * Track
Definition: drawEveTracks.C:8
A simple class which adds the corresponding file extensions to a given base class.
virtual void UseIsochroneTime()
FairMCPointDraw * MvdPoints
Definition: drawEveTracks.C:9
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
PndMvdCreateDefaultApvMap * creator
FairEventManager * fMan
Definition: drawEveTracks.C:7
int testFile(TString nome, TString type)
Definition: testFile.C:1
eventDisplay_llbar()