# RooChebychev odd and even terms

Hi,

is there a way to use only odd or even terms of the Chebychev polynomials?
(or any other implemented polynomials)

cheers,
delo

Hi delo,

You have to set the even / odd coefficients of the polynomials to 0.0, so that you remain only with the odd / even terms respectively. Other than that, there is no other possibility for the moment.

Cheers,
Gabriel

thank you.
do you mean something like:

RooRealVar a1("a1","a1",1.);
a1.setConstant(false);

RooRealVar a2("a2","a2",0.);

RooRealVar a3("a3","a3",1.);
a3.setConstant(false);

RooRealVar a4("a4","a4",0.);

RooRealVar a5("a5","a5",1.);
a5.setConstant(false);

RooChebychev poly("poly", "poly",Mass,RooArgList(a1,a2,a3,a4,a5));

and this will give me only an odd polynomial.
is that correct?

cheers,
Francesco

Hi Francesco,

Actually, the variables are by default not constant (ERRATUM: when using the constructor with limits). What you have to do is to set the ones which you are eliminating (i.e. making zero) to be constant, like so:

RooRealVar a1("a1","a1",1.);

RooRealVar a2("a2","a2",0.);
a2.setConstant(true);

RooRealVar a3("a3","a3",1.);

RooRealVar a4("a4","a4",0.);
a4.setConstant(true);

RooRealVar a5("a5","a5",1.);

RooChebychev poly("poly", "poly",Mass,RooArgList(a1,a2,a3,a4,a5));

Cheers,
Gabriel

really… !?
I thought that if you don’t put limits they are considered as constants
thanks

No, you’re right, they are considered constants. I was thinking with limits instead. In your case, you don’t have to set anything, they are all constants.

Cheers,
Gabriel