|
[Rivet] Pythia+PU+Rivet problemAndy Buckley andy.buckley at cern.chTue Apr 15 09:20:16 BST 2014
On 14/04/14 23:17, Tomasz Fruboes wrote: > Hi, > > thanks for answer. No, the analysis code doesnt access the particle > names. I'm getting quite a lot event printouts (not requested :) ), so > I'm guessing that rivet is finding something weird with the events and > prints it out as a debug info. And time to time, during the printout, he > asks for the name of pdg=1...3 resulting with the crash. Sounds reasonable, but I don't know where in Rivet there would be an event printout... can you send a bit of the printout so we can tell if it's coming from Rivet or HepMC (or other) code? Strange... If you put printouts in your code (or some other method), can you tell if the exception is being thrown before your code executes, or if it's triggered by something that you are calling in the analysis? > PU in Pythia6 seems to be easiest to get on generator level (AFAIK in > pythia8 this has to be handled on c++ level - by defining two separate > pythia sources - and cannot be controlled from "cards" level). BTW the > workaround is not intended to be included in any official release (I'm > not a developer/maintainer of the rivet wrapper present in CMSSW), this > is just to keep going with work. So - do you think this can be dangerous > on the rivet side (ie can broke some rivet internals)? > > My main concern with the workaround is that event weight counting can > get corrupted. I'll try to investigate this (unless you got immediate > answer :) ) I think that is possible, yes. And depending on where the error occurs, you might be filling some histograms but not others. Andy > On 14.04.2014 22:13, Andy Buckley wrote: >> Hi Tomasz, >> >> I didn't know anyone was using the old PYTHIA pile-up system! Looking in >> the Rivet code, that exception is thrown when it tries to find a text >> name for an unknown particle: since PIDs 1,2,3 are all quarks and hence >> should never be seen in a stable event final state, it leads to your >> error. >> >> Do you know why your code could be trying to access Particles' string >> names? It is possible that there's a bug in PYTHIA6 when run this way, >> which leads to partons appearing in the final state: I'm not sure. >> Obviously it's better not to put catch-all exception handling around the >> analyze function call -- you can hide serious problems that way and make >> debugging hard for everyone: presumably the error is being thrown by >> something inside your analysis routine, so maybe wrap *that* in the try >> block (and make the try block as small as possible) rather than the >> general CMSSW Rivet wrapper? >> >> By the way, I strongly recommend updating to use Rivet 1.9.0 -- your >> analysis should continue to work as before, but several bugs were fixed >> between 1.8.2 and that. All future releases, bugfixes, etc. are in the >> Rivet 2.x series. >> >> Best wishes, >> Andy >> >> >> On 14/04/14 16:52, Tomasz Fruboes wrote: >>> Dear Experts, >>> >>> in our rivet (1.82) analysys I'm trying to include pileup. Pileup is >>> added on generator level by pythia6 using following settings: >>> >>> 'MSTP(131)=1 >>> 'MSTP(132)=3 >>> 'MSTP(133)=1 >>> 'PARP(131)=0.15 >>> >>> Above gives n=10 PU interactions on average. In every 1 out of ~300 >>> events I'm getting following exception >>> >>> A std::exception was thrown. >>> Particle ID '1' not known. >>> >>> (where ID can be 2 or 3 as well). >>> >>> I have added try/catch block in order to handle this (see [1] below). >>> Could you comment if this is a safe workaround? Or maybe there is a >>> better solution? >>> >>> Thank you, >>> Tomasz Fruboes >>> >>> >>> [1] Source code of our rivet wrapper: >>> >>> https://github.com/cms-sw/cmssw/blob/CMSSW_7_1_X/GeneratorInterface/RivetInterface/plugins/RivetAnalyzer.cc >>> >>> >>> >>> Line ~120 was changed to >>> //run the analysis >>> try { >>> _analysisHandler.analyze(*myGenEvent); >>> } catch (...) { >>> std::cout << "Exception caught...\n" ; >>> } >>> >>> >>> >>> >>> _______________________________________________ >>> Rivet mailing list >>> Rivet at projects.hepforge.org >>> https://www.hepforge.org/lists/listinfo/rivet >> >> > -- Dr Andy Buckley, Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow / PH Dept, CERN
More information about the Rivet mailing list |