Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:09

0001 #ifndef PHASIC_Channels_ISR_Channel_Base_H
0002 #define PHASIC_Channels_ISR_Channel_Base_H
0003 
0004 #include "PHASIC++/Channels/Single_Channel.H"
0005 #include "PHASIC++/Channels/Vegas.H"
0006 #include "ATOOLS/Org/Info_Key.H"
0007 
0008 namespace PHASIC {
0009   class ISR_Channel_Base: public Single_Channel {
0010   protected:
0011     Vegas  * p_vegas;
0012     double * p_rans;
0013     
0014     inline double SelectS(const double &s1,const double &s2) {
0015       return (s2>0.0?s2:s1);
0016     }
0017   public:
0018     ISR_Channel_Base(ATOOLS::Integration_Info *info) {}
0019     ~ISR_Channel_Base() {
0020       if (p_vegas) delete p_vegas;
0021       if (p_rans)  delete p_rans;
0022     }
0023     
0024     inline const std::string & ChID() const { return m_name; }
0025     inline void MPISync()                   { p_vegas->MPISync(); }
0026     inline void Optimize()                  { p_vegas->Optimize(); }
0027     inline void EndOptimize()               { p_vegas->EndOptimize(); }
0028     inline void WriteOut(std::string pId)   { p_vegas->WriteOut(pId); }
0029     inline void ReadIn(std::string pId)     { p_vegas->ReadIn(pId); }
0030     inline void AddPoint(double value) {
0031       Single_Channel::AddPoint(value);
0032       p_vegas->AddPoint(value,p_rans);
0033     }
0034   };
0035 }
0036 #endif