]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveJetPlane.cxx
Fixed effc++ warnings.
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveJetPlane.cxx
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #include "AliEveJetPlane.h"
11 #include <TString.h>
12 #include <TBuffer3D.h>
13 #include <TBuffer3DTypes.h>
14 #include <TVirtualPad.h>
15 #include <TVirtualViewer3D.h>
16
17
18 //______________________________________________________________________________
19 // AliEveJetPlane
20 //
21
22
23 Bool_t AliEveJetPlane::fgOneMomentumXYZ      = kFALSE;
24 Bool_t AliEveJetPlane::fgOneMomentumPhiTheta = kFALSE;
25 Bool_t AliEveJetPlane::fgOneEta     = kFALSE;
26 Bool_t AliEveJetPlane::fgOneE       = kFALSE;
27 Bool_t AliEveJetPlane::fgOneChgMass = kFALSE;
28
29
30 ClassImp(AliEveJetPlane)
31
32 AliEveJetPlane::AliEveJetPlane(Int_t iev) :
33   TEveElementList(Form("AliEveJetPlane %i",iev), Form("%i",iev)),
34
35   fMinEta (-1.5 ),
36   fMaxEta ( 1.5 ),
37   fMinPhi (-TMath::Pi() ),
38   fMaxPhi ( TMath::Pi() ),
39
40   fNEtaDiv(30),
41   fNPhiDiv(30),
42
43   fEtaScale(350/1.5),
44   fPhiScale(350/TMath::Pi()),
45   fEnergyScale(100.0),
46
47   fEnergyColorScale (0.),
48
49   fGridColor(5),
50
51   fHMTrans(),
52   fJets(),
53   fTracks(),
54
55   fRnrJets (kTRUE),
56   fRnrTracks (kTRUE),
57
58   fOneSelection (kTRUE),
59   fTwoSelection (kFALSE),
60
61   fJet1(0), fJet2(0), fTrack1(0), fTrack2(0),
62
63   fSelectionFlag (1)
64 {
65   SetMainColorPtr(&fGridColor);
66 }
67
68 /******************************************************************************/
69
70 void AliEveJetPlane::AddJet(AliAODJet jet)
71 {
72   fJets.push_back(jet);
73 }
74
75 /******************************************************************************/
76
77 void AliEveJetPlane::AddTrack(AliAODTrack track)
78 {
79   fTracks.push_back(track);
80 }
81
82
83 /******************************************************************************/
84
85 void AliEveJetPlane::ComputeBBox()
86 {
87   BBoxInit();
88   BBoxCheckPoint(-350, -350, -20);
89   BBoxCheckPoint( 350,  350,  20);
90 }
91
92 void AliEveJetPlane::Paint(Option_t* /*option*/)
93 {
94   TBuffer3D buff(TBuffer3DTypes::kGeneric);
95
96   // Section kCore
97   buff.fID           = this;
98   buff.fColor        = fGridColor;
99   buff.fTransparency = 0;
100   fHMTrans.SetBuffer3D(buff);
101   buff.SetSectionsValid(TBuffer3D::kCore);
102
103   Int_t reqSections = gPad->GetViewer3D()->AddObject(buff);
104   if (reqSections == TBuffer3D::kNone) {
105     // printf("AliEveJetPlane::Paint viewer was happy with Core buff3d.\n");
106     return;
107   }
108 }