BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtRadCorr.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtRadCorr.cc
12//
13// Description: RadCorr interface for EvtGen
14//
15//
16// Modification history:
17//
18// Lange April 27, 2002 - Created
19//
20//------------------------------------------------------------------------
21//
22#include "EvtPatches.hh"
23
24#include "EvtAbsRadCorr.hh"
25#include "EvtRadCorr.hh"
26#include "EvtReport.hh"
27#include <iostream>
28#include <stdlib.h>
29using std::endl;
30
31EvtAbsRadCorr* EvtRadCorr::_isrEngine = 0;
32bool EvtRadCorr::_alwaysRadCorr = false;
33bool EvtRadCorr::_neverRadCorr = false;
34
36 _isrEngine = 0;
37 _alwaysRadCorr = false;
38 _neverRadCorr = false;
39}
40
42 if ( _isrEngine ) delete _isrEngine;
43 _isrEngine = 0;
44}
45
46void EvtRadCorr::setRadCorrEngine( EvtAbsRadCorr* isrEngine ) { _isrEngine = isrEngine; }
47
49
50 if ( _isrEngine == 0 )
51 {
52 report( ERROR, "EvtGen" ) << "No RadCorr model available in "
53 << "EvtRadCorr::doRadCorr()." << endl;
54 ::abort();
55 }
56
57 if ( !_neverRadCorr ) _isrEngine->doRadCorr( p );
58 return;
59}
60
61bool EvtRadCorr::alwaysRadCorr() { return _alwaysRadCorr; }
62bool EvtRadCorr::neverRadCorr() { return _neverRadCorr; }
63
65 _alwaysRadCorr = true;
66 _neverRadCorr = false;
67}
69 _alwaysRadCorr = false;
70 _neverRadCorr = true;
71}
73 _alwaysRadCorr = false;
74 _neverRadCorr = false;
75}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
virtual void doRadCorr(EvtParticle *p)=0
static void setAlwaysRadCorr()
Definition EvtRadCorr.cc:64
static void setNormalRadCorr()
Definition EvtRadCorr.cc:72
static bool alwaysRadCorr()
Definition EvtRadCorr.cc:61
static bool neverRadCorr()
Definition EvtRadCorr.cc:62
static void setRadCorrEngine(EvtAbsRadCorr *isrEngine)
Definition EvtRadCorr.cc:46
static void setNeverRadCorr()
Definition EvtRadCorr.cc:68
static void doRadCorr(EvtParticle *p)
Definition EvtRadCorr.cc:48