HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoRecoMonitorGui.h
Go to the documentation of this file.
1 #ifndef HARPORECOMONITORGUI_H
2 #define HARPORECOMONITORGUI_H
3 
4 
5 
6 #include <TGClient.h>
7 
8 
9 #include <TPad.h>
10 #include <TH1.h>
11 #include <TH2.h>
12 #include <TLine.h>
13 #include <TCanvas.h>
14 #include <TRootEmbeddedCanvas.h>
15 #include <TGFrame.h>
16 #include <TGComboBox.h>
17 #include <TGButton.h>
18 #include <TGLabel.h>
19 #include <TGButtonGroup.h>
20 //#include <TGButton.h>
21 #include <TGNumberEntry.h>
22 #include <TGListBox.h>
23 #include <TGTab.h>
24 #include <TObjArray.h>
25 #include <TLegend.h>
26 #include <TClonesArray.h>
27 #include <TSystemDirectory.h>
28 #include <TSystem.h>
29 #include <TStyle.h>
30 #include <TChain.h>
31 #include <TProfile.h>
32 #include <TGraph.h>
33 
34 #include <math.h>
35 
36 #include "HarpoReader.h"
38 #include "HarpoClustering.h"
39 #include "HarpoClusteringBlocs.h"
40 #include "HarpoTrackingPh.h"
41 #include "HarpoKalmanTracking.h"
42 #include "HarpoKalmanFitting.h"
43 #include "HarpoKalmanNew.h"
44 #include "HarpoHoughTracking.h"
45 #include "HarpoMatching.h"
46 #include "HarpoVertexing.h"
47 #include "HarpoRecoEvent.h"
48 #include "HarpoEventSelector.h"
49 #include "HarpoSelectorVertex.h"
50 #include "HarpoSelectorPileUp.h"
53 
54 #include "TThread.h"
55 #include "TMapFile.h"
56 
57 
58 const ULong_t kNclustering = 3;
63 };
64 const ULong_t kNtracking = 5;
71 };
72 const ULong_t kNmatching = 3;
77 };
78 const ULong_t kNvertexing = 2;
82 };
83 const ULong_t kNanalysis = 7;
92 };
93 const ULong_t kNselector = 5;
100 };
101 
102 
103 class HarpoRecoMonitorGui : public TGMainFrame {
104 
105  private:
106 
108  Bool_t fAutoScale;
109 
110  TRootEmbeddedCanvas* ecTabRaw;
111  TRootEmbeddedCanvas* ecTabNoiseSuppr;
112  TRootEmbeddedCanvas* ecTabClusters;
113  TRootEmbeddedCanvas* ecTabClustersTracks;
114  TRootEmbeddedCanvas* ecTabTracks;
115  TRootEmbeddedCanvas* ecTabMatching;
116  TRootEmbeddedCanvas* ecTab3D;
117  TRootEmbeddedCanvas* ecTabSim;
118  TRootEmbeddedCanvas* ecTabVertex;
119  TRootEmbeddedCanvas* ecTabVertexing;
120  TRootEmbeddedCanvas* ecTabAnalysis;
121  TRootEmbeddedCanvas* ecSideSummary;
122  TCanvas* cSideSummary;
123  TGMainFrame* fFrameMain;
124 
125  TGTextButton* fAutoRefreshButton;
126  TGComboBox* fChooseRun;
127  TGNumberEntry* fChooseDelay;
128  TGNumberEntry* fChooseEvent;
129  TGNumberEntry* fChooseNEvents;
130  TGCheckButton* fCheckShowSpectrum;
131  TGCheckButton* fCheckAnimTracking;
132  TGCheckButton* fCheckAnimFitting;
133  TGCheckButton* fCheckAnimClustering;
134  TGTextButton* fDisplayEvent;
135  TGTextButton* fNextEvent;
136  TGTextButton* fPrevEvent;
137  TGTextButton* fFindEvent;
138 
139  TGComboBox* fChooseTrigger;
140  TGComboBox* fChooseEventType;
142  TGComboBox* fChooseTrackingType;
143  TGComboBox* fChooseMatchingType;
144  TGComboBox* fChooseVertexingType;
145  TGComboBox* fChooseAnalysisType;
146  TGComboBox* fChooseSelectorType;
147 
148  TGTextButton* fTriggerText;
150  TGCheckButton* fCheckShowTrigger;
151 
152  TGNumberEntry* fChooseNmax;
153 
154  TGNumberEntry* fChooseNch;
155  TGNumberEntry* fChooseSig;
156  TGNumberEntry* fChooseDelta;
157  TGNumberEntry* fChooseTruncL;
158  TGNumberEntry* fChooseTruncH;
159  TGNumberEntry* fChooseThr;
160  TGNumberEntry* fChooseNoiseThr;
161 
162  TGNumberEntry* fChooseNClmin;
163  TGNumberEntry* fChooseNClmax;
164  TGNumberEntry* fChooseQmin;
165 
166  TGTab* fTab;
167 
168  Int_t fRunNumber;
169 
170  TGTextButton* fDisplay;
171  TGTextButton* fDisplayBox;
172  TGTextButton* fSave;
173 
174  TGListBox* fInfoBox;
175 
176 
177  public:
178  HarpoRecoMonitorGui(const TGWindow *p, UInt_t w, UInt_t h, UInt_t opt, int argc, char **argv);
180 
181  virtual void CloseWindow();
182 
183  void BuildButtonsFrame(TGVerticalFrame* f);
184  void BuildDisplayFrame(TGVerticalFrame* f);
185  void BuildInfoFrame(TGHorizontalFrame* f);
186 
187  void SetListOfRuns(TGComboBox* box, const char* dirname);
188  Bool_t GetNextEvent();
189  void NextEvent();
190  void PrevEvent();
191  void FindEvent();
192  void InitEvent(HarpoEvent* evt);
193  void DisplayMap(TRootEmbeddedCanvas* c, Int_t proj = 0, Int_t copy = 0);
194  void DisplayEmptyMap(TRootEmbeddedCanvas* c, Int_t copy = 0);
195  void DisplayClustersTracks(TRootEmbeddedCanvas* c);
196  void DisplayTracks(TRootEmbeddedCanvas* c);
197  void DisplayVertex(TRootEmbeddedCanvas* c);
198  void Display3D(TRootEmbeddedCanvas* c);
199  void DisplaySim(TRootEmbeddedCanvas* c);
200  void DisplayEvent(HarpoEvent* event);
201  void DisplayInfo(HarpoEvent* event);
202  void DisplayEvent();
203  void LoopEvents(Int_t nEvents =1);
204  void Save();
205  void SaveEvent(HarpoEvent* evt, const char* savedir);
206 
207 
208  void SetBaselineFluctParam();
209  void SetConfig();
210  void SetSelectorParam();
211  Double_t TruncSigma(TArrayD* vect, Double_t &truncS, Double_t &truncM, Double_t tl, Double_t th);
212 
213  Bool_t TestEvent(HarpoEvent* event);
214 
215  void SetStyle();
216 
217  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
218 
219  Int_t GetDelay(){return 1000*fChooseDelay->GetNumber();}
220 
221  Bool_t fAutoRefresh;
222 
223  // HarpoAnalyseRecoMonitor* fAna;
226 
233 
235 
238  /* HarpoEventSelector* fEventSelector; */
239  /* HarpoSelectorVertex* fSelectorSelectorVertex; */
240  /* HarpoSelectorPileUp* fSelectorSelectorPileUp; */
241  /* HarpoSelectorStraightTracks* fSelectorSelectorStraightTracks; */
242 
249 
250  TH2F* fHistEvent[2];
251  TH1F* fHistSpectrum[2];
252  TH2F* fHistEventEmpty[2];
253 
254  TH1F* hDoca;
255  TH1F* hOpenAngle;
256  TH1F* hOmegaAngle;
257 
258 
259  Int_t fNevt;
260 
261 
262  ClassDef(HarpoRecoMonitorGui, 1); // Harpo Reco display
263 };
264 
265 
266 
267 #endif
HarpoAnalyse * fSelector[kNselector]
void SetListOfRuns(TGComboBox *box, const char *dirname)
HarpoKalmanFitting * fTrackFitting
Dummy analysis to run as test and example. Give basic histograms of the data.
TRootEmbeddedCanvas * ecTabSim
HarpoRecoMonitorGui(const TGWindow *p, UInt_t w, UInt_t h, UInt_t opt, int argc, char **argv)
const ULong_t kNanalysis
TRootEmbeddedCanvas * ecTabVertexing
TGComboBox * fChooseClusteringType
TGComboBox * fChooseAnalysisType
HarpoMatchingTypes
TGNumberEntry * fChooseThr
A virtual class which define intrafece between HARPO Reader and Event Analysis code.
Definition: HarpoAnalyse.h:47
TGCheckButton * fCheckAnimTracking
TGNumberEntry * fChooseNEvents
TRootEmbeddedCanvas * ecTabClusters
TGTextButton * fAutoRefreshButton
HarpoTrackingTypes
Analysis and suppression of baseline fluctuations.
TGNumberEntry * fChooseTruncH
void Display3D(TRootEmbeddedCanvas *c)
void BuildDisplayFrame(TGVerticalFrame *f)
HarpoAnalyse * fClustering[kNclustering]
HarpoAnalyseBaselineFluct * fBaselineFluct
TGNumberEntry * fChooseQmin
HarpoAnalyse * fTracking[kNtracking]
TGCheckButton * fCheckAnimFitting
HarpoAnalyse * fAnalysis[kNanalysis]
HarpoSelectorTypes
TRootEmbeddedCanvas * ecTabVertex
TRootEmbeddedCanvas * ecTabMatching
TGCheckButton * fCheckShowSpectrum
A class which instantiate the real top level reader.
Definition: HarpoReader.h:33
const ULong_t kNvertexing
TRootEmbeddedCanvas * ecTab3D
Double_t TruncSigma(TArrayD *vect, Double_t &truncS, Double_t &truncM, Double_t tl, Double_t th)
void DisplayTracks(TRootEmbeddedCanvas *c)
TGComboBox * fChooseTrackingType
A virtual class which define intrafece between HARPO Reader and Event Analysis code.
TGNumberEntry * fChooseNoiseThr
TGNumberEntry * fChooseEvent
TGNumberEntry * fChooseNmax
const ULong_t kNclustering
const ULong_t kNselector
void SaveEvent(HarpoEvent *evt, const char *savedir)
void LoopEvents(Int_t nEvents=1)
HarpoAnalysePedestalShift * fSaturation
Bool_t TestEvent(HarpoEvent *event)
TGNumberEntry * fChooseNClmin
void DisplayInfo(HarpoEvent *event)
void BuildInfoFrame(TGHorizontalFrame *f)
TGComboBox * fChooseMatchingType
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
const ULong_t kNtracking
HarpoAnalyse * fVertexing[kNvertexing]
TRootEmbeddedCanvas * ecTabTracks
void DisplayEmptyMap(TRootEmbeddedCanvas *c, Int_t copy=0)
TGNumberEntry * fChooseDelay
TRootEmbeddedCanvas * ecSideSummary
TGNumberEntry * fChooseTruncL
HarpoClusteringTypes
TGComboBox * fChooseVertexingType
HarpoAnalyse * fMatching[kNmatching]
void DisplayVertex(TRootEmbeddedCanvas *c)
TGComboBox * fChooseSelectorType
TGNumberEntry * fChooseNClmax
TGTextButton * fDisplayEvent
void DisplayClustersTracks(TRootEmbeddedCanvas *c)
void InitEvent(HarpoEvent *evt)
TRootEmbeddedCanvas * ecTabRaw
TGNumberEntry * fChooseNch
TGCheckButton * fCheckShowTrigger
void BuildButtonsFrame(TGVerticalFrame *f)
HarpoVertexingTypes
TGCheckButton * fCheckAnimClustering
void DisplayMap(TRootEmbeddedCanvas *c, Int_t proj=0, Int_t copy=0)
A class store HARPO row event data and header. Provide access metods to the row event data...
Definition: HarpoEvent.h:29
TRootEmbeddedCanvas * ecTabClustersTracks
TGTextButton * fTriggerText
TRootEmbeddedCanvas * ecTabAnalysis
const ULong_t kNmatching
TGNumberEntry * fChooseDelta
ClassDef(HarpoRecoMonitorGui, 1)
TGTextButton * fDisplayBox
HarpoAnalysisTypes
GUI for monitoring/testing reconstruction processes.
void DisplaySim(TRootEmbeddedCanvas *c)
TGNumberEntry * fChooseSig
TRootEmbeddedCanvas * ecTabNoiseSuppr