Skip to Content.
Sympa Menu

sphenix-software-l - [Sphenix-software-l] macro updates backward breaking change

sphenix-software-l AT lists.bnl.gov

Subject: sPHENIX discussion of software

List archive

Chronological Thread  
  • From: pinkenburg <pinkenburg AT bnl.gov>
  • To: "sphenix-software-l AT lists.bnl.gov" <sphenix-software-l AT lists.bnl.gov>
  • Subject: [Sphenix-software-l] macro updates backward breaking change
  • Date: Fri, 23 Oct 2020 11:08:17 -0400

Hi folks,

this is the promised backward compatibility breaking change to enable running multiple single particle event generators concurrently (the qa uses 2 simple event generators). The change is that the pointers to them used in setting the generator options are now vectors. For your Fun4All macro that means you need to append [0] to them. So what you need to modify is:

INPUTGENERATOR::SimpleEventGenerator --> INPUTGENERATOR::SimpleEventGenerator[0]
INPUTGENERATOR::VectorMesonGenerator --> INPUTGENERATOR::VectorMesonGenerator[0]
INPUTGENERATOR::Gun --> INPUTGENERATOR::Gun[0]

If you actually want to use multiple generators you need to set the number you want - have a look at:
https://github.com/sPHENIX-Collaboration/macros/blob/master/detectors/sPHENIX/Fun4All_G4_sPHENIX.C

Adding more generators you address them by [1], [2],...
All event generators have to use the same vertex otherwise the tracking dies.

This also takes care of the problem that G4_Tracking.C didn't load standalone. But there is no default, so if you do not execute the MagnetInit() function in one of the G4_Magnet_*.C macros you need to set them in your macro by

G4MAGNET::magfield_rescale = <whatever you think is the scale factor>
G4MAGNET::magfield = <fieldmap>

I doubt the usefulness of this since our fieldmaps need to be read by dedicated code which depends on the type of fieldmap. But at least one can now include G4_Tracking.C without including a magnet macro first.

Last not least - local files weren't picked up first in all cases. The ROOT_INCLUDE_PATH now starts with ./ and changing all include statements from #include "" to #include <> makes sure root looks in your local directory first for any include.

Chris

--
*************************************************************

Christopher H. Pinkenburg ; pinkenburg AT bnl.gov
; http://www.phenix.bnl.gov/~pinkenbu

Brookhaven National Laboratory ; phone: (631) 344-5692
Physics Department Bldg 510 C ; fax: (631) 344-3253
Upton, NY 11973-5000

*************************************************************




  • [Sphenix-software-l] macro updates backward breaking change, pinkenburg, 10/23/2020

Archive powered by MHonArc 2.6.24.

Top of Page