Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:41:50

0001 /*
0002 * blha/njet.h
0003 *
0004 * This file is part of NJet library
0005 * Copyright (C) 2011, 2012 NJet Collaboration
0006 *
0007 * This software is distributed under the terms of the GNU General Public License (GPL)
0008 */
0009 
0010 #ifndef BLHA_NJET_H
0011 #define BLHA_NJET_H
0012 
0013 #define BLHA_NAME_LEN 15
0014 #define BLHA_VERSION_LEN 15
0015 #define BLHA_MESSAGE_LEN 255
0016 
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif /* __cplusplus */
0020   // BLHA1 functions
0021   void OLP_Start(const char* filename, int* status);
0022   void OLP_EvalSubProcess(int mcn, double* pp, double scale, double* cpl, double* rval);
0023   // fortran versions
0024   void olpstart_(const char* filename, int* status, int slen);
0025   void olpevalsubprocess_(int* mcn, double* pp, double* scale, double* cpl, double* rval);
0026 
0027   // BLHA2 functions
0028   void OLP_Info(char* olpname, char* olpversion, char* olpmessage);
0029   void OLP_SetParameter(const char* name, const double* reval,
0030                         const double* imval, int* rstatus);
0031   void OLP_EvalSubProcess2(const int* pmcn, const double* pp,
0032                            const double* pscale, double* rval, double* racc);
0033   void OLP_Polvec(const double* p, const double* q, double* eps);
0034   // fortran versions
0035   void olpinfo_(char* olpname, char* olpversion, char* olpmessage);
0036   void olpsetparameter_(const char* name, const double* reval,
0037                         const double* imval, int* rstatus);
0038   void olpevalsubprocess2_(const int* pmcn, const double* pp,
0039                            const double* pscale, double* rval, double* racc);
0040 #ifdef __cplusplus
0041 }
0042 #endif /* __cplusplus */
0043 
0044 #ifdef __cplusplus
0045 namespace NJet
0046 {
0047 
0048 class Contract;
0049 
0050 class LH_OLP
0051 {
0052   public:
0053     static void OLP_Start(const char* filename, int* status);
0054     static void OLP_EvalSubProcess(int mcn, const double* pp, double scale,
0055                                    const double* cpl, double* rval);
0056 
0057     static void OLP_Info(char* olpname, char* olpversion, char* olpmessage);
0058     static void OLP_SetParameter(const char* name, const double* reval,
0059                                  const double* imval, int* rstatus);
0060     static void OLP_EvalSubProcess2(const int* pmcn, const double* pp,
0061                                     const double* pscale, double* rval, double* racc);
0062 
0063     static void OLP_Polvec(const double* p, const double* q, double* eps);
0064 
0065     LH_OLP() {};
0066     ~LH_OLP();
0067   private:
0068     static Contract* njet_global;
0069 };
0070 
0071 // non-diagonal symmetric index: i != j, (i,j) in [0,1,...], "nis" in [0,1,...]
0072 // also natural symmetric index: (i,j) in [1,2,...], "nis" in [1,2,...]
0073 int nis(int i, int j)
0074 {
0075   return ( i<=j ? i+j*(j-1)/2 : j+i*(i-1)/2 );
0076 }
0077 
0078 } /* namespace NJet */
0079 #endif /* __cplusplus */
0080 
0081 #endif /* BLHA_NJET_H */