laura is hosted by Hepforge, IPPP Durham
Laura++  v3r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauBlind.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2006 - 2015.
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 "LauBlind.hh"
16 
17 #include "TMath.h"
18 #include "TRandom3.h"
19 
21 
22 
24  blindingString_(""),
25  blindingWidth_(0.0),
26  offset_(0.0)
27 {
28 }
29 
30 LauBlind::LauBlind(const TString& blindingStr, const Double_t width) :
31  blindingString_(blindingStr),
32  blindingWidth_(width),
33  offset_(0.0)
34 {
35  this->calcOffset();
36 }
37 
39  blindingString_(rhs.blindingString_),
40  blindingWidth_(rhs.blindingWidth_),
41  offset_(rhs.offset_)
42 {
43 }
44 
46 {
47 }
48 
50 {
51  //hash the blinding string to obtain a seed
52  TRandom3 r(TMath::Hash(blindingString_));
53 
54  //offsets are Gaussian distributed with defined width
55  offset_ = blindingWidth_ * r.Gaus();
56 }
57 
LauBlind()
Default constructor.
Definition: LauBlind.cc:23
File containing declaration of LauBlind class.
ClassImp(LauAbsCoeffSet)
const Double_t blindingWidth_
The Gaussian width.
Definition: LauBlind.hh:81
void calcOffset()
Calculate the offset.
Definition: LauBlind.cc:49
const TString blindingString_
The blinding string.
Definition: LauBlind.hh:78
virtual ~LauBlind()
Destructor.
Definition: LauBlind.cc:45
Double_t offset_
The offset used to blind the value.
Definition: LauBlind.hh:84
Class for blinding and unblinding a number based on a blinding string.
Definition: LauBlind.hh:28