Locked History Actions

attachment:slew.C of ANAROOT/Macros

Attachment 'slew.C'

Download

// create "root function(TF1)" to use in fit
// ex)
// root[i] .x slew.C
// root[i] fit("slew") // using Nadeko
// root[i] hist->Fit("slew") // not using Nadeko

Double_t func_slew(Double_t *x, Double_t *par)
{
  return par[0]-par[1]/sqrt(x[0]);
}

void slew()
{
  TString name = "slew";
  Double_t (*fcn)(Double_t *,Double_t *) = func_slew;
  Double_t xmin=0;
  Double_t xmax=1;
  Int_t npar=2;
  
  TF1 *f1 = new TF1(name, fcn, xmin, xmax, npar);
  f1->SetParameters(0, 1);
  f1->SetParNames("constant", "coefficient");
}

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2012-11-02 05:21:15, 1.6 KB) [[attachment:BPCHist.C]]
  • [get | view] (2013-02-27 09:18:59, 0.8 KB) [[attachment:CoinHist.C]]
  • [get | view] (2012-11-02 05:10:49, 2.6 KB) [[attachment:FDC2Hist.C]]
  • [get | view] (2012-11-02 04:31:49, 2.1 KB) [[attachment:HODHist.C]]
  • [get | view] (2012-11-02 04:31:32, 1.6 KB) [[attachment:ICBHist.C]]
  • [get | view] (2014-12-31 11:41:13, 19.5 KB) [[attachment:OnlineMonitor.cc]]
  • [get | view] (2014-12-31 11:41:02, 2.6 KB) [[attachment:OnlineMonitor.hh]]
  • [get | view] (2012-11-02 05:25:41, 1.7 KB) [[attachment:PlaHist.C]]
  • [get | view] (2012-02-15 09:14:24, 3.2 KB) [[attachment:ch2ns.C]]
  • [get | view] (2012-02-15 10:05:13, 3.0 KB) [[attachment:getlandaupeak.C]]
  • [get | view] (2012-02-15 09:14:53, 2.7 KB) [[attachment:getped.C]]
  • [get | view] (2012-02-13 09:49:04, 2.6 KB) [[attachment:makevsta.C]]
  • [get | view] (2012-02-19 14:44:04, 0.5 KB) [[attachment:slew.C]]

You are not allowed to attach a file to this page.