This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT, math | |
print ( 'ROOT version %s' % ROOT.gROOT.GetVersion() ) | |
ROOT.gInterpreter.Declare(''' | |
#include "RooAbsPdf.h" | |
class PyPdf : public RooAbsPdf | |
{ | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT, array | |
print ( 'ROOT version', ROOT.gROOT.GetVersion() ) | |
x = ROOT.RooRealVar('x','x-variable' , 0 , 10 ) | |
varset = ROOT.RooArgSet() ; varset.add ( x ) | |
m0 = ROOT.RooFit.RooConst ( 5 ) | |
s0 = ROOT.RooFit.RooConst ( 1 ) | |
## generate data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROOT version 6.27/01 | |
(0.8357307706942926+0.5491393984360653j) | |
840456 function calls (839750 primitive calls) in 34.002 seconds | |
Ordered by: standard name | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1 0.000 0.000 0.000 0.000 :0(AddCPPInstancePickling) | |
1 0.000 0.000 0.000 0.000 :0(AddDirectoryGetAttrPyz) | |
1 0.000 0.000 0.000 0.000 :0(AddDirectoryWritePyz) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROOT version 6.27/01 | |
(0.8357307706942926+0.5491393984360653j) | |
840456 function calls (839750 primitive calls) in 34.003 seconds | |
Ordered by: standard name | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1 0.000 0.000 0.000 0.000 :0(AddCPPInstancePickling) | |
1 0.000 0.000 0.000 0.000 :0(AddDirectoryGetAttrPyz) | |
1 0.000 0.000 0.000 0.000 :0(AddDirectoryWritePyz) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROOT version 6.26/04 | |
(0.8357307706942926+0.5491393984360653j) | |
838190 function calls (837529 primitive calls) in 6.539 seconds | |
Ordered by: standard name | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1 0.000 0.000 0.000 0.000 :0(AddCPPInstancePickling) | |
1 0.000 0.000 0.000 0.000 :0(AddDirectoryGetAttrPyz) | |
1 0.000 0.000 0.000 0.000 :0(AddDirectoryWritePyz) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT | |
ROOT.gInterpreter.Declare(""" | |
#include <complex> | |
#include <cmath> | |
namespace Test { | |
double myfun ( const double a ) { return a ; } | |
std::complex<double> myfun ( const std::complex<double> a ) { return a ; } | |
} | |
""") | |
print ('ROOT version', ROOT.gROOT.GetVersion() ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT | |
ROOT.gInterpreter.Declare(""" | |
#include <complex> | |
#include <cmath> | |
namespace Test { | |
double myfun ( const double a ) { return a ; } | |
std::complex<double> myfun ( const std::complex<double> a ) { return a ; } | |
} | |
""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT, random | |
## 1) create Gaussian fit models | |
xvar = ROOT.RooRealVar( 'x' , 'x-observable' , 0 , 10 ) | |
mean = ROOT.RooRealVar( 'mean' , 'mean-value for Gaussian' , 5 , 2 , 8 ) | |
sigma = ROOT.RooRealVar( 'sigma' , 'sigma-value for Gaussian' , 1 , 0.5 , 2.0 ) | |
gauss = ROOT.RooGaussian( 'G' , 'Gaussian model' , xvar , mean , sigma ) | |
## 2) create and fill dataste & histogram |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## 1. setup environment | |
## SUCCESS | |
## source /cvmfs/sft.cern.ch/lcg/views/LCG_97a/x86_64-centos7-gcc9-opt/setup.sh | |
## source /cvmfs/sft.cern.ch/lcg/views/LCG_97/x86_64-centos7-gcc9-opt/setup.sh | |
## source /cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc9-opt/setup.sh | |
## source /cvmfs/sft.cern.ch/lcg/views/LCG_96a/x86_64-centos7-gcc8-opt/setup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import ROOT | |
ROOT.gROOT.ProcessLine(''' | |
#include <string> | |
#include <iostream> | |
class A | |
{ | |
public: |
NewerOlder