GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Warning in FairPrimaryGenerator
Warning in FairPrimaryGenerator [message #16467] Wed, 30 April 2014 08:15 Go to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Hi,


when using an EvtGen decay file with a PDG code not in TDatabasePDG, FairPrimaryGenerators prints for every single decay some warning like

 -W FairPrimaryGenerator: PDG code 88880 not found in database. This warning can be savely ignored


Is there a (verbose-)switch which allows to suppress this warning? If not, would it be possible to implement something to get rid of this warning?


Best and thanks,
Klaus
Re: Warning in FairPrimaryGenerator [message #16468 is a reply to message #16467] Wed, 30 April 2014 08:30 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
what about adding the particle in the database by adding the following in the simulation macro?!?

TDatabasePDG::Instance()->AddParticle("pbarpSystem0","pbarpSystem0",fIni.M(),kFALSE,0.1,0, "",88880);

j.
Re: Warning in FairPrimaryGenerator [message #16469 is a reply to message #16468] Wed, 30 April 2014 08:48 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Hi Johan,


yes, I believe that was my own suggestion some time ago, but this workaround nevertheless is unconvenient. And since the warning itself says, that it savely can be ignored, I don't know why I should read this message 10000 times...


Best,
Klaus
Re: Warning in FairPrimaryGenerator [message #16470 is a reply to message #16469] Wed, 30 April 2014 08:50 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
indeed, I learned this trick from you actually Wink
And you are right, why giving a warning at all when it is completely save to ignore it... bit ironical.

j.
Re: Warning in FairPrimaryGenerator [message #16471 is a reply to message #16470] Wed, 30 April 2014 10:25 Go to previous messageGo to next message
Shyam Kumar is currently offline  Shyam Kumar
Messages: 78
Registered: September 2012
Location: Mumbai, Maharashtra India
continuous participant
From: 14.139.97*
Hi,
If you don't want to see the warning on screen then comment the line 234 in source code /pandaroot/base/sim/FairPrimaryGenerator.cxx . then compile it again, it will not display that warning.
 cout << "\033[5m\033[31m -W FairPrimaryGenerator: PDG code " << pdgid << " not found in database. This warning can be savely ignored.\033[0m " << endl;



Thank You
Re: Warning in FairPrimaryGenerator [message #16472 is a reply to message #16471] Wed, 30 April 2014 10:28 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Hi,


thanks for the hint, but I'd really like to have some official switch, so that I don't need some patch or workaround every time again.


Best,
Klaus
Re: Warning in FairPrimaryGenerator [message #16473 is a reply to message #16472] Wed, 30 April 2014 10:33 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
I think the message should stay there, since if you do some error in your generator you will never realize w/o such a message.
The point would be to set these TParticle in some standard class called at the beginning of each macro.
Re: Warning in FairPrimaryGenerator [message #16474 is a reply to message #16473] Wed, 30 April 2014 10:35 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
Again, if I'm aware of that problem in some case, I'd like to have the possibility to switch it off by sth like

primaryGen->PrintWarnings(kFALSE);

Best,
Klaus
Re: Warning in FairPrimaryGenerator [message #16475 is a reply to message #16472] Wed, 30 April 2014 10:42 Go to previous messageGo to next message
Shyam Kumar is currently offline  Shyam Kumar
Messages: 78
Registered: September 2012
Location: Mumbai, Maharashtra India
continuous participant
From: 14.139.97*
some thing verbose like will be good in this case I have not seen any loop on verbose in the source code FairPrimaryGenerator.cxx. But one can put the loops like

if (verbose>1){
cout << "\033[5m\033[31m -W FairPrimaryGenerator: PDG code " << pdgid << " not found in database. This warning can be savely ignored.\033[0m " << endl;
}

Thank you

[Updated on: Wed, 30 April 2014 10:56]

Report message to a moderator

Re: Warning in FairPrimaryGenerator [message #16476 is a reply to message #16475] Wed, 30 April 2014 10:54 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
However, this is the wrong place to ask, since FairPrimaryGenerator is a FairRoot class.
Re: Warning in FairPrimaryGenerator [message #16479 is a reply to message #16476] Wed, 30 April 2014 13:25 Go to previous message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *gsi.de
I somehow overlooked the FairRoot forum, I'm gonna post the same message there again.

Best,
Klaus
Previous Topic: track finding
Next Topic: Question about supported Linux distributions
Goto Forum:
  


Current Time: Wed Apr 24 07:41:41 CEST 2024

Total time taken to generate the page: 0.01009 seconds