StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MaxllBoltz.hh
1 /***************************************************************************
2  *
3  * $Id: MaxllBoltz.hh,v 1.3 2003/09/02 17:58:09 perev Exp $
4  *
5  * Author: Aihong Tang & Richard Witt (FORTRAN Version),Kent State U.
6  * Send questions to aihong@cnr.physics.kent.edu
7  ***************************************************************************
8  *
9  * Description:part of StPidAmpMaker package
10  * MaxllBoltz function
11  ***************************************************************************
12  *
13  * $Log: MaxllBoltz.hh,v $
14  * Revision 1.3 2003/09/02 17:58:09 perev
15  * gcc 3.2 updates + WarnOff
16  *
17  * Revision 1.2 2000/12/18 23:23:22 aihong
18  * change formula
19  *
20  * Revision 1.1 2000/07/22 22:27:14 aihong
21  * move files from StPidAmpMaker to StEventUtilities
22  *
23  * Revision 1.1.1.1 2000/03/09 17:48:34 aihong
24  * Installation of package
25  *
26  **************************************************************************/
27 
28 #ifndef MaxllBoltz_hh
29 #define MaxllBoltz_hh
30 
31 
32 
33 double MaxllBoltz(double *rig,double *par) {
34  double intercept = par[3];// intrcept
35  double wd =exp(1.0/par[2]);
36 
37  if (rig[0]<intercept ) {return 0.0;} else {
38 
39  double aa; double bb;
40 
41  if(par[0]!=0.0 && wd!=0.0) aa = 2.7182818*par[0]*wd;
42  if (wd>0.0 && (par[1]-intercept)>0.0 && ::log(par[1]-intercept)!=0.0) bb =
43  -1.0*(::log(wd))/::log(par[1]-intercept);
44 
45  double mb=aa*(::pow((fabs(rig[0]) - fabs(intercept)),bb) * exp(-wd*::pow((fabs
46 (rig[0]) - fabs(intercept)),bb)));
47 
48  return mb;
49 
50  }
51 };
52 
53 #endif
54 
55 
56 //par[0] peak height
57 //par[1] peak position
58 //par[2] width
59 
60