pythia_display.C file from root/tutorials/eve not running

Dear Friends,
I installed root with pythia 8 as a plug in and it went completely well with the installation and even I ran an example from tutorials . I ran the example under Pythia8.C tutorials/pythia directory and it went totally well!

But when I tried to ran the file pythia_display.C from tutorials/eve directory I found an issue i.e it was made for pythia 6 library , hence I edited it accordingly and ran it and got following list of errors :frowning:
Please help fellows .

This is the link of code I am running .

https://root.cern.ch/root/html/tutorials/eve/pythia_display.C.html

Here is the link of errors I am getting :

root [1] .x /Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C
In file included from input_line_30:21:
In file included from /Users/Umang/pythia_root/root/include/TEveBrowser.h:15:
/Users/Umang/pythia_root/root/include/TEveElement.h:33:7: error: redefinition of 'TEveElementā€™
class TEveElement
^
/Users/Umang/pythia_root/root/include/TEveElement.h:33:7: note: previous definition is here
class TEveElement
^
In file included from input_line_30:21:
In file included from /Users/Umang/pythia_root/root/include/TEveBrowser.h:15:
/Users/Umang/pythia_root/root/include/TEveElement.h:428:37: error: base class has incomplete type
class TEveElementObjectPtr : public TEveElement,
~^~~~~
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
In file included from input_line_30:21:
In file included from /Users/Umang/pythia_root/root/include/TEveBrowser.h:15:
/Users/Umang/pythia_root/root/include/TEveElement.h:459:32: error: base class has incomplete type
class TEveElementList : public TEveElement,
~^~~~~
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
In file included from input_line_30:21:
In file included from /Users/Umang/pythia_root/root/include/TEveBrowser.h:15:
/Users/Umang/pythia_root/root/include/TEveElement.h:477:21: error: cannot initialize a variable of type 'const TObject ā€™ with an rvalue of
type 'const TEveElementList '
{ const TObject
obj = this; return const_cast<TObject
>(obj); }
^ ~~~~
/Users/Umang/pythia_root/root/include/TEveElement.h:481:57: error: cannot initialize object parameter of type ā€˜const TNamedā€™ with an
expression of type 'const TEveElementListā€™
virtual const char* GetElementName() const { return GetName(); }
^~~~~~~
/Users/Umang/pythia_root/root/include/TEveElement.h:482:57: error: cannot initialize object parameter of type ā€˜const TNamedā€™ with an
expression of type 'const TEveElementListā€™
virtual const char* GetElementTitle() const { return GetTitle(); }
^~~~~~~~
/Users/Umang/pythia_root/root/include/TEveElement.h:485:14: error: cannot initialize object parameter of type ā€˜TNamedā€™ with an expression of
type ā€˜TEveElementListā€™
{ TNamed::SetName(name); NameTitleChanged(); }
^~~~~~~
/Users/Umang/pythia_root/root/include/TEveElement.h:485:29: error: use of undeclared identifier ā€˜NameTitleChangedā€™
{ TNamed::SetName(name); NameTitleChanged(); }
^
/Users/Umang/pythia_root/root/include/TEveElement.h:488:14: error: cannot initialize object parameter of type ā€˜TNamedā€™ with an expression of
type ā€˜TEveElementListā€™
{ TNamed::SetTitle(title); NameTitleChanged(); }
^~~~~~~~
/Users/Umang/pythia_root/root/include/TEveElement.h:488:31: error: use of undeclared identifier ā€˜NameTitleChangedā€™
{ TNamed::SetTitle(title); NameTitleChanged(); }
^
/Users/Umang/pythia_root/root/include/TEveElement.h:491:14: error: cannot initialize object parameter of type ā€˜TNamedā€™ with an expression of
type ā€˜TEveElementListā€™
{ TNamed::SetNameTitle(name, title); NameTitleChanged(); }
^~~~~~~~~~~~
/Users/Umang/pythia_root/root/include/TEveElement.h:491:41: error: use of undeclared identifier ā€˜NameTitleChangedā€™
{ TNamed::SetNameTitle(name, title); NameTitleChanged(); }
^
/Users/Umang/pythia_root/root/include/TEveElement.h:520:58: error: cannot initialize return object of type ā€˜TEveElement *ā€™ with an rvalue of
type 'TEveElementListProjected '
virtual TEveElement
GetProjectedAsElement() { return this; }
^~~~
In file included from input_line_30:21:
/Users/Umang/pythia_root/root/include/TEveBrowser.h:43:68: error: member access into incomplete type 'TEveElementā€™
virtual Bool_t IsActive() const { return fElement->GetSelectedLevel() != 0; }
^
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
In file included from input_line_30:21:
/Users/Umang/pythia_root/root/include/TEveBrowser.h:47:70: error: member access into incomplete type 'TEveElementā€™
virtual const char *GetText() const { return fElement->GetElementName(); }
^
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
In file included from input_line_30:21:
/Users/Umang/pythia_root/root/include/TEveBrowser.h:48:77: error: member access into incomplete type 'TEveElementā€™
virtual Int_t GetTextLength() const { return strlen(fElement->GetElementName()); }
^
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
In file included from input_line_30:21:
/Users/Umang/pythia_root/root/include/TEveBrowser.h:49:70: error: member access into incomplete type 'TEveElementā€™
virtual const char GetTipText() const { return fElement->GetElementTitle(); }
^
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
In file included from input_line_30:21:
/Users/Umang/pythia_root/root/include/TEveBrowser.h:50:77: error: member access into incomplete type 'TEveElementā€™
virtual Int_t GetTipTextLength() const { return strlen(fElement->GetElementTitle()); }
^
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
In file included from input_line_30:21:
/Users/Umang/pythia_root/root/include/TEveBrowser.h:57:72: error: member access into incomplete type 'TEveElementā€™
virtual const TGPicture
GetPicture() const { return fElement->GetListTreeIcon(fOpen); }
^
/Users/Umang/pythia_root/root/include/TPyDispatcher.h:22:7: note: forward declaration of 'TEveElementā€™
class TEveElement;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Error in TInterpreter::AutoParse: Error parsing payload code for class TEveException with content:

Hi,

Since it works with Pythia 6 (I just tried), could you tell what you modified exactly?

Cheers, Bertrand.

Dear Bertrand,

Many thanks for your reply :slight_smile:

I just replaced pythia6 with pythia8 in the code i.e wherever the word pythia6 appeared I changed it wit pythia8 and ran it, following is the list of errors I received (ignore the error log in the original post ):

Umangs-MacBook-Pro:eve Umang$ root -l pythia_display.C 
root [0] 
Processing pythia_display.C...
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:84:6: error: no
      member named 'SetMSEL' in 'TPythia8'
   P.SetMSEL(0);           // full user controll;
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:85:6: error: no
      member named 'SetMSUB' in 'TPythia8'
   P.SetMSUB(102, 1);      // g + g -> H0
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:89:6: error: no
      member named 'SetPMAS' in 'TPythia8'
   P.SetPMAS(6,  1, 175);  // mass of TOP
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:90:6: error: no
      member named 'SetPMAS' in 'TPythia8'
   P.SetPMAS(25, 1, 180);  // mass of Higgs
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:93:6: error: no
      member named 'SetCKIN' in 'TPythia8'
   P.SetCKIN(1, 170.0);    // range of allowed mass
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:94:6: error: no
      member named 'SetCKIN' in 'TPythia8'
   P.SetCKIN(2, 190.0);
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:96:6: error: no
      member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(61, 0);   // switch off ISR
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:97:6: error: no
      member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(71, 0);   // switch off FSR
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:98:6: error: no
      member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(81, 0);   // switch off multiple interactions
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:100:6: error: no
      member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(111, 0);  // Switch off fragmentation
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:104:9: error: no
      member named 'SetMDME' in 'TPythia8'
      P.SetMDME(i, 1, 0);
      ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:105:6: error: no
      member named 'SetMDME' in 'TPythia8'
   P.SetMDME(225, 1, 1);
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:109:9: error: no
      member named 'SetMDME' in 'TPythia8'
      P.SetMDME(i, 1, 0);
      ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:110:6: error: no
      member named 'SetMDME' in 'TPythia8'
   P.SetMDME(184, 1, 1);
   ~ ^
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:113:6: error: no
      matching member function for call to 'Initialize'
   P.Initialize("cms", "p", "p", 14000);
   ~~^~~~~~~~~~
/Users/Umang/pythia_root/root/include/TPythia8.h:100:28: note: candidate
      function not viable: no known conversion from 'const char [4]' to 'Int_t'
      (aka 'int') for 1st argument
   Bool_t                  Initialize(Int_t idAin, Int_t idBin, Double_...
                           ^
/Users/Umang/pythia_root/root/include/TPythia8.h:99:28: note: candidate function
      not viable: requires 3 arguments, but 4 were provided
   Bool_t                  Initialize(Int_t idAin, Int_t idBin, Double_t ecms);
                           ^
Error in <TInterpreter::AutoParse>: Error parsing payload code for class TEveGeoShape with content:


#ifndef G__VECTOR_HAS_CLASS_ITERATOR
  #define G__VECTOR_HAS_CLASS_ITERATOR 1
#endif

#define _BACKWARD_BACKWARD_WARNING_H
#include "TEveBrowser.h"
#include "TEveChunkManager.h"
#include "TEveCompound.h"
#include "TEveElement.h"
#include "TEveElementEditor.h"
#include "TEveEventManager.h"
#include "TEveGValuators.h"
#include "TEveGedEditor.h"
#include "TEveMacro.h"
#include "TEveManager.h"
#include "TEvePad.h"
#include "TEveParamList.h"
#include "TEveProjectionAxes.h"
#include "TEveProjectionAxesEditor.h"
#include "TEveProjectionAxesGL.h"
#include "TEveProjectionBases.h"
#include "TEveProjectionManager.h"
#include "TEveProjectionManagerEditor.h"
#include "TEveProjections.h"
#include "TEveScene.h"
#include "TEveSceneInfo.h"
#include "TEveSelection.h"
#include "TEveTrans.h"
#include "TEveTransEditor.h"
#include "TEveTreeTools.h"
#include "TEveUtil.h"
#include "TEveVector.h"
#include "TEvePathMark.h"
#include "TEveVSD.h"
#include "TEveVSDStructs.h"
#include "TEveViewer.h"
#include "TEveViewerListEditor.h"
#include "TEveWindow.h"
#include "TEveWindowEditor.h"
#include "TEveWindowManager.h"
#include "TEveSecondarySelectable.h"
#include "TEveArrow.h"
#include "TEveArrowEditor.h"
#include "TEveArrowGL.h"
#include "TEveBox.h"
#include "TEveBoxGL.h"
#include "TEveBoxSet.h"
#include "TEveBoxSetGL.h"
#include "TEveCalo.h"
#include "TEveCalo2DGL.h"
#include "TEveCalo3DGL.h"
#include "TEveCaloData.h"
#include "TEveCaloLegoEditor.h"
#include "TEveCaloLegoGL.h"
#include "TEveCaloLegoOverlay.h"
#include "TEveCaloVizEditor.h"
#include "TEveDigitSet.h"
#include "TEveDigitSetEditor.h"
#include "TEveDigitSetGL.h"
#include "TEveFrameBox.h"
#include "TEveFrameBoxGL.h"
#include "TEveGeoNode.h"
#include "TEveGeoNodeEditor.h"
#include "TEveGeoPolyShape.h"
#include "TEveGeoShape.h"
#include "TEveGeoShapeExtract.h"
#include "TEveGridStepper.h"
#include "TEveGridStepperEditor.h"
#include "TEveLegoEventHandler.h"
#include "TEveShape.h"
#include "TEveShapeEditor.h"
#include "TEveLine.h"
#include "TEveLineEditor.h"
#include "TEveLineGL.h"
#include "TEvePointSet.h"
#include "TEvePointSetArrayEditor.h"
#include "TEvePolygonSetProjected.h"
#include "TEvePolygonSetProjectedGL.h"
#include "TEveQuadSet.h"
#include "TEveQuadSetGL.h"
#include "TEveRGBAPalette.h"
#include "TEveRGBAPaletteEditor.h"
#include "TEveRGBAPaletteOverlay.h"
#include "TEveScalableStraightLineSet.h"
#include "TEveStraightLineSet.h"
#include "TEveStraightLineSetEditor.h"
#include "TEveStraightLineSetGL.h"
#include "TEveText.h"
#include "TEveTextEditor.h"
#include "TEveTextGL.h"
#include "TEveTrack.h"
#include "TEveTrackEditor.h"
#include "TEveTrackGL.h"
#include "TEveTrackProjected.h"
#include "TEveTrackProjectedGL.h"
#include "TEveTrackPropagator.h"
#include "TEveTrackPropagatorEditor.h"
#include "TEveTriangleSet.h"
#include "TEveTriangleSetEditor.h"
#include "TEveTriangleSetGL.h"
#include "TEveJetCone.h"
#include "TEveJetConeEditor.h"
#include "TEveJetConeGL.h"
#include "TEvePlot3D.h"
#include "TEvePlot3DGL.h"

#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:125:12: error: 
      allocation of incomplete type 'TEveGeoShape'
   b = new TEveGeoShape("Barell 1");
           ^~~~~~~~~~~~
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:126:5: error: 
      member access into incomplete type 'TEveGeoShape'
   b->SetShape(new TGeoTube(kR_min, kR_max, kZ_d));
    ^
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:127:5: error: 
      member access into incomplete type 'TEveGeoShape'
   b->SetMainColor(kCyan);
    ^
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:128:5: error: 
      member access into incomplete type 'TEveGeoShape'
   b->SetMainTransparency(80);
    ^
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:129:26: error: 
      cannot initialize a parameter of type 'TEveElement *' with an lvalue of
      type 'TEveGeoShape *'
   fake_geom->AddElement(b);
                         ^
/Users/Umang/pythia_root/root/include/TEveElement.h:233:41: note: passing
      argument to parameter 'el' here
   virtual void AddElement(TEveElement* el);
                                        ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:131:12: error: 
      allocation of incomplete type 'TEveGeoShape'
   b = new TEveGeoShape("Barell 2");
           ^~~~~~~~~~~~
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:132:5: error: 
      member access into incomplete type 'TEveGeoShape'
   b->SetShape(new TGeoTube(2*kR_min, 2*kR_max, 2*kZ_d));
    ^
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:133:5: error: 
      member access into incomplete type 'TEveGeoShape'
   b->SetMainColor(kPink-3);
    ^
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:134:5: error: 
      member access into incomplete type 'TEveGeoShape'
   b->SetMainTransparency(80);
    ^
input_line_15:142:560: note: forward declaration of 'TEveGeoShape'
  ...__attribute__((annotate("$clingAutoload$TEveGeoNode.h")))  TEveGeoShape;
                                                                ^
In file included from input_line_20:1:
/Users/Umang/pythia_root/root/tutorials/eve/pythia_display.C:135:26: error: 
      cannot initialize a parameter of type 'TEveElement *' with an lvalue of
      type 'TEveGeoShape *'
   fake_geom->AddElement(b);
                         ^
/Users/Umang/pythia_root/root/include/TEveElement.h:233:41: note: passing
      argument to parameter 'el' here
   virtual void AddElement(TEveElement* el);
                                        ^
In file included from input_line_23:22:
/Users/Umang/pythia_root/root/include/TEveChunkManager.h:27:7: error: 
      redefinition of 'TEveChunkManager'
class TEveChunkManager
      ^
/Users/Umang/pythia_root/root/include/TEveChunkManager.h:27:7: note: previous
      definition is here
class TEveChunkManager
      ^
In file included from input_line_23:22:
/Users/Umang/pythia_root/root/include/TEveChunkManager.h:112:16: error: 
      incomplete type 'TEveChunkManager' named in nested name specifier
inline Char_t* TEveChunkManager::NewAtom()
               ^~~~~~~~~~~~~~~~~~
input_line_15:34:275: note: forward declaration of 'TEveChunkManager'
  ...__attribute__((annotate("$clingAutoload$TEveChunkManager.h")))  TEveChun...
                                                                     ^
In file included from input_line_23:22:
/Users/Umang/pythia_root/root/include/TEveChunkManager.h:125:32: error: base
      class has incomplete type
class TEveChunkVector : public TEveChunkManager
                        ~~~~~~~^~~~~~~~~~~~~~~~
input_line_15:34:275: note: forward declaration of 'TEveChunkManager'
  ...__attribute__((annotate("$clingAutoload$TEveChunkManager.h")))  TEveChun...
                                                                     ^
In file included from input_line_23:22:
/Users/Umang/pythia_root/root/include/TEveChunkManager.h:132:40: error: type
      'TEveChunkManager' is not a direct or virtual base of 'TEveChunkVector<T>'
   TEveChunkVector()                 : TEveChunkManager() {}
                                       ^~~~~~~~~~~~~~~~
/Users/Umang/pythia_root/root/include/TEveChunkManager.h:133:40: error: type
      'TEveChunkManager' is not a direct or virtual base of 'TEveChunkVector<T>'
   TEveChunkVector(Int_t chunk_size) : TEveChunkManager(sizeof(T), chunk...
                                       ^~~~~~~~~~~~~~~~
/Users/Umang/pythia_root/root/include/TEveChunkManager.h:138:52: error: use of
      undeclared identifier 'Atom'
   T* At(Int_t idx)  { return reinterpret_cast<T*>(Atom(idx)); }
                                                   ^
In file included from input_line_23:23:
/Users/Umang/pythia_root/root/include/TEveCompound.h:23:7: error: redefinition
      of 'TEveCompound'
class TEveCompound : public TEveElementList
      ^
/Users/Umang/pythia_root/root/include/TEveCompound.h:23:7: note: previous
      definition is here
class TEveCompound : public TEveElementList
      ^
In file included from input_line_23:23:
/Users/Umang/pythia_root/root/include/TEveCompound.h:60:7: error: redefinition
      of 'TEveCompoundProjected'
class TEveCompoundProjected : public TEveCompound,
      ^
/Users/Umang/pythia_root/root/include/TEveCompound.h:60:7: note: previous
      definition is here
class TEveCompoundProjected : public TEveCompound,
      ^
In file included from input_line_23:25:
/Users/Umang/pythia_root/root/include/TEveElementEditor.h:25:7: error: 
      redefinition of 'TEveElementEditor'
class TEveElementEditor : public TGedFrame
      ^
/Users/Umang/pythia_root/root/include/TEveElementEditor.h:25:7: note: previous
      definition is here
class TEveElementEditor : public TGedFrame
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Error in <TInterpreter::AutoParse>: Error parsing payload code for class TEveTrackList with content:

[size=200][/size]

Please help and tell me what am I doing wrong or what changes are needed to be done :slight_smile:

Regards,
Umang

Hi,

You cannot simply replace pythia6 by pythia8 in the code, the two interfaces are not compatible. You will have to learn how to use Pythia8. See for example the $ROOTSYS/tutorials/pythia/pythi8.C tutorial.
(and Iā€™m sure Pythia8 itself has plenty of examples)

Cheers, Bertrand

Hi Bertrand,
Thanks again for your reply.
I agree with you that one cannot just replace pythia6 with pythia8 in the code and run it.

My question is How can I make this higgs code (with pythia 6) run with root and pythia 8 library ,what can be done about it?

How can I fix it and run the code.

Regards,
Umang

Hi Umang,

Well, I guess you have to understand what the Pythia6 code is doing, learn how to use Pythia8 and make the conversionā€¦ Or find and ask someone who knows pythia6 and pythia8 well enough to do the work.
But I think the best way would be for you to learn how to do it yourself.

Cheers, Bertrand.