ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id$ */

// Helper class to interface pdflib and the TPythia 
// the c++ interface for Pythia
// The pdf codes used  in pdflib are mapped
// to a more user friendly enumeration type.
// Author: andreas.morsch@cern.ch

#include "AliStructFuncType.h"

#ifndef WIN32
# define structa  structa_ 
# define pdfset   pdfset_
# define type_of_call
#else
# define structa  STRUCTA
# define pdfset   PDFSET
# define type_of_call _stdcall
#endif

extern "C" {
    void type_of_call pdfset(char parm[20][20], Double_t value[20]);
    
    void type_of_call structa(Double_t& xx, Double_t& qq, Double_t& a,
			       Double_t& upv, Double_t& dnv, Double_t& usea,
			       Double_t& dsea,
			       Double_t& str, Double_t& chm, Double_t& bot,
			       Double_t& top, Double_t& gl);
}

ClassImp(AliStructFuncType)

void AliStructFuncType::PdfSet(char parm[20][20], Double_t value[20])
{
    pdfset(parm, value);
}

void AliStructFuncType::StructA(Double_t xx, Double_t qq, Double_t a,
				Double_t& upv, Double_t& dnv, Double_t& usea,
				Double_t& dsea,
				Double_t& str, Double_t& chm, Double_t& bot,
				Double_t& top, Double_t& gl)
{
    structa(xx, qq, a, upv, dnv, usea, dsea, str, chm, bot, top, gl);
}


Int_t AliStructFuncType::PDFsetIndex(StrucFunc_t pdf)
{
// PDF set index
    Int_t pdfSetNumber[12] = {
	19170,
	19150,
	19070,
	19050,
	80060,
	10040,
	10100,
	10050,
	10041,
	10042,
        10800,
	11000
    };
    return pdfSetNumber[pdf];
}

TString AliStructFuncType::PDFsetName(StrucFunc_t pdf)
{
// PDF Set Name
    TString pdfsetName[12]   = {
	"cteq4l.LHgrid",
	"cteq4m.LHgrid",   
	"cteq5l.LHgrid",
	"cteq5m.LHgrid",
	"GRV98lo.LHgrid",   
	"cteq6.LHpdf",
	"cteq61.LHpdf",
	"cteq6m.LHpdf",
	"cteq6l.LHpdf", 
	"cteq6ll.LHpdf",
	"CT10.LHgrid", 
	"CT10nlo.LHgrid"
    };
    return pdfsetName[pdf];
}
 AliStructFuncType.cxx:1
 AliStructFuncType.cxx:2
 AliStructFuncType.cxx:3
 AliStructFuncType.cxx:4
 AliStructFuncType.cxx:5
 AliStructFuncType.cxx:6
 AliStructFuncType.cxx:7
 AliStructFuncType.cxx:8
 AliStructFuncType.cxx:9
 AliStructFuncType.cxx:10
 AliStructFuncType.cxx:11
 AliStructFuncType.cxx:12
 AliStructFuncType.cxx:13
 AliStructFuncType.cxx:14
 AliStructFuncType.cxx:15
 AliStructFuncType.cxx:16
 AliStructFuncType.cxx:17
 AliStructFuncType.cxx:18
 AliStructFuncType.cxx:19
 AliStructFuncType.cxx:20
 AliStructFuncType.cxx:21
 AliStructFuncType.cxx:22
 AliStructFuncType.cxx:23
 AliStructFuncType.cxx:24
 AliStructFuncType.cxx:25
 AliStructFuncType.cxx:26
 AliStructFuncType.cxx:27
 AliStructFuncType.cxx:28
 AliStructFuncType.cxx:29
 AliStructFuncType.cxx:30
 AliStructFuncType.cxx:31
 AliStructFuncType.cxx:32
 AliStructFuncType.cxx:33
 AliStructFuncType.cxx:34
 AliStructFuncType.cxx:35
 AliStructFuncType.cxx:36
 AliStructFuncType.cxx:37
 AliStructFuncType.cxx:38
 AliStructFuncType.cxx:39
 AliStructFuncType.cxx:40
 AliStructFuncType.cxx:41
 AliStructFuncType.cxx:42
 AliStructFuncType.cxx:43
 AliStructFuncType.cxx:44
 AliStructFuncType.cxx:45
 AliStructFuncType.cxx:46
 AliStructFuncType.cxx:47
 AliStructFuncType.cxx:48
 AliStructFuncType.cxx:49
 AliStructFuncType.cxx:50
 AliStructFuncType.cxx:51
 AliStructFuncType.cxx:52
 AliStructFuncType.cxx:53
 AliStructFuncType.cxx:54
 AliStructFuncType.cxx:55
 AliStructFuncType.cxx:56
 AliStructFuncType.cxx:57
 AliStructFuncType.cxx:58
 AliStructFuncType.cxx:59
 AliStructFuncType.cxx:60
 AliStructFuncType.cxx:61
 AliStructFuncType.cxx:62
 AliStructFuncType.cxx:63
 AliStructFuncType.cxx:64
 AliStructFuncType.cxx:65
 AliStructFuncType.cxx:66
 AliStructFuncType.cxx:67
 AliStructFuncType.cxx:68
 AliStructFuncType.cxx:69
 AliStructFuncType.cxx:70
 AliStructFuncType.cxx:71
 AliStructFuncType.cxx:72
 AliStructFuncType.cxx:73
 AliStructFuncType.cxx:74
 AliStructFuncType.cxx:75
 AliStructFuncType.cxx:76
 AliStructFuncType.cxx:77
 AliStructFuncType.cxx:78
 AliStructFuncType.cxx:79
 AliStructFuncType.cxx:80
 AliStructFuncType.cxx:81
 AliStructFuncType.cxx:82
 AliStructFuncType.cxx:83
 AliStructFuncType.cxx:84
 AliStructFuncType.cxx:85
 AliStructFuncType.cxx:86
 AliStructFuncType.cxx:87
 AliStructFuncType.cxx:88
 AliStructFuncType.cxx:89
 AliStructFuncType.cxx:90
 AliStructFuncType.cxx:91
 AliStructFuncType.cxx:92
 AliStructFuncType.cxx:93
 AliStructFuncType.cxx:94
 AliStructFuncType.cxx:95
 AliStructFuncType.cxx:96
 AliStructFuncType.cxx:97
 AliStructFuncType.cxx:98
 AliStructFuncType.cxx:99
 AliStructFuncType.cxx:100
 AliStructFuncType.cxx:101