KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVEventViewer.h
1
3
4#ifndef __KVEVENTVIEWER_H
5#define __KVEVENTVIEWER_H
6
7#include "KVEvent.h"
8#include "TGeoManager.h"
9#include "TGeoMaterial.h"
10#include "TGeoMedium.h"
11#include "TGeoVolume.h"
12#include "Riostream.h"
13using namespace std;
14
15class TBranch;
16class TTree;
17
52class KVEventViewer : public KVBase {
53protected:
61
69
72
76
82
84
85 ifstream eventFile;
88
91
94
97
99
100public:
106 KVEventViewer(Int_t protoncolor = kRed - 2, Int_t neutroncolor = kBlue - 2,
107 Int_t highlightprotoncolor = kOrange - 2,
108 Int_t highlightneutroncolor = kGreen - 2,
109 Double_t freenucleonradius = 0.2,
110 Double_t nucleonradius = 0.25,
111 Double_t nuclearradiusparameter = 0.2);
112 virtual ~KVEventViewer();
113
115 {
117 }
119 {
121 }
123 {
125 }
127 {
129 }
130 void SetSavePicture(Bool_t yes = kTRUE)
131 {
132 fSavePicture = yes;
133 }
134
142 {
144 }
145
147 {
148 fMaxVelocity = vel;
149 }
150 void SetFixSeed(Bool_t fix, Int_t refresh = 1)
151 {
152 fFixSeed = fix;
153 fRefresh = refresh;
154 }
155 void SetXYMode(Bool_t mode)
156 {
157 fXYMode = mode;
158 }
161 {
163 }
164
165 void DrawNucleus(KVNucleus&, const Char_t* frame = "");
166 void DrawEvent(KVEvent*, const Char_t* frame = "");
167 void DrawEvent(KVEvent*, const Char_t* frame = "") const;
168
169 void SetInput(TBranch* eventbranch);
170 void SetInput(const char* filename);
171
172 void ReadEvent();
173 void ReadTextEvent();
174 void ReadTreeEvent();
175
176 void DrawNextEvent();
177
178 virtual Bool_t SetHighlight(KVNucleus* n);
179 virtual void SetHighlightMode(Int_t m)
180 {
189 }
190
191 void SetAxesMode(Bool_t on = kTRUE)
192 {
194 fAxesMode = on;
195 }
196
198 {
199 if (theEvent) theEvent->Print("ok");
200 }
201
202 void SetFixPerspective(Bool_t on = kTRUE)
203 {
206
208 }
209
210 ClassDef(KVEventViewer, 1) //Draw events in 3D using OpenGL
211};
212
213#endif
int Int_t
ROOT::R::TRInterface & r
#define c(i)
bool Bool_t
char Char_t
double Double_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char mode
Base class for KaliVeda framework.
Definition KVBase.h:142
virtual void Print(Option_t *option="") const
Definition KVBase.cpp:410
Draw events in 3D using OpenGL.
Long64_t NtreeEntries
virtual Bool_t SetHighlight(KVNucleus *n)
Decide whether or not to highlight this nucleus in the event display.
void SetFixPerspective(Bool_t on=kTRUE)
Double_t nucleon_radius
radius of nucleons in nuclei
virtual void SetHighlightMode(Int_t m)
void SetXYMode(Bool_t mode)
void ReadEvent()
Read an event from input source.
void DrawNextEvent()
Draw next event read from input source.
Double_t fMaxVelocity
void SetHighlightProtonColor(Int_t c)
void SetAxesMode(Bool_t on=kTRUE)
Int_t fproton_color
proton colour
Double_t fScaleFactor
Int_t fProton_color
proton colour for highlighted nuclei
void SetHighlightNeutronColor(Int_t c)
TGeoVolume * top
void SetSavePicture(Bool_t yes=kTRUE)
virtual ~KVEventViewer()
Destructor.
void SetFixSeed(Bool_t fix, Int_t refresh=1)
TGeoMaterial * matNuc
Double_t nuclear_radius_parameter
to calculate radii of nuclei
void DrawEvent(KVEvent *, const Char_t *frame="")
Draw all particles in event which are "ok".
void SetFreeNucleonRadius(Double_t r)
Set radius used to represent free nucleons (default value = 0.2)
TGeoMedium * Nuc
void SetInput(TBranch *eventbranch)
Read events from branch of a TTree.
TGeoManager * geom
void SetNeutronColor(Int_t c)
Int_t fNeutron_color
neutron colour for highlighted nuclei
void SetDrawMomentumSpace(Bool_t on=kTRUE)
Draw event in momentum space (default is velocity space)
ifstream eventFile
Double_t maxV
largest velocity of event
void DumpCurrentEvent()
KVEvent * theEvent
TGeoMedium * Box
Double_t free_nucleon_radius
radius of free nucleons
TGeoMedium * EmptySpace
void SetProtonColor(Int_t c)
Int_t ivol
geovolume counter
void DrawNucleus(KVNucleus &, const Char_t *frame="")
Draw nucleus.
Bool_t fSavePicture
kTRUE to save in GIF file
Int_t fneutron_color
neutron colour
Int_t maxZ
largest Z of event
void SetNucleonRadius(Double_t r)
Set radius used to represent nucleons in nuclei (default value = 0.25)
void SetMaxVelocity(Int_t vel)
Bool_t fMomentumSpace
kTRUE to show event in momentum space
Bool_t fFixPerspective
TGeoMaterial * matBox
TGeoMaterial * matEmptySpace
Abstract base class container for multi-particle events.
Definition KVEvent.h:67
Description of properties and kinematics of atomic nuclei.
Definition KVNucleus.h:126
long long Long64_t
TMarker m