FairRoot/PandaRoot
macro/detectors/rich/eventDisplay.C
Go to the documentation of this file.
1 
2 
4 {
5  //-----User Settings:-----------------------------------------------
6  TString SimEngine ="TGeant3";
7  TString InputFile ="sim_complete.root";
8  TString DigiFile ="digi_complete.root";
9  TString RecoFile ="reco_complete.root";
10  TString ParFile ="simparams.root";
11 
12  Bool_t enablePointDraw = kTRUE;
13  Bool_t enableHitDraw = kTRUE;
14  Bool_t enableTrackDraw = kTRUE;
15  //------------------------------------------------------------------
16 
17  // ----- Reconstruction run -------------------------------------------
18  FairRunAna *fRun= new FairRunAna();
19  fRun->SetInputFile(InputFile.Data());
20  fRun->SetOutputFile("tst.root");
21 
22  TFile* testFile;
23  testFile = new TFile(DigiFile.Data());
24  if (!testFile->IsZombie()){
25  fRun->AddFriend(DigiFile.Data());
26  }
27  else {
28  enableHitDraw = kFALSE;
29  }
30  testFile->Close();
31 
32  testFile = new TFile(RecoFile.Data());
33  if (!testFile->IsZombie()){
34  fRun->AddFriend(RecoFile.Data());
35  FairGeane *Geane = new FairGeane();
36  fRun->AddTask(Geane);
37  }
38  else {
39  enableTrackDraw = kFALSE;
40  }
41  testFile->Close();
42 
43  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
44  FairParRootFileIo* parInput1 = new FairParRootFileIo();
45  parInput1->open(ParFile.Data());
46  rtdb->setFirstInput(parInput1);
47  FairEventManager *fMan= new FairEventManager();
48 
49 
50  //----------------------Traks and points -------------------------------------
51  if (enablePointDraw) {
52  FairMCTracks *Track = new FairMCTracks ("Monte-Carlo Tracks");
53  FairMCPointDraw *MvdPoints = new FairMCPointDraw ("MVDPoint",kBlue, kFullSquare);
54  FairHitDraw *EMCPoints = new FairHitDraw ("EmcHit");
55  PndEmcHitDraw *EMCPoints2 = new PndEmcHitDraw("EmcHit");
56  EMCPoints->SetBoxDimensions(2.,2.,2.);
57  EMCPoints2->SetBoxDimensions(2.,2.,2.);
58  FairMCPointDraw *TofSciFPoint= new FairMCPointDraw ("SciTPoint",kTeal, kFullSquare);
59  FairMCPointDraw *MdtPoint = new FairMCPointDraw ("MdtPoint",kAzure, kFullSquare);
60  FairMCPointDraw *PndDrcBarPoint = new FairMCPointDraw ("DrcBarPoint",kGreen, kFullSquare);
61  FairMCPointDraw *PndDrcPDPoint = new FairMCPointDraw ("DrcPDPoint",kViolet, kFullSquare);
62  FairMCPointDraw *PndDskParticle = new FairMCPointDraw ("DskParticle",kYellow, kFullSquare);
63  FairMCPointDraw *PndDskFLGHit = new FairMCPointDraw ("PndDskFLGHit",kPink, kFullSquare);
64  FairMCPointDraw *PndSTTPoint = new FairMCPointDraw ("STTPoint",kMagenta, kFullSquare);
65  FairMCPointDraw *PndGEMPoint = new FairMCPointDraw ("GEMPoint",kRed, kFullSquare);
66  FairMCPointDraw *PndFTSPoint = new FairMCPointDraw ("FTSPoint",kMagenta, kFullSquare);
67  FairMCPointDraw *PndFtofPoint = new FairMCPointDraw ("FtofPoint",kGreen, kFullSquare);
68 
69  PndEmcHitCaloDraw *EmcHitCalo = new PndEmcHitCaloDraw("EmcHit");
70 
71  fMan->AddTask(Track);
72  fMan->AddTask(MvdPoints);
73  fMan->AddTask(EMCPoints);
74  fMan->AddTask(EMCPoints2);
75  fMan->AddTask( TofSciFPoint);
76  fMan->AddTask( MdtPoint);
77  fMan->AddTask( PndDrcBarPoint);
78  fMan->AddTask( PndDrcPDPoint);
79  fMan->AddTask( PndDskParticle);
80  fMan->AddTask( PndDskFLGHit);
81  fMan->AddTask( PndSTTPoint);
82  fMan->AddTask( PndGEMPoint);
83  fMan->AddTask( PndFTSPoint);
84  fMan->AddTask( PndFtofPoint);
85  fMan->AddTask(EmcHitCalo);
86 
87  }
88 
89  //--------------- Hits ----------------------
90 
91  if (enableHitDraw) {
92  FairHitDraw *MvdRecoHit = new FairHitDraw ("MVDHitsPixel");
93  FairHitDraw *MvdRecoStrip = new FairHitDraw ("MVDHitsStrip");
94  FairHitDraw *STTHits = new FairHitDraw ("STTHit");
95  PndSttIsochroneDraw* STTIsochrone = new PndSttIsochroneDraw("STTHit");
96 // STTIsochrone->UseIsochroneTime();
97  FairHitDraw *SciTHit = new FairHitDraw("SciTHit");
98  FairHitDraw *MdtHit = new FairHitDraw("MdtHit");
99  FairHitDraw *DrcHit = new FairHitDraw("DrcHit");
100  FairHitDraw *DrcPDHit = new FairHitDraw("DrcPDHit");
101  FairHitDraw *GEMHit = new FairHitDraw("GEMHit");
102  FairHitDraw *FTSHit = new FairHitDraw("FTSHit");
103  FairHitDraw *FtofHit = new FairHitDraw("FtofHit");
104  PndEmcClusterDraw *EmcBump = new PndEmcClusterDraw("EmcBump");
105  EmcBump->SetBoxDimensions(4.0,4.0,4.0);
106  fMan->AddTask(MvdRecoHit);
107  fMan->AddTask(MvdRecoStrip);
108  fMan->AddTask(STTHits);
109  fMan->AddTask(STTIsochrone);
110  fMan->AddTask(SciTHit);
111  fMan->AddTask(MdtHit);
112  fMan->AddTask(DrcHit);
113  fMan->AddTask(DrcPDHit);
114  fMan->AddTask(GEMHit);
115  fMan->AddTask(FTSHit);
116  fMan->AddTask(FtofHit);
117  fMan->AddTask(EmcBump);
118  }
119 
120  if (enableTrackDraw) {
121  PndTrackDraw* SttMvdTrack = new PndTrackDraw("SttMvdTrack");
122  PndTrackDraw* SttMvdGemTrack = new PndTrackDraw("SttMvdGemTrack", kTRUE);
123  PndTrackDraw* FtsIdealTrack = new PndTrackDraw("FtsIdealTrack");
124  PndTrackDraw* SttMvdGemGenTrack = new PndTrackDraw("SttMvdGemGenTrack", kTRUE);
125 
126  fMan->AddTask(SttMvdTrack);
127  fMan->AddTask(SttMvdGemTrack);
128  fMan->AddTask(SttMvdGemGenTrack);
129  fMan->AddTask(FtsIdealTrack);
130  }
131 
132 
133 
134 
135  fMan->Init();
136 
137 }
TString RecoFile
FairGeane * Geane
FairRunAna * fRun
Definition: hit_dirc.C:58
TString DigiFile
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
int testFile(TString nome, TString type)
Definition: testFile.C:1