Re: [ROOT] Three questions

From: Bernard Andrieu (andrieu@in2p3.fr)
Date: Thu Feb 26 2004 - 19:10:10 MET


Hi Rene,

thanks for the answers. Yes I wrote my mail very fast, sorry for the confusion!
I reformulate the remaining open questions.

.root_hist: 
OK to change the name, but how can I tell root to keep more than the last 100
commands? I checked that this is not written in the User's Guide.

not expanding cuts: 
I give an example to be more clear. In an interactive session, I want to analyze
a root tree and try all sorts of cuts. I first define a lot of simple cuts, then
more and more complicated cuts by combining the simpler ones, e.g.:

TCut eta_e("abs(Etaele) < 2"); 
TCut pt_e("pTele > 20");

TCut eta_jet1("abs(Etajet[0] <2");
TCut pt_jet1("pTjet[0] > 20");
TCut eta_jet2("abs(Etajet[1] <3");
TCut pt_jet2("pTjet[1] > 10");

TCut ele(pt_e && eta_e);
TCut jets(eta_jet1 && pt_jet1 && eta_jet2 && pt_jet2);

TCut presel(ele && jets);

and so on...

Then, when I draw a plot, e.g.:
MyTree->Draw("pTjet[2]",presel && "nbjets > 2");

root automatically expands the cut definition in the title box, which makes it
unreadable except for very simple cuts. Now I can ask my question again: how can
I tell root to keep original cut names and NOT to expand cut
definition, i.e. in my example how can I end up with only  ` presel && "nbjets >
2" ' in the title box of my plot? I checked it is not written in the User's
Guide, at least not in the TCut section of Trees chapter.

I hope my question is clear now. Thanks for help.
-- 
                      Bets regards,
                               Bernard Andrieu
-----------------------------------------------------------------------
                         ("-/")_.-'"-._                       
LPNHE, 4 pl. Jussieu      . . ; -._    )-;-,_)  email: andrieu@in2p3.fr
    Tour 33, RdC         (v_,)'  _  )-.\  -'    Tel: +33 (0)1 4427 2321
75252 PARIS CEDEX 05    _.- _..-_/ / ((.'       Fax: +33 (0)1 4427 4638
                      ((,.-'   ((,/                      
-----------------------------------------------------------------------

Rene Brun a écrit :
> 
> Bernard,
> 
> Please formulate your questions precisely.
> >- is there a way to redirect the screen output to a file?
>  this is described in teh Users Guide
>  root > .x macro.C > file.log   output of macro to file.log
>  root > myFunction(); >file.log  output of call to C++ statement to
> file.log
> 
> - is it possible to change the name and maximum size of .root_hist?
> 
>  also in the Users Guide. Change the name in etc/system.rootrc or your
> .rootrc or by calling gEnv->setvalue(..
> 
> - how can I tell root to keep
> original cut names and NOT to expand cut On
> 
> I do not understand this question. What do you want to do exactly?
> 
> Rene  Brun
>



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET