168 fShowNeutrons =
kTRUE;
209 if (!strcmp(option,
"") || !strcmp(option,
"Final")) {
210 for (
Int_t i = 0; i<numpart; i++) {
233 }
else if (!strcmp(option,
"All")) {
234 for (
Int_t i = 0; i<numpart; i++) {
272 if (particles == 0)
return 0;
274 clonesParticles.
Clear();
276 if (!strcmp(option,
"") || !strcmp(option,
"Final")) {
277 for (
Int_t i = 0; i<numpart; i++) {
299 }
else if (!strcmp(option,
"All")) {
300 for (
Int_t i = 0; i<numpart; i++) {
336 const Int_t big = 9999;
337 const Int_t inview = 0;
339 if (px > 50 && py > 50) dist = inview;
352 gROOT->MakeDefCanvas();
353 if (
gPad->GetVirtCanvas())
354 gPad->GetVirtCanvas()->SetFillColor(13);
360 if (!strstr(option,
"same")) {
361 if (view) { view->
GetRange(rmin,rmax); rbox = rmax[2];}
367 view =
gPad->GetView();
374 if (view) view->
SetRange(-rbox,-rbox,-rbox, rbox,rbox,rbox );
376 const Int_t kColorProton = 4;
377 const Int_t kColorNeutron = 5;
378 const Int_t kColorAntiProton= 3;
379 const Int_t kColorPionPlus = 6;
380 const Int_t kColorPionMinus = 2;
381 const Int_t kColorKaons = 7;
382 const Int_t kColorElectrons = 0;
383 const Int_t kColorGamma = 18;
387 Int_t nAntiProtons= 0;
389 Int_t nPionMinus = 0;
391 Int_t nElectrons = 0;
395 Int_t i,lwidth,color,lstyle;
401 for (i=0;i<ntracks;i++) {
408 if (vx*vx+vy*vy+vz*vz > rbox*rbox)
continue;
410 if (pt <
fPtCut)
continue;
414 if (lwidth < 1) lwidth = 1;
419 color = kColorNeutron; nNeutrons++;}
420 if (!strcmp(name,
"p")) { color = kColorProton; nProtons++;}
421 if (!strcmp(name,
"p bar")) { color = kColorAntiProton; nAntiProtons++;}
422 if (!strcmp(name,
"pi+")) { color = kColorPionPlus; nPionPlus++;}
423 if (!strcmp(name,
"pi-")) { color = kColorPionMinus; nPionMinus++;}
424 if (!strcmp(name,
"e+")) { color = kColorElectrons; nElectrons++;}
425 if (!strcmp(name,
"e-")) { color = kColorElectrons; nElectrons++;}
426 if (!strcmp(name,
"gamma")) { color = kColorGamma; nGammas++; lstyle = 3; }
427 if ( strstr(name,
"K")) { color = kColorKaons; nKaons++;}
444 if (
gPad->GetFillColor() == 10) tcolor = 4;
475 if (nPionPlus+nPionMinus) {
478 strlcpy(tcount,
"Protons/Pions= inf",31);
482 if (nPionPlus+nPionMinus) {
485 strlcpy(tcount,
"Kaons/Pions= inf",31);
497 if (
gPad->GetView()) {
498 gPad->GetView()->ExecuteRotateView(event, px, py);
519 if (i < 0 || i > n)
return 0;
563 view->
SetRange(xmin,ymin,zmin,xmax,ymax,zmax);
virtual const char * GetName() const
Returns name of object.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
Bool_t fShowNeutrons
Pt cut. Do not show primaries below.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
The interface to various event generators.
Int_t GetNumberOfParticles() const
Return the number of particles in the stack.
Description of the dynamic properties of a particle.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual Int_t ImportParticles(TClonesArray *particles, Option_t *option="")
It reads the /HEPEVT/ common block which has been filled by the GenerateEvent method.
virtual void SetRange(const Double_t *min, const Double_t *max)=0
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetViewRange(Float_t xmin=-10000, Float_t ymin=-10000, Float_t zmin=-10000, Float_t xmax=10000, Float_t ymax=10000, Float_t zmax=10000)
Set lower and upper values of the view range.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
static TDatabasePDG * Instance()
static function
The TNamed class is the base class for all named ROOT classes.
Double_t Log10(Double_t x)
Base class for several text objects.
virtual void ShowNeutrons(Bool_t show=1)
Set flag to display or not neutrons.
virtual void GenerateEvent()
must be implemented in concrete class (see eg TPythia6)
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void Clear(Option_t *option="")
Clear the clones array.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Using a TBrowser one can browse all ROOT objects.
Int_t GetLast() const
Return index of last object in array.
virtual void Draw(Option_t *option="")
Insert one event in the pad list.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void Paint(Option_t *option="")
Paint one event.
Int_t GetEntriesFast() const
Description of the static properties of a particle.
virtual void SetViewRadius(Float_t rbox=1000)
Set lower and upper values of the view range.
TObject * UncheckedAt(Int_t i) const
A Pave (see TPave) with text, lines or/and boxes inside.
TObjArray * fParticles
display neutrons if true
virtual void SetPtCut(Float_t ptcut=0)
Set Pt threshold below which primaries are not drawn.
TParticlePDG * GetPDG(Int_t mode=0) const
Returns a pointer to the TParticlePDG object using the pdgcode.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
An array of clone (identical) objects.
virtual void Browse(TBrowser *b)
browse generator
virtual void GetRange(Float_t *min, Float_t *max)=0
virtual TText * DrawText(Double_t x, Double_t y, const char *text)
Draw this text with new coordinates.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual ~TGenerator()
Event generator default destructor.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual TParticle * GetParticle(Int_t i) const
Returns pointer to primary number i;.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to objects in event.
virtual const char * GetTitle() const
Returns title of object.