Added support to display the HLT ESD Tree. See the comment in visscan_local.C for How
[u/mrichter/AliRoot.git] / EVE / alice-macros / alieve_set_cuts.C
CommitLineData
76dc7e0e 1/**************************************************************************
2 * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. *
3 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
4 * full copyright notice. *
5 **************************************************************************/
6
7// Author: Pawel Debski 2010
8
4f8b4026 9#if !defined(__CINT__) || defined(__MAKECINT__)
10#include <fstream>
11
12#include <TColor.h>
13#include <TCanvas.h>
14#include <TROOT.h>
15#include <TSystem.h>
16#include <TString.h>
17#include <TGFileDialog.h>
18#include <TGShutter.h>
19#include <TGTab.h>
20#include <TGLOverlayButton.h>
21#include <TH1.h>
22#include <TH2.h>
23#include <TPRegexp.h>
24#include <TRandom.h>
25#include <TEveGValuators.h>
26#include <TEveManager.h>
27#include <TEveElement.h>
28#include <TEveEventManager.h>
29#include <TEveWindowManager.h>
30#include <TEveViewer.h>
31#include <TEveScene.h>
32#include <TEveTrackPropagator.h>
33
6c49a8e1 34#include <AliEveEventManager.h>
35#include <AliEveMultiView.h>
36#include <AliEveTrack.h>
37#include <AliESDtrack.h>
38#include <AliESDEvent.h>
4f8b4026 39#endif
40
6aafad45 41#include <TGButton.h>
42#include <TGComboBox.h>
43#include <TEveBrowser.h>
44#include <TGButtonGroup.h>
45#include <TGLabel.h>
46#include <TGNumberEntry.h>
47#include <TG3DLine.h>
48#include <TApplication.h>
49#include <TGComboBox.h>
50#include <TLatex.h>
51#include <TGSlider.h>
4f8b4026 52#include <TGDoubleSlider.h>
6aafad45 53#include <TEvePointSet.h>
54
6aafad45 55class SetCutsWindow : public TGMainFrame {
56
57protected:
58 TGCheckButton* gDrawV0s;
59 TGCheckButton* gDrawCascades;
60 TGCheckButton* gDrawKinks;
61 TGCheckButton* gDrawVertex;
62 TGCheckButton* gDrawTracklets;
63 TGCheckButton* gDrawTracks;
64 TGCheckButton* gDrawClusters;
65 TGCheckButton* gDrawTracksType1;
66 TGCheckButton* gDrawTracksType2;
67 TGCheckButton* gDrawTracksType3;
68 TGCheckButton* gDrawTracksType4;
69 TGCheckButton* gDrawTracksType5;
70 TGCheckButton* gDrawTracksType6;
71 TGCheckButton* gDrawTracksType7;
72 TGCheckButton* gCutOnP;
73 TGCheckButton* gCutOnPt;
74 TGCheckButton* gCutOnEta;
75 TGCheckButton* gCutOnMult;
76 TGCheckButton* gCutOnCls;
77 TEveGDoubleValuator* gPRange;
78 TEveGDoubleValuator* gPtRange;
79 TEveGDoubleValuator* gEtaRange;
80 TGHSlider* gMultRange;
81 TGNumberEntry* gMultRangeNE;
82 TGHSlider* gClsRange;
83 TGNumberEntry* gClsRangeNE;
84 TGHSlider* gPMVRange;
85 TGLabel* gPMVRangeLabel;
86 TGComboBox* gVectorMode;
87 TGComboBox* gPosColorList;
88 TGTextButton* gPosColorButton;
89 TGComboBox* gNegColorList;
90 TGTextButton* gNegColorButton;
76dc7e0e 91 TGComboBox* gTrackColorScale;
6aafad45 92 TGComboBox* gBkgColorList;
93 TGTextButton* gBkgColorButton;
94 TGLOverlayButton *gOverlayButton3D;
95 TGLOverlayButton *gOverlayButtonRPhi;
96 TGLOverlayButton *gOverlayButtonRhoZ;
97 Bool_t gDrawHistograms[12];
4f8b4026 98 TGHorizontal3DLine *separator;
6aafad45 99
6aafad45 100public:
101 SetCutsWindow();
102 void MultNECallBack();
103 void MultSliderCallBack();
104 void ClsNECallBack();
105 void ClsSliderCallBack();
106 void PosTracksCallBack();
107 void NegTracksCallBack();
108 void BackgroundCallBack();
109 void PMVSliderCallBack();
110 void AddDescriptions();
111 void MuonGeometry();
112 void DefaultGeometry();
113 void BrightGeometry();
114 void TransparentGeometry();
115 void YellowGeometry();
116 void SaveAllViews();
117 void Save3DView();
118 void SaveRPhiView();
4f8b4026 119 void SaveRhoZView();
6aafad45 120 void DrawPtHisto();
121 void DrawEtaHisto();
122 void DrawPhiHisto();
123 void DrawPhiPtHisto();
124 void DrawPtYHisto();
125 void DrawEtaPhiHisto();
126 void DrawPtHistoAll();
127 void DrawEtaHistoAll();
128 void DrawPhiHistoAll();
129 void DrawPhiPtHistoAll();
130 void DrawPtYHistoAll();
131 void DrawEtaPhiHistoAll();
132 void DrawHistos();
133 void DrawHistosAll();
134 void DrawResiduals();
135 Int_t GetTrackColorByMomentum(Double_t, Int_t);
136 void SetStandardCuts();
137 void AddMomentumVectors();
138 void SetCuts();
4f8b4026 139 void SetValues();
140 void SaveMacro();
141 void LoadMacro();
6aafad45 142 void CloseTab();
6747295f 143 void Macro1();
144 void Macro2();
145 void Macro3();
146 void Macro4();
147 void Macro5();
6aafad45 148
149 ClassDef(SetCutsWindow, 0)
150};
151
152//________________________________________________
153
154namespace
155{
156
157 const char *gPictureSaveAsTypes[] = {"PNG Image", "*.png", 0, 0}; //for saving pictures
158
159}
160
6747295f 161namespace
162{
163
164 const char *gMacroSaveAsTypes[] = {"AliEve settings", "*.alieve", 0, 0};
165}
166
6aafad45 167//________________________________________________
168
169SetCutsWindow::SetCutsWindow() : TGMainFrame(gClient->GetRoot(), 10, 10, kHorizontalFrame)
170{
171
172 // Main test window.
173
174 gEve->GetWindowManager()->HideAllEveDecorations();
175
176 SetCleanup(kDeepCleanup);
177
178 TGTextButton *b = 0;
179 TGLabel *label = 0;
180 TGHorizontalFrame *hframe = 0;
181 TGHorizontalFrame *hframeMerge = 0;
4f8b4026 182
6aafad45 183 gOverlayButton3D = 0;
184 gOverlayButtonRPhi = 0;
185 gOverlayButtonRhoZ = 0;
186
187 for(Int_t i = 0; i < 12; i++)
188 gDrawHistograms[i] = kFALSE;
189
6aafad45 190 TGShutter *mainShutter = new TGShutter(this, kSunkenFrame);
191
192 TGShutterItem *item1 = new TGShutterItem(mainShutter, new TGHotString("Draw Objects"), 1);
193
194 TGShutterItem *item2 = new TGShutterItem(mainShutter, new TGHotString("Track Cuts"), 2);
195
196 TGShutterItem *item3 = new TGShutterItem(mainShutter, new TGHotString("Colors"), 3);
197
198 TGShutterItem *item4 = new TGShutterItem(mainShutter, new TGHotString("Geometry"), 4);
199
200 TGShutterItem *item5 = new TGShutterItem(mainShutter, new TGHotString("Analysis"), 5);
201
202 TGShutterItem *item6 = new TGShutterItem(mainShutter, new TGHotString("Momentum Vectors"), 6);
203
6747295f 204 TGShutterItem *item7 = new TGShutterItem(mainShutter, new TGHotString("PR macros"), 7);
205
6aafad45 206 mainShutter->AddItem(item1);
207
208 mainShutter->AddItem(item2);
209
210 mainShutter->AddItem(item3);
211
212 mainShutter->AddItem(item4);
213
214 mainShutter->AddItem(item5);
215
216 mainShutter->AddItem(item6);
217
6747295f 218 mainShutter->AddItem(item7);
219
6aafad45 220 AddFrame(mainShutter, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
221
222 TGCompositeFrame *container1 = (TGCompositeFrame *) item1->GetContainer();
223
224 TGCompositeFrame *container2 = (TGCompositeFrame *) item2->GetContainer();
225
226 TGCompositeFrame *container3 = (TGCompositeFrame *) item3->GetContainer();
227
228 TGCompositeFrame *container4 = (TGCompositeFrame *) item4->GetContainer();
229
230 TGCompositeFrame *container5 = (TGCompositeFrame *) item5->GetContainer();
231
232 TGCompositeFrame *container6 = (TGCompositeFrame *) item6->GetContainer();
233
6747295f 234 TGCompositeFrame *container7 = (TGCompositeFrame *) item7->GetContainer();
235
6aafad45 236 // Draw Elements
237
238 TGVerticalFrame *drawElements = new TGVerticalFrame(container1);
76dc7e0e 239 container1->AddFrame(drawElements, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
6aafad45 240
241 // Track Cuts
242 TGVerticalFrame *trackCuts = new TGVerticalFrame(container2);
76dc7e0e 243 container2->AddFrame(trackCuts, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
6aafad45 244
245 // Buttons
246 TGVerticalFrame *buttons = new TGVerticalFrame(container3);
76dc7e0e 247 container3->AddFrame(buttons, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
6aafad45 248
249 // Geometry
250 TGVerticalFrame *geometry = new TGVerticalFrame(container4);
76dc7e0e 251 container4->AddFrame(geometry, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
6aafad45 252
253 // Analysis
254 TGVerticalFrame *analysis = new TGVerticalFrame(container5);
76dc7e0e 255 container5->AddFrame(analysis, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
6aafad45 256
257 // Momentum Vectors
258 TGVerticalFrame *momentumVectors = new TGVerticalFrame(container6);
76dc7e0e 259 container6->AddFrame(momentumVectors, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
6aafad45 260
6747295f 261 // PR macros
262 TGVerticalFrame *prMacros = new TGVerticalFrame(container7);
263 container7->AddFrame(prMacros, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
264
6aafad45 265 // DRAW ELEMENTS
266
267 separator = new TGHorizontal3DLine(drawElements);
268 drawElements->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
269
270 label = new TGLabel(drawElements, "ESD objects");
271 drawElements->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
272
273 separator = new TGHorizontal3DLine(drawElements);
274 drawElements->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
275
276 // V0s
277
278 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
279
280 label = new TGLabel(hframeMerge, "V0s");
281 gDrawV0s = new TGCheckButton(hframeMerge, "", 10);
282 gDrawV0s->SetEnabled(kTRUE);
283 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
284 hframeMerge->AddFrame(gDrawV0s);
285
286 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
287
288 // Cascades
289
290 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
291
292 label = new TGLabel(hframeMerge, "Cascades");
293 gDrawCascades = new TGCheckButton(hframeMerge, "", 10);
294 gDrawCascades->SetEnabled(kTRUE);
295 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
296 hframeMerge->AddFrame(gDrawCascades);
297
298 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
299
300 // Kinks
301
302 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
303
304 label = new TGLabel(hframeMerge, "Kinks");
305 gDrawKinks = new TGCheckButton(hframeMerge, "", 10);
306 gDrawKinks->SetEnabled(kTRUE);
307 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
308 hframeMerge->AddFrame(gDrawKinks);
309
310 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
311
312 // Primary Vertex
313
314 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
315
316 label = new TGLabel(hframeMerge, "Primary Vertex");
317 gDrawVertex = new TGCheckButton(hframeMerge, "", 10);
318 gDrawVertex->SetEnabled(kTRUE);
319 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
320 hframeMerge->AddFrame(gDrawVertex);
321
322 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
323
324 // Tracklets
325
326 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
327
328 label = new TGLabel(hframeMerge, "Tracklets");
329 gDrawTracklets = new TGCheckButton(hframeMerge, "", 10);
330 gDrawTracklets->SetEnabled(kTRUE);
331 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
332 hframeMerge->AddFrame(gDrawTracklets);
333
334 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
335
336 // Tracks
337
338 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
339
340 label = new TGLabel(hframeMerge, "Tracks");
341 gDrawTracks = new TGCheckButton(hframeMerge, "", 10);
342 gDrawTracks->SetEnabled(kTRUE);
343 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
344 hframeMerge->AddFrame(gDrawTracks);
345
346 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
347
348 // Clusters
349
350 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
351
352 label = new TGLabel(hframeMerge, "Clusters");
353 gDrawClusters = new TGCheckButton(hframeMerge, "", 10);
354 gDrawClusters->SetEnabled(kTRUE);
355 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
356 hframeMerge->AddFrame(gDrawClusters);
357
358 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
359
6747295f 360 // Muon
361
362 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
363
364 label = new TGLabel(hframeMerge, "MUON");
365 gDrawVertex = new TGCheckButton(hframeMerge, "", 10);
366 gDrawVertex->SetEnabled(kTRUE);
367 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
368 hframeMerge->AddFrame(gDrawVertex);
369
370 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
371
6aafad45 372 // TRACK TYPES
373
374 separator = new TGHorizontal3DLine(drawElements);
375 drawElements->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
376
377 label = new TGLabel(drawElements, "Track types");
378 drawElements->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
379
380 separator = new TGHorizontal3DLine(drawElements);
381 drawElements->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
382
383 // sigma < 3
384
385 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
386
387 label = new TGLabel(hframeMerge, "Sigma < 3");
388 gDrawTracksType1 = new TGCheckButton(hframeMerge, "", 10);
389 gDrawTracksType1->SetEnabled(kTRUE);
390 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
391 hframeMerge->AddFrame(gDrawTracksType1);
392
393 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
394
395 // 3 < sigma < 5
396
397 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
398
399 label = new TGLabel(hframeMerge, "3 < Sigma < 5");
400 gDrawTracksType2 = new TGCheckButton(hframeMerge, "", 10);
401 gDrawTracksType2->SetEnabled(kTRUE);
402 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
403 hframeMerge->AddFrame(gDrawTracksType2);
404
405 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
406
407 // 5 < Sigma
408
409 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
410
411 label = new TGLabel(hframeMerge, "5 < Sigma");
412 gDrawTracksType3 = new TGCheckButton(hframeMerge, "", 10);
413 gDrawTracksType3->SetEnabled(kTRUE);
414 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
415 hframeMerge->AddFrame(gDrawTracksType3);
416
417 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
418
419 // no ITS refit;
420
421 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
422
423 label = new TGLabel(hframeMerge, "no ITS refit");
424 gDrawTracksType4 = new TGCheckButton(hframeMerge, "", 10);
425 gDrawTracksType4->SetEnabled(kTRUE);
426 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
427 hframeMerge->AddFrame(gDrawTracksType4);
428
429 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
430
431 // no TPC refit
432
433 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
434
435 label = new TGLabel(hframeMerge, "no TPC refit");
436 gDrawTracksType5 = new TGCheckButton(hframeMerge, "", 10);
437 gDrawTracksType5->SetEnabled(kTRUE);
438 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
439 hframeMerge->AddFrame(gDrawTracksType5);
440
441 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
442
443 // ITS ncl>=3
444
445 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
446
447 label = new TGLabel(hframeMerge, "ITS ncl>=3");
448 gDrawTracksType6 = new TGCheckButton(hframeMerge, "", 10);
449 gDrawTracksType6->SetEnabled(kTRUE);
450 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
451 hframeMerge->AddFrame(gDrawTracksType6);
452
453 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
454
455 // ITS others
456
457 hframeMerge = new TGHorizontalFrame(drawElements, 200, 20, kFixedWidth);
458
459 label = new TGLabel(hframeMerge, "ITS others");
460 gDrawTracksType7 = new TGCheckButton(hframeMerge, "", 10);
461 gDrawTracksType7->SetEnabled(kTRUE);
462 hframeMerge->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
463 hframeMerge->AddFrame(gDrawTracksType7);
464
465 drawElements->AddFrame(hframeMerge, new TGLayoutHints(kLHintsExpandX));
466
467 // Main menu
468
469 separator = new TGHorizontal3DLine(drawElements);
470 drawElements->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
471
472 hframe = new TGHorizontalFrame(drawElements, 150, 20, kFixedWidth);
473
474 b = new TGTextButton(hframe, "Apply Cuts");
475 b->Connect("Clicked()", "SetCutsWindow", this, "SetCuts()");
476
477 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
478
479 drawElements->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
480
481 hframe = new TGHorizontalFrame(drawElements, 150, 20, kFixedWidth);
482
483 b = new TGTextButton(hframe, "Close Tab");
484 b->Connect("Clicked()", "SetCutsWindow", this, "CloseTab()");
485
486 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
487
488 drawElements->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
489
490 // TRACK CUTS
491
492 separator = new TGHorizontal3DLine(trackCuts);
493 trackCuts->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
494
495 hframe = new TGHorizontalFrame(trackCuts, 200, 20, kFixedWidth);
496
497 gPRange = new TEveGDoubleValuator(hframe,"P range:", 40, 0);
498 gPRange->SetNELength(6);
499 gPRange->SetLabelWidth(50);
500 gPRange->Build();
501 gPRange->GetSlider()->SetWidth(180);
502 gPRange->SetLimits(0, 5, TGNumberFormat::kNESRealTwo);
503 gPRange->SetValues(0, 5, TGNumberFormat::kNESRealTwo);
504
505 gCutOnP = new TGCheckButton(hframe, "", 10);
506 gCutOnP->SetEnabled(kTRUE);
507
508 hframe->AddFrame(gPRange, new TGLayoutHints(kLHintsExpandX, 10, 10, 10, 10));
509 hframe->AddFrame(gCutOnP, new TGLayoutHints(kLHintsNormal, 10, 10, 10, 10));
510
511 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
512
513 // Pt
514
515 hframe = new TGHorizontalFrame(trackCuts, 200, 20, kFixedWidth);
516
517 gPtRange = new TEveGDoubleValuator(hframe,"Pt range:", 40, 0);
518 gPtRange->SetNELength(6);
519 gPtRange->SetLabelWidth(50);
520 gPtRange->Build();
521 gPtRange->GetSlider()->SetWidth(180);
522 gPtRange->SetLimits(0, 5, TGNumberFormat::kNESRealTwo);
523 gPtRange->SetValues(0, 5, TGNumberFormat::kNESRealTwo);
524
525 gCutOnPt = new TGCheckButton(hframe, "", 10);
526 gCutOnPt->SetEnabled(kTRUE);
527
528 hframe->AddFrame(gPtRange, new TGLayoutHints(kLHintsExpandX, 10, 10, 10, 10));
529 hframe->AddFrame(gCutOnPt, new TGLayoutHints(kLHintsNormal, 10, 10, 10, 10));
530
531 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
532
533 // Eta
534
535 hframe = new TGHorizontalFrame(trackCuts, 200, 20, kFixedWidth);
536
537 gEtaRange = new TEveGDoubleValuator(hframe,"Eta range:", 40, 0);
538 gEtaRange->SetNELength(6);
539 gEtaRange->SetLabelWidth(50);
540 gEtaRange->Build();
541 gEtaRange->GetSlider()->SetWidth(180);
542 gEtaRange->SetLimits(-5, 5, TGNumberFormat::kNESRealTwo);
543 gEtaRange->SetValues(-5, 5, TGNumberFormat::kNESRealTwo);
544
545 gCutOnEta = new TGCheckButton(hframe, "", 10);
546 gCutOnEta->SetEnabled(kTRUE);
547
548 hframe->AddFrame(gEtaRange, new TGLayoutHints(kLHintsExpandX, 10, 10, 10, 10));
549 hframe->AddFrame(gCutOnEta, new TGLayoutHints(kLHintsNormal, 10, 10, 10, 10));
550
551 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
552
553 // Multiplicity
554
555 hframe = new TGHorizontalFrame(trackCuts, 200, 20, kFixedWidth);
556
557 label = new TGLabel(hframe, "% Tracks displayed:");
558
559 gMultRangeNE = new TGNumberEntry(hframe, 0, 6);
560 gMultRangeNE->SetNumber(100);
561 gCutOnMult = new TGCheckButton(hframe, "", 10);
562 gCutOnMult->SetEnabled(kTRUE);
563
564 hframe->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
565 hframe->AddFrame(gMultRangeNE, new TGLayoutHints(kLHintsNormal, 0, 0, 0, 0));
566 hframe->AddFrame(gCutOnMult, new TGLayoutHints(kLHintsRight, 10, 10, 0, 0));//kLHintsNormal
567
568 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0));
569
570 hframe = new TGHorizontalFrame(trackCuts, 200, 20, kFixedWidth);
571
572 gMultRange = new TGHSlider(hframe,180);
573 gMultRange->SetRange(0, 100);
574 gMultRange->SetPosition(100);
575 gMultRange->Connect("PositionChanged(Int_t)", "SetCutsWindow", this, "MultSliderCallBack()");
576
577 gMultRangeNE->Connect("ValueSet(Long_t)", "SetCutsWindow", this, "MultNECallBack()");
578
579 hframe->AddFrame(gMultRange, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
580
581 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 10));
582
583 // TPC Clusters
584
585 hframe = new TGHorizontalFrame(trackCuts, 200, 20, kFixedWidth);
586
587 label = new TGLabel(hframe, "TPC clusters:");
588
589 gClsRangeNE = new TGNumberEntry(hframe, 0, 6);
590 gClsRangeNE->SetNumber(0);
591 gClsRangeNE->Connect("ValueSet(Long_t)", "SetCutsWindow", this, "ClsNECallBack()");
592
593 gCutOnCls = new TGCheckButton(hframe, "", 10);
594 gCutOnCls->SetEnabled(kTRUE);
595
596 hframe->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
597 hframe->AddFrame(gClsRangeNE, new TGLayoutHints(kLHintsNormal, 0, 0, 0, 0));
598 hframe->AddFrame(gCutOnCls, new TGLayoutHints(kLHintsRight, 10, 10, 0, 0));//kLHintsNormal
599
600 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0));
601
602 hframe = new TGHorizontalFrame(trackCuts, 200, 20, kFixedWidth);
603
604 gClsRange = new TGHSlider(hframe,180);
605 gClsRange->SetRange(0, 200);
606 gClsRange->SetPosition(0);
607 gClsRange->Connect("PositionChanged(Int_t)", "SetCutsWindow", this, "ClsSliderCallBack()");
608
609 hframe->AddFrame(gClsRange, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
610
611 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 10));
612
613 separator = new TGHorizontal3DLine(trackCuts);
614 trackCuts->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
615
616 // Standard cuts
617
618 hframe = new TGHorizontalFrame(trackCuts, 100, 20, kFixedWidth);
619
620 b = new TGTextButton(hframe, "Standard Cuts");
621 b->Connect("Clicked()", "SetCutsWindow", this, "SetStandardCuts()");
622
623 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
624
625 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 10, 10, 10, 10));
626
627 // Main menu
628
629 separator = new TGHorizontal3DLine(trackCuts);
630 trackCuts->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
631
632 hframe = new TGHorizontalFrame(trackCuts, 150, 20, kFixedWidth);
633
634 b = new TGTextButton(hframe, "Apply Cuts");
635 b->Connect("Clicked()", "SetCutsWindow", this, "SetCuts()");
636
637 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
638
639 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
640
641 hframe = new TGHorizontalFrame(trackCuts, 150, 20, kFixedWidth);
642
643 b = new TGTextButton(hframe, "Close Tab");
644 b->Connect("Clicked()", "SetCutsWindow", this, "CloseTab()");
645
646 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
647
648 trackCuts->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
649
6aafad45 650 // BUTTONS
651
652 separator = new TGHorizontal3DLine(buttons);
653 buttons->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
654
655 // Positive tracks colorset
656
657 hframe = new TGHorizontalFrame(buttons, 200, 20, kFixedWidth);
658
659 label = new TGLabel(hframe, "Positive tracks:");
660 hframe->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
661
662 gPosColorList = new TGComboBox(hframe);
76dc7e0e 663 gPosColorList->AddEntry("Mixed 1", 0);
664 gPosColorList->AddEntry("Mixed 2", 1);
665 gPosColorList->AddEntry("Cyan-Blue", 2);
666 gPosColorList->AddEntry("Yellow-Red", 3);
667 gPosColorList->AddEntry("Red 1", 4);
668 gPosColorList->AddEntry("Red 2", 5);
669 gPosColorList->AddEntry("Orange 1", 6);
670 gPosColorList->AddEntry("Orange 2", 7);
671 gPosColorList->AddEntry("Yellow 1", 8);
672 gPosColorList->AddEntry("Yellow 2", 9);
673 gPosColorList->AddEntry("Spring 1", 10);
674 gPosColorList->AddEntry("Spring 2", 11);
675 gPosColorList->AddEntry("Green 1", 12);
676 gPosColorList->AddEntry("Green 2", 13);
677 gPosColorList->AddEntry("Teal 1", 14);
678 gPosColorList->AddEntry("Teal 2", 15);
679 gPosColorList->AddEntry("Cyan 1", 16);
680 gPosColorList->AddEntry("Cyan 2", 17);
681 gPosColorList->AddEntry("Azure 1", 18);
682 gPosColorList->AddEntry("Azure 2", 19);
683 gPosColorList->AddEntry("Blue 1", 20);
684 gPosColorList->AddEntry("Blue 2", 21);
685 gPosColorList->AddEntry("Violet 1", 22);
686 gPosColorList->AddEntry("Violet 2", 23);
687 gPosColorList->AddEntry("Magenta 1", 24);
688 gPosColorList->AddEntry("Magenta 2", 25);
689 gPosColorList->AddEntry("Pink 1", 26);
690 gPosColorList->AddEntry("Pink 2", 27);
691
692 gPosColorList->Select(0, kFALSE);
693
6aafad45 694 gPosColorList->Resize(100,20);
695 gPosColorList->Connect("Selected(Int_t)", "SetCutsWindow", this, "PosTracksCallBack()");
696 hframe->AddFrame(gPosColorList, new TGLayoutHints(kLHintsExpandX));
697
698 gPosColorButton = new TGTextButton(hframe, " ");
699
700 hframe->AddFrame(gPosColorButton, new TGLayoutHints(kLHintsNormal, 5, 5, 1, 1));
701
702 buttons->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
703
704 // Negative tracks colorset
705
706 hframe = new TGHorizontalFrame(buttons, 200, 20, kFixedWidth);
707
708 label = new TGLabel(hframe, "Negative tracks:");
709 hframe->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
710
711 gNegColorList = new TGComboBox(hframe);
76dc7e0e 712 gNegColorList->AddEntry("Mixed 1", 0);
713 gNegColorList->AddEntry("Mixed 2", 1);
714 gNegColorList->AddEntry("Cyan-Blue", 2);
715 gNegColorList->AddEntry("Yellow-Red", 3);
716 gNegColorList->AddEntry("Red 1", 4);
717 gNegColorList->AddEntry("Red 2", 5);
718 gNegColorList->AddEntry("Orange 1", 6);
719 gNegColorList->AddEntry("Orange 2", 7);
720 gNegColorList->AddEntry("Yellow 1", 8);
721 gNegColorList->AddEntry("Yellow 2", 9);
722 gNegColorList->AddEntry("Spring 1", 10);
723 gNegColorList->AddEntry("Spring 2", 11);
724 gNegColorList->AddEntry("Green 1", 12);
725 gNegColorList->AddEntry("Green 2", 13);
726 gNegColorList->AddEntry("Teal 1", 14);
727 gNegColorList->AddEntry("Teal 2", 15);
728 gNegColorList->AddEntry("Cyan 1", 16);
729 gNegColorList->AddEntry("Cyan 2", 17);
730 gNegColorList->AddEntry("Azure 1", 18);
731 gNegColorList->AddEntry("Azure 2", 19);
732 gNegColorList->AddEntry("Blue 1", 20);
733 gNegColorList->AddEntry("Blue 2", 21);
734 gNegColorList->AddEntry("Violet 1", 22);
735 gNegColorList->AddEntry("Violet 2", 23);
736 gNegColorList->AddEntry("Magenta 1", 24);
737 gNegColorList->AddEntry("Magenta 2", 25);
738 gNegColorList->AddEntry("Pink 1", 26);
739 gNegColorList->AddEntry("Pink 2", 27);
740
741 gNegColorList->Select(0, kFALSE);
742
6aafad45 743 gNegColorList->Resize(100,20);
744 gNegColorList->Connect("Selected(Int_t)", "SetCutsWindow", this, "NegTracksCallBack()");
745 hframe->AddFrame(gNegColorList, new TGLayoutHints(kLHintsExpandX));
746
747 gNegColorButton = new TGTextButton(hframe, " ");
748 hframe->AddFrame(gNegColorButton, new TGLayoutHints(kLHintsNormal, 5, 5, 1, 1));
749
750 buttons->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
751
76dc7e0e 752 // Color scale
753
754 hframe = new TGHorizontalFrame(buttons, 200, 20, kFixedWidth);
755
756 label = new TGLabel(hframe, "Color scale:");
757 hframe->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
758
759 gTrackColorScale = new TGComboBox(hframe);
760 gTrackColorScale->AddEntry("Linear", 1);
761 gTrackColorScale->AddEntry("Logarithmic", 2);
762 gTrackColorScale->AddEntry("Power", 3);
763
764 gTrackColorScale->Select(1, kFALSE);
765
766 gTrackColorScale->Resize(100,20);
767 hframe->AddFrame(gTrackColorScale, new TGLayoutHints(kLHintsExpandX));
768
769 label = new TGLabel(hframe, " ");
770 hframe->AddFrame(label, new TGLayoutHints(kLHintsNormal, 5, 5, 1, 1));
771
772 buttons->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
773
774
6aafad45 775 // Background color
776
777 hframe = new TGHorizontalFrame(buttons, 200, 20, kFixedWidth);
778
779 label = new TGLabel(hframe, "Background:");
780 hframe->AddFrame(label, new TGLayoutHints(kLHintsExpandX));
781
782 gBkgColorList = new TGComboBox(hframe);
783 gBkgColorList->AddEntry("White", 1);
784 gBkgColorList->AddEntry("Black", 2);
76dc7e0e 785
786 gBkgColorList->Select(1, kFALSE);
787
6aafad45 788 gBkgColorList->Resize(100,20);
789 gBkgColorList->Connect("Selected(Int_t)", "SetCutsWindow", this, "BackgroundCallBack()");
790 hframe->AddFrame(gBkgColorList, new TGLayoutHints(kLHintsExpandX));
791
792 gBkgColorButton = new TGTextButton(hframe, " ");
793 hframe->AddFrame(gBkgColorButton, new TGLayoutHints(kLHintsNormal, 5, 5, 1, 1));
794
795 buttons->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
796
797 // Main menu
798
799 separator = new TGHorizontal3DLine(buttons);
800 buttons->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
801
802 hframe = new TGHorizontalFrame(buttons, 150, 20, kFixedWidth);
803
804 b = new TGTextButton(hframe, "Apply Cuts");
805 b->Connect("Clicked()", "SetCutsWindow", this, "SetCuts()");
806
807 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
808
809 buttons->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
810
811 hframe = new TGHorizontalFrame(buttons, 150, 20, kFixedWidth);
812
813 b = new TGTextButton(hframe, "Close Tab");
814 b->Connect("Clicked()", "SetCutsWindow", this, "CloseTab()");
815
816 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
817
818 buttons->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
819
820 // GEOMETRY
821
822 separator = new TGHorizontal3DLine(geometry);
823 geometry->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
824
825 label = new TGLabel(geometry, "Geometries");
826 geometry->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
827
828 // Geometry
829
830 separator = new TGHorizontal3DLine(geometry);
831 geometry->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
832
833 hframe = new TGHorizontalFrame(geometry, 200, 20, kFixedWidth);
834
835 b = new TGTextButton(hframe, "MUON arm");
836 b->Connect("Clicked()", "SetCutsWindow", this, "MuonGeometry()");
837 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
838
839 geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
840
841 hframe = new TGHorizontalFrame(geometry, 200, 20, kFixedWidth);
842
843 b = new TGTextButton(hframe, "Default");
844 b->Connect("Clicked()", "SetCutsWindow", this, "DefaultGeometry()");
845 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
846
847 b = new TGTextButton(hframe, "Bright");
848 b->Connect("Clicked()", "SetCutsWindow", this, "BrightGeometry()");
849 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
850
851 geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
852
853 hframe = new TGHorizontalFrame(geometry, 200, 20, kFixedWidth);
854
855 b = new TGTextButton(hframe, "Transparent");
856 b->Connect("Clicked()", "SetCutsWindow", this, "TransparentGeometry()");
857 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
858
859 b = new TGTextButton(hframe, "Yellow");
860 b->Connect("Clicked()", "SetCutsWindow", this, "YellowGeometry()");
861 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
862
863 geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
864
6aafad45 865 // Snapshots
866
867 separator = new TGHorizontal3DLine(geometry);
868 geometry->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
869
870 label = new TGLabel(geometry, "Snapshots");
871 geometry->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
872
873 separator = new TGHorizontal3DLine(geometry);
874 geometry->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
875
6aafad45 876 hframe = new TGHorizontalFrame(geometry, 200, 20, kFixedWidth);
877
878 b = new TGTextButton(hframe, "Save all Views");
879 b->Connect("Clicked()", "SetCutsWindow", this, "SaveAllViews()");
880 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
881
882 geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
883
884 hframe = new TGHorizontalFrame(geometry, 200, 20, kFixedWidth);
885
886 b = new TGTextButton(hframe, "3D View");
887 b->Connect("Clicked()", "SetCutsWindow", this, "Save3DView()");
888 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
889
890 b = new TGTextButton(hframe, "RPhi");
891 b->Connect("Clicked()", "SetCutsWindow", this, "SaveRPhiView()");
892 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
893
894 b = new TGTextButton(hframe, "RhoZ");
895 b->Connect("Clicked()", "SetCutsWindow", this, "SaveRhoZView()");
896 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
897
898 geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
899
900 // Main menu
901
902 separator = new TGHorizontal3DLine(geometry);
903 geometry->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
904
905 hframe = new TGHorizontalFrame(geometry, 150, 20, kFixedWidth);
906
907 b = new TGTextButton(hframe, "Apply Cuts");
908 b->Connect("Clicked()", "SetCutsWindow", this, "SetCuts()");
909
910 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
911
912 geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
913
914 hframe = new TGHorizontalFrame(geometry, 150, 20, kFixedWidth);
915
916 b = new TGTextButton(hframe, "Close Tab");
917 b->Connect("Clicked()", "SetCutsWindow", this, "CloseTab()");
918
919 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
920
921 geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
922
6747295f 923// hframe = new TGHorizontalFrame(geometry, 150, 20, kFixedWidth);
924
925// TGPictureButton* b1 = new TGPictureButton(hframe, gClient->GetPicture("$ALICE_ROOT/EVE/alice-data/ALICE_logo.png"));
926
927// hframe->AddFrame(b1, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
928
929// geometry->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
930
6aafad45 931 // ANALYSIS
932
933 separator = new TGHorizontal3DLine(analysis);
934 analysis->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
935
936 label = new TGLabel(analysis, "Single Event Histograms");
937 analysis->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
938
939 // Single Event
940
941 separator = new TGHorizontal3DLine(analysis);
942 analysis->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
943
944 hframe = new TGHorizontalFrame(analysis, 200, 20, kFixedWidth);
945
946 b = new TGTextButton(hframe, "Pt");
947 b->AllowStayDown(kTRUE);
948 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPtHisto()");
76dc7e0e 949 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 950
951 b = new TGTextButton(hframe, "Eta");
952 b->AllowStayDown(kTRUE);
953 b->Connect("Clicked()", "SetCutsWindow", this, "DrawEtaHisto()");
76dc7e0e 954 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 955
956 b = new TGTextButton(hframe, "Phi");
957 b->AllowStayDown(kTRUE);
958 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPhiHisto()");
76dc7e0e 959 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 960
961 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
962
963 hframe = new TGHorizontalFrame(analysis, 200, 20, kFixedWidth);
964
965 b = new TGTextButton(hframe, "Phi-Pt");
966 b->AllowStayDown(kTRUE);
967 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPhiPtHisto()");
76dc7e0e 968 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 969
970 b = new TGTextButton(hframe, "Pt-Y");
971 b->AllowStayDown(kTRUE);
972 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPtYHisto()");
76dc7e0e 973 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 974
975 b = new TGTextButton(hframe, "Eta-Phi");
976 b->AllowStayDown(kTRUE);
977 b->Connect("Clicked()", "SetCutsWindow", this, "DrawEtaPhiHisto()");
76dc7e0e 978 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 979
980 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
981
982 hframe = new TGHorizontalFrame(analysis, 200, 20, kFixedWidth);
983
984 b = new TGTextButton(hframe, "Draw Histograms");
985 b->Connect("Clicked()", "SetCutsWindow", this, "DrawHistos()");
986 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
987
988 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
989
990 // All Events
991
992 separator = new TGHorizontal3DLine(analysis);
993 analysis->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
994
995 label = new TGLabel(analysis, "All Events Histograms");
996 analysis->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
997
998 separator = new TGHorizontal3DLine(analysis);
999 analysis->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1000
1001 hframe = new TGHorizontalFrame(analysis, 200, 20, kFixedWidth);
1002
1003 b = new TGTextButton(hframe, "Pt");
1004 b->AllowStayDown(kTRUE);
1005 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPtHistoAll()");
76dc7e0e 1006 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 1007
1008 b = new TGTextButton(hframe, "Eta");
1009 b->AllowStayDown(kTRUE);
1010 b->Connect("Clicked()", "SetCutsWindow", this, "DrawEtaHistoAll()");
76dc7e0e 1011 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 1012
1013 b = new TGTextButton(hframe, "Phi");
1014 b->AllowStayDown(kTRUE);
1015 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPhiHistoAll()");
76dc7e0e 1016 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 1017
1018 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
1019
1020 hframe = new TGHorizontalFrame(analysis, 200, 20, kFixedWidth);
1021
1022 b = new TGTextButton(hframe, "Phi-Pt");
1023 b->AllowStayDown(kTRUE);
1024 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPhiPtHistoAll()");
76dc7e0e 1025 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 1026
1027 b = new TGTextButton(hframe, "Pt-Y");
1028 b->AllowStayDown(kTRUE);
1029 b->Connect("Clicked()", "SetCutsWindow", this, "DrawPtYHistoAll()");
76dc7e0e 1030 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 1031
1032 b = new TGTextButton(hframe, "Eta-Phi");
1033 b->AllowStayDown(kTRUE);
1034 b->Connect("Clicked()", "SetCutsWindow", this, "DrawEtaPhiHistoAll()");
76dc7e0e 1035 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
6aafad45 1036
1037 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
1038
1039 hframe = new TGHorizontalFrame(analysis, 200, 20, kFixedWidth);
1040
1041 b = new TGTextButton(hframe, "Draw Histograms");
1042 b->Connect("Clicked()", "SetCutsWindow", this, "DrawHistosAll()");
1043 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1044
1045 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1046
1047 separator = new TGHorizontal3DLine(analysis);
1048 analysis->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1049
1050 label = new TGLabel(analysis, "Residuals");
1051 analysis->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1052
1053 separator = new TGHorizontal3DLine(analysis);
1054 analysis->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1055
1056 hframe = new TGHorizontalFrame(analysis, 200, 20, kFixedWidth);
1057
1058 b = new TGTextButton(hframe, "Draw Residuals");
1059 b->Connect("Clicked()", "SetCutsWindow", this, "DrawResiduals()");
1060 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1061
1062 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1063
1064 // Main menu
1065
1066 separator = new TGHorizontal3DLine(analysis);
1067 analysis->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1068
1069 hframe = new TGHorizontalFrame(analysis, 150, 20, kFixedWidth);
1070
1071 b = new TGTextButton(hframe, "Apply Cuts");
1072 b->Connect("Clicked()", "SetCutsWindow", this, "SetCuts()");
1073
1074 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
1075
1076 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1077
1078 hframe = new TGHorizontalFrame(analysis, 150, 20, kFixedWidth);
1079
1080 b = new TGTextButton(hframe, "Close Tab");
1081 b->Connect("Clicked()", "SetCutsWindow", this, "CloseTab()");
1082
1083 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1084
1085 analysis->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
1086
1087 // MOMENTUM VECTORS
1088
1089 // Draw momentum vectors
1090
1091 separator = new TGHorizontal3DLine(momentumVectors);
1092 momentumVectors->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1093
1094 label = new TGLabel(momentumVectors, "Draw Momentum Vectors");
1095 momentumVectors->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1096
1097 separator = new TGHorizontal3DLine(momentumVectors);
1098 momentumVectors->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1099
1100 hframe = new TGHorizontalFrame(momentumVectors, 200, 20, kFixedWidth);
1101
1102 label = new TGLabel(hframe, "Scale:");
1103 hframe->AddFrame(label, new TGLayoutHints(kLHintsNormal, 5, 5, 0, 0));
1104
1105 gVectorMode = new TGComboBox(hframe);
1106 gVectorMode->AddEntry("Log scale", 1);
1107 gVectorMode->AddEntry("maxP -> 600cm", 2);
1108 gVectorMode->AddEntry("1GeV -> 100cm", 3);
1109 gVectorMode->Resize(150,20);
1110 gVectorMode->Select(2);
1111
1112 hframe->AddFrame(gVectorMode, new TGLayoutHints(kLHintsNormal, 0, 5, 0, 0));
1113
1114 momentumVectors->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1115
1116 hframe = new TGHorizontalFrame(momentumVectors, 200, 20, kFixedWidth);
1117
1118 label = new TGLabel(hframe, "Minimal P: ");
1119 hframe->AddFrame(label, new TGLayoutHints(kLHintsNormal, 5, 5, 0, 0));
1120
1121 gPMVRangeLabel = new TGLabel(hframe, "0.0");
1122 hframe->AddFrame(gPMVRangeLabel, new TGLayoutHints(kLHintsNormal, 0, 0, 0, 0));
1123
1124 label = new TGLabel(hframe, "GeV/c");
1125 hframe->AddFrame(label, new TGLayoutHints(kLHintsNormal, 1, 0, 0, 0));
1126
1127 momentumVectors->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1128
1129 hframe = new TGHorizontalFrame(momentumVectors, 200, 20, kFixedWidth);
1130
1131 gPMVRange = new TGHSlider(hframe,180);
1132 gPMVRange->SetRange(0, 50);
6747295f 1133 gPMVRange->SetPosition(3);
6aafad45 1134 gPMVRange->Connect("PositionChanged(Int_t)", "SetCutsWindow", this, "PMVSliderCallBack()");
1135
1136 hframe->AddFrame(gPMVRange, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1137
1138 momentumVectors->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1139
1140 hframe = new TGHorizontalFrame(momentumVectors, 150, 20, kFixedWidth);
1141
1142 b = new TGTextButton(hframe, "Draw");
1143 b->Connect("Clicked()", "SetCutsWindow", this, "AddMomentumVectors()");
1144 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 0, 0));
1145
1146 momentumVectors->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1147
1148 // Main menu
1149
1150 separator = new TGHorizontal3DLine(momentumVectors);
1151 momentumVectors->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1152
1153 hframe = new TGHorizontalFrame(momentumVectors, 150, 20, kFixedWidth);
1154
1155 b = new TGTextButton(hframe, "Apply Cuts");
1156 b->Connect("Clicked()", "SetCutsWindow", this, "SetCuts()");
1157
1158 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
1159
1160 momentumVectors->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1161
1162 hframe = new TGHorizontalFrame(momentumVectors, 150, 20, kFixedWidth);
1163
1164 b = new TGTextButton(hframe, "Close Tab");
1165 b->Connect("Clicked()", "SetCutsWindow", this, "CloseTab()");
1166
1167 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1168
1169 momentumVectors->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX));
1170
6747295f 1171 // PR macros
1172
1173 // choose pr macro
1174
1175 separator = new TGHorizontal3DLine(prMacros);
1176 prMacros->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1177
1178 label = new TGLabel(prMacros, "Choose PR macro");
1179 prMacros->AddFrame(label, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1180
1181 separator = new TGHorizontal3DLine(prMacros);
1182 prMacros->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1183
1184 hframe = new TGHorizontalFrame(prMacros, 200, 20, kFixedWidth);
1185
1186 label = new TGLabel(hframe, "No geometry, global tracks");
1187
1188 b = new TGTextButton(hframe, "OK");
1189 b->Connect("Clicked()", "SetCutsWindow", this, "Macro1()");
1190 hframe->AddFrame(label);
1191 hframe->AddFrame(b, new TGLayoutHints(kLHintsRight));
1192
1193 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1194
1195 hframe = new TGHorizontalFrame(prMacros, 200, 20, kFixedWidth);
1196
1197 label = new TGLabel(hframe, "Clusters, global tracks, mixed colors");
1198
1199 b = new TGTextButton(hframe, "OK");
1200 b->Connect("Clicked()", "SetCutsWindow", this, "Macro2()");
1201 hframe->AddFrame(label);
1202 hframe->AddFrame(b, new TGLayoutHints(kLHintsRight));
1203
1204 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1205
1206 hframe = new TGHorizontalFrame(prMacros, 200, 20, kFixedWidth);
1207
1208 label = new TGLabel(hframe, "No geometry, clusters, tracks, mixed colors");
1209
1210 b = new TGTextButton(hframe, "OK");
1211 b->Connect("Clicked()", "SetCutsWindow", this, "Macro3()");
1212 hframe->AddFrame(label);
1213 hframe->AddFrame(b, new TGLayoutHints(kLHintsRight));
1214
1215 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1216
1217 hframe = new TGHorizontalFrame(prMacros, 200, 20, kFixedWidth);
1218
1219 label = new TGLabel(hframe, "Only V0s, cascades, kinks");
1220
1221 b = new TGTextButton(hframe, "OK");
1222 b->Connect("Clicked()", "SetCutsWindow", this, "Macro4()");
1223 hframe->AddFrame(label);
1224 hframe->AddFrame(b, new TGLayoutHints(kLHintsRight));
1225
1226 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1227
1228 hframe = new TGHorizontalFrame(prMacros, 200, 20, kFixedWidth);
1229
1230 label = new TGLabel(hframe, "No geometry, global tracks, vectors");
1231
1232 b = new TGTextButton(hframe, "OK");
1233 b->Connect("Clicked()", "SetCutsWindow", this, "Macro5()");
1234 hframe->AddFrame(label);
1235 hframe->AddFrame(b, new TGLayoutHints(kLHintsRight));
1236
1237 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1238
1239 separator = new TGHorizontal3DLine(prMacros);
1240
1241 prMacros->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1242
1243 hframe = new TGHorizontalFrame(prMacros, 200, 20, kFixedWidth);
1244
1245 b = new TGTextButton(hframe, "Save Current Settings");
1246 b->Connect("Clicked()", "SetCutsWindow", this, "SaveMacro()");
1247 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1248
1249 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1250
1251 hframe = new TGHorizontalFrame(prMacros, 200, 20, kFixedWidth);
1252
1253 b = new TGTextButton(hframe, "Load Settings");
1254 b->Connect("Clicked()", "SetCutsWindow", this, "LoadMacro()");
1255 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1256
1257 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1258
1259 // Main menu
1260
1261 separator = new TGHorizontal3DLine(prMacros);
1262 prMacros->AddFrame(separator, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1263
1264 hframe = new TGHorizontalFrame(prMacros, 150, 20, kFixedWidth);
1265
1266 b = new TGTextButton(hframe, "Apply Cuts");
1267 b->Connect("Clicked()", "SetCutsWindow", this, "SetCuts()");
1268
1269 hframe->AddFrame(b, new TGLayoutHints(kLHintsExpandX));
1270
1271 prMacros->AddFrame(hframe, new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5));
1272
6aafad45 1273 // FINAL STUFF
1274
1275 Resize();
1276
1277 MapSubwindows();
1278
1279 SetWMSizeHints(GetDefaultWidth(), GetDefaultHeight(), 1000, 1000, 0 ,0);
1280 SetWindowName("Pb-Pb set");
1281 MapRaised();
1282
1283}
1284
1285//______________________________________________________________________________
1286
1287void SetCutsWindow::MultNECallBack()
1288{
1289
1290 Double_t entry;
1291
1292 entry = gMultRangeNE->GetNumber();
1293 gMultRange->SetPosition(entry);
1294
1295 return;
1296
1297}
1298
1299//______________________________________________________________________________
1300
1301void SetCutsWindow::MultSliderCallBack()
1302{
1303
1304 Double_t entry;
1305
1306 entry = gMultRange->GetPosition();
1307 gMultRangeNE->SetNumber(entry);
1308
1309 return;
1310
1311}
1312
1313//______________________________________________________________________________
1314
1315void SetCutsWindow::ClsNECallBack()
1316{
4f8b4026 1317
6aafad45 1318 Double_t entry;
1319
1320 entry = gClsRangeNE->GetNumber();
1321 gClsRange->SetPosition(entry);
1322
1323 return;
1324
1325}
1326
1327//______________________________________________________________________________
1328
1329void SetCutsWindow::ClsSliderCallBack()
1330{
1331
1332 Double_t entry;
1333
1334 entry = gClsRange->GetPosition();
1335 gClsRangeNE->SetNumber(entry);
1336
1337 return;
1338
1339}
1340
1341//______________________________________________________________________________
1342
1343void SetCutsWindow::PosTracksCallBack()
1344{
1345
1346 switch(gPosColorList->GetSelected())
1347 {
76dc7e0e 1348 case 0:
1349 gPosColorButton->SetBackgroundColor(gROOT->GetColor(18)->GetPixel());
1350 gPosColorButton->SetText("M 1");
1351 break;
6aafad45 1352
1353 case 1:
76dc7e0e 1354 gPosColorButton->SetBackgroundColor(gROOT->GetColor(18)->GetPixel());
1355 gPosColorButton->SetText("M 2");
6aafad45 1356 break;
1357
1358 case 2:
76dc7e0e 1359 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kAzure)->GetPixel());
1360 gPosColorButton->SetText(" ");
6aafad45 1361 break;
1362
1363 case 3:
76dc7e0e 1364 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kOrange)->GetPixel());
1365 gPosColorButton->SetText(" ");
1366 break;
1367
1368 case 4:
1369 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kRed)->GetPixel());
1370 gPosColorButton->SetText(" 1 ");
1371 break;
1372
1373 case 5:
1374 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kRed)->GetPixel());
1375 gPosColorButton->SetText(" 2 ");
1376 break;
1377
1378 case 6:
1379 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kOrange)->GetPixel());
1380 gPosColorButton->SetText(" 1 ");
1381 break;
1382
1383 case 7:
1384 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kOrange)->GetPixel());
1385 gPosColorButton->SetText(" 2 ");
1386 break;
1387
1388 case 8:
1389 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kYellow)->GetPixel());
1390 gPosColorButton->SetText(" 1 ");
1391 break;
1392
1393 case 9:
1394 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kYellow)->GetPixel());
1395 gPosColorButton->SetText(" 2 ");
1396 break;
1397
1398 case 10:
1399 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kSpring)->GetPixel());
1400 gPosColorButton->SetText(" 1 ");
1401 break;
1402
1403 case 11:
1404 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kSpring)->GetPixel());
1405 gPosColorButton->SetText(" 2 ");
1406 break;
1407
1408 case 12:
1409 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kGreen)->GetPixel());
1410 gPosColorButton->SetText(" 1 ");
1411 break;
1412
1413 case 13:
1414 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kGreen)->GetPixel());
1415 gPosColorButton->SetText(" 2 ");
1416 break;
1417
1418 case 14:
1419 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kTeal)->GetPixel());
1420 gPosColorButton->SetText(" 1 ");
1421 break;
1422
1423 case 15:
1424 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kTeal)->GetPixel());
1425 gPosColorButton->SetText(" 2 ");
1426 break;
1427
1428 case 16:
1429 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kCyan)->GetPixel());
1430 gPosColorButton->SetText(" 1 ");
1431 break;
1432
1433 case 17:
1434 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kCyan)->GetPixel());
1435 gPosColorButton->SetText(" 2 ");
1436 break;
1437
1438 case 18:
1439 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kAzure)->GetPixel());
1440 gPosColorButton->SetText(" 1 ");
1441 break;
1442
1443 case 19:
1444 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kAzure)->GetPixel());
1445 gPosColorButton->SetText(" 2 ");
1446 break;
1447
1448 case 20:
1449 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kBlue)->GetPixel());
1450 gPosColorButton->SetText(" 1 ");
1451 break;
1452
1453 case 21:
1454 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kBlue)->GetPixel());
1455 gPosColorButton->SetText(" 2 ");
1456 break;
1457
1458 case 22:
1459 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kViolet)->GetPixel());
1460 gPosColorButton->SetText(" 1 ");
1461 break;
1462
1463 case 23:
1464 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kViolet)->GetPixel());
1465 gPosColorButton->SetText(" 2 ");
1466 break;
1467
1468 case 24:
1469 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kMagenta)->GetPixel());
1470 gPosColorButton->SetText(" 1 ");
1471 break;
1472
1473 case 25:
1474 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kMagenta)->GetPixel());
1475 gPosColorButton->SetText(" 2 ");
1476 break;
1477
1478 case 26:
1479 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kPink)->GetPixel());
1480 gPosColorButton->SetText(" 1 ");
1481 break;
1482
1483 case 27:
1484 gPosColorButton->SetBackgroundColor(gROOT->GetColor(kPink)->GetPixel());
1485 gPosColorButton->SetText(" 2 ");
6aafad45 1486 break;
1487
1488 default:
1489 gPosColorButton->SetBackgroundColor(gROOT->GetColor(18)->GetPixel());
76dc7e0e 1490 gPosColorButton->SetText("M 1");
6aafad45 1491 break;
1492
1493 }
1494
1495 return;
1496
1497}
1498
1499void SetCutsWindow::NegTracksCallBack()
1500{
1501
1502 switch(gNegColorList->GetSelected())
1503 {
76dc7e0e 1504 case 0:
1505 gNegColorButton->SetBackgroundColor(gROOT->GetColor(18)->GetPixel());
1506 gNegColorButton->SetText("M 1");
1507 break;
6aafad45 1508
1509 case 1:
76dc7e0e 1510 gNegColorButton->SetBackgroundColor(gROOT->GetColor(18)->GetPixel());
1511 gNegColorButton->SetText("M 2");
6aafad45 1512 break;
1513
1514 case 2:
76dc7e0e 1515 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kAzure)->GetPixel());
1516 gNegColorButton->SetText(" ");
6aafad45 1517 break;
1518
1519 case 3:
76dc7e0e 1520 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kOrange)->GetPixel());
1521 gNegColorButton->SetText(" ");
1522 break;
1523
1524 case 4:
1525 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kRed)->GetPixel());
1526 gNegColorButton->SetText(" 1 ");
1527 break;
1528
1529 case 5:
1530 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kRed)->GetPixel());
1531 gNegColorButton->SetText(" 2 ");
1532 break;
1533
1534 case 6:
1535 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kOrange)->GetPixel());
1536 gNegColorButton->SetText(" 1 ");
1537 break;
1538
1539 case 7:
1540 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kOrange)->GetPixel());
1541 gNegColorButton->SetText(" 2 ");
1542 break;
1543
1544 case 8:
1545 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kYellow)->GetPixel());
1546 gNegColorButton->SetText(" 1 ");
1547 break;
1548
1549 case 9:
1550 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kYellow)->GetPixel());
1551 gNegColorButton->SetText(" 2 ");
1552 break;
1553
1554 case 10:
1555 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kSpring)->GetPixel());
1556 gNegColorButton->SetText(" 1 ");
1557 break;
1558
1559 case 11:
1560 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kSpring)->GetPixel());
1561 gNegColorButton->SetText(" 2 ");
1562 break;
1563
1564 case 12:
1565 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kGreen)->GetPixel());
1566 gNegColorButton->SetText(" 1 ");
1567 break;
1568
1569 case 13:
1570 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kGreen)->GetPixel());
1571 gNegColorButton->SetText(" 2 ");
1572 break;
1573
1574 case 14:
1575 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kTeal)->GetPixel());
1576 gNegColorButton->SetText(" 1 ");
1577 break;
1578
1579 case 15:
1580 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kTeal)->GetPixel());
1581 gNegColorButton->SetText(" 2 ");
1582 break;
1583
1584 case 16:
1585 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kCyan)->GetPixel());
1586 gNegColorButton->SetText(" 1 ");
1587 break;
1588
1589 case 17:
1590 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kCyan)->GetPixel());
1591 gNegColorButton->SetText(" 2 ");
1592 break;
1593
1594 case 18:
1595 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kAzure)->GetPixel());
1596 gNegColorButton->SetText(" 1 ");
1597 break;
1598
1599 case 19:
1600 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kAzure)->GetPixel());
1601 gNegColorButton->SetText(" 2 ");
1602 break;
1603
1604 case 20:
1605 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kBlue)->GetPixel());
1606 gNegColorButton->SetText(" 1 ");
1607 break;
1608
1609 case 21:
1610 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kBlue)->GetPixel());
1611 gNegColorButton->SetText(" 2 ");
1612 break;
1613
1614 case 22:
1615 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kViolet)->GetPixel());
1616 gNegColorButton->SetText(" 1 ");
1617 break;
1618
1619 case 23:
1620 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kViolet)->GetPixel());
1621 gNegColorButton->SetText(" 2 ");
1622 break;
1623
1624 case 24:
1625 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kMagenta)->GetPixel());
1626 gNegColorButton->SetText(" 1 ");
1627 break;
1628
1629 case 25:
1630 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kMagenta)->GetPixel());
1631 gNegColorButton->SetText(" 2 ");
1632 break;
1633
1634 case 26:
1635 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kPink)->GetPixel());
1636 gNegColorButton->SetText(" 1 ");
1637 break;
1638
1639 case 27:
1640 gNegColorButton->SetBackgroundColor(gROOT->GetColor(kPink)->GetPixel());
1641 gNegColorButton->SetText(" 2 ");
6aafad45 1642 break;
1643
1644 default:
1645 gNegColorButton->SetBackgroundColor(gROOT->GetColor(18)->GetPixel());
76dc7e0e 1646 gNegColorButton->SetText("M 1");
6aafad45 1647 break;
1648
1649 }
1650
1651 return;
1652
1653}
1654
1655void SetCutsWindow::BackgroundCallBack()
1656{
1657
1658 switch(gBkgColorList->GetSelected())
1659 {
1660
1661 case 1:
1662 gBkgColorButton->SetBackgroundColor(gROOT->GetColor(0)->GetPixel());
1663 gBkgColorButton->SetText(" ");
1664
1665 if(!gEve->GetViewers()->UseLightColorSet())
1666 gEve->GetViewers()->SwitchColorSet(); //white background
1667
1668 break;
1669
1670 case 2:
1671 gBkgColorButton->SetBackgroundColor(gROOT->GetColor(1)->GetPixel());
1672 gBkgColorButton->SetText(" ");
1673
1674 if(gEve->GetViewers()->UseLightColorSet())
1675 gEve->GetViewers()->SwitchColorSet(); //black background
1676
1677 break;
1678
1679 default:
1680 gBkgColorButton->SetBackgroundColor(gROOT->GetColor(18)->GetPixel());
1681 gBkgColorButton->SetText(" ");
1682
1683 break;
1684
1685 }
1686
1687 return;
1688
1689}
1690
1691//______________________________________________________________________________
1692
1693void SetCutsWindow::PMVSliderCallBack()
1694{
1695
6aafad45 1696 Double_t entry;
1697
1698 entry = gPMVRange->GetPosition();
1699 gPMVRangeLabel->SetText(Form("%2.1f",0.1*entry));
1700
1701 return;
1702
1703}
1704
1705//______________________________________________________________________________
1706
1707void SetCutsWindow::AddDescriptions()
1708{
76dc7e0e 1709
6aafad45 1710/*
1711 if(gOverlayButton3D && gOverlayButtonRPhi && gOverlayButtonRhoZ)
1712 {
1713
1714 (dynamic_cast<TEveViewer*>(gEve->GetViewers()->FindChild("3D View")))->GetGLViewer()->RemoveOverlayElement((TGLOverlayElement*)gOverlayButton3D);
1715 (dynamic_cast<TEveViewer*>(gEve->GetViewers()->FindChild("RPhi View")))->GetGLViewer()->RemoveOverlayElement((TGLOverlayElement*)gOverlayButtonRPhi);
1716 (dynamic_cast<TEveViewer*>(gEve->GetViewers()->FindChild("RhoZ View")))->GetGLViewer()->RemoveOverlayElement((TGLOverlayElement*)gOverlayButtonRhoZ);
1717
1718 }
1719 else
1720 {
1721
1722 AliEveMultiView *multiView = AliEveMultiView::Instance();
1723
1724 TGLViewer *glv = (dynamic_cast<TEveViewer*>(gEve->GetViewers()->FindChild("3D View")))->GetGLViewer();
1725 gOverlayButton3D = new TGLOverlayButton(glv, "ALICE run 123456 event 123", 0, 0, multiView->Get3DView()->GetEveFrame()->GetWidth(), 30);
1726 gOverlayButton3D->SetAlphaValues(0.5, 0.5);
1727
1728 glv = (dynamic_cast<TEveViewer*>(gEve->GetViewers()->FindChild("RPhi View")))->GetGLViewer();
1729 gOverlayButtonRPhi = new TGLOverlayButton(glv, "ALICE run 123456 event 123", 0, 0, multiView->GetRPhiView()->GetEveFrame()->GetWidth(), 30);
1730 gOverlayButtonRPhi->SetAlphaValues(0.5, 0.5);
1731
1732 glv = (dynamic_cast<TEveViewer*>(gEve->GetViewers()->FindChild("RhoZ View")))->GetGLViewer();
1733 gOverlayButtonRhoZ = new TGLOverlayButton(glv, "ALICE run 123456 event 123", 0, 0, multiView->GetRhoZView()->GetEveFrame()->GetWidth(), 30);
1734 gOverlayButtonRhoZ->SetAlphaValues(0.5, 0.5);
1735
1736 }
1737
1738 gEve->Redraw3D(kFALSE, kTRUE);
1739*/
76dc7e0e 1740
6aafad45 1741 return;
1742
1743}
1744
1745//______________________________________________________________________________
1746
1747void SetCutsWindow::MuonGeometry()
1748{
1749
1750 if(gEve->GetScenes()->FirstChild()->FindChild("Gentle MUON"))
1751 {
1752 if(gEve->GetScenes()->FirstChild()->FindChild("Gentle MUON")->GetRnrSelf() || gEve->GetScenes()->FirstChild()->FindChild("Gentle MUON")->GetRnrChildren())
1753 {
1754 gEve->GetScenes()->FirstChild()->FindChild("Gentle MUON")->SetRnrSelf(kFALSE);
1755 gEve->GetScenes()->FirstChild()->FindChild("Gentle MUON")->SetRnrChildren(kFALSE);
1756 }
1757 else
1758 {
1759 gEve->GetScenes()->FirstChild()->FindChild("Gentle MUON")->SetRnrSelf(kTRUE);
1760 gEve->GetScenes()->FirstChild()->FindChild("Gentle MUON")->SetRnrChildren(kTRUE);
1761 }
1762
1763 }
1764
1765 gEve->FullRedraw3D();
1766
1767 return;
1768
1769}
1770
1771//______________________________________________________________________________
1772
1773void SetCutsWindow::DefaultGeometry()
1774{
1775
1776 AliEveMultiView *mv = AliEveMultiView::Instance();
1777
1778 mv->DestroyAllGeometries(); //destroy RPhi and Rhoz geometries before putting new
1779
1780 gEve->LoadVizDB("geom_gentle_default.C", kTRUE, kTRUE); //loading geometry
1781
1782 if(!gEve->GetViewers()->UseLightColorSet())
1783 gEve->GetViewers()->SwitchColorSet(); //white background
1784
1785 gEve->FullRedraw3D();
1786
1787 return;
1788
1789}
1790
1791//______________________________________________________________________________
1792
1793void SetCutsWindow::BrightGeometry()
1794{
1795
1796 AliEveMultiView *mv = AliEveMultiView::Instance();
1797
1798 mv->DestroyAllGeometries();
1799
1800 gEve->LoadVizDB("geom_gentle_bright.C", kTRUE, kTRUE);
1801
1802 if(gEve->GetViewers()->UseLightColorSet())
1803 gEve->GetViewers()->SwitchColorSet();
1804
1805
1806
1807 gEve->FullRedraw3D();
1808
1809 return;
1810
1811}
1812
1813//______________________________________________________________________________
1814
1815void SetCutsWindow::TransparentGeometry()
1816{
1817
1818 AliEveMultiView *mv = AliEveMultiView::Instance();
1819
1820 mv->DestroyAllGeometries();
1821
1822 gEve->LoadVizDB("geom_gentle_transparent.C", kTRUE, kTRUE);
1823
1824 if(!gEve->GetViewers()->UseLightColorSet())
1825 gEve->GetViewers()->SwitchColorSet();
1826
1827 gEve->FullRedraw3D();
1828
1829 return;
1830
1831}
1832
1833//______________________________________________________________________________
1834
1835void SetCutsWindow::YellowGeometry()
1836{
1837
1838 AliEveMultiView *mv = AliEveMultiView::Instance();
1839
1840 mv->DestroyAllGeometries();
1841
1842 gEve->LoadVizDB("geom_gentle_yellow.C", kTRUE, kTRUE);
1843
1844 if(!gEve->GetViewers()->UseLightColorSet())
1845 gEve->GetViewers()->SwitchColorSet();
1846
1847 gEve->FullRedraw3D();
1848
1849 return;
1850
1851}
1852
1853//______________________________________________________________________________
1854
1855void SetCutsWindow::SaveAllViews()
1856{
1857
1858 TGFileInfo fi;
1859 fi.fFileTypes = gPictureSaveAsTypes;
1860 fi.fIniDir = StrDup(""); // current directory
1861 fi.fFileTypeIdx = 0;
1862 fi.fOverwrite = kTRUE;
1863 new TGFileDialog(gClient->GetDefaultRoot(),
1864 gEve->GetMainWindow(), kFDSave, &fi);
1865 if (!fi.fFilename) return;
1866
1867 TPMERegexp filere(".*/([^/]+$)");
1868 if (filere.Match(fi.fFilename) != 2)
1869 {
1870 Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
1871 return;
1872 }
1873
1874 TString file1(filere[1]);
1875 TString file2(filere[1]);
1876 TString file3(filere[1]);
1877
1878 if (!file1.EndsWith(".png"))
1879 file1 += "_3D.png";
1880
1881 if (!file2.EndsWith(".png"))
1882 file2 += "_RPhi.png";
1883
1884 if (!file3.EndsWith(".png"))
1885 file3 += "_RhoZ.png";
1886
1887 gSystem->ChangeDirectory(fi.fIniDir);
1888
1889 printf("Saving...\n");
1890
1891 TEveViewerList *viewers = gEve->GetViewers();
1892 TEveElement::List_i i = viewers->BeginChildren();
1893 i++;
1894 TEveViewer* view3d = ((TEveViewer*)*i);
1895 view3d->GetGLViewer()->SavePictureScale(file1,4.0); // getting high resolution
1896 i++;
1897 TEveViewer* viewrphi = ((TEveViewer*)*i);
1898 viewrphi->GetGLViewer()->SavePictureScale(file2,4.0);
1899 i++;
1900 TEveViewer* viewrhoz = ((TEveViewer*)*i);
1901 viewrhoz->GetGLViewer()->SavePictureScale(file3,4.0);
1902
1903 printf("Done.\n");
1904
1905 return;
1906
1907}
1908
1909//______________________________________________________________________________
1910
1911void SetCutsWindow::Save3DView()
1912{
1913
1914 TGFileInfo fi;
1915 fi.fFileTypes = gPictureSaveAsTypes;
1916 fi.fIniDir = StrDup(""); // current directory
1917 fi.fFileTypeIdx = 0;
1918 fi.fOverwrite = kTRUE;
1919 new TGFileDialog(gClient->GetDefaultRoot(),
1920 gEve->GetMainWindow(), kFDSave, &fi);
1921 if (!fi.fFilename) return;
1922
1923 TPMERegexp filere(".*/([^/]+$)");
1924 if (filere.Match(fi.fFilename) != 2)
1925 {
1926 Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
1927 return;
1928 }
1929
1930 TString file1(filere[1]);
1931
1932 if (!file1.EndsWith(".png"))
1933 file1 += ".png";
1934
1935 gSystem->ChangeDirectory(fi.fIniDir);
1936
1937 printf("Saving...\n");
1938
1939 TEveViewerList *viewers = gEve->GetViewers();
1940 TEveElement::List_i i = viewers->BeginChildren();
1941 i++;
1942 TEveViewer* view3d = ((TEveViewer*)*i);
1943 view3d->GetGLViewer()->SavePictureScale(file1,4.0);
1944
1945 printf("Done.\n");
1946
1947 return;
1948
1949}
1950
1951//______________________________________________________________________________
1952
1953void SetCutsWindow::SaveRPhiView()
1954{
1955
1956 TGFileInfo fi;
1957 fi.fFileTypes = gPictureSaveAsTypes;
1958 fi.fIniDir = StrDup(""); // current directory
1959 fi.fFileTypeIdx = 0;
1960 fi.fOverwrite = kTRUE;
1961 new TGFileDialog(gClient->GetDefaultRoot(),
1962 gEve->GetMainWindow(), kFDSave, &fi);
1963 if (!fi.fFilename) return;
1964
1965 TPMERegexp filere(".*/([^/]+$)");
1966 if (filere.Match(fi.fFilename) != 2)
1967 {
1968 Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
1969 return;
1970 }
1971
1972 TString file1(filere[1]);
1973
1974 if (!file1.EndsWith(".png"))
1975 file1 += ".png";
1976
1977 gSystem->ChangeDirectory(fi.fIniDir);
1978
1979 printf("Saving...\n");
1980
1981 TEveViewerList *viewers = gEve->GetViewers();
1982 TEveElement::List_i i = viewers->BeginChildren();
1983 i++;
1984 i++;
1985 TEveViewer* viewrphi = ((TEveViewer*)*i);
1986 viewrphi->GetGLViewer()->SavePictureScale(file1,4.0);
1987
1988 printf("Done.\n");
1989
1990
1991 return;
1992
1993}
1994
1995//______________________________________________________________________________
1996
1997void SetCutsWindow::SaveRhoZView()
1998{
1999
2000 TGFileInfo fi;
2001 fi.fFileTypes = gPictureSaveAsTypes;
2002 fi.fIniDir = StrDup(""); // current directory
2003 fi.fFileTypeIdx = 0;
2004 fi.fOverwrite = kTRUE;
2005 new TGFileDialog(gClient->GetDefaultRoot(),
2006 gEve->GetMainWindow(), kFDSave, &fi);
2007 if (!fi.fFilename) return;
2008
2009 TPMERegexp filere(".*/([^/]+$)");
2010 if (filere.Match(fi.fFilename) != 2)
2011 {
2012 Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
2013 return;
2014 }
2015
2016 TString file1(filere[1]);
2017
2018 if (!file1.EndsWith(".png"))
2019 file1 += ".png";
2020
2021 gSystem->ChangeDirectory(fi.fIniDir);
2022
2023 printf("Saving...\n");
2024
2025 TEveViewerList *viewers = gEve->GetViewers();
2026 TEveElement::List_i i = viewers->BeginChildren();
2027 i++;
2028 i++;
2029 i++;
2030 TEveViewer* viewrhoz = ((TEveViewer*)*i);
2031 viewrhoz->GetGLViewer()->SavePictureScale(file1,4.0);
2032
2033 printf("Done.\n");
2034
2035
2036 return;
2037
2038}
2039//______________________________________________________________________________
2040
2041void SetCutsWindow::DrawPtHisto()
2042{
2043 if(gDrawHistograms[0])
2044 gDrawHistograms[0] = kFALSE;
2045 else
2046 gDrawHistograms[0] = kTRUE;
2047
2048 return;
2049
2050}
2051
2052//______________________________________________________________________________
2053
2054void SetCutsWindow::DrawEtaHisto()
2055{
2056 if(gDrawHistograms[1])
2057 gDrawHistograms[1] = kFALSE;
2058 else
2059 gDrawHistograms[1] = kTRUE;
2060
2061 return;
2062
2063}
2064
2065//______________________________________________________________________________
2066
2067void SetCutsWindow::DrawPhiHisto()
2068{
2069 if(gDrawHistograms[2])
2070 gDrawHistograms[2] = kFALSE;
2071 else
2072 gDrawHistograms[2] = kTRUE;
2073
2074 return;
2075
2076}
2077
2078//______________________________________________________________________________
2079
2080void SetCutsWindow::DrawPhiPtHisto()
2081{
2082 if(gDrawHistograms[3])
2083 gDrawHistograms[3] = kFALSE;
2084 else
2085 gDrawHistograms[3] = kTRUE;
2086
2087 return;
2088
2089}
2090
2091//______________________________________________________________________________
2092
2093void SetCutsWindow::DrawPtYHisto()
2094{
2095 if(gDrawHistograms[4])
2096 gDrawHistograms[4] = kFALSE;
2097 else
2098 gDrawHistograms[4] = kTRUE;
2099
2100 return;
2101
2102}
2103
2104//______________________________________________________________________________
2105
2106void SetCutsWindow::DrawEtaPhiHisto()
2107{
2108 if(gDrawHistograms[5])
2109 gDrawHistograms[5] = kFALSE;
2110 else
2111 gDrawHistograms[5] = kTRUE;
2112
2113 return;
2114
2115}
2116
2117//______________________________________________________________________________
2118
2119void SetCutsWindow::DrawPtHistoAll()
2120{
2121 if(gDrawHistograms[6])
2122 gDrawHistograms[6] = kFALSE;
2123 else
2124 gDrawHistograms[6] = kTRUE;
2125
2126 return;
2127
2128}
2129
2130//______________________________________________________________________________
2131
2132void SetCutsWindow::DrawEtaHistoAll()
2133{
2134 if(gDrawHistograms[7])
2135 gDrawHistograms[7] = kFALSE;
2136 else
2137 gDrawHistograms[7] = kTRUE;
2138
2139 return;
2140
2141}
2142
2143//______________________________________________________________________________
2144
2145void SetCutsWindow::DrawPhiHistoAll()
2146{
2147 if(gDrawHistograms[8])
2148 gDrawHistograms[8] = kFALSE;
2149 else
2150 gDrawHistograms[8] = kTRUE;
2151
2152 return;
2153
2154}
2155
2156//______________________________________________________________________________
2157
2158void SetCutsWindow::DrawPhiPtHistoAll()
2159{
2160 if(gDrawHistograms[9])
2161 gDrawHistograms[9] = kFALSE;
2162 else
2163 gDrawHistograms[9] = kTRUE;
2164
2165 return;
2166
2167}
2168
2169//______________________________________________________________________________
2170
2171void SetCutsWindow::DrawPtYHistoAll()
2172{
2173 if(gDrawHistograms[10])
2174 gDrawHistograms[10] = kFALSE;
2175 else
2176 gDrawHistograms[10] = kTRUE;
2177
2178 return;
2179
2180}
2181
2182//______________________________________________________________________________
2183
2184void SetCutsWindow::DrawEtaPhiHistoAll()
2185{
2186 if(gDrawHistograms[11])
2187 gDrawHistograms[11] = kFALSE;
2188 else
2189 gDrawHistograms[11] = kTRUE;
2190
2191 return;
2192
2193}
2194
2195//______________________________________________________________________________
2196
2197void SetCutsWindow::DrawHistos()
2198{
2199
2200 Int_t nHistos1 = 0;
2201 Int_t nHistos2 = 0;
2202
2203 TCanvas* pad1 = 0;
2204 TCanvas* pad2 = 0;
4f8b4026 2205
2206 TH1D* histPt = 0;
2207 TH1D* histEta = 0;
2208 TH1D* histPhi = 0;
2209 TH2D* histPhiPt= 0;
2210 TH2D* histPtY = 0;
2211 TH2D* histEtaPhi=0;
6aafad45 2212
2213 if(gDrawHistograms[0])
2214 {
2215 nHistos1++;
4f8b4026 2216 histPt = new TH1D("Pt\nSingle Event", "AliEve Pt histogram", 100, 0.0, 5.0);
6aafad45 2217 }
2218
2219 if(gDrawHistograms[1])
2220 {
2221 nHistos1++;
4f8b4026 2222 histEta = new TH1D("#eta\nSingle Event", "AliEve #eta histogram", 100, -1.5, 1.5);
6aafad45 2223 }
2224
2225 if(gDrawHistograms[2])
2226 {
2227 nHistos1++;
4f8b4026 2228 histPhi = new TH1D("#phi\nSingle Event", "AliEve #phi histogram", 100, 0.0, 2*TMath::Pi());
6aafad45 2229 }
2230
2231 if(gDrawHistograms[3])
2232 {
2233 nHistos2++;
4f8b4026 2234 histPhiPt = new TH2D("#phi-Pt\nSingle Event", "AliEve #phi-Pt histogram", 100, 0.0, 2*TMath::Pi(), 100, 0.0, 5.0);
6aafad45 2235 }
2236
2237 if(gDrawHistograms[4])
2238 {
2239 nHistos2++;
4f8b4026 2240 histPtY = new TH2D("Pt-Y\nSingle Event", "AliEve Pt-y histogram", 100, 0.0, 5.0, 100, -1.5, 1.5);
6aafad45 2241 }
2242
2243 if(gDrawHistograms[5])
2244 {
2245 nHistos2++;
4f8b4026 2246 histEtaPhi = new TH2D("#eta-#phi\nSingle Event", "AliEve #eta-#phi histogram", 100, -1.5, 1.5, 100, 0.0, 2*TMath::Pi());
6aafad45 2247 }
2248
2249 AliESDEvent* esd = AliEveEventManager::AssertESD();
2250
2251 if(esd->GetNumberOfTracks())
2252 {
2253
2254 for(Int_t j = 0; j < esd->GetNumberOfTracks(); j++)
2255 {
2256
2257 AliESDtrack* track = esd->GetTrack(j);
2258
2259 if(gDrawHistograms[0])
2260 histPt->Fill(track->Pt());
2261 if(gDrawHistograms[1])
2262 histEta->Fill(track->Eta());
2263 if(gDrawHistograms[2])
2264 histPhi->Fill(track->Phi());
2265 if(gDrawHistograms[3])
2266 histPhiPt->Fill(track->Phi(),track->Pt());
2267 if(gDrawHistograms[4])
2268 histPtY->Fill(track->Pt(),track->Y());
2269 if(gDrawHistograms[5])
2270 histEtaPhi->Fill(track->Eta(),track->Phi());
2271
2272 }
2273
2274 }
2275
2276 switch(nHistos1)
2277 {
2278 case 1:
2279 pad1 = new TCanvas("AliEve 1D histograms - Single Event","AliEve 1D histograms - Single Event",800,600);
2280 if(gDrawHistograms[0])
2281 histPt->Draw();
2282 if(gDrawHistograms[1])
2283 histEta->Draw();
2284 if(gDrawHistograms[2])
2285 histPhi->Draw();
2286 break;
2287
2288 case 2:
2289 pad1 = new TCanvas("AliEve 1D histograms - Single Event","AliEve 1D histograms - Single Event",1200,500);
2290 pad1->Divide(2,1);
2291 if(!gDrawHistograms[0])
2292 {
2293 pad1->cd(1);
2294 histEta->Draw();
2295 pad1->cd(2);
2296 histPhi->Draw();
2297 }
2298 if(!gDrawHistograms[1])
2299 {
2300 pad1->cd(1);
2301 histPt->Draw();
2302 pad1->cd(2);
2303 histPhi->Draw();
2304 }
2305 if(!gDrawHistograms[2])
2306 {
2307 pad1->cd(1);
2308 histPt->Draw();
2309 pad1->cd(2);
2310 histEta->Draw();
2311 }
2312 break;
2313
2314 case 3:
2315 pad1 = new TCanvas("AliEve 1D histograms - Single Event","AliEve 1D histograms - Single Event",1200,500);
2316 pad1->Divide(3,1);
2317 pad1->cd(1);
2318 histPt->Draw();
2319 pad1->cd(2);
2320 histEta->Draw();
2321 pad1->cd(3);
2322 histPhi->Draw();
2323 break;
2324
2325 default:
2326 break;
2327 }
2328
2329 switch(nHistos2)
2330 {
2331 case 1:
2332 pad2 = new TCanvas("AliEve 2D histograms - Single Event","AliEve 2D histograms - Single Event",800,600);
2333 if(gDrawHistograms[3])
2334 histPhiPt->Draw();
2335 if(gDrawHistograms[4])
2336 histPtY->Draw();
2337 if(gDrawHistograms[5])
2338 histEtaPhi->Draw();
2339 break;
2340
2341 case 2:
2342 pad2 = new TCanvas("AliEve 2D histograms - Single Event","AliEve 2D histograms - Single Event",1200,500);
2343 pad2->Divide(2,1);
2344 if(!gDrawHistograms[3])
2345 {
2346 pad2->cd(1);
2347 histPtY->Draw();
2348 pad2->cd(2);
2349 histEtaPhi->Draw();
2350 }
2351 if(!gDrawHistograms[4])
2352 {
2353 pad2->cd(1);
2354 histPhiPt->Draw();
2355 pad2->cd(2);
2356 histEtaPhi->Draw();
2357 }
2358 if(!gDrawHistograms[5])
2359 {
2360 pad2->cd(1);
2361 histPhiPt->Draw();
2362 pad2->cd(2);
2363 histPtY->Draw();
2364 }
2365 break;
2366
2367 case 3:
2368 pad2 = new TCanvas("AliEve 2D histograms - Single Event","AliEve 2D histograms - Single Event",1200,500);
2369 pad2->Divide(3,1);
2370 pad2->cd(1);
2371 histPhiPt->Draw();
2372 pad2->cd(2);
2373 histPtY->Draw();
2374 pad2->cd(3);
2375 histEtaPhi->Draw();
2376 break;
2377
2378 default:
2379 break;
2380 }
2381
2382 return;
2383
2384}
2385
2386//______________________________________________________________________________
2387
2388void SetCutsWindow::DrawHistosAll()
2389{
2390
2391 Int_t nHistos1 = 0;
2392 Int_t nHistos2 = 0;
2393
2394 TCanvas* pad1 = 0;
2395 TCanvas* pad2 = 0;
4f8b4026 2396
2397 TH1D* histPt = 0;
2398 TH1D* histEta = 0;
2399 TH1D* histPhi = 0;
2400 TH2D* histPhiPt= 0;
2401 TH2D* histPtY = 0;
2402 TH2D* histEtaPhi=0;
2403
53ffa98a 2404// TCanvas* pad3 = 0;
2405
2406// TH1D* histMult = new TH1D("Multiplicity\n", "AliEve Multiplicity histogram", 1000, 0.0, 1000.0);
2407// TH1D* histNcls = new TH1D("Number of ITS clusters\n", "AliEve Multiplicity histogram", 10000, 0.0, 10000.0);
6aafad45 2408
2409 if(gDrawHistograms[6])
2410 {
2411 nHistos1++;
4f8b4026 2412 histPt = new TH1D("Pt\n", "AliEve Pt histogram", 1000, 0.0, 1000.0);
6aafad45 2413 }
2414
2415 if(gDrawHistograms[7])
2416 {
2417 nHistos1++;
4f8b4026 2418 histEta = new TH1D("#eta\nAll Events", "AliEve #eta histogram", 100, -1.5, 1.5);
6aafad45 2419 }
2420
2421 if(gDrawHistograms[8])
2422 {
2423 nHistos1++;
4f8b4026 2424 histPhi = new TH1D("#phi\nAll Events", "AliEve #phi histogram", 100, 0.0, 2*TMath::Pi());
6aafad45 2425 }
2426
2427 if(gDrawHistograms[9])
2428 {
2429 nHistos2++;
4f8b4026 2430 histPhiPt = new TH2D("#phi-Pt\nAll Events", "AliEve #phi-Pt histogram", 100, 0.0, 2*TMath::Pi(), 100, 0.0, 5.0);
6aafad45 2431 }
2432
2433 if(gDrawHistograms[10])
2434 {
2435 nHistos2++;
4f8b4026 2436 histPtY = new TH2D("Pt-Y\nAll Events", "AliEve Pt-y histogram", 100, 0.0, 5.0, 100, -1.5, 1.5);
6aafad45 2437 }
2438
2439 if(gDrawHistograms[11])
2440 {
2441 nHistos2++;
4f8b4026 2442 histEtaPhi = new TH2D("#eta-#phi\nAll Events", "AliEve #eta-#phi histogram", 100, 1.5, 1.5, 100, 0.0, 2*TMath::Pi());
6aafad45 2443 }
2444
2445 Int_t nEvents = AliEveEventManager::GetMaster()->GetMaxEventId();
2446
2447 AliEveEventManager::GetMaster()->GotoEvent(0);
2448
53ffa98a 2449 ofstream myresult1(TString::Format("foundMultiplicity.txt"));
2450
6aafad45 2451 for(Int_t i = 0; i <= nEvents; i++)
2452 {
2453
2454 AliESDEvent* esd = AliEveEventManager::AssertESD();
53ffa98a 2455/*
2456 if(esd->GetMultiplicity())
2457 histMult->Fill(esd->GetMultiplicity()->GetNumberOfTracklets());
6aafad45 2458
53ffa98a 2459 if(esd->GetMultiplicity())
2460 histNcls->Fill(esd->GetMultiplicity()->GetNumberOfITSClusters(0));
2461
2462 if(esd->GetMultiplicity()->GetNumberOfTracklets())
2463 myresult1 << i << " " << esd->GetMultiplicity()->GetNumberOfTracklets() << endl;
2464*/
6aafad45 2465 if(esd->GetNumberOfTracks())
2466 {
2467
2468 for(Int_t j = 0; j < esd->GetNumberOfTracks(); j++)
2469 {
2470
2471 AliESDtrack* track = esd->GetTrack(j);
2472
2473 if(gDrawHistograms[6])
2474 histPt->Fill(track->Pt());
2475 if(gDrawHistograms[7])
2476 histEta->Fill(track->Eta());
2477 if(gDrawHistograms[8])
2478 histPhi->Fill(track->Phi());
2479 if(gDrawHistograms[9])
2480 histPhiPt->Fill(track->Phi(),track->Pt());
2481 if(gDrawHistograms[10])
2482 histPtY->Fill(track->Pt(),track->Y());
2483 if(gDrawHistograms[11])
2484 histEtaPhi->Fill(track->Eta(),track->Phi());
2485
2486 }
2487
2488 }
2489
2490 AliEveEventManager::GetMaster()->NextEvent();
2491
2492 }
2493
2494 switch(nHistos1)
2495 {
2496 case 1:
2497 pad1 = new TCanvas("AliEve 1D histograms - All Events","AliEve 1D histograms - All Events",800,600);
2498 if(gDrawHistograms[6])
2499 histPt->Draw();
2500 if(gDrawHistograms[7])
2501 histEta->Draw();
2502 if(gDrawHistograms[8])
2503 histPhi->Draw();
2504 break;
2505
2506 case 2:
2507 pad1 = new TCanvas("AliEve 1D histograms - All Events","AliEve 1D histograms - All Events",1200,500);
2508 pad1->Divide(2,1);
2509 if(!gDrawHistograms[6])
2510 {
2511 pad1->cd(1);
2512 histEta->Draw();
2513 pad1->cd(2);
2514 histPhi->Draw();
2515 }
2516 if(!gDrawHistograms[7])
2517 {
2518 pad1->cd(1);
2519 histPt->Draw();
2520 pad1->cd(2);
2521 histPhi->Draw();
2522 }
2523 if(!gDrawHistograms[8])
2524 {
2525 pad1->cd(1);
2526 histPt->Draw();
2527 pad1->cd(2);
2528 histEta->Draw();
2529 }
2530 break;
2531
2532 case 3:
2533 pad1 = new TCanvas("AliEve 1D histograms - All Events","AliEve 1D histograms - All Events",1200,500);
2534 pad1->Divide(3,1);
2535 pad1->cd(1);
2536 histPt->Draw();
2537 pad1->cd(2);
2538 histEta->Draw();
2539 pad1->cd(3);
2540 histPhi->Draw();
2541 break;
2542
2543 default:
2544 break;
2545 }
2546
2547 switch(nHistos2)
2548 {
2549 case 1:
2550 pad2 = new TCanvas("AliEve 2D histograms - All Events","AliEve 2D histograms - All Events",800,600);
2551 if(gDrawHistograms[9])
2552 histPt->Draw();
2553 if(gDrawHistograms[10])
2554 histEta->Draw();
2555 if(gDrawHistograms[11])
2556 histPhi->Draw();
2557 break;
2558
2559 case 2:
2560 pad2 = new TCanvas("AliEve 2D histograms - All Events","AliEve 2D histograms - All Events",1200,500);
2561 pad2->Divide(2,1);
2562 if(!gDrawHistograms[9])
2563 {
2564 pad2->cd(1);
2565 histPtY->Draw();
2566 pad2->cd(2);
2567 histEtaPhi->Draw();
2568 }
2569 if(!gDrawHistograms[10])
2570 {
2571 pad2->cd(1);
2572 histPhiPt->Draw();
2573 pad2->cd(2);
2574 histEtaPhi->Draw();
2575 }
2576 if(!gDrawHistograms[11])
2577 {
2578 pad2->cd(1);
2579 histPhiPt->Draw();
2580 pad2->cd(2);
2581 histPtY->Draw();
2582 }
2583 break;
2584
2585 case 3:
2586 pad2 = new TCanvas("AliEve 2D histograms - All Events","AliEve 2D histograms - All Events",1200,500);
2587 pad2->Divide(3,1);
2588 pad2->cd(1);
2589 histPhiPt->Draw();
2590 pad2->cd(2);
2591 histPtY->Draw();
2592 pad2->cd(3);
2593 histEtaPhi->Draw();
2594 break;
2595
2596 default:
2597 break;
2598 }
2599
53ffa98a 2600/*
2601 pad3 = new TCanvas("AliEve 1D histograms - All Events","AliEve 1D histograms - All Events",1200,500);
2602 pad3->Divide(2,1);
2603 pad3->cd(1);
2604 histMult->Draw();
2605 pad3->cd(2);
2606 histNcls->Draw();
2607*/
2608
2609 myresult1.close();
2610
6aafad45 2611 return;
2612
2613}
2614
2615//______________________________________________________________________________
2616
2617void SetCutsWindow::DrawResiduals()
2618{
2619
2620 TEveUtil::Macro("make_residuals.C");
2621
2622 return;
2623
2624}
2625
2626//______________________________________________________________________________
2627
2628Int_t SetCutsWindow::GetTrackColorByMomentum(Double_t momentum, Int_t size)
2629{
2630
2631
6747295f 2632 Double_t step = 1.0/size;
4f8b4026 2633 Int_t i=0;
6aafad45 2634
4f8b4026 2635 for(i = 0; i < size; i++)
6aafad45 2636 {
2637
76dc7e0e 2638 switch(gTrackColorScale->GetSelected())
6aafad45 2639 {
76dc7e0e 2640
2641 case 1:
2642 if(momentum > i*step && momentum <= (i+1)*step)
2643 return i;
2644 break;
2645
2646 case 2:
2647 if(momentum > TMath::Log(1+i*step) && momentum <= TMath::Log(1+(i+1)*step))
2648 return i;
2649 break;
2650
2651 case 3:
2652 if(momentum > TMath::Power(i*step,0.5) && momentum <= TMath::Power((i+1)*step,0.5))
2653 return i;
2654 break;
2655
2656 default:
2657 if(momentum > i*step && momentum <= (i+1)*step)
2658 return i;
2659 break;
6aafad45 2660 }
2661
2662 }
2663
4f8b4026 2664 return (i-1);
6aafad45 2665
2666}
2667
2668//______________________________________________________________________________
2669
2670void SetCutsWindow::SetStandardCuts()
2671{
2672
2673 gDrawV0s->SetOn(kFALSE,kFALSE);
2674 gDrawCascades->SetOn(kFALSE,kFALSE);
2675 gDrawKinks->SetOn(kFALSE,kFALSE);
2676 gDrawVertex->SetOn(kFALSE,kFALSE);
2677 gDrawTracklets->SetOn(kFALSE,kFALSE);
2678 gDrawTracks->SetOn(kTRUE,kFALSE);
2679 gDrawClusters->SetOn(kFALSE,kFALSE);
2680 gDrawTracksType1->SetOn(kTRUE,kFALSE);
2681 gDrawTracksType2->SetOn(kTRUE,kFALSE);
2682 gDrawTracksType3->SetOn(kTRUE,kFALSE);
2683 gDrawTracksType4->SetOn(kFALSE,kFALSE);
2684 gDrawTracksType5->SetOn(kFALSE,kFALSE);
2685 gDrawTracksType6->SetOn(kFALSE,kFALSE);
2686 gDrawTracksType7->SetOn(kFALSE,kFALSE);
2687 gCutOnP->SetOn(kFALSE,kFALSE);
2688 gCutOnPt->SetOn(kTRUE,kFALSE);
2689 gCutOnEta->SetOn(kTRUE,kFALSE);
2690 gCutOnMult->SetOn(kFALSE,kFALSE);
2691 gCutOnCls->SetOn(kTRUE,kFALSE);
2692 gPtRange->SetValues(0.15,gPtRange->GetLimitMax());
2693 gEtaRange->SetValues(-0.9,0.9);
2694 gClsRangeNE->SetNumber(70);
2695 gClsRange->SetPosition(70);
2696
2697}
2698
2699//______________________________________________________________________________
2700
2701void SetCutsWindow::AddMomentumVectors()
2702{
2703
6747295f 2704 Int_t posTrackColor= gPosColorList->GetSelected();
2705 Int_t negTrackColor= gNegColorList->GetSelected();
2706
2707Int_t colorNeg[27][10] =
2708{
2709 { kRed, kBlue, kOrange, kCyan, kGreen, kGray, kViolet, kMagenta, kSpring, kYellow },
2710 { kCyan-4, kCyan, kAzure+10, kAzure+8, kAzure+5, kAzure, kBlue, kBlue+1, kBlue+2, kBlue+3 },
2711 { kYellow-4, kYellow, kOrange+10, kOrange, kOrange+7, kOrange+10, kRed, kRed+1, kRed+2, kRed+3 },
2712 { kRed, kRed-1, kRed-2, kRed-3, kRed-4, kRed-5, kRed-6, kRed-7, kRed-8, kRed-9},
2713 { kRed, kRed, kRed+1, kRed+1, kRed+2, kRed+2, kRed+3, kRed+3, kRed+4, kRed+4},
2714 { kOrange, kOrange-1, kOrange-2, kOrange-3, kOrange-4, kOrange-5, kOrange-6, kOrange-7, kOrange-8, kOrange-9},
2715 { kOrange, kOrange+1, kOrange+2, kOrange+3, kOrange+4, kOrange+5, kOrange+6, kOrange+7, kOrange+8, kOrange+9},
2716 { kYellow, kYellow-1, kYellow-2, kYellow-3, kYellow-4, kYellow-5, kYellow-6, kYellow-7, kYellow-8, kYellow-9},
2717 { kYellow, kYellow, kYellow+1, kYellow+1, kYellow+2, kYellow+2, kYellow+3, kYellow+3, kYellow+4, kYellow+4},
2718 { kSpring, kSpring-1, kSpring-2, kSpring-3, kSpring-4, kSpring-5, kSpring-6, kSpring-7, kSpring-8, kSpring-9},
2719 { kSpring, kSpring+1, kSpring+2, kSpring+3, kSpring+4, kSpring+5, kSpring+6, kSpring+7, kSpring+8, kSpring+9},
2720 { kGreen, kGreen-1, kGreen-2, kGreen-3, kGreen-4, kGreen-5, kGreen-6, kGreen-7, kGreen-8, kGreen-9},
2721 { kGreen, kGreen, kGreen+1, kGreen+1, kGreen+2, kGreen+2, kGreen+3, kGreen+3, kGreen+4, kGreen+4},
2722 { kTeal, kTeal-1, kTeal-2, kTeal-3, kTeal-4, kTeal-5, kTeal-6, kTeal-7, kTeal-8, kTeal-9},
2723 { kTeal, kTeal+1, kTeal+2, kTeal+3, kTeal+4, kTeal+5, kTeal+6, kTeal+7, kTeal+8, kTeal+9},
2724 { kCyan, kCyan-1, kCyan-2, kCyan-3, kCyan-4, kCyan-5, kCyan-6, kCyan-7, kCyan-8, kCyan-9},
2725 { kCyan, kCyan, kCyan+1, kCyan+1, kCyan+2, kCyan+2, kCyan+3, kCyan+3, kCyan+4, kCyan+4},
2726 { kAzure, kAzure-1, kAzure-2, kAzure-3, kAzure-4, kAzure-5, kAzure-6, kAzure-7, kAzure-8, kAzure-9},
2727 { kAzure, kAzure+1, kAzure+2, kAzure+3, kAzure+4, kAzure+5, kAzure+6, kAzure+7, kAzure+8, kAzure+9},
2728 { kBlue, kBlue-1, kBlue-2, kBlue-3, kBlue-4, kBlue-5, kBlue-6, kBlue-7, kBlue-8, kBlue-9},
2729 { kBlue, kBlue, kBlue+1, kBlue+1, kBlue+2, kBlue+2, kBlue+3, kBlue+3, kBlue+4, kBlue+4},
2730 { kViolet, kViolet-1, kViolet-2, kViolet-3, kViolet-4, kViolet-5, kViolet-6, kViolet-7, kViolet-8, kViolet-9},
2731 { kViolet, kViolet+1, kViolet+2, kViolet+3, kViolet+4, kViolet+5, kViolet+6, kViolet+7, kViolet+8, kViolet+9},
2732 { kMagenta, kMagenta-1, kMagenta-2, kMagenta-3, kMagenta-4, kMagenta-5, kMagenta-6, kMagenta-7, kMagenta-8, kMagenta-9},
2733 { kMagenta, kMagenta, kMagenta+1, kMagenta+1, kMagenta+2, kMagenta+2, kMagenta+3, kMagenta+3, kMagenta+4, kMagenta+4},
2734 { kPink, kPink-1, kPink-2, kPink-3, kPink-4, kPink-5, kPink-6, kPink-7, kPink-8, kPink-9},
2735 { kPink, kPink+1, kPink+2, kPink+3, kPink+4, kPink+5, kPink+6, kPink+7, kPink+8, kPink+9},
2736};
2737
2738Int_t colorAll[22] =
2739{
2740kBlue+4, kBlue+2, kBlue, kAzure, kAzure-3, kAzure+7, kCyan, kCyan-7, kGreen-7, kGreen-4, kGreen, kSpring,
2741kSpring+7, kSpring+8, kYellow, kOrange, kOrange-3, kOrange+7, kOrange+4, kRed, kRed+2, kMagenta
2742};
2743
6aafad45 2744// Bool_t drawWithTracks = kTRUE;
2745
2746 if(gEve->GetEventScene()->FirstChild()->FindChild("Momentum Vectors"))
2747 gEve->GetEventScene()->FirstChild()->FindChild("Momentum Vectors")->Destroy();
2748
4f8b4026 2749 TString str1;
2750 TString str2;
6aafad45 2751
2752 TEveElement::List_i i = gEve->GetEventScene()->FirstChild()->BeginChildren();
2753 TEveElement::List_i j = gEve->GetEventScene()->FirstChild()->EndChildren();
2754 TEveElement::List_i k;
2755
2756 TEveElementList* momentumVectorList = new TEveElementList("Momentum Vectors");
2757
2758 Double_t maxMomentum = 0;
2759 Double_t vectorLength = 600.0;
2760
2761 Double_t x1 = 0;
2762 Double_t y1 = 0;
2763 Double_t z1 = 0;
2764
2765 Double_t x2 = 0;
2766 Double_t y2 = 0;
2767 Double_t z2 = 0;
2768
2769 Bool_t draw = kFALSE;
2770
2771 Int_t mode = gVectorMode->GetSelected();
2772 Double_t cut = 0.1*gPMVRange->GetPosition();
2773
2774 //==============================================
2775 // find highest momentum (to normalize)
2776 //==============================================
2777
2778 if(mode != 3)
2779 {
2780 for(k = i; k != j; k++)
2781 {
2782 TEveElement* element = (TEveElement*) *k;
2783
2784 str1 = element->GetElementName();
2785
2786 if(str1.Contains("Tracks") || str1.Contains("tracks"))
2787 {
2788
2789 TEveElement::List_i m = element->BeginChildren();
2790 TEveElement::List_i n = element->EndChildren();
2791 TEveElement::List_i l;
2792
2793 for(l = m; l != n; l++)
2794 {
2795 TEveElement* trackType = (TEveElement*) *l;
2796 str2 = trackType->GetElementName();
2797
2798 if(str2.Contains("Sigma < 3"))
2799 {
2800 if(trackType->HasChildren())
2801 {
2802
2803 TEveElement::List_i x = trackType->BeginChildren();
2804 TEveElement::List_i y = trackType->EndChildren();
2805 TEveElement::List_i z;
2806
2807 for(z = x; z != y; z++)
2808 {
2809
2810 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
2811
2812 if(trackSingle1->GetESDTrack()->P() > maxMomentum)
2813 maxMomentum = trackSingle1->GetESDTrack()->P();
2814
2815 }
2816 }
2817 }
2818
2819
2820 if(str2.Contains("3 < Sigma < 5"))
2821 {
2822
2823 if(trackType->HasChildren())
2824 {
2825
2826 TEveElement::List_i x = trackType->BeginChildren();
2827 TEveElement::List_i y = trackType->EndChildren();
2828 TEveElement::List_i z;
2829
2830 for(z = x; z != y; z++)
2831 {
2832
2833 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
2834
2835 if(trackSingle1->GetESDTrack()->P() > maxMomentum)
2836 maxMomentum = trackSingle1->GetESDTrack()->P();
2837
2838 }
2839 }
2840 }
2841
2842 if(str2.Contains("5 < Sigma"))
2843 {
2844
2845 if(trackType->HasChildren())
2846 {
2847
2848 TEveElement::List_i x = trackType->BeginChildren();
2849 TEveElement::List_i y = trackType->EndChildren();
2850 TEveElement::List_i z;
2851
2852 for(z = x; z != y; z++)
2853 {
2854
2855 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
2856
2857 if(trackSingle1->GetESDTrack()->P() > maxMomentum)
2858 maxMomentum = trackSingle1->GetESDTrack()->P();
2859
2860
2861 }
2862 }
2863 }
2864 }
2865 }
2866 }
2867 }
2868 //==============================================
2869 // clean the display
2870 //==============================================
2871/*
2872 if(!drawWithTracks)
2873
2874 for(k = i; k != j; k++)
2875 {
2876 TEveElement* element = (TEveElement*) *k;
2877
2878 str1 = element->GetElementName();
2879
2880 element->SetRnrSelf(kFALSE);
2881
2882 if(element->HasChildren())
2883 element->SetRnrChildren(kFALSE);
2884
2885 }
2886
2887 }
2888*/
2889 //==============================================
2890 // draw momentum vectors
2891 //==============================================
2892
6747295f 2893 TEveRecTrack rcNeg;
2894
2895 TEveTrackList* fTrackListV0Neg = new TEveTrackList("V0 Tracks Neg");
2896 fTrackListV0Neg->SetMainColor(kGreen-4);
2897 fTrackListV0Neg->SetMarkerColor(kYellow);
2898 fTrackListV0Neg->SetMarkerStyle(10);
2899 fTrackListV0Neg->SetMarkerSize(5);
2900
2901 TEveTrackPropagator* trkProp = fTrackListV0Neg->GetPropagator();
2902 trkProp->SetMagField(0.5);
2903 trkProp->SetMaxR(250);
2904
6aafad45 2905 if(mode == 1 && maxMomentum > 1)
2906 vectorLength = 100/TMath::Log(100*maxMomentum);
2907 if(mode == 2 && maxMomentum)
2908 vectorLength = vectorLength/maxMomentum;
2909 if(mode == 3)
2910 vectorLength = 100;
2911
2912 for(k = i; k != j; k++)
2913 {
2914 TEveElement* element = (TEveElement*) *k;
2915
2916 str1 = element->GetElementName();
2917
2918 if(str1.Contains("Tracks") || str1.Contains("tracks"))
2919 {
2920
2921 TEveElement::List_i m = element->BeginChildren();
2922 TEveElement::List_i n = element->EndChildren();
2923 TEveElement::List_i l;
2924
2925 for(l = m; l != n; l++)
2926 {
2927 TEveElement* trackType = (TEveElement*) *l;
2928 str2 = trackType->GetElementName();
2929
6aafad45 2930 if(str2.Contains("Sigma < 3"))
2931 {
2932
2933 if(trackType->HasChildren())
2934 {
2935
2936 TEveElementList* momentumVectorList1 = new TEveElementList("sigma < 3");
2937
2938 TEveElement::List_i x = trackType->BeginChildren();
2939 TEveElement::List_i y = trackType->EndChildren();
2940 TEveElement::List_i z;
2941
2942 for(z = x; z != y; z++)
2943 {
2944
2945 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
2946
6747295f 2947 Double_t p[3];
2948 Double_t pos[3];
2949
2950 trackSingle1->GetESDTrack()->GetTPCInnerParam()->GetPxPyPzAt(80,-5.01,p);
2951 trackSingle1->GetESDTrack()->GetTPCInnerParam()->GetXYZAt(80,-5.01,pos);
2952
2953// printf("%f %f %f\n",p[0],p[1],p[2]);
2954// printf("%f %f %f\n",pos[0],pos[1],pos[2]);
2955
2956// printf("%f %f %f %f\n",trackSingle1->GetESDTrack()->GetTPCPoints(0),trackSingle1->GetESDTrack()->GetTPCPoints(1),trackSingle1->GetESDTrack()->GetTPCPoints(2),trackSingle1->GetESDTrack()->GetTPCPoints(3));
2957
2958 rcNeg.fP.Set(p);
2959 rcNeg.fV.Set(pos);
2960 rcNeg.fStatus = trackSingle1->GetESDTrack()->GetStatus();
2961 rcNeg.fLabel = trackSingle1->GetESDTrack()->GetLabel();
2962 Double_t momentum = trackSingle1->GetESDTrack()->P();
2963 rcNeg.fBeta = momentum/TMath::Sqrt(momentum*momentum + TMath::C()*TMath::C()*trackSingle1->GetESDTrack()->M()*trackSingle1->GetESDTrack()->M());
2964 rcNeg.fSign = trackSingle1->GetESDTrack()->GetSign();
2965
2966 TEveTrack* track1 = new TEveTrack(&rcNeg, trkProp);
2967
2968 if(trackSingle1->GetESDTrack()->GetSign() > 0)
2969 {
2970 if(posTrackColor == 0)
2971 track1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
2972 else
2973 track1->SetLineColor(colorNeg[posTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
2974 }
2975 else
2976 {
2977 if(negTrackColor == 0)
2978 track1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
2979 else
2980 track1->SetLineColor(colorNeg[negTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
2981 }
2982
2983 track1->SetLineStyle(1);
2984 track1->SetRnrSelf(kTRUE);
2985
2986 fTrackListV0Neg->AddElement(track1);
2987
6aafad45 2988 TEveLine* momentumVector = new TEveLine(TString::Format("Momentum Vector"));
2989
2990 if(trackSingle1->GetESDTrack()->P() > cut)
2991 {
2992
2993 x1 = trackSingle1->GetESDTrack()->Xv();
2994 y1 = trackSingle1->GetESDTrack()->Yv();
2995 z1 = trackSingle1->GetESDTrack()->Zv();
2996
2997 momentumVector->SetPoint(0, x1, y1, z1);
2998
2999 if(mode == 1)
3000 {
3001 x2 = x1+vectorLength*TMath::Log(100*trackSingle1->GetESDTrack()->P())*trackSingle1->GetESDTrack()->Px();
3002 y2 = y1+vectorLength*TMath::Log(100*trackSingle1->GetESDTrack()->P())*trackSingle1->GetESDTrack()->Py();
3003 z2 = z1+vectorLength*TMath::Log(100*trackSingle1->GetESDTrack()->P())*trackSingle1->GetESDTrack()->Pz();
3004 }
3005
3006 if(mode == 2)
3007 {
3008 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px();
3009 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py();
3010 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz();
3011 }
3012
3013 if(mode == 3)
3014 {
3015 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px();
3016 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py();
3017 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz();
3018 }
3019
3020 if((mode != 1 && mode!= 2 && mode != 3) ||
3021 ( mode == 3 && trackSingle1->GetESDTrack()->P() <= 0.01))
3022 continue;
3023
3024 momentumVector->SetPoint(1, x2, y2, z2);
3025
3026/*
3027 if(trackSingle1->GetESDTrack()->Charge() == -1)
3028 momentumVector->SetLineColor(kGreen);
3029 else
3030 momentumVector->SetLineColor(kRed);
3031*/
3032 momentumVector->SetLineColor(kRed);
3033
3034 momentumVector->SetLineWidth(1);
3035 momentumVector->SetLineStyle(0);
3036 momentumVector->SetTitle(Form("%f GeV/c", trackSingle1->GetESDTrack()->P()));
3037
3038 momentumVectorList1->AddElement(momentumVector);
3039
3040 }
3041
3042 }
3043
3044 momentumVectorList->AddElement(momentumVectorList1);
3045
3046 draw = kTRUE;
3047
3048 }
3049 }
3050
3051
3052 if(str2.Contains("3 < Sigma < 5"))
3053 {
3054
3055 if(trackType->HasChildren())
3056 {
3057
3058 TEveElement::List_i x = trackType->BeginChildren();
3059 TEveElement::List_i y = trackType->EndChildren();
3060 TEveElement::List_i z;
3061
3062 TEveElementList* momentumVectorList2 = new TEveElementList("3 < sigma < 5");
3063
3064 for(z = x; z != y; z++)
3065 {
3066
3067 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
3068
3069 TEveLine* momentumVector = new TEveLine(TString::Format("Momentum Vector"));
3070
6747295f 3071 Double_t p[3];
3072 Double_t pos[3];
3073
3074 trackSingle1->GetESDTrack()->GetTPCInnerParam()->GetPxPyPzAt(80,-5.01,p);
3075 trackSingle1->GetESDTrack()->GetTPCInnerParam()->GetXYZAt(80,-5.01,pos);
3076
3077// printf("%f %f %f\n",p[0],p[1],p[2]);
3078// printf("%f %f %f\n",pos[0],pos[1],pos[2]);
3079
3080// printf("%f %f %f %f\n",trackSingle1->GetESDTrack()->GetTPCPoints(0),trackSingle1->GetESDTrack()->GetTPCPoints(1),trackSingle1->GetESDTrack()->GetTPCPoints(2),trackSingle1->GetESDTrack()->GetTPCPoints(3));
3081
3082 rcNeg.fP.Set(p);
3083 rcNeg.fV.Set(pos);
3084 rcNeg.fStatus = trackSingle1->GetESDTrack()->GetStatus();
3085 rcNeg.fLabel = trackSingle1->GetESDTrack()->GetLabel();
3086 Double_t momentum = trackSingle1->GetESDTrack()->P();
3087 rcNeg.fBeta = momentum/TMath::Sqrt(momentum*momentum + TMath::C()*TMath::C()*trackSingle1->GetESDTrack()->M()*trackSingle1->GetESDTrack()->M());
3088 rcNeg.fSign = trackSingle1->GetESDTrack()->GetSign();
3089
3090 TEveTrack* track1 = new TEveTrack(&rcNeg, trkProp);
3091
3092 if(trackSingle1->GetESDTrack()->GetSign() > 0)
3093 {
3094 if(posTrackColor == 0)
3095 track1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
3096 else
3097 track1->SetLineColor(colorNeg[posTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
3098 }
3099 else
3100 {
3101 if(negTrackColor == 0)
3102 track1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
3103 else
3104 track1->SetLineColor(colorNeg[negTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
3105 }
3106
3107 track1->SetLineStyle(1);
3108 track1->SetRnrSelf(kTRUE);
3109
3110 fTrackListV0Neg->AddElement(track1);
3111
3112
6aafad45 3113 if(trackSingle1->GetESDTrack()->P() > cut)
3114 {
3115
3116 x1 = trackSingle1->GetESDTrack()->Xv();
3117 y1 = trackSingle1->GetESDTrack()->Yv();
3118 z1 = trackSingle1->GetESDTrack()->Zv();
3119
3120 momentumVector->SetPoint(0, x1, y1, z1);
3121
3122 if(mode == 1)
3123 {
3124 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px()*TMath::Log(trackSingle1->GetESDTrack()->P());
3125 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py()*TMath::Log(trackSingle1->GetESDTrack()->P());
3126 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz()*TMath::Log(trackSingle1->GetESDTrack()->P());
3127 }
3128
3129 if(mode == 2)
3130 {
3131 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px();
3132 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py();
3133 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz();
3134 }
3135
3136 if(mode == 3)
3137 {
3138 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px();
3139 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py();
3140 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz();
3141 }
3142
3143 if(mode != 1 && mode!= 2 && mode != 3)
3144 continue;
3145
3146 momentumVector->SetPoint(1, x2, y2, z2);
3147
3148/*
3149 if(trackSingle1->GetESDTrack()->Charge() == -1)
3150 momentumVector->SetLineColor(kGreen+2);
3151 else
3152 momentumVector->SetLineColor(kRed+2);
3153*/
3154 momentumVector->SetLineColor(kRed+2);
3155
3156 momentumVector->SetLineWidth(1);
3157 momentumVector->SetLineStyle(0);
3158 momentumVector->SetTitle(Form("%f GeV/c", trackSingle1->GetESDTrack()->P()));
3159
3160 momentumVectorList2->AddElement(momentumVector);
3161
6747295f 3162
6aafad45 3163 }
3164
3165 }
3166
6aafad45 3167 momentumVectorList->AddElement(momentumVectorList2);
3168
3169 draw = kTRUE;
3170
3171 }
3172 }
3173
3174 if(str2.Contains("5 < Sigma"))
3175 {
3176
3177 if(trackType->HasChildren())
3178 {
3179
3180 TEveElementList* momentumVectorList3 = new TEveElementList("5 < sigma");
3181
3182 TEveElement::List_i x = trackType->BeginChildren();
3183 TEveElement::List_i y = trackType->EndChildren();
3184 TEveElement::List_i z;
3185
3186 for(z = x; z != y; z++)
3187 {
3188
3189 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
3190
3191 TEveLine* momentumVector = new TEveLine(TString::Format("Momentum Vector"));
3192
6747295f 3193 Double_t p[3];
3194 Double_t pos[3];
3195
3196 trackSingle1->GetESDTrack()->GetTPCInnerParam()->GetPxPyPzAt(80,-5.01,p);
3197 trackSingle1->GetESDTrack()->GetTPCInnerParam()->GetXYZAt(80,-5.01,pos);
3198
3199// printf("%f %f %f\n",p[0],p[1],p[2]);
3200// printf("%f %f %f\n",pos[0],pos[1],pos[2]);
3201
3202// printf("%f %f %f %f\n",trackSingle1->GetESDTrack()->GetTPCPoints(0),trackSingle1->GetESDTrack()->GetTPCPoints(1),trackSingle1->GetESDTrack()->GetTPCPoints(2),trackSingle1->GetESDTrack()->GetTPCPoints(3));
3203
3204 rcNeg.fP.Set(p);
3205 rcNeg.fV.Set(pos);
3206 rcNeg.fStatus = trackSingle1->GetESDTrack()->GetStatus();
3207 rcNeg.fLabel = trackSingle1->GetESDTrack()->GetLabel();
3208 Double_t momentum = trackSingle1->GetESDTrack()->P();
3209 rcNeg.fBeta = momentum/TMath::Sqrt(momentum*momentum + TMath::C()*TMath::C()*trackSingle1->GetESDTrack()->M()*trackSingle1->GetESDTrack()->M());
3210 rcNeg.fSign = trackSingle1->GetESDTrack()->GetSign();
3211
3212 TEveTrack* track1 = new TEveTrack(&rcNeg, trkProp);
3213
3214 if(trackSingle1->GetESDTrack()->GetSign() > 0)
3215 {
3216 if(posTrackColor == 0)
3217 track1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
3218 else
3219 track1->SetLineColor(colorNeg[posTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
3220 }
3221 else
3222 {
3223 if(negTrackColor == 0)
3224 track1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
3225 else
3226 track1->SetLineColor(colorNeg[negTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
3227 }
3228
3229 track1->SetLineStyle(2);
3230 track1->SetRnrSelf(kTRUE);
3231
3232 fTrackListV0Neg->AddElement(track1);
3233
6aafad45 3234 if(trackSingle1->GetESDTrack()->P() > cut)
3235 {
3236
3237 x1 = trackSingle1->GetESDTrack()->Xv();
3238 y1 = trackSingle1->GetESDTrack()->Yv();
3239 z1 = trackSingle1->GetESDTrack()->Zv();
3240
3241 momentumVector->SetPoint(0, x1, y1, z1);
3242
3243 if(mode == 1)
3244 {
3245 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px()*TMath::Log(trackSingle1->GetESDTrack()->P());
3246 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py()*TMath::Log(trackSingle1->GetESDTrack()->P());
3247 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz()*TMath::Log(trackSingle1->GetESDTrack()->P());
3248 }
3249
3250 if(mode == 2)
3251 {
3252 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px();
3253 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py();
3254 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz();
3255 }
3256
3257 if(mode == 3)
3258 {
3259 x2 = x1+vectorLength*trackSingle1->GetESDTrack()->Px();
3260 y2 = y1+vectorLength*trackSingle1->GetESDTrack()->Py();
3261 z2 = z1+vectorLength*trackSingle1->GetESDTrack()->Pz();
3262 }
3263
3264 if(mode != 1 && mode!= 2 && mode != 3)
3265 continue;
3266
3267 momentumVector->SetPoint(1, x2, y2, z2);
3268/*
3269 if(trackSingle1->GetESDTrack()->Charge() == -1)
3270 momentumVector->SetLineColor(kGreen+3);
3271 else
3272 momentumVector->SetLineColor(kRed+3);
3273*/
3274 momentumVector->SetLineColor(kRed+3);
3275
3276 momentumVector->SetLineWidth(1);
3277 momentumVector->SetLineStyle(0);
3278 momentumVector->SetTitle(Form("%f GeV/c", trackSingle1->GetESDTrack()->P()));
3279
3280 momentumVectorList3->AddElement(momentumVector);
3281
3282 }
3283
3284 }
3285
6aafad45 3286 momentumVectorList->AddElement(momentumVectorList3);
3287
3288 draw = kTRUE;
3289
3290 }
3291 }
3292 }
3293 }
3294 }
3295
6747295f 3296// fTrackListV0Neg->MakeTracks();
53ffa98a 3297// fTrackListV0Neg->SetRnrChildren(kFALSE);
6747295f 3298// gEve->AddElement(fTrackListV0Neg);
3299
6aafad45 3300 gEve->AddElement(momentumVectorList);
3301
3302 TEveElement* top = gEve->GetCurrentEvent();
3303
3304 AliEveMultiView *mv = AliEveMultiView::Instance();
3305
3306 mv->DestroyEventRPhi();
3307 mv->DestroyEventRhoZ();
3308
3309 mv->ImportEventRPhi(top);
3310 mv->ImportEventRhoZ(top);
3311
3312 gEve->FullRedraw3D(kFALSE, kTRUE);
3313
3314}
3315
3316//______________________________________________________________________________
3317
3318void SetCutsWindow::SetCuts()
3319{
4f8b4026 3320 TEvePointSet *pointset=0;
3321
3322 TString str1;
3323 TString str2;
6aafad45 3324
3325 Int_t posTrackColor= gPosColorList->GetSelected();
3326 Int_t negTrackColor= gNegColorList->GetSelected();
3327
3328 TEveElement::List_i i = gEve->GetEventScene()->FirstChild()->BeginChildren();
3329 TEveElement::List_i j = gEve->GetEventScene()->FirstChild()->EndChildren();
3330 TEveElement::List_i k;
3331
4f8b4026 3332 Double_t x1, y1, z1;
6aafad45 3333
3334 for(k = i; k != j; k++)
3335 {
3336 TEveElement* element = (TEveElement*) *k;
3337
3338 str1 = element->GetElementName();
3339
3340 if(gDrawV0s->IsOn())
3341 {
3342 if(str1.Contains("ESD v0") || str1.Contains("ESD V0"))
3343 {
3344 element->SetRnrSelf(kTRUE);
3345
3346 if(element->HasChildren())
3347 element->SetRnrChildren(kTRUE);
3348
3349 continue;
3350 }
3351 }
3352
3353 if(gDrawCascades->IsOn())
3354 {
3355 if(str1.Contains("ESD cascade") || str1.Contains("ESD Cascade"))
3356 {
3357 element->SetRnrSelf(kTRUE);
3358
3359 if(element->HasChildren())
3360 element->SetRnrChildren(kTRUE);
3361
3362 continue;
3363 }
3364 }
3365
3366 if(gDrawKinks->IsOn())
3367 {
3368 if(str1.Contains("ESD kink") || str1.Contains("ESD Kink"))
3369 {
3370 element->SetRnrSelf(kTRUE);
3371
3372 if(element->HasChildren())
3373 element->SetRnrChildren(kTRUE);
3374
3375 continue;
3376 }
3377 }
3378
3379 if(gDrawVertex->IsOn())
3380 {
3381 if(str1.Contains("Primary Vertex") || str1.Contains("primary Vertex") || str1.Contains("Primary vertex") || str1.Contains("primary vertex"))
3382 {
3383 element->SetRnrSelf(kTRUE);
3384
3385 if(element->HasChildren())
3386 element->SetRnrChildren(kTRUE);
3387
3388 continue;
3389 }
3390 }
3391
3392 if(gDrawTracklets->IsOn())
3393 {
3394 if(str1.Contains("Tracklets") || str1.Contains("tracklets"))
3395 {
3396 element->SetRnrSelf(kTRUE);
3397
3398 if(element->HasChildren())
3399 element->SetRnrChildren(kTRUE);
3400
3401 continue;
3402 }
3403 }
3404
3405 if(gDrawTracks->IsOn())
3406 {
3407
76dc7e0e 3408Int_t colorNeg[27][10] =
6aafad45 3409{
76dc7e0e 3410 { kRed, kBlue, kOrange, kCyan, kGreen, kGray, kViolet, kMagenta, kSpring, kYellow },
3411 { kCyan-4, kCyan, kAzure+10, kAzure+8, kAzure+5, kAzure, kBlue, kBlue+1, kBlue+2, kBlue+3 },
3412 { kYellow-4, kYellow, kOrange+10, kOrange, kOrange+7, kOrange+10, kRed, kRed+1, kRed+2, kRed+3 },
3413 { kRed, kRed-1, kRed-2, kRed-3, kRed-4, kRed-5, kRed-6, kRed-7, kRed-8, kRed-9},
3414 { kRed, kRed, kRed+1, kRed+1, kRed+2, kRed+2, kRed+3, kRed+3, kRed+4, kRed+4},
3415 { kOrange, kOrange-1, kOrange-2, kOrange-3, kOrange-4, kOrange-5, kOrange-6, kOrange-7, kOrange-8, kOrange-9},
3416 { kOrange, kOrange+1, kOrange+2, kOrange+3, kOrange+4, kOrange+5, kOrange+6, kOrange+7, kOrange+8, kOrange+9},
3417 { kYellow, kYellow-1, kYellow-2, kYellow-3, kYellow-4, kYellow-5, kYellow-6, kYellow-7, kYellow-8, kYellow-9},
3418 { kYellow, kYellow, kYellow+1, kYellow+1, kYellow+2, kYellow+2, kYellow+3, kYellow+3, kYellow+4, kYellow+4},
3419 { kSpring, kSpring-1, kSpring-2, kSpring-3, kSpring-4, kSpring-5, kSpring-6, kSpring-7, kSpring-8, kSpring-9},
3420 { kSpring, kSpring+1, kSpring+2, kSpring+3, kSpring+4, kSpring+5, kSpring+6, kSpring+7, kSpring+8, kSpring+9},
3421 { kGreen, kGreen-1, kGreen-2, kGreen-3, kGreen-4, kGreen-5, kGreen-6, kGreen-7, kGreen-8, kGreen-9},
3422 { kGreen, kGreen, kGreen+1, kGreen+1, kGreen+2, kGreen+2, kGreen+3, kGreen+3, kGreen+4, kGreen+4},
3423 { kTeal, kTeal-1, kTeal-2, kTeal-3, kTeal-4, kTeal-5, kTeal-6, kTeal-7, kTeal-8, kTeal-9},
3424 { kTeal, kTeal+1, kTeal+2, kTeal+3, kTeal+4, kTeal+5, kTeal+6, kTeal+7, kTeal+8, kTeal+9},
3425 { kCyan, kCyan-1, kCyan-2, kCyan-3, kCyan-4, kCyan-5, kCyan-6, kCyan-7, kCyan-8, kCyan-9},
3426 { kCyan, kCyan, kCyan+1, kCyan+1, kCyan+2, kCyan+2, kCyan+3, kCyan+3, kCyan+4, kCyan+4},
3427 { kAzure, kAzure-1, kAzure-2, kAzure-3, kAzure-4, kAzure-5, kAzure-6, kAzure-7, kAzure-8, kAzure-9},
3428 { kAzure, kAzure+1, kAzure+2, kAzure+3, kAzure+4, kAzure+5, kAzure+6, kAzure+7, kAzure+8, kAzure+9},
3429 { kBlue, kBlue-1, kBlue-2, kBlue-3, kBlue-4, kBlue-5, kBlue-6, kBlue-7, kBlue-8, kBlue-9},
3430 { kBlue, kBlue, kBlue+1, kBlue+1, kBlue+2, kBlue+2, kBlue+3, kBlue+3, kBlue+4, kBlue+4},
3431 { kViolet, kViolet-1, kViolet-2, kViolet-3, kViolet-4, kViolet-5, kViolet-6, kViolet-7, kViolet-8, kViolet-9},
3432 { kViolet, kViolet+1, kViolet+2, kViolet+3, kViolet+4, kViolet+5, kViolet+6, kViolet+7, kViolet+8, kViolet+9},
3433 { kMagenta, kMagenta-1, kMagenta-2, kMagenta-3, kMagenta-4, kMagenta-5, kMagenta-6, kMagenta-7, kMagenta-8, kMagenta-9},
3434 { kMagenta, kMagenta, kMagenta+1, kMagenta+1, kMagenta+2, kMagenta+2, kMagenta+3, kMagenta+3, kMagenta+4, kMagenta+4},
3435 { kPink, kPink-1, kPink-2, kPink-3, kPink-4, kPink-5, kPink-6, kPink-7, kPink-8, kPink-9},
3436 { kPink, kPink+1, kPink+2, kPink+3, kPink+4, kPink+5, kPink+6, kPink+7, kPink+8, kPink+9},
6aafad45 3437};
3438
3439Int_t colorAll[22] =
3440{
76dc7e0e 3441kBlue+4, kBlue+2, kBlue, kAzure, kAzure-3, kAzure+7, kCyan, kCyan-7, kGreen-7, kGreen-4, kGreen, kSpring,
3442kSpring+7, kSpring+8, kYellow, kOrange, kOrange-3, kOrange+7, kOrange+4, kRed, kRed+2, kMagenta
6aafad45 3443};
3444
3445 if(str1.Contains("Tracks") || str1.Contains("tracks"))
3446 {
3447 element->SetRnrSelf(kTRUE);
3448
3449 if(element->HasChildren())
3450 element->SetRnrChildren(kTRUE);
3451
3452 TEveElement::List_i m = element->BeginChildren();
3453 TEveElement::List_i n = element->EndChildren();
3454 TEveElement::List_i l;
3455
3456 for(l = m; l != n; l++)
3457 {
3458 TEveElement* trackType = (TEveElement*) *l;
3459 str2 = trackType->GetElementName();
3460
3461 trackType->SetRnrSelf(kFALSE);
3462
6747295f 3463// (dynamic_cast<TEveTrackList*>trackType)->GetPropagator()->SetMaxR(250);
6aafad45 3464
3465 if(trackType->HasChildren())
3466 trackType->SetRnrChildren(kFALSE);
3467
3468 if(gDrawTracksType1->IsOn() && str2.Contains("Sigma < 3"))
3469 {
3470 trackType->SetRnrSelf(kTRUE);
3471
3472 if(trackType->HasChildren())
3473 {
3474
3475 trackType->SetRnrChildren(kTRUE);
3476 TEveElement::List_i x = trackType->BeginChildren();
3477 TEveElement::List_i y = trackType->EndChildren();
3478 TEveElement::List_i z;
3479
3480 for(z = x; z != y; z++)
3481 {
3482
3483 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
3484
3485 if(trackSingle1->GetESDTrack()->GetSign() > 0)
3486 {
76dc7e0e 3487 if(posTrackColor == 0)
6aafad45 3488 trackSingle1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
76dc7e0e 3489 else
3490 trackSingle1->SetLineColor(colorNeg[posTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
6aafad45 3491 }
3492 else
3493 {
76dc7e0e 3494 if(negTrackColor == 0)
6aafad45 3495 trackSingle1->SetLineColor(colorAll[GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),22)]);
76dc7e0e 3496 else
3497 trackSingle1->SetLineColor(colorNeg[negTrackColor-1][GetTrackColorByMomentum(trackSingle1->GetESDTrack()->Pt(),10)]);
6aafad45 3498 }
3499
3500 trackSingle1->SetLineStyle(1);
3501 trackSingle1->SetRnrSelf(kTRUE);
3502
3503
3504 }
3505
3506 }
3507
3508 }
3509
3510
3511 if(gDrawTracksType2->IsOn() && str2.Contains("3 < Sigma < 5"))
3512 {
3513 trackType->SetRnrSelf(kTRUE);
3514
3515 if(trackType->HasChildren())
3516 {
3517 trackType->SetRnrChildren(kTRUE);
3518 TEveElement::List_i x = trackType->BeginChildren();
3519 TEveElement::List_i y = trackType->EndChildren();
3520 TEveElement::List_i z;
3521
3522 for(z = x; z != y; z++)
3523 {
3524
3525 AliEveTrack* trackSingle1 = dynamic_cast<AliEveTrack*>((TEveElement*) *z);
3526
3527 if(trackSingle1->GetESDTrack()->GetSign() > 0)
3528 {