Hello,
I have 6 histograms and each has its own point settings. When I use the Add() function, all settings disappear. How to add them while saving your settings? I thought the solution is in the options of the function Add(), but did not find a list of options.
Code:
TFile *f0 = new TFile ("/home/slava/Data_Files/root/Var1/4009.root");
TFile *f1 = new TFile ("/home/slava/Data_Files/root/Var1/4210.root");
TFile *f2 = new TFile ("/home/slava/Data_Files/root/Var1/4230.root");
TFile *f3 = new TFile ("/home/slava/Data_Files/root/Var1/4260.root");
TFile *f4 = new TFile ("/home/slava/Data_Files/root/Var1/4360.root");
TFile *f5 = new TFile ("/home/slava/Data_Files/root/Var1/4470.root");
TFile *f6 = new TFile ("/home/slava/Data_Files/root/Var1/4600.root");
TH2D his4009 = (TH2D)f0->Get(“momentum_and_energy_p/Energy_point”);
TH2D his4210 = (TH2D)f1->Get(“momentum_and_energy_p/Energy_point”);
TH2D his4230 = (TH2D)f2->Get(“momentum_and_energy_p/Energy_point”);
TH2D his4260 = (TH2D)f3->Get(“momentum_and_energy_p/Energy_point”);
TH2D his4360 = (TH2D)f4->Get(“momentum_and_energy_p/Energy_point”);
TH2D his4470 = (TH2D)f5->Get(“momentum_and_energy_p/Energy_point”);
TH2D his4600 = (TH2D)f6->Get(“momentum_and_energy_p/Energy_point”);
his4009->SetMarkerStyle(21);
his4009->SetMarkerColor(2);
his4210->SetMarkerStyle(21);
his4210->SetMarkerColor(3);
his4230->SetMarkerStyle(21);
his4230->SetMarkerColor(4);
his4260->SetMarkerStyle(21);
his4260->SetMarkerColor(5);
his4360->SetMarkerStyle(21);
his4360->SetMarkerColor(6);
his4470->SetMarkerStyle(21);
his4470->SetMarkerColor(7);
his4600->SetMarkerStyle(21);
his4600->SetMarkerColor(8);
TH2D *Merger = new TH2D(“All_points”,“Momentum and energy;Momentum P_{p#bar{p}} - min P_{p#bar{p}}, GeV/c;Energy E_{p#bar{p}} - E_{point}, GeV/c^{2}”, 80, -0.04, 0.04, 80, -0.04 - 0.015, 0.04 - 0.015);
Merger->Add(his4009);
Merger->Add(his4210);
Merger->Add(his4230);
Merger->Add(his4260);
Merger->Add(his4360);
Merger->Add(his4470);
Merger->Add(his4600);
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided