Plot the variables.
#include <vector>
{
cout <<
"ERROR: cannot open file: " <<
fname << endl;
return;
}
), "", "0" );
frameS->SetTitle(
var1+
" versus "+
var0+
" for signal and background" );
frameS->SetLabelSize( 0.04,
"X" );
frameS->SetLabelSize( 0.04,
"Y" );
frameS->SetTitleSize( 0.05,
"X" );
frameS->SetTitleSize( 0.05,
"Y" );
1 -
c->GetRightMargin(), 1 -
c->GetTopMargin() );
}
{
}
}
}
{
cout <<
"<getGaussRnd> too short input vector: " <<
size <<
" " <<
v.GetSize() << endl;
}
}
}
{
cout <<
"Creating branch var" <<
ivar+1 <<
" in signal tree" << endl;
}
}
Float_t xB[nvar] = { -0.2, -0.3, -0.5, -0.6 };
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
}
}
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
cout <<
"created tree: " <<
tree->GetName() << endl;
}
{
}
}
}
cout <<
"created tree: " <<
tree->GetName() << endl;
}
{
const int nvar = 4;
Float_t xB[nvar] = { -0.2, -0.3, -0.5, -0.6 };
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
Float_t xB[nvar] = { -0.2, -0.3, -0.5, -0.6 };
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
treeS->Branch(
"eta", &eta,
"eta/F" );
treeB->Branch(
"eta", &eta,
"eta/F" );
Float_t xB[nvar] = { -0.2, -0.3, -0.5, -0.6 };
rho[1*2] = 0.0;
rho[1*3] = 0.0;
rho[1*4] = 0.0;
rho[2*3] = 0.0;
rho[2*4] = 0.0;
rho[3*4] = 0.0;
rho[1*2] = 0.6;
rho[1*3] = 0.7;
rho[1*4] = 0.9;
rho[2*3] = 0.8;
rho[2*4] = 0.9;
rho[3*4] = 0.93;
}
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
eta = 2.5*2*(
R.Rndm() - 0.5);
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
cout << endl << endl << endl;
cout << "please use .L createData.C++ if you want to run this MC generation" <<endl;
cout << "otherwise you will wait for ages!!! " << endl;
cout << endl << endl << endl;
else fileName =
Form(
"linCorGauss%d_weighted.root",seed);
}
Float_t xB[nvar] = { -0.2, -0.3, -0.4, -0.5 };
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
do {
weight = 1;
i++;
weight = 1;
i++;
}
else {
if (tmp < weight){
weight = 1./weight;
if (i%10 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
i++;
}
}
}
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
if (i%2) weight = 1;
else weight = -1;
}
}
char buffer[5];
h[i]=
new TH1F(buffer,
"",100,-5,5);
hw[i] =
new TH1F(buffer,
"",100,-5,5);
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
std::vector<float>*
xvar[nvar];
}
Float_t xB[nvar] = { -0.2, -0.3, -0.5, -0.6 };
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%100 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
else {
}
}
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
}
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
for (int i=0; i<20; i++) rho[i] = 0;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
}
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
Float_t xS[nvar] = { 0.5, 0.5, 0.0, 0.0, 0.0, 0.0 };
Float_t xB[nvar] = { -0.5, -0.5, -0.0, -0.0, -0.0, -0.0 };
Float_t dx[nvar] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
for (
Int_t i=0; i<50; i++) rho[i] = 0;
rho[1*2] = 0.3;
rho[1*3] = 0.0;
rho[1*4] = 0.0;
rho[2*3] = 0.0;
rho[2*4] = 0.0;
rho[3*4] = 0.0;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
}
treeS->Branch(
"weight", &weight,
"weight/F" );
treeB->Branch(
"weight", &weight,
"weight/F" );
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
if (
itype == 0) weight = 1.0;
else weight = 2.0;
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
int nvar = 2;
}
treeS->Branch(
"weight", &weight,
"weight/F");
treeB->Branch(
"weight", &weight,
"weight/F");
do {
if (
nsig<10) cout <<
"xout = " <<
xout<<endl;
}
else {
}
}
{
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
}
int idx[nvar];
for (
Int_t i=0;i<nvar;i++){
}
}
}
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
}
int idx[nvar];
for (
Int_t i=0;i<nvar;i++){
}
}
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
}
int idx[nvar];
for (
Int_t i=0;i<nvar;i++){
}
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
}
int idx[nvar];
for (
Int_t i=0;i<nvar;i++){
}
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
}
Double_t Centers[nvar][6] = {{-1,0,0,0,1,1},{0,0,0,0,0,0}};
for (int idx=0; idx<6; idx++){
if (idx==1 || idx==2 || idx==3)
type = 0;
}
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
int nvar = 4;
}
do {
if (
nsig<100) cout <<
"xout = " <<
xout<<endl;
}
}
}
{
int nvar = 4;
{ 0. , 0.3, 0.5, 0.9 },
{ -0.2 , -0.3, 0.5, 0.4 },
{ 0.2 , 0.1, -0.1, 0.7 }} ;
}
}
treeR->Branch(
"weight", &weight,
"weight/F");
do {
}
}
{
treeS->Branch(
"arr",
xvar,
"arr[arrSize]/F" );
treeB->Branch(
"arr",
xvar,
"arr[arrSize]/F" );
Float_t xB[nvar] = { -0.2, -0.3, -0.5, -0.6 };
rho[1*2] = 0.4;
rho[1*3] = 0.6;
rho[1*4] = 0.9;
rho[2*3] = 0.7;
rho[2*4] = 0.8;
rho[3*4] = 0.93;
}
}
cout << "signal covariance matrix: " << endl;
cout << "background covariance matrix: " << endl;
else {
x =
xB;
m =
sqrtMatB; cout <<
"- produce background" << endl; }
if (i%1000 == 0) cout <<
"... event: " << i <<
" (" <<
N <<
")" << endl;
}
}
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
{
const int nvar = 4;
cout <<
"created data file: " <<
dataFile->GetName() << endl;
}
#define R(a, b, c, d, e, f, g, h, i)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter char TVirtualGLPainter plot
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
TMatrixT< Double_t > TMatrixD
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Array of doubles (64 bits per element).
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
1-D histogram with a float per channel (see TH1 documentation)
2-D histogram with a float per channel (see TH1 documentation)
This class displays a legend box (TPaveText) containing several legend entries.
This is the base class for the ROOT Random number generators.
Double_t Rndm() override
Machine independent random number generator.
const char * Data() const
TStyle objects may be created to define special styles.
A TTree represents a columnar dataset.
RVec< PromoteType< T > > acos(const RVec< T > &v)
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculates a gaussian function with mean and sigma.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
static uint64_t sum(uint64_t i)