I’m trying to create a large histogram by using splitting.
However, when I change the splitting value of the branch with the below code, it doesn’t seem to allow me to use more bins.
I’m wondering if I’m doing the splitting correctly or whether it is actually possible?
Thanks.
{
int noBins3Dx = 2000;
int noBins3Dy = 2000;
int noBins3Dz = 2000;
double min3Dx = -1.; double max3Dx = 1.;
double min3Dy = -1; double max3Dy = 1.;
double min3Dz = -1.; double max3Dz = 1.;
Int_t split = 99;
Int_t bsize = 64000;
TFile *MyFile1 = new TFile("File1.root","RECREATE");
TTree*mytree= new TTree("mytree","TestTree");
TH3D*h1= new TH3D("h1","test",noBins3Dx, min3Dx, max3Dx, noBins3Dy, min3Dy,max3Dy, noBins3Dz, min3Dz, max3Dz);
TBranch*branch= mytree->Branch("hBranch","TH3D",&h1, bsize, split);
for (int i = 0; i < 100; i++)
{
h1->Fill( double(rand())/RAND_MAX , double(rand())/RAND_MAX, double(rand())/RAND_MAX);
}
MyFile1->Write();
MyFile1->Close();
}
I’m sure there is, but I don’t know what you mean by standard size limits.
If it’s about bins, you can have as many bins as you want (and as you memory supports).
If it’s about axis ranges, you can set any range supported by double numbers.