laura is hosted by Hepforge, IPPP Durham
Laura++  v3r0p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAsymmCalc.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
15 #include "TMath.h"
16 
17 #include "LauAsymmCalc.hh"
18 
20 
21 
22 LauAsymmCalc::LauAsymmCalc(Double_t negValue, Double_t posValue) :
23  negValue_(negValue),
24  posValue_(posValue),
25  asymm_(0.0)
26 {
27  asymm_ = calcAsymmetry();
28 }
29 
31  negValue_(rhs.negValue_),
32  posValue_(rhs.posValue_),
33  asymm_(rhs.asymm_)
34 {
35 }
36 
38 {
39  if ( &rhs != this ) {
40  negValue_ = rhs.negValue_;
41  posValue_ = rhs.posValue_;
42  asymm_ = rhs.asymm_;
43  }
44  return *this;
45 }
46 
48 {
49 }
50 
52 {
53  Double_t num = negValue_ - posValue_;
54  Double_t denom = negValue_ + posValue_;
55  Double_t asymm(0.0);
56  if (TMath::Abs(denom) > 1e-10) {
57  asymm = num/denom;
58  }
59 
60  return asymm;
61 }
62 
Double_t asymm_
The asymmetry.
Definition: LauAsymmCalc.hh:65
LauAsymmCalc & operator=(const LauAsymmCalc &rhs)
Copy assignment operator.
Definition: LauAsymmCalc.cc:37
File containing declaration of LauAsymmCalc class.
ClassImp(LauAbsCoeffSet)
Class for calculating the asymmetry between two variables.
Definition: LauAsymmCalc.hh:25
Double_t negValue_
The negative value.
Definition: LauAsymmCalc.hh:59
Double_t posValue_
The positive value.
Definition: LauAsymmCalc.hh:62
LauAsymmCalc(Double_t negValue, Double_t posValue)
Constructor.
Definition: LauAsymmCalc.cc:22
virtual ~LauAsymmCalc()
Destructor.
Definition: LauAsymmCalc.cc:47
Double_t calcAsymmetry()
Calculate the asymmetry.
Definition: LauAsymmCalc.cc:51