CGEM BOSS 6.6.5.f
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//
23
24#include <stdlib.h>
25#include <iostream>
29using std::endl;
30
31
32EvtAbsRadCorr* EvtRadCorr::_isrEngine=0;
33bool EvtRadCorr::_alwaysRadCorr=false;
34bool EvtRadCorr::_neverRadCorr=false;
35
37 _isrEngine=0;
38 _alwaysRadCorr=false;
39 _neverRadCorr=false;
40}
41
43 if ( _isrEngine ) delete _isrEngine;
44 _isrEngine=0;
45}
46
48 _isrEngine=isrEngine;
49}
50
51
53
54 if (_isrEngine==0){
55 report(ERROR,"EvtGen") <<"No RadCorr model available in "
56 <<"EvtRadCorr::doRadCorr()."<<endl;
57 ::abort();
58 }
59
60 if ( !_neverRadCorr) _isrEngine->doRadCorr(p);
61 return;
62}
63
64
65bool EvtRadCorr::alwaysRadCorr() {return _alwaysRadCorr;}
66bool EvtRadCorr::neverRadCorr() {return _neverRadCorr;}
67
68void EvtRadCorr::setAlwaysRadCorr() { _alwaysRadCorr=true; _neverRadCorr=false;}
69void EvtRadCorr::setNeverRadCorr() { _alwaysRadCorr=false; _neverRadCorr=true;}
70void EvtRadCorr::setNormalRadCorr() {_alwaysRadCorr=false; _neverRadCorr=false;}
71
72
73
74
75
76
77
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
virtual void doRadCorr(EvtParticle *p)=0
static void setAlwaysRadCorr()
Definition: EvtRadCorr.cc:68
static void setNormalRadCorr()
Definition: EvtRadCorr.cc:70
static bool alwaysRadCorr()
Definition: EvtRadCorr.cc:65
static bool neverRadCorr()
Definition: EvtRadCorr.cc:66
static void setRadCorrEngine(EvtAbsRadCorr *isrEngine)
Definition: EvtRadCorr.cc:47
static void setNeverRadCorr()
Definition: EvtRadCorr.cc:69
static void doRadCorr(EvtParticle *p)
Definition: EvtRadCorr.cc:52