Setting scale and Merging two histograms

Hi, I wanna merge two histograms produced by single root file. But when i merged h10 and h20 then no effects occured after merging(may be due to empty h20). How one can adjust the scale and how it could be resolved?
Macro file used

macro file for TestEm5.cc

/control/verbose 2
/run/verbose 2

/testem/det/setAbsMat G4_GLASS_PLATE
/testem/det/setAbsThick 2 mm
/testem/det/setAbsYZ 2 mm

/run/initialize

/testem/gun/setDefault
/gun/particle gamma
/gun/energy 511 keV

/analysis/setFileName acosta.root
/analysis/h1/set 1 100 0 511 keV
/analysis/h1/set 2 100 0 511 keV
/analysis/h1/set 3 100 0 511 keV
/analysis/h1/set 10 100 0 511 keV
/analysis/h1/set 13 100 0 511 keV
/analysis/h1/set 20 100 0 511 keV
/analysis/h1/set 30 100 0 511 keV
/analysis/h1/set 40 100 0 511 keV

/run/setCut 1 um

/run/printProgress 10000

/run/beamOn 100000

Can you provide code of your ROOT macro?

Code?

Hi,

You need ROOT macro which opens your file, read histograms and merge them together, using TH1::Add method.
You also can try to use hadd executable, but typically it used to merge together several ROOT files with similar content structure inside.

Regards,
Sergey

How to set scale of histogram? So that an empty pad get fill with histogram?

There is method TH1::Scale. Just do:

h1->Scale(1000);

To multiply all bins by 1000