Update master to aliroot
[u/mrichter/AliRoot.git] / LHAPDF / AliStructFuncType.cxx
CommitLineData
9463a7b3 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18// Helper class to interface pdflib and the TPythia
19// the c++ interface for Pythia
20// The pdf codes used in pdflib are mapped
21// to a more user friendly enumeration type.
22// Author: andreas.morsch@cern.ch
23
24#include "AliStructFuncType.h"
25
26#ifndef WIN32
27# define structa structa_
28# define pdfset pdfset_
29# define type_of_call
30#else
31# define structa STRUCTA
32# define pdfset PDFSET
33# define type_of_call _stdcall
34#endif
35
9463a7b3 36extern "C" {
37 void type_of_call pdfset(char parm[20][20], Double_t value[20]);
38
39 void type_of_call structa(Double_t& xx, Double_t& qq, Double_t& a,
40 Double_t& upv, Double_t& dnv, Double_t& usea,
41 Double_t& dsea,
42 Double_t& str, Double_t& chm, Double_t& bot,
43 Double_t& top, Double_t& gl);
44}
45
46ClassImp(AliStructFuncType)
47
48void AliStructFuncType::PdfSet(char parm[20][20], Double_t value[20])
49{
50 pdfset(parm, value);
51}
52
53void AliStructFuncType::StructA(Double_t xx, Double_t qq, Double_t a,
54 Double_t& upv, Double_t& dnv, Double_t& usea,
55 Double_t& dsea,
56 Double_t& str, Double_t& chm, Double_t& bot,
57 Double_t& top, Double_t& gl)
58{
59 structa(xx, qq, a, upv, dnv, usea, dsea, str, chm, bot, top, gl);
60}
61
62
0312243f 63Int_t AliStructFuncType::PDFsetIndex(StrucFunc_t pdf)
64{
65// PDF set index
ec6e6353 66 Int_t pdfSetNumber[12] = {
0312243f 67 19170,
68 19150,
69 19070,
70 19050,
71 80060,
72 10040,
73 10100,
74 10050,
75 10041,
ec6e6353 76 10042,
77 10800,
78 11000
0312243f 79 };
80 return pdfSetNumber[pdf];
81}
82
83TString AliStructFuncType::PDFsetName(StrucFunc_t pdf)
84{
85// PDF Set Name
ec6e6353 86 TString pdfsetName[12] = {
0312243f 87 "cteq4l.LHgrid",
88 "cteq4m.LHgrid",
89 "cteq5l.LHgrid",
90 "cteq5m.LHgrid",
4d22de6b 91 "GRV98lo.LHgrid",
0312243f 92 "cteq6.LHpdf",
93 "cteq61.LHpdf",
94 "cteq6m.LHpdf",
95 "cteq6l.LHpdf",
ec6e6353 96 "cteq6ll.LHpdf",
97 "CT10.LHgrid",
98 "CT10nlo.LHgrid"
0312243f 99 };
100 return pdfsetName[pdf];
101}