BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPdfMax.hh
Go to the documentation of this file.
1/*******************************************************************************
2 * Project: BaBar detector at the SLAC PEP-II B-factory
3 * Package: EvtGenBase
4 * File: $Id: EvtPdfMax.hh,v 1.1.1.2 2007/10/26 05:03:14 pingrg Exp $
5 * Author: Alexei Dvoretskii, [email protected], 2001-2002
6 *
7 * Copyright (C) 2002 Caltech
8 *******************************************************************************/
9
10// Pdf maximum and its location
11
12#ifndef EVT_PDF_MAX_HH
13#define EVT_PDF_MAX_HH
14
16
17// PDF maximum - helper class
18
19template <class Point>
20class EvtPdfMax {
21
22public:
23
25 : _value(-1),_valueKnown(false), _locKnown(false)
26 {}
28 : _value(value),_valueKnown(true), _locKnown(false)
29 {}
30 EvtPdfMax(Point p, double value)
31 : _value(value), _valueKnown(true), _locKnown(true), _loc(p)
32 {}
33 EvtPdfMax(const EvtPdfMax& other)
34 : COPY_MEM(_value), COPY_MEM(_valueKnown), COPY_MEM(_locKnown), COPY_MEM(_loc)
35 {}
37
38 bool valueKnown() const { return _valueKnown; }
39 double value() const { assert(_valueKnown); return _value; }
40 bool locKnown() const { return _locKnown; }
41 Point loc() const { assert(_locKnown); return _loc; }
42
43private:
44
45 double _value;
46 bool _valueKnown;
47 bool _locKnown;
48 Point _loc;
49
50};
51
52#endif
#define COPY_MEM(X)
Definition EvtMacros.hh:16
bool valueKnown() const
Definition EvtPdfMax.hh:38
double value() const
Definition EvtPdfMax.hh:39
EvtPdfMax(Point p, double value)
Definition EvtPdfMax.hh:30
EvtPdfMax(const EvtPdfMax &other)
Definition EvtPdfMax.hh:33
bool locKnown() const
Definition EvtPdfMax.hh:40
EvtPdfMax(double value)
Definition EvtPdfMax.hh:27
Point loc() const
Definition EvtPdfMax.hh:41