1 //--------------------------------------------------------------------------
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.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtRadCorr.cc
13 // Description: RadCorr interface for EvtGen
16 // Modification history:
18 // Lange April 27, 2002 - Created
20 //------------------------------------------------------------------------
22 #include "EvtGenBase/EvtPatches.hh"
26 #include "EvtGenBase/EvtAbsRadCorr.hh"
27 #include "EvtGenBase/EvtRadCorr.hh"
28 #include "EvtGenBase/EvtReport.hh"
32 EvtAbsRadCorr* EvtRadCorr::_fsrEngine=0;
33 bool EvtRadCorr::_alwaysRadCorr=false;
34 bool EvtRadCorr::_neverRadCorr=false;
36 EvtRadCorr::EvtRadCorr() {
42 EvtRadCorr::~EvtRadCorr() {
43 if ( _fsrEngine ) delete _fsrEngine;
47 void EvtRadCorr::setRadCorrEngine(EvtAbsRadCorr* fsrEngine){
52 void EvtRadCorr::doRadCorr(EvtParticle *p){
55 report(ERROR,"EvtGen") <<"No RadCorr model available in "
56 <<"EvtRadCorr::doRadCorr()."<<endl;
60 if ( !_neverRadCorr) _fsrEngine->doRadCorr(p);
65 bool EvtRadCorr::alwaysRadCorr() {return _alwaysRadCorr;}
66 bool EvtRadCorr::neverRadCorr() {return _neverRadCorr;}
68 void EvtRadCorr::setAlwaysRadCorr() { _alwaysRadCorr=true; _neverRadCorr=false;}
69 void EvtRadCorr::setNeverRadCorr() { _alwaysRadCorr=false; _neverRadCorr=true;}
70 void EvtRadCorr::setNormalRadCorr() {_alwaysRadCorr=false; _neverRadCorr=false;}