Line data Source code
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 "EvtGenBase/EvtPatches.hh"
23 :
24 : #include <stdlib.h>
25 : #include <iostream>
26 : #include "EvtGenBase/EvtAbsRadCorr.hh"
27 : #include "EvtGenBase/EvtRadCorr.hh"
28 : #include "EvtGenBase/EvtReport.hh"
29 : using std::endl;
30 :
31 :
32 : EvtAbsRadCorr* EvtRadCorr::_fsrEngine=0;
33 : bool EvtRadCorr::_alwaysRadCorr=false;
34 : bool EvtRadCorr::_neverRadCorr=false;
35 :
36 0 : EvtRadCorr::EvtRadCorr() {
37 0 : _fsrEngine=0;
38 0 : _alwaysRadCorr=false;
39 0 : _neverRadCorr=false;
40 0 : }
41 :
42 0 : EvtRadCorr::~EvtRadCorr() {
43 0 : if ( _fsrEngine ) delete _fsrEngine;
44 0 : _fsrEngine=0;
45 0 : }
46 :
47 : void EvtRadCorr::setRadCorrEngine(EvtAbsRadCorr* fsrEngine){
48 0 : _fsrEngine=fsrEngine;
49 0 : }
50 :
51 :
52 : void EvtRadCorr::doRadCorr(EvtParticle *p){
53 :
54 0 : if (_fsrEngine==0){
55 0 : report(Severity::Error,"EvtGen") <<"No RadCorr model available in "
56 0 : <<"EvtRadCorr::doRadCorr()."<<endl;
57 0 : ::abort();
58 : }
59 :
60 0 : if ( !_neverRadCorr) _fsrEngine->doRadCorr(p);
61 0 : return;
62 : }
63 :
64 :
65 0 : bool EvtRadCorr::alwaysRadCorr() {return _alwaysRadCorr;}
66 0 : bool EvtRadCorr::neverRadCorr() {return _neverRadCorr;}
67 :
68 0 : void EvtRadCorr::setAlwaysRadCorr() { _alwaysRadCorr=true; _neverRadCorr=false;}
69 0 : void EvtRadCorr::setNeverRadCorr() { _alwaysRadCorr=false; _neverRadCorr=true;}
70 0 : void EvtRadCorr::setNormalRadCorr() {_alwaysRadCorr=false; _neverRadCorr=false;}
71 :
72 :
73 :
74 :
75 :
76 :
77 :
|