Christian Holm Christensen | 22 May 2013 11:26
Picon
Favicon

Aux files for TSelector in PROOF


Hi all, 

First off, sorry if this question has been asked before. 

I have a TSelector (wrapped by ALICE's ANALYSIS framework) which needs
an auxiliary file - that is, a file that's not part of the data-set
being analysed - the file contains correction objects (stored in a
TTree) needed by the TSelector to properly process the data-set. 

So my question is, how do I push this file to the workers along with the
job?  Preferably, the file should go into the working directory of the
individual jobs.  

Of course, one can put the file on some shared location e.g., NFS,
rootd://, or http(s):// server, but since the code should work uniformly
across environments and clusters, this solution seems more troublesome
than it's worth. 

The code must work in all three environments supported by ALICE: AliEn
(Grid), Proof, and local.  On AliEn, one can simply upload the auxiliary
file with the job.  For local jobs, the file can be a symlink or the
like.  But for Proof it is not so obvious to me. 

Note also, that I cannot really change the TSelector code - all I can
change is a limited set of functionality called by the TSelector. 

The protected member function TProof::SendFile or perhaps the private
TProof::BroadcastFile seems to do what I want, but they are obviously
not accessible.  In principle I could roll my own `SendFile': 
(Continue reading)

Federico Ferri | 21 May 2013 15:54
Picon
Picon

Get histograms with `/' in the name

Dear experts,

I've been given a root file containing histograms with `/' in their
names. How can I get a hold on them from the TDirectory or gDirectory?

The TBrowser works, so I see them and I can plot them, but as soon as I
try to get a pointer to the histograms I get a null one.
Few lines to reproduce the behaviour are below.

From the code of TDirectory::Get(const char *namecycle) it is clear why
I experience this behaviour. Is there another method that can be used?

Thank you in advance,
Federico

--------------------
root [0] TFile * fout = new TFile("test.root", "recreate")
root [1] TH1F * h = new TH1F("ciao/pippo", "ciao/pippo", 100, 0., 1.)
root [2] h->Fill(0.5)
root [3] fout->Write()
root [4] fout->Close()

root -l test.root
root [0] 
Attaching file test.root as _file0...
root [1] _file0->Get("ciao/pippo")
(class TObject*)0x0
root [2] 

(Continue reading)

Marek Sirendi | 16 May 2013 17:46
Picon
Picon

SetTitleOffset for TEfficiency

Dear ROOTers,

When I draw TH2 in "LEGO" mode, or similar, the axis titles tend to merge into the labels and can't be viewed.

I fixed this with the method

//________________________________________________________________________

void Analysis::adjust2DAxes(TH2F* hist) {

  TAxis* xAxis = hist->GetXaxis();

  xAxis->SetTitleOffset((Float_t) 1.5*xAxis->GetTitleOffset());


  TAxis* yAxis = hist->GetYaxis();

  yAxis->SetTitleOffset((Float_t) 1.5*yAxis->GetTitleOffset());


  TAxis* zAxis = hist->GetZaxis();

  zAxis->SetTitleOffset((Float_t) 1.2*zAxis->GetTitleOffset());

  return;

}


But I can't do the same for a 2D T​Efficiency object as I get the error:

error: ‘class TEfficiency’ has no member named ‘GetXaxis’


How can I achieve this for TEfficiency?

Lorenzo Moneta | 15 May 2013 09:28
Picon
Picon

Re: Bug in TMatrixTBase

Hello Omar, 

 Thank you for reporting this bug. I will commit now the fix in the master and the 5.34 patches

 Best Regards

 Lorenzo
On May 13, 2013, at 6:35 PM, Omar Andrés Zapata Mesa <andresete.chaos <at> gmail.com> wrote:

Hello dear ROOTers,
I found a bug in TMatrixTBase using Option "F" for fortran representation in the method GetMatrix2Array(Element *data,Option_t *option).

When I get tha matrix's data in an array with fortran representation and I try to create a matrix again using TMatrixT(nrows,ncols,*data,"F"), the matrix is corrupted.

I attach the macro to test the bug and the patch.

Thanks.

--
Omar Andres Zapata Mesa
Fundamental Interaction Phenomenology Gruop (Gfif)
Head Developer 
Gfif Developers (Gfif Dev)
Division of computer science 
System Engineering Student
Universidad de Antioquia At Medellin - Colombia
Usuario Linux  #490962
<bug.C><TMatrixTBase.cxx.diff>

Omar Andrés Zapata Mesa | 13 May 2013 18:35
Picon
Gravatar

Bug in TMatrixTBase

Hello dear ROOTers,
I found a bug in TMatrixTBase using Option "F" for fortran representation in the method GetMatrix2Array(Element *data,Option_t *option).

When I get tha matrix's data in an array with fortran representation and I try to create a matrix again using TMatrixT(nrows,ncols,*data,"F"), the matrix is corrupted.

I attach the macro to test the bug and the patch.

Thanks.

--
Omar Andres Zapata Mesa
Fundamental Interaction Phenomenology Gruop (Gfif)
Head Developer 
Gfif Developers (Gfif Dev)
Division of computer science 
System Engineering Student
Universidad de Antioquia At Medellin - Colombia
Usuario Linux  #490962
Attachment (bug.C): text/x-csrc, 428 bytes
Attachment (TMatrixTBase.cxx.diff): application/octet-stream, 747 bytes
Pilar Casado | 9 May 2013 09:58
Picon

X axis title in a stack histogram

Hello,

How can I set the X axis title of a stack histogram.
I have tried the usual SetTitle on the stack histogram,
have also set two of the histogram in the stack, but
I don't manage.

Many thanks, Pilar

Irakli Keshelashvili | 7 May 2013 13:36
Picon
Picon
Favicon

TTimer time resolution


Dear ROOTers,

I'm using TTimer for VMEbus readout. As I learned, the minimum time resolution is 10ms as it is defined in TSystem.h -
kItimerResolution = 10 // interval-timer resolution in ms

Question: is it O.K. if one changes it to 1ms? Or is there some other method to decrease time interval?

Best regards
Irakli

* * * * * * * * * * * * * * *
 Dr. Irakli Keshelashvili
 Department of Physics
 University of Basel
 Klingelbergstrasse 82,
 CH-4056 Basel, Switzerland
 Tel. +41 6126 73775 (Office)
      +41 7887 06657 (Mobile)
 Fax: +41 6126 73784
 * * * * * * * * * * * * * * *
Maria Pilar Casado | 3 May 2013 15:29
Picon

TH1F* hists froma THStack plot

Dear root expert,

I'm using root version 5.34/05  14 February 2013

I would need to retrieve the list of histograms from a THStack histogram
and add them into another histogram. I'm trying to do it in this way by
I get the complain you can see at the end. How can I do it?

Many thanks, Pilar

   TH1F * h_signalf = new TH1F("h_signalf","h_signalf",50,0.,500.);
   TList *thisList = h_stack->GetHists();

   TObjLink *lnk = thisList->FirstLink();
   while (lnk) {
    //h_signalf->Add( (TH1F*) lnk->GetObject());
    h_signalf->Add( (TH1F*) lnk);
    lnk = lnk->Next();
   }
--------------------------------
Error:
Error: Can't call TObjLink::Next() in current scope KolmoTest.C:45:
Possible candidates are...
(in TObjLink)

--

-- 
----------------------------------------------------------------
Dept. de Física & IFAE,
Facultat Ciències Nord UAB, E-08193 Bellaterra (Barcelona) Spain

Tel. (Barcelona): +34 93 581 42 85
Tel. (CERN):      +41 22 767 11 25

Avís - Aviso - Legal Notice - (LOPD) - http://legal.ifae.es

Nabil Ghodbane | 2 May 2013 18:02
Picon
Picon

extracting systematics from profile

dear experts,
I am trying to submit again this question to which i would be grateful 
if someone could confirm the bottom approach.
thanks in advance.
I discussed this with several people, but I would need a confirmation 
that what i am doing is consistent enough.
Basically, I am trying to extract some single source systematic 
uncertainty associated to one measurement. In order to extract the 
different systematics, I am proceeding as follow:

1) start with the histogram templates for signal (nominal and 
systematics) and data driven background and produce the Roofit workspace 
using the Histfactory machinery.

2) fix all nuisance parameters to zero, fit and extract the 68% 
confidence interval.
-> This is the nominal signal strength factor, that i label: mu_nom_c, 
mu_nom_u, mu_nom_d (central, upper, lower)

3) leave all nuisance parameters free within [-2,2], perform the fit and 
extract again the associated 68% confidence interval.
-> I label these: mu_sys_c, mu_sys_u, mu_sys_d (central, upper, lower)
-> I have the set of associated values for the nuisance parameters.

4) loop over all nuisance parameters, for each of them, fix its value to 
the value found in step 3) and perform the fit w.r.t. all other ones 
left free and extract the associated 68% CL interval. I call this:
-> I label these: mu_alphaI_c, mu_alphaI_u, mu_alphaI_d (central, upper, 
lower)

5) fix all nuisance parameters to their value found in step 3) and 
perform the fit -> this allows me to extract the stat only uncertainty: 
mu_stat_c, mu_stat_u, mu_stat_d

then i compute the systematics (total and single sources ) as follow:
a) total systematics:
--------------------------
tot_sys_u = ( |(mu_sys_c - mu_sys_u)^2 - (mu_stat_c - mu_stat_u)^2 |)^(1/2)
tot_sys_d = ( |(mu_sys_c - mu_sys_d)^2 - (mu_stat_c - mu_stat_d)^2 |)^(1/2)

b) Luminosity:
------------------
lumi_sys_u = ( |(mu_lumi_c - mu_lumi_u)^2 - (mu_stat_c - mu_stat_u)^2 
|)^(1/2)
lumi_sys_d = ( |(mu_lumi_c - mu_lumi_d)^2 - (mu_stat_c - mu_stat_d)^2 
|)^(1/2)

c) Nuisance parameter associated systematics:
---------------------------------------------------------------
alpha_sys_u = ( | (mu_sys_c - mu_sys_u)^2 - (mu_alpha_c - mu_alpha_u)^2 
|)^(1/2);
alpha_sys_d = ( | (mu_sys_c - mu_sys_d)^2 - (mu_alpha_c - mu_alpha_d)^2 
|)^(1/2);

To do this on the technical aspect, I am using Minuit2 like:
mc->GetPdf()->fitTo(*data,Save(kTRUE),InitialHesse(true), 
Hesse(true),Minos(kTRUE), RooFit::Minimizer("Minuit2","minos"), 
Strategy(1), PrintLevel(3), Save(true) );

and to extract the confidence interval, i use:
ProfileLikelihoodCalculator* PL = new 
ProfileLikelihoodCalculator(*data,*mc);
PL->SetConfidenceLevel(0.68);
LikelihoodInterval* interval = PL->GetInterval();
double intervalValue = POI->getVal();
double intervalError = POI->getError();
double intervalLow = interval->LowerLimit(*POI);
double intervalUp = interval->UpperLimit(*POI);

thanks in advance.

--

-- 
Nabil Ghodbane
Skype: nabilghodbane

Suvayu Ali | 30 Apr 2013 10:54
Picon
Gravatar

Re: ROOT has moved to Git...

On Mon, Apr 29, 2013 at 04:21:17PM -0700, Konstantin Olchanski wrote:
> On Tue, Apr 30, 2013 at 12:43:22AM +0200, suvayu ali wrote:
> > On Mon, Apr 29, 2013 at 9:44 PM, Stanley Seibert
> > <volsung <at> physics.utexas.edu> wrote:
> > >> - how do I keep around sources for multiple versions of ROOT? Git seems to have this concept
> > >>  that "repository and checked out sources go together" and for each copy of checked out
> > >>  sources I have to have a copy of the repository (I cannot "svn checkout" into a different directory,
> > >>  I am supposed to "git pull" to duplicate everything), a huge waste of disk space. Do you
> > >>  have a solution or advice for this? (as a quick solution I can "cp -Rpv", but this loses
> > >>  all revision tracking).
> > >
> > >
> > > You can clone from one on-disk repository to another, and git will use hardlinks for the immutable files
by default.  This works on both Mac and Linux:
> > 
> > You can also create tarballs with
> > 
> >   $ git archive --format=tar--prefix=root-<refspec>/  <refspec> | \
> >          gzip > root-<refspec>.tar.gz
> > 
> > Then just unpack the tarball wherever you want.
> > 
> 
> 
> Hi! Thanks for your git tip. Very handy. But for my situation not
> quite right as it loses the connection to the revision tracking
> system...

In that case you can try the git-new-workdir script from
git.git/contrib[1].

Hope this helps,

Footnotes:

[1] <https://raw.github.com/git/git/master/contrib/workdir/git-new-workdir>

--

-- 
Suvayu

Open source is the future. It sets us free.

Doug Schouten | 26 Apr 2013 18:04
Picon
Favicon

Unsubscribing ...

Hello,

I found an article describing how to unsubscribe to roottalk:

http://root.cern.ch/phpBB3/viewtopic.php?f=7&t=11954

But the majordomo <at> root.cern.ch system replies with "unknown list 'roottalk'"

Can some please tell me how to unsubscribe from roottalk? I have a number of email aliases that I can no longer send from (but which are being forwarded to my current address). I need to remove all of these from the roottalk list.

thanks,
   
-- Doug Schouten Research Associate TRIUMF

Gmane