Functions
cePulserToAdc.h File Reference
#include "cePulser.h"

Go to the source code of this file.

Functions

double cePulserToAdc (int ia, double adcScale, double pedestal, double negScale, const double rfLines[6], double r6, double qvscale)
 
double cePulserToAdc (double *x, double *pars)
 
TF1 * cePulserToAdcTF1 (std::string fname="adcpulser", double tol=0.01, double adcScale=3.0 *14.0)
 

Function Documentation

double cePulserToAdc ( int  ia,
double  adcScale,
double  pedestal,
double  negScale,
const double  rfLines[6],
double  r6,
double  qvscale 
)
inline

Definition at line 25 of file cePulserToAdc.h.

26  {
27  double dadc = adcScale*cePulser(ia, rfLines, r6, qvscale);
28  if ( ia < 0.0 ) dadc *= negScale;
29  return dadc + pedestal;
30 }
double cePulser(int ia, const double rfLines[6], double r6, double qvscale)
Definition: cePulser.h:61
double cePulserToAdc ( double *  x,
double *  pars 
)

Definition at line 32 of file cePulserToAdc.h.

32  {
33  int ia = x[0];
34  double adcScale = pars[0];
35  double pedestal = pars[1];
36  double negScale = pars[2];
37  const double* rfLines = pars + 3;
38  double r6 = pars[9];
39  double qvscale = pars[10];
40  return cePulserToAdc(ia, adcScale, pedestal, negScale, rfLines, r6, qvscale);
41 }
double cePulserToAdc(int ia, double adcScale, double pedestal, double negScale, const double rfLines[6], double r6, double qvscale)
Definition: cePulserToAdc.h:25
list x
Definition: train.py:276
TF1* cePulserToAdcTF1 ( std::string  fname = "adcpulser",
double  tol = 0.01,
double  adcScale = 3.0*14.0 
)
inline

Definition at line 47 of file cePulserToAdc.h.

48  {
49  using Index = unsigned int;
50  const Index npar = 11;
51  TF1* pf = new TF1(fname.c_str(), cePulserToAdc, -64, 64, npar);
52  initCePulserTF1(pf, 3, tol);
53  pf->SetParName(0, "AdcScale");
54  pf->SetParName(1, "Pedestal");
55  pf->SetParName(2, "NegScale");
56  pf->SetParameter(0, adcScale);
57  pf->SetParameter(1, 0.0);
58  pf->SetParameter(2, 1.0);
59  pf->FixParameter(10, 1.8*183.0);
60  return pf;
61 }
int initCePulserTF1(TF1 *pf, unsigned int ipoff, double tol=0.01)
Definition: cePulser.h:135
auto const tol
Definition: SurfXYZTest.cc:16
unsigned int Index
double cePulserToAdc(int ia, double adcScale, double pedestal, double negScale, const double rfLines[6], double r6, double qvscale)
Definition: cePulserToAdc.h:25