BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
GammaShape Class Reference

#include <GammaShape.h>

Public Member Functions

 GammaShape ()
 
 ~GammaShape ()
 
 GammaShape (const GammaShape &)
 
 GammaShape (const double eorigin, const double epeak)
 
 GammaShape (const HepLorentzVector p4, const double dphi, const double dthe, const double de)
 
GammaShapeoperator= (const GammaShape &)
 
double peak (const double fitvalue)
 
double mean (const double epeak)
 
double tail (const double epeak)
 
double width (const double epeak)
 
double de (const double eorigin, const double peak)
 
double fitm (double x, double pk, double width, double tail, double mean)
 
void settail (const double tail)
 
void setwidth (const double width)
 
void setpeak (const double peak)
 
void sete (const double e)
 
void setde (const double de)
 
void setdphi (const double dphi)
 
void setdtheta (const double dtheta)
 
double gettail () const
 
double getwidth () const
 
double getpeak () const
 
double gete () const
 
double getde () const
 
double getdphi () const
 
double getdthe () const
 

Detailed Description

Definition at line 26 of file GammaShape.h.

Constructor & Destructor Documentation

◆ GammaShape() [1/4]

GammaShape::GammaShape ( )

Definition at line 6 of file GammaShape.cxx.

6 {
7 m_tail = 0;
8 m_width = 0;
9 m_peak = 0;
10 m_e = 0;
11 m_de = 0;
12 m_dphi = 0;
13 m_dtheta = 0;
14}

◆ ~GammaShape()

GammaShape::~GammaShape ( )
inline

Definition at line 32 of file GammaShape.h.

32{;}

◆ GammaShape() [2/4]

GammaShape::GammaShape ( const GammaShape gammashape)

Definition at line 16 of file GammaShape.cxx.

16 {
17 m_tail = gammashape.m_tail;
18 m_width = gammashape.m_width;
19 m_peak = gammashape.m_peak;
20 m_e = gammashape.m_e;
21 m_de = gammashape.m_de;
22 m_dphi = gammashape.m_dphi;
23 m_dtheta = gammashape.m_dtheta;
24}

◆ GammaShape() [3/4]

GammaShape::GammaShape ( const double  eorigin,
const double  epeak 
)

Definition at line 37 of file GammaShape.cxx.

37 {
38 m_tail = tail(peak);
39 m_width = width(peak);
40 m_peak = peak;
41 m_e = eorigin;
42 m_de = de(eorigin, peak);
43 m_dphi = 0;
44 m_dtheta = 0;
45}
double tail(const double epeak)
Definition: GammaShape.cxx:81
double width(const double epeak)
Definition: GammaShape.cxx:85
double peak(const double fitvalue)
double de(const double eorigin, const double peak)
Definition: GammaShape.cxx:93

◆ GammaShape() [4/4]

GammaShape::GammaShape ( const HepLorentzVector  p4,
const double  dphi,
const double  dthe,
const double  de 
)

Definition at line 48 of file GammaShape.cxx.

48 {
49 m_tail = 0;
50 m_width = 0;
51 m_peak = 0;
52 m_e = 0;
53 m_de = 0;
54 m_dphi = dphi;
55 m_dtheta = dthe;
56}

Member Function Documentation

◆ de()

double GammaShape::de ( const double  eorigin,
const double  peak 
)

Definition at line 93 of file GammaShape.cxx.

93 {
94 double f1;
95 double tail1 = tail(peak);
96 double width1 = width(peak);
97 double mean1 = mean(peak);
98 double qa = tail1*sqrt(log(4.));
99 double qb = sinh(qa)/qa;
100 double qx = (eorigin-peak)/width1*qb*tail1;
101//cout<<"qx ="<<qx<<endl;
102// f1 = (eorigin-peak)/fitm(eorigin,peak, width1, tail1);
103
104 if(fabs(qx)>0.001){
105 f1 = (eorigin-peak)/fitm(eorigin,peak, width1, tail1, mean1);
106// cout<<"dynamic"<<endl;
107 }
108 else {
109// f1=width1/qb;
110 f1 = width1/(qb*tail1);
111// cout<<"gaus"<<endl;
112 }
113
114 // else f1 = 0;
115// return f1*eorigin;
116 return f1;
117}
double fitm(double x, double pk, double width, double tail, double mean)
Definition: GammaShape.cxx:123
double mean(const double epeak)
Definition: GammaShape.cxx:89

Referenced by GammaShape(), and setde().

◆ fitm()

double GammaShape::fitm ( double  x,
double  pk,
double  width,
double  tail,
double  mean 
)

Definition at line 123 of file GammaShape.cxx.

123 {
124
125 double qa = tail*sqrt(log(4.));
126 double qb = sinh(qa)/qa;
127 double qx = ((x-pk)/pk)/width*qb;
128 double qy = 1 + tail * qx;
129 double qc;
130 if(qy < 1.e-7) qc = 15;
131 else
132 qc = log(qy)/tail;
133 double val = qc;
134 return val-mean;
135 }
double x[1000]

Referenced by de().

◆ getde()

double GammaShape::getde ( ) const
inline

Definition at line 61 of file GammaShape.h.

61{return m_de;}

◆ getdphi()

double GammaShape::getdphi ( ) const
inline

Definition at line 62 of file GammaShape.h.

62{return m_dphi;}

◆ getdthe()

double GammaShape::getdthe ( ) const
inline

Definition at line 63 of file GammaShape.h.

63{return m_dtheta;}

◆ gete()

double GammaShape::gete ( ) const
inline

Definition at line 60 of file GammaShape.h.

60{return m_e;}

◆ getpeak()

double GammaShape::getpeak ( ) const
inline

Definition at line 59 of file GammaShape.h.

59{return m_peak;}

◆ gettail()

double GammaShape::gettail ( ) const
inline

Definition at line 57 of file GammaShape.h.

57{return m_tail;}

◆ getwidth()

double GammaShape::getwidth ( ) const
inline

Definition at line 58 of file GammaShape.h.

58{return m_width;}

◆ mean()

double GammaShape::mean ( const double  epeak)

Definition at line 89 of file GammaShape.cxx.

89 {
90 return -0.7984 + 0.7759*peak - 0.6356*peak*peak + 0.1476*peak*peak*peak;
91}

Referenced by de(), and fitm().

◆ operator=()

GammaShape & GammaShape::operator= ( const GammaShape gammashape)

Definition at line 26 of file GammaShape.cxx.

26 {
27 m_tail = gammashape.m_tail;
28 m_width = gammashape.m_width;
29 m_peak = gammashape.m_peak;
30 m_e = gammashape.m_e;
31 m_de = gammashape.m_de;
32 m_dphi = gammashape.m_dphi;
33 m_dtheta = gammashape.m_dtheta;
34 return (*this);
35}

◆ peak()

double GammaShape::peak ( const double  fitvalue)

Referenced by de(), GammaShape(), mean(), setpeak(), tail(), and width().

◆ setde()

void GammaShape::setde ( const double  de)
inline

Definition at line 52 of file GammaShape.h.

52{m_de = de;}

◆ setdphi()

void GammaShape::setdphi ( const double  dphi)
inline

Definition at line 53 of file GammaShape.h.

53{m_dphi = dphi;}

◆ setdtheta()

void GammaShape::setdtheta ( const double  dtheta)
inline

Definition at line 54 of file GammaShape.h.

54{m_dtheta = dtheta;}

◆ sete()

void GammaShape::sete ( const double  e)
inline

Definition at line 51 of file GammaShape.h.

51{m_e = e;}

◆ setpeak()

void GammaShape::setpeak ( const double  peak)
inline

Definition at line 50 of file GammaShape.h.

50{m_peak = peak;}

◆ settail()

void GammaShape::settail ( const double  tail)
inline

Definition at line 48 of file GammaShape.h.

48{m_tail = tail;}

◆ setwidth()

void GammaShape::setwidth ( const double  width)
inline

Definition at line 49 of file GammaShape.h.

49{m_width = width;}

◆ tail()

double GammaShape::tail ( const double  epeak)

Definition at line 81 of file GammaShape.cxx.

81 {
82 return -0.7931 + 0.8026*peak - 0.6694*peak*peak + 0.1476*peak*peak*peak;
83}

Referenced by de(), fitm(), GammaShape(), and settail().

◆ width()

double GammaShape::width ( const double  epeak)

Definition at line 85 of file GammaShape.cxx.

85 {
86 return 0.002496/sqrt(peak) + 0.01861 + 0.0001788*peak;
87}

Referenced by de(), fitm(), GammaShape(), and setwidth().


The documentation for this class was generated from the following files: