212 if (!strcmp(option,
"") || !strcmp(option,
"Final")) {
213 for (
Int_t i = 0; i<numpart; i++) {
214 if (
HEPEVT.isthep[i] == 1) {
236 }
else if (!strcmp(option,
"All")) {
237 for (
Int_t i = 0; i<numpart; i++) {
275 if (particles == 0)
return 0;
277 clonesParticles.
Clear();
279 if (!strcmp(option,
"") || !strcmp(option,
"Final")) {
280 for (
Int_t i = 0; i<numpart; i++) {
281 if (
HEPEVT.isthep[i] == 1) {
302 }
else if (!strcmp(option,
"All")) {
303 for (
Int_t i = 0; i<numpart; i++) {
339 const Int_t big = 9999;
340 const Int_t inview = 0;
342 if (px > 50 && py > 50) dist = inview;
355 gROOT->MakeDefCanvas();
356 if (
gPad->GetVirtCanvas())
357 gPad->GetVirtCanvas()->SetFillColor(13);
363 if (!strstr(option,
"same")) {
370 view =
gPad->GetView();
379 const Int_t kColorProton = 4;
380 const Int_t kColorNeutron = 5;
381 const Int_t kColorAntiProton= 3;
382 const Int_t kColorPionPlus = 6;
383 const Int_t kColorPionMinus = 2;
384 const Int_t kColorKaons = 7;
385 const Int_t kColorElectrons = 0;
386 const Int_t kColorGamma = 18;
390 Int_t nAntiProtons= 0;
392 Int_t nPionMinus = 0;
394 Int_t nElectrons = 0;
398 Int_t i,lwidth,color,lstyle;
404 for (i=0;i<ntracks;i++) {
411 if (vx*vx+vy*vy+vz*vz >
rbox*
rbox)
continue;
417 if (lwidth < 1) lwidth = 1;
422 color = kColorNeutron; nNeutrons++;}
423 if (!strcmp(
name,
"p")) { color = kColorProton; nProtons++;}
424 if (!strcmp(
name,
"p bar")) { color = kColorAntiProton; nAntiProtons++;}
425 if (!strcmp(
name,
"pi+")) { color = kColorPionPlus; nPionPlus++;}
426 if (!strcmp(
name,
"pi-")) { color = kColorPionMinus; nPionMinus++;}
427 if (!strcmp(
name,
"e+")) { color = kColorElectrons; nElectrons++;}
428 if (!strcmp(
name,
"e-")) { color = kColorElectrons; nElectrons++;}
429 if (!strcmp(
name,
"gamma")) { color = kColorGamma; nGammas++; lstyle = 3; }
430 if ( strstr(
name,
"K")) { color = kColorKaons; nKaons++;}
447 if (
gPad->GetFillColor() == 10) tcolor = 4;
478 if (nPionPlus+nPionMinus) {
481 strlcpy(tcount,
"Protons/Pions= inf",31);
485 if (nPionPlus+nPionMinus) {
488 strlcpy(tcount,
"Kaons/Pions= inf",31);
500 if (
gPad->GetView()) {
501 gPad->GetView()->ExecuteRotateView(
event, px, py);
522 if (i < 0 || i >
n)
return 0;
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Using a TBrowser one can browse all ROOT objects.
An array of clone (identical) objects.
virtual void Clear(Option_t *option="")
Clear the clones array.
static TDatabasePDG * Instance()
static function
The interface to various event generators.
virtual TParticle * GetParticle(Int_t i) const
Returns pointer to primary number i;.
Int_t GetNumberOfParticles() const
Return the number of particles in the stack.
virtual void SetViewRadius(Float_t rbox=1000)
Set lower and upper values of the view range.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void Paint(Option_t *option="")
Paint one event.
virtual ~TGenerator()
Event generator default destructor.
virtual void GenerateEvent()
must be implemented in concrete class (see eg TPythia6)
Bool_t fShowNeutrons
Pt cut. Do not show primaries below.
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 SetPtCut(Float_t ptcut=0)
Set Pt threshold below which primaries are not drawn.
TObjArray * fParticles
display neutrons if true
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to objects in event.
virtual void Draw(Option_t *option="")
Insert one event in the pad list.
virtual void Browse(TBrowser *b)
browse generator
virtual void ShowNeutrons(Bool_t show=1)
Set flag to display or not neutrons.
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.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
virtual void Clear(Option_t *option="")
Remove all objects from the array.
TObject * UncheckedAt(Int_t i) const
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Int_t GetLast() const
Return index of last object in array.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Description of the static properties of a particle.
Description of the dynamic properties of a particle.
TParticlePDG * GetPDG(Int_t mode=0) const
Returns a pointer to the TParticlePDG object using the pdgcode.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
Base class for several text objects.
virtual TText * DrawText(Double_t x, Double_t y, const char *text)
Draw this text with new coordinates.
virtual void GetRange(Float_t *min, Float_t *max)=0
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.
virtual void SetRange(const Double_t *min, const Double_t *max)=0
Double_t Log10(Double_t x)