Hello
I’m having trouble learning how to use the TF1 function properly, due to my unfamiliarity with coding. I want to add some modifiers to a Poisson function.
So a standard function would be
void fplot()
{
TF1 *Poisson0 = new TF1("Poisson0","TMath::Poisson(0,x)",0,10);
Poisson0 -> Draw();
}
But I need to modify the Poisson curve by giving it a amplitude multiplier which would be Var0 in this case. And to explode the x-axis by another variable “Var1”
So I tried doing this
void fplot()
{
double Var0 = 5000;
double Var1 = 1e12;
TF1 *Poisson0 = new TF1("Poisson0","Var0*TMath::Poisson(0,x/Var1)",0,Var1*10);
Poisson0 -> Draw();
}
But an error where Var0 and Var1 is considered unknown is spat out. If anyone can educate me on how to solve this, your help would be greatly appreciated.
Thanks
Soren
___ROOT Version: 6.24
_Platform: Windows
Compiler: Not Provided