laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAsymmCalc.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2004 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
29 #include "TMath.h"
30 
31 #include "LauAsymmCalc.hh"
32 
34 
35 
36 LauAsymmCalc::LauAsymmCalc(Double_t negValue, Double_t posValue) :
37  negValue_(negValue),
38  posValue_(posValue),
39  asymm_(0.0)
40 {
41  asymm_ = calcAsymmetry();
42 }
43 
45  negValue_(rhs.negValue_),
46  posValue_(rhs.posValue_),
47  asymm_(rhs.asymm_)
48 {
49 }
50 
52 {
53  if ( &rhs != this ) {
54  negValue_ = rhs.negValue_;
55  posValue_ = rhs.posValue_;
56  asymm_ = rhs.asymm_;
57  }
58  return *this;
59 }
60 
62 {
63 }
64 
66 {
67  Double_t num = negValue_ - posValue_;
68  Double_t denom = negValue_ + posValue_;
69  Double_t asymm(0.0);
70  if (TMath::Abs(denom) > 1e-10) {
71  asymm = num/denom;
72  }
73 
74  return asymm;
75 }
76 
Double_t asymm_
The asymmetry.
Definition: LauAsymmCalc.hh:79
LauAsymmCalc & operator=(const LauAsymmCalc &rhs)
Copy assignment operator.
Definition: LauAsymmCalc.cc:51
File containing declaration of LauAsymmCalc class.
ClassImp(LauAbsCoeffSet)
Class for calculating the asymmetry between two variables.
Definition: LauAsymmCalc.hh:39
Double_t negValue_
The negative value.
Definition: LauAsymmCalc.hh:73
Double_t posValue_
The positive value.
Definition: LauAsymmCalc.hh:76
LauAsymmCalc(Double_t negValue, Double_t posValue)
Constructor.
Definition: LauAsymmCalc.cc:36
virtual ~LauAsymmCalc()
Destructor.
Definition: LauAsymmCalc.cc:61
Double_t calcAsymmetry()
Calculate the asymmetry.
Definition: LauAsymmCalc.cc:65