BOSS 8.0.0
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, dvoretsk@slac.stanford.edu, 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
15#include "EvtMacros.hh"
16#include <cassert>
17
18// PDF maximum - helper class
19
20template <class Point> class EvtPdfMax {
21
22public:
23 EvtPdfMax() : _value( -1 ), _valueKnown( false ), _locKnown( false ) {}
24 EvtPdfMax( double value ) : _value( value ), _valueKnown( true ), _locKnown( false ) {}
25 EvtPdfMax( Point p, double value )
26 : _value( value ), _valueKnown( true ), _locKnown( true ), _loc( p ) {}
27 EvtPdfMax( const EvtPdfMax& other )
28 : COPY_MEM( _value ), COPY_MEM( _valueKnown ), COPY_MEM( _locKnown ), COPY_MEM( _loc ) {}
30
31 bool valueKnown() const { return _valueKnown; }
32 double value() const {
33 assert( _valueKnown );
34 return _value;
35 }
36 bool locKnown() const { return _locKnown; }
37 Point loc() const {
38 assert( _locKnown );
39 return _loc;
40 }
41
42private:
43 double _value;
44 bool _valueKnown;
45 bool _locKnown;
46 Point _loc;
47};
48
49#endif
#define COPY_MEM(X)
Definition EvtMacros.hh:16
bool valueKnown() const
Definition EvtPdfMax.hh:31
double value() const
Definition EvtPdfMax.hh:32
EvtPdfMax(Point p, double value)
Definition EvtPdfMax.hh:25
EvtPdfMax(const EvtPdfMax &other)
Definition EvtPdfMax.hh:27
bool locKnown() const
Definition EvtPdfMax.hh:36
EvtPdfMax(double value)
Definition EvtPdfMax.hh:24
Point loc() const
Definition EvtPdfMax.hh:37