Alexandros Attikis | 24 Jul 17:03 2014
Picon
Picon

Accessing nth result of Min$/Max$?

Hi ROOTers,

quick question. Is there a way to get the nth-result of a Min$/Max$ operation?

For example, we know that Max$(array of elements) returns the maximum  value of the 
elements (leading-value). What if I want to get the next-to-maximum value (sub-leading-value) or
next-to-next-to leading value etc.? 
Is there a way to do this? 

If not, does anyone know if there a way around this?

Cheers,
Alexandros
Antonio Augusto Alves Jr | 24 Jul 05:14 2014
Picon
Picon

Using RooStats::SPlot with weighted datasets

Dear ROOTERS,

Please, I would like to know if the class RooStats::SPlot is compatible
with weighted datasets ?

I would like to compute sWeights and yields for a efficiency corrected
data set, as described in the section 4.5, page 16 of the
http://arxiv.org/pdf/physics/0402083v3.pdf.

Is the class implemented in a such way to take in consideration the
event weights when calculating the sWeights ?

Thanks you!
A.A.

--

-- 
Queriam-me casado, fútil, quotidiano e tributável? Queriam-me o
contrário disto, o contrário de qualquer coisa? Se eu fosse outra
pessoa, fazia-lhes, a todos, a vontade. Assim, como sou, tenham
paciência! Vão para o diabo sem mim, Ou deixem-me ir sozinho para o
diabo! Alvaro de Campos.

Dr. Harinder Singh Bawa | 22 Jul 19:29 2014
Picon

Re: hadd large number of files

Hi Dr. Davies,

I was using hadd.C where inside that c-code, I loop over 1000 files. It runs fine but I dont see it merge all the files after analysing the target file. I observed it doesnt add many files.(Dont know how many).

BTW: Could you share how you loop over 2000 files in hadd command. I mean Are you using bash kind of script . Could you share your snippet?

Harinder



On Tue, Jul 22, 2014 at 2:03 AM, Dr P J Davies <paul.davies <at> york.ac.uk> wrote:
I have used the linux command line hadd, which is now provided with root, to successfully merge over 2000 files. What kind of weird results are you seeing?

All the best, Paul Davies 


-- 
Dr P J Davies, Nuclear Physics Group, Department of Physics, 
University of York, Heslington, York, Tel: +44 (0)1904 432245.


On 22 July 2014 at 02:18:21, Dr. Harinder Singh Bawa (harinder.singh.bawa <at> gmail.com) wrote:

Hello,

I understand that there had been an issue with hadd.C not taking large number of files. Could anybody point out what is the maximum number of files one can merge in one go?

I am not able to hadd 150 files since it is giving me weird results. 2-3 files are OK. I didnt check upto many can be merged..

Is there any well made script which can handle the issue and gives the best results if someone have 1000 directories each having 1 file and need to merge all in one go?

Many thanks..Any suggestion is appreciated.

--
Dr. Harinder Singh Bawa

                                          
[web][facebook][youtube][twitter]





--
Dr. Harinder Singh Bawa

                                          
[web][facebook][youtube][twitter]


Dr. Harinder Singh Bawa | 22 Jul 03:18 2014
Picon

hadd large number of files

Hello,

I understand that there had been an issue with hadd.C not taking large number of files. Could anybody point out what is the maximum number of files one can merge in one go?

I am not able to hadd 150 files since it is giving me weird results. 2-3 files are OK. I didnt check upto many can be merged..

Is there any well made script which can handle the issue and gives the best results if someone have 1000 directories each having 1 file and need to merge all in one go?

Many thanks..Any suggestion is appreciated.

--
Dr. Harinder Singh Bawa

                                          
[web][facebook][youtube][twitter]


Arthur E. Snyder | 19 Jul 21:44 2014
Picon

(unknown)


Hi

I'm trying to do 'createHistogram' from a pdf from the pdf itself. It has only 'AbsRooRealProx' references
to the 'AbsRooReal' variariable which are in turn to ref'd to 'RooRealVar' arguments when object is createdd.

The code (hh,cc) is below.

The problem is that I can't find out how to invoke 'createHistogram' with proxys.
In this line (where X is a proxy) it fails to find the function.

     return ((RooAbsReal*)this)->createHistogram("h1D",X.arg());

This appears to be because 'X.arg()' which I thought gave me access to the underlying 'AbsRooReal' returns
does not inherit from 'RooAbsRealLValue' expected by 'createHistogram'.

Evidently I'm not doing this correctly ...

It seems I could like do this by putting an ordinary reference to 'RooRealVar' in 'HistPdf', but it does seem
like I should be able to get there from the proxy somehow? The inheritance through 'RooAbsLValue' needed
for 'createHistogram' seems to be bypassed by 'RooAbsReal' ...

How do I get around this?

-Arthur

  /*****************************************************************************
  * Project: RooFit                                                           *
  *                                                                           *
  * This code was autogenerated by RooClassFactory                            *
  *****************************************************************************/

// Your description goes here...

#include "Riostream.h"

#include "HistPdf.hh" 
#include "RooAbsReal.h" 
#include "RooAbsCategory.h" 
#include <math.h> 
#include "TMath.h" 
#include "TString.h"
#include "TH2F.h"
#include <iostream>
#include "Math/Interpolator.h"

ClassImp(HistPdf) ;

//3D
HistPdf::HistPdf(const char *name, const char *title,
 		 RooAbsReal& _X,
 		 RooAbsReal& _Y,
 		 RooAbsReal& _Z,
 		 RooAbsReal& _XTrue):
   RooAbsPdf(name,title),
   X("X","X",this,_X),
   Y("Y","Y",this,_Y),
   Z("Z","Z",this,_Z),
   XTrue("XTrue","XTrue",this,_XTrue) { 
}

//2D
HistPdf::HistPdf(const char *name, const char *title,
 		 RooAbsReal& _X,
 		 RooAbsReal& _Y,
 		 RooAbsReal& _XTrue):
   RooAbsPdf(name,title),
   X("X","X",this,_X),
   Y("Y","Y",this,_Y),
   XTrue("XTrue","XTrue",this,_XTrue) { 
}

//1D
HistPdf::HistPdf(const char *name, const char *title,
 		 RooAbsReal& _X,
 		 RooAbsReal& _XTrue) :
   RooAbsPdf(name,title),
   X("X","X",this,_X),
   XTrue("XTrue","XTrue",this,_XTrue) { 
}

HistPdf::HistPdf(const HistPdf& other, const char* name) :
   RooAbsPdf(other,name),
   X("X",this,other.X),
   Y("Y",this,other.Y),
   Z("Z",this,other.Z),
   XTrue("XTrue",this,other.XTrue) { 
}

TH1* HistPdf::createHistogram() {

   if(Y.name()=="") {
     return ((RooAbsReal*)this)->createHistogram("h1D",X.arg());
   }
   else if(Z.name()=="") {
     //    return this->createHistogram("h2D",X.arg(),RooFit::YVar(Y.arg()));

   } else {
     //    return this->createHistogram
     //      ("h3d",X.arg(),RooFit::YVar(X.arg()),RooFit::ZVar(Z.arg()));
   }
}

/*****************************************************************************
  * Project: RooFit                                                           *
  *                                                                           *
  * Histogram in X,Y and possibley Z (i.e., up to 3D)                         *
  *****************************************************************************/

#ifndef HISTPDF
#define HISTPDF

#include "RooAbsPdf.h"
#include "RooRealProxy.h"
#include "RooCategoryProxy.h"
#include "RooAbsReal.h"
#include "RooAbsCategory.h"
#include "TString.h"

#include <vector>

class HistPdf : public RooAbsPdf {

public:

   // Default c'tor.  Needed for streaming
   HistPdf() {} ;

   // 3D c'tor
   HistPdf(const char *name, const char *title,
 	  RooAbsReal& _X,
 	  RooAbsReal& _Y,
 	  RooAbsReal& _Z,
 	  RooAbsReal& _XTrue
 	  );

   // 2D c'tor
   HistPdf(const char *name, const char *title,
 	  RooAbsReal& _X,
 	  RooAbsReal& _Y,
 	  RooAbsReal& _XTrue
 	  );

   // 1D c'tor
   HistPdf(const char *name, const char *title,
 	  RooAbsReal& _X,
 	  RooAbsReal& _XTrue
 	  );

   // Copy c'tor
   HistPdf(const HistPdf& other, const char* name=0) ;

   // D'tor.  All variables clean up after themselves
   virtual ~HistPdf() { }

protected:

   // Proxies for paramters
   RooRealProxy X ;
   RooRealProxy Y ;
   RooRealProxy Z ;
   RooRealProxy XTrue ;

   //create hist  1D, 2D, or 3D hist depending on what's available of X,Y,Z
   TH1* createHistogram();

    // This is inherited for RooAbsPdf, and evaluates the PDF for a single event

private:

   ClassDef(HistPdf,1)

};

#endif

A.E. Snyder, The Former Group C/Kipac        \!c*p?/
SLAC Mail Stop #29                          ((.   .))
Box 4349                                        |
Stanford, Ca, USA, 94309                      '\|/`
e-mail:snyder <at> slac.stanford.edu                 o
phone:650-926-2701                              _
http://www.slac.stanford.edu/~snyder          BaBar
FAX:707-313-0250                          Collaboration
                                                 &
                                            Fermi/GLAST

Arthur E. Snyder | 19 Jul 21:40 2014
Picon

How to create histogram from proxy

I'm trying to create a histogram with pdf that has a proxy to 
'RooAbsReal'. I'm having trouble figuring out how to do it.

The code is:

A.E. Snyder, The Former Group C/Kipac        \!c*p?/
SLAC Mail Stop #29                          ((.   .))
Box 4349                                        |
Stanford, Ca, USA, 94309                      '\|/`
e-mail:snyder <at> slac.stanford.edu                 o
phone:650-926-2701                              _
http://www.slac.stanford.edu/~snyder          BaBar
FAX:707-313-0250                          Collaboration
                                                 &
                                            Fermi/GLAST

Antonio Augusto Alves Jr | 19 Jul 04:00 2014
Picon
Picon

fit parameter errors in weighted extended maximum likelihood fits

Dear Rooters,

Please, where can I find  more detailed information about the following change in  ROOT v5-34-19:

RooFit
  • Fix the computation of fit parameter errors in weighted extended maximum likelihood fits

Thank you
A.A.
--
Queriam-me casado, fútil, quotidiano e tributável? Queriam-me o contrário disto, o contrário de qualquer coisa? Se eu fosse outra pessoa, fazia-lhes, a todos, a vontade. Assim, como sou, tenham paciência! Vão para o diabo sem mim, Ou deixem-me ir sozinho para o diabo! Alvaro de Campos.
Pere Mato Vila | 10 Jul 10:35 2014
Picon
Picon

ROOT Patch Release v5.34/19

Dear ROOT users,

  We are pleased to announce the patch release ROOT version 5.34/19. For more information see the announcement in our web site.

 Pere Mato on behalf of the ROOT team.
Werner Scheinast | 8 Jul 12:22 2014
Picon

Geometry Display

​Dear Rooters,

the attached geometry file is a setup from GEANT that I converted by means of the VGM library to ROOT format. It contains boolean solids.

  • If you draw it in the Canvas, »Draw("gl")«, the components of the boolean solids are displayed entirely, i.e. no intersection or subtraction.
  • If you draw it in OGL, »Draw("ogl")«, the boolean operations are performed, but some of the surfaces are invisible. It looks strange when you turn the object with the mouse.
  • When I distribute "Random Points" in the setup, I see that the geometry is basically "understood" by ROOT, i.e. the points are where they are supposed to be.
Can anybody reproduce this? Is this a bug in ROOT or just a broken file?
Attachment (magnet.root): application/octet-stream, 15 KiB
Niladribihari Sahoo | 7 Jul 07:59 2014
Picon
Picon

libpng warning in fedora 20


Hi experts,


I am using ROOT v5.34/18 on Fedora 20. when I opened a new TBrowser, it showed me the following warning regarding libpng. I never came across such error before.

[niladri <at> localhost ~]$ root -l
root [0] TBrowser b;
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
libpng warning: Application built with libpng-1.2.50 but running with 1.6.6
Warning in <TASImage::GetMask>: No image
Warning in <TASImage::GetMask>: No image
Warning in <TASImage::GetMask>: No image
Warning in <TASImage::GetMask>: No image
Warning in <TASImage::GetMask>: No image
Warning in <TASImage::GetMask>: No image
root [1] .q
[niladri <at> localhost ~]$


Could you please tell me how to fix this issue ?

cheers,
Niladri

Nevzat Guler | 6 Jul 18:30 2014

RE: TCanvas::Divide::Margins

Thank you Jacek. Unfortunately this does not solve the problem. I get the
attached picture. Still, the bottom part of the picture does not have enough
space to accommodate the axis title.

If I do what you said and I also readjust the margins as below (in a loop
for each pad):
        CvCell++;
        CvAll->cd(CvCell);
        gPad->SetRightMargin(0.01);
        gPad->SetTopMargin(0.01);
        gPad->SetBottomMargin(0.01);
        if((CvCell-1)%2 == 0) gPad->SetLeftMargin(0.2);
        if(CvCell >= 11) gPad->SetBottomMargin(0.2);
        gPad->Update();
        gPad->Modified();
I get the second attached picture (*readjusted.gif) where the pads at the
left are smaller and the pads at the bottom are smaller.

What I want is a very small gap between the pads (or no gap at all), all the
pads to be the same size and I want extra space at the left and at the
bottom to accommodate the axis titles with a large enough font. I may leave
large space between pads and that might solve the issue but I don't want
that.

Best regards, - NG

-----Original Message-----
From: Jacek M. Holeczek [mailto:jacek.m.holeczek <at> gmail.com] 
Sent: Sunday, July 06, 2014 11:16 AM
To: nguler <at> jlab.org
Subject: TCanvas::Divide::Margins

Try with:
CvAll->Divide(2, 6, 0.00001, 0.00001, 0);
See the "Note3" in:
http://root.cern.ch/root/html534/TPad.html#TPad:Divide
Jacek.

Gmane