]>
Commit | Line | Data |
---|---|---|
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 | 36 | extern "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 | ||
46 | ClassImp(AliStructFuncType) | |
47 | ||
48 | void AliStructFuncType::PdfSet(char parm[20][20], Double_t value[20]) | |
49 | { | |
50 | pdfset(parm, value); | |
51 | } | |
52 | ||
53 | void 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 | 63 | Int_t AliStructFuncType::PDFsetIndex(StrucFunc_t pdf) |
64 | { | |
65 | // PDF set index | |
66 | Int_t pdfSetNumber[10] = { | |
67 | 19170, | |
68 | 19150, | |
69 | 19070, | |
70 | 19050, | |
71 | 80060, | |
72 | 10040, | |
73 | 10100, | |
74 | 10050, | |
75 | 10041, | |
76 | 10042 | |
77 | }; | |
78 | return pdfSetNumber[pdf]; | |
79 | } | |
80 | ||
81 | TString AliStructFuncType::PDFsetName(StrucFunc_t pdf) | |
82 | { | |
83 | // PDF Set Name | |
84 | TString pdfsetName[10] = { | |
85 | "cteq4l.LHgrid", | |
86 | "cteq4m.LHgrid", | |
87 | "cteq5l.LHgrid", | |
88 | "cteq5m.LHgrid", | |
4d22de6b | 89 | "GRV98lo.LHgrid", |
0312243f | 90 | "cteq6.LHpdf", |
91 | "cteq61.LHpdf", | |
92 | "cteq6m.LHpdf", | |
93 | "cteq6l.LHpdf", | |
9fb42395 | 94 | "cteq6ll.LHpdf" |
0312243f | 95 | }; |
96 | return pdfsetName[pdf]; | |
97 | } |