[ROOT] RE: need help with function...

From: Gordon Watts (gwatts@phys.washington.edu)
Date: Wed Dec 24 2003 - 02:36:13 MET


Hi,
  Valgrind is a truly great program -- but it is _not_ for nonexperts as
currently distributed for the following reasons:

- The command line is a ***** to get right, and you need a large number
of parameters to do it correctly for a root guy: leak checking, num
callers 15 (or so), gen suppressions so you can see things as they go,
etc.

- Must use the special sauce suppressions file that contains both the
known root problems and also the ldap problems (which may be unique to
DZERO). If you don't you are overwhelmed by noise.

- You must use a current version rather than the bogus one that is
installed on clued0 by default.

- Many times, when you mess up the Clear for an object or don't get the
set branch address call right, the error is caught deep inside root code
with no obvious links to your code, and, indeed, it is impossible to
tell what branch it is messing up on.

- Output is hard to interpret for a first time user who isn't an expert
in the inner workings of C++/C or a computer.

  In short, once you get it setup it can find some really weird and
otherwise difficult to find problems very quickly.

  For people on dzero, I've written up some basic instructions for
running it -- they are in the cvs package topd0root_analyze/doc (check
out
http://www-d0.fnal.gov/d0dist/dist/releases/development/topd0root_analys
is/doc -- url may be wrong; I'm at a coffee shop.

  None the less, I do think it should be run more on root files. I would
suggest doing the following:

- Make valgrind part of the root distribution at Fermilab (perhaps more
widely, but I don't know the license rules on this -- or suppression
file format, etc.).
- Define a default command, like valroot or something, that has a
default set of parameters (and references a distributed suppression
file, etc.)
- Write up a short web page that lists the most common errors that
people encounter and what they actually mean.
- Encourage people to post output from valgrind they don't understand to
the about-root mailing list to get people up to speed.

  Philippe -- if you get this going I'm more than happy to help you test
it at DZERO.

  :-) Happy Holidays and Happy New Year, everyone.

   Cheers, 
      Gordon 


-----Original Message-----
From: Philippe Canal [mailto:pcanal@fnal.gov] 
Sent: Monday, December 22, 2003 11:06 AM
To: Daniela Kaefer; about-root@fnal.gov; roottalk@pcroot.cern.ch
Cc: Rene.Brun@cern.ch
Subject: RE: need help with function...

Hi Daniela,

There is nothing __obviously__ wrong with your code.  However since I 
am unable to run your program (I do not your root files), I can't 
tell for sure.

Anyway, I strongly recommend that you run your program using 'valgrind' 
(http://valgrind.kde.org).

Cheers,
Philippe.


-----Original Message-----
From: owner-about-root@listserv.fnal.gov
[mailto:owner-about-root@listserv.fnal.gov]On Behalf Of Daniela Kaefer
Sent: Monday, December 22, 2003 5:24 AM
To: about-root@fnal.gov; roottalk@pcroot.cern.ch
Cc: Rene.Brun@cern.ch
Subject: need help with function...



Hi all,

I don't seem to be able to get this working correctly, but by now I
tried so
many different things and I just don't know, what I'm doing wrong...
(please
see attachments 1., 2. and 3.).

The thing is, that it finds the rootfiles in the directory and it chains
them
correctly. I can even access the number of entries, but when it tries to
open an
entry, it crashes. Why I don't know. If I don't try to give a generic
name to
the working part of the program, that is, if I use the executable and
program-parts attached as 4., 5. and 6. it works fine. Could anybody
please have
a look at this and tell me or give me a hint, why the part without a
generic
name works fine and the other not...?  Thank you very, very much in
advance.

Merry christmas and a happy new year to all of you,
  Daniela




The log file in the first case (not working!) looks like this:
--------------------------------------------------------------
path=/work1/kaefer/signalinput/
name=my_lambda122_0.001_muminus.root

Reading file names from directory /work1/kaefer/signalinput/
filename = .
filename = ..
filename = my_lambda122_0.001_muminus.root
...in while, after check for root-files.
root-file-name =
/work1/kaefer/signalinput/my_lambda122_0.001_muminus.root
filename = other
OBJ: TObjString
/work1/kaefer/signalinput/my_lambda122_0.001_muminus.root
Collectable string class : 0 at: 0x84cbac0
Adding files to TChain
No.of root-files=1
FILE: /work1/kaefer/signalinput/my_lambda122_0.001_muminus.root added to
TChain
In myrunRPVSearch: No.of entries=6000
Initializing rpv-mc...
Program running on host acd0sam.physik.rwth-aachen.de
Writing outputfile
/home/kaefer/rpvsearch/output/first/1400/my_lambda122_0.001_muminus.root
_new.root
Booking histograms.
...rpv-mc initialized successfully
Starting event loop...


  <---  Loop  started  ---
  <---  Chain is:
/work1/kaefer/signalinput/my_lambda122_0.001_muminus.root
tree:TopTree entries=6000
  <---  Name=my_lambda122_0.001_muminus.root  mcflag=1 ---
  <---  Running over 6000  events.  ---
  <---  Weight for MC= 0.222(data=1.0) ---


...muon cut class initialized successfully
in entry-loop...
after check on ientry...
jentry=0




The log file in the second case like this:
------------------------------------------
Reading file names from directory /work1/kaefer/signalinput
Adding files to TChain
No.of root-files=1,   Job-No.=1,  Total Jobs=1
FILE: /work1/kaefer/signalinput/my_lambda122_0.001_muminus.root added to
TChain
Initializing rpv-mc...
Job# : 1
Program running on host acd0sam.physik.rwth-aachen.de
Basedir: /home/kaefer/rpvsearch
Dir: output/first/1400
Writing outputfile
/home/kaefer/rpvsearch/output/first/1400/rpvsignal_1.root
Outfile: /home/kaefer/rpvsearch/output/first/1400/rpvsignal_1.root
Booking histograms.
...rpv-mc initialized successfully
Starting event loop...
  <---  Loop  started ---
  <---  Running over 6000  events. ---
  <---  Weight for MC= 0.0218033 (data=1.0) ---
...muon cut class initialized successfully
6000 events left to process.
5000 events left to process.
4000 events left to process.
3000 events left to process.
2000 events left to process.
1000 events left to process.

general Results:
================
MC-xs=0 pb,     events=6000   ==> MC-lumi=inf pb^-1


 Generator statistics
======================
Ran over RPV-Signal-MC. The generator produced in total 6000 events,
in 6000 (100%) of these were 2 LSP's produced.
Chi1:  ->leptons=5737 (95.6167%)  ->muons=2870    chi1's produced: 6000
Chi2:  ->leptons=5476 (91.2667%)  ->muons=2684    chi2's produced: 6000

No. of events with two prompt chis: 323.
No. of events with one prompt chi : 123.

General production:
-------------------
LSP-Pair:         323 (5.38 %).
Chargino-LSP:     123 (2.05 %).
Chargino-Pair.:  2176 (36.27 %)
Chargino-Neutr.: 3258 (54.30 %)  no LSP.
SusyOther:          0 (0.00 %).
OnlyOther:         15 (0.25 %).

The ''selection efficiency'' for events with 1 muon  was 84.1673% (4609
events).
The ''selection efficiency'' for events with 2 muons was 43.6998% (2393
events).
The ''selection efficiency'' for events with 3 muons was 24.8722% (1362
events).
The ''selection efficiency'' for events with 4 muons was 12.3996% (679
events).



Selection efficiencies: (    6000):
===================================
mu1/mu2:  SMT>=3   scintA<10ns  nseg==3(trackmatch)
          CFT>=8   scintB<13ns  isolated   pT>5 GeV

Cuts          & weighted &   eff. [%]  &  events     lumi=  3000.00
pb^-1
------------------------------------------------------------------------
--
all events    &    130.82 & 100.00 &    6000
2MU_A_L2M0    &    103.30 &  78.97 &    4738
2 mu          &     50.28 &  38.43 &    2306
pT>15/10 GeV  &     39.49 &  30.18 &    1811
         mu+mu+mu:
         ---------
         3rd mu |eta|<2, pT>3 GeV &  27.82 & 21.27 & 1276
         JES-coor. MET > 10 GeV   &  26.08 & 19.93 & 1196
         dR>0.5 (mu to next jet)  &  25.12 & 19.20 & 1152
         not all mu same charge   &  24.25 & 18.53 & 1112
         Z-mass cut (80-100 GeV)  &  23.68 & 18.10 & 1086
         mu+mu+e:
         --------
         1 electron, pT>10 GeV    &  13.78 & 10.53 &  632
         JES-coor. MET > 10 GeV   &  12.97 &  9.92 &  595
         dR>0.5 (mu to next jet)  &  12.56 &  9.60 &  576
         electron in fiducial     &   9.77 &  7.47 &  448
         not all mu/e same charge &   9.51 &  7.27 &  436
         HMatrix < 20.0           &   9.51 &  7.27 &  436

...event loop ended. Histogram file saved.
...starting termination...
...chain deleted, starting termination of event...
...event deleted...
...filelist deleted...
...pathname deleted...
...termination phase successful


 +------------------------------------------------------------+
 | Daniela Kaefer       | email: kaefer@physik.rwth-aachen.de |
 | III. Phys.Institut A |        kaefer@fnal.gov     \_L_/    |
 | Physikzentrum        |                            /* *\/   |
 | 52056 Aachen         | work: +49-(0)241-80-27243  \_*_/\   |
 | Germany              | home: +49-(0)2472-7163     / | \    |
 +------------------------------------------------------------+



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET