Is it possible to shift the bins of one wrt to the other to align them?
So far, I am having the centroids of the peaks for both the histograms obtained by fitting. The ultimate goal is to align these centroids such that the peaks overlap.
I am a new user with minimal experience in these operations, so any suggestion will be precious.
I think I should scale the contents, however from the documentation it seems function TH1::Scale only changes the contents by a multiplicative factorthis = this*c1
Is it possible to change the contents by this = this*c1 + c2
c2 is a constant offset
ROOT_prompt_396:1:18: error: cannot initialize an array element of type 'void *' with an rvalue of type 'Double_t (*)(Double_t)' (aka 'double (*)(double)')
The function scale
#include "TAxis.h"
#include "TH1.h"
#include "TArrayD.h"
Double_t Scale(Double_t x)
{
Double_t v;
v = 10 * x + 100; // "linear scaling" function example
return v;
}
Can you please suggest what I am messing up here ?