laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
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 
19 ClassImp(LauAsymmCalc)
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 {
32 }
33 
35 {
36  Double_t num = negValue_ - posValue_;
37  Double_t denom = negValue_ + posValue_;
38  Double_t asymm(0.0);
39  if (TMath::Abs(denom) > 1e-10) {
40  asymm = num/denom;
41  }
42 
43  return asymm;
44 }
45 
File containing declaration of LauAsymmCalc class.
Class for calculating the asymmetry between two variables.
Definition: LauAsymmCalc.hh:25
Double_t negValue_
The negative value.
Definition: LauAsymmCalc.hh:53
Double_t posValue_
The positive value.
Definition: LauAsymmCalc.hh:56
virtual ~LauAsymmCalc()
Destructor.
Definition: LauAsymmCalc.cc:30
Double_t calcAsymmetry()
Calculate the asymmetry.
Definition: LauAsymmCalc.cc:34