[ROOT] Re: TParticlePDG::Charge() problem?

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Dec 19 2000 - 17:37:01 MET


Hi Andre,

  look at: http://root.cern.ch/root/htmldoc/TDatabasePDG.html
on how to use this PDG interface class. Basically you first need
to create the database and then you can get a TParticlePDG from the
database and print its charge. What you were doing was just creating
an empty, uninitialized, TParticlePDG and then trying to print its
charge.

Cheers, Fons.


-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910

attached mail follows:


>From news Tue Dec 19 15:03 MET 2000 Path: cern.ch!news From: Andre DAVID <Andre.David@cern.ch> Newsgroups: cern.root Subject: TParticlePDG::Charge() problem? Date: Tue, 19 Dec 2000 15:03:50 +0100 Organization: CERN EP-NA60 Lines: 71 Message-ID: <3A3F6AC6.E849E8AE@cern.ch> NNTP-Posting-Host: na60pc04.cern.ch Mime-Version: 1.0 X-Trace: sunnews.cern.ch 977234630 24073 (None) 137.138.189.56 X-Complaints-To: news@sunnews.cern.ch X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14-5.0 i686) X-Accept-Language: en, pt Xref: cern.ch cern.root:9222 Content-Type: multipart/mixed; boundary="------------FC2B3ECE855F107B0363F5E2" Content-Length: 2002 This is a multi-part message in MIME format. --------------FC2B3ECE855F107B0363F5E2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi ... I was trying to use TParticlePDG::Charge() and I got the folllowing output Constant Field Map1 created: map= 1, factor= 1.000000 ******************************************* * * * W E L C O M E to R O O T * * * * Version 2.25/03 15 September 2000 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * ******************************************* Compiled with thread support. CINT/ROOT C/C++ Interpreter version 5.14.50, Sep 2 2000 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] TParticlePDG P1(13) root [1] cout << P1.Charge() 0(class ostream)1141899008 root [2] TParticlePDG P2(-13) root [3] cout << P2.Charge() 0(class ostream)1141899008 root [4] TParticlePDG P3(11) root [5] cout << P3.Charge() 3.90447e-312(class ostream)1141899008 root [6] TParticlePDG P4(-11) root [7] cout << P4.Charge() 0(class ostream)1141899008 while playing around with muons (pdg code 13) and electrons (11)... Can anyone enlighten me in what's happening? I haven't got the faintest clue ... Thanks, Andre --------------FC2B3ECE855F107B0363F5E2 Content-Type: text/x-vcard; charset=us-ascii; name="Andre.David.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Andre DAVID Content-Disposition: attachment; filename="Andre.David.vcf" begin:vcard n:David;Andre tel;work:+44 22 76 79408 x-mozilla-html:FALSE org:CERN - European Organization for Nuclear Research;EP Division / NA60 Group adr:;;;;;; version:2.1 email;internet:Andre.David@cern.ch x-mozilla-cpt:;4320 fn:Andre David end:vcard --------------FC2B3ECE855F107B0363F5E2--



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:40 MET