How to generate weighted events

Dear ROOT + Pythia Users,

I have root v.5.04, which I successfully linked with libPythia6 so that
[0] .L pythiaExample.C
runs perfectly.

My difficulty is trying to find information on how to generate weighted events. Does anybody know how is this done?

Best Regards,
Doug Carlson
pythiaExample.C (6.57 KB)

Hi Doug,

Depends a bit on what you mean by weighted' - more specifally what the wieght is. If what you're looking for is the nucleon overlap, perhaps you want some sort of Glauber calculation - see for examplerunHijing.C’ in THijing [1]

If what you want is to explore a particular part of phase-space, the authors of Pythia has some recommendations on pp. 226 of [2]. Essentially they say that you should replace your event loop with something like

[code] dpT = (pT_high-pT_low) / nBin;
for (Int_t bin = 0; bin < nBin; bin++) {
pythia->SetCKIN(3. bin * dpT + pT_low));
pythia->SetCKIN(4, (bin+1) * dpT + pT_low));
// Now we make some events
for (Int_t ev = 0; ev < nEvents; ev++) {
// Show how far we got every 100’th event.
if (ev % 100 == 0) cout << "Event # " << ev << endl;
// Make one event.
pythia->GenerateEvent();

  // Filter out events in first bin that doesn't fall within bin
  if (bin == 0 && ((bin+1) * dpT + pT_low) <= pyhtia->GetPARI(17)) {
     ev--;
     continue;
  }
  // Maybe you want to have another branch with global event
  // information.  In that case, you should process that here. 
  // You can also filter out particles here if you want.

  // Now we're ready to fill the tree, and the event is over. 
  tree->Fill();
}

}
[/code]
The authors also suggest using subroutine PYEVWT [3] but I’m not sure that it’s supported in the ROOT interface (perhaps it should be - it seems like a newer approach with certain advantages).

Hope that helps.

Yours,

Christian

[1] cholm.home.cern.ch/cholm/root/#thijing
[2] thep.lu.se/~torbjorn/pythia/pythia6301.pdf
[3] home.fnal.gov/~mrenna/041207_pyt … orial7.pdf