]>
Commit | Line | Data |
---|---|---|
da0e9ce3 | 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 | EvtRadCorr::EvtRadCorr() { | |
37 | _fsrEngine=0; | |
38 | _alwaysRadCorr=false; | |
39 | _neverRadCorr=false; | |
40 | } | |
41 | ||
42 | EvtRadCorr::~EvtRadCorr() { | |
43 | if ( _fsrEngine ) delete _fsrEngine; | |
44 | _fsrEngine=0; | |
45 | } | |
46 | ||
47 | void EvtRadCorr::setRadCorrEngine(EvtAbsRadCorr* fsrEngine){ | |
48 | _fsrEngine=fsrEngine; | |
49 | } | |
50 | ||
51 | ||
52 | void EvtRadCorr::doRadCorr(EvtParticle *p){ | |
53 | ||
54 | if (_fsrEngine==0){ | |
55 | report(ERROR,"EvtGen") <<"No RadCorr model available in " | |
56 | <<"EvtRadCorr::doRadCorr()."<<endl; | |
57 | ::abort(); | |
58 | } | |
59 | ||
60 | if ( !_neverRadCorr) _fsrEngine->doRadCorr(p); | |
61 | return; | |
62 | } | |
63 | ||
64 | ||
65 | bool EvtRadCorr::alwaysRadCorr() {return _alwaysRadCorr;} | |
66 | bool EvtRadCorr::neverRadCorr() {return _neverRadCorr;} | |
67 | ||
68 | void EvtRadCorr::setAlwaysRadCorr() { _alwaysRadCorr=true; _neverRadCorr=false;} | |
69 | void EvtRadCorr::setNeverRadCorr() { _alwaysRadCorr=false; _neverRadCorr=true;} | |
70 | void EvtRadCorr::setNormalRadCorr() {_alwaysRadCorr=false; _neverRadCorr=false;} | |
71 | ||
72 | ||
73 | ||
74 | ||
75 | ||
76 | ||
77 |