Pdf identified via string or number.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Mar 2008 18:56:08 +0000 (18:56 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Mar 2008 18:56:08 +0000 (18:56 +0000)
LHAPDF/AliStructFuncType.cxx
LHAPDF/AliStructFuncType.h

index ce5bd69..ac13083 100644 (file)
@@ -33,7 +33,6 @@
 # define type_of_call _stdcall
 #endif
 
-
 extern "C" {
     void type_of_call pdfset(char parm[20][20], Double_t value[20]);
     
@@ -61,3 +60,38 @@ void AliStructFuncType::StructA(Double_t xx, Double_t qq, Double_t a,
 }
 
 
+Int_t AliStructFuncType::PDFsetIndex(StrucFunc_t pdf)
+{
+// PDF set index
+    Int_t pdfSetNumber[10] = {
+       19170,
+       19150,
+       19070,
+       19050,
+       80060,
+       10040,
+       10100,
+       10050,
+       10041,
+       10042
+    };
+    return pdfSetNumber[pdf];
+}
+
+TString AliStructFuncType::PDFsetName(StrucFunc_t pdf)
+{
+// PDF Set Name
+    TString pdfsetName[10]   = {
+       "cteq4l.LHgrid",
+       "cteq4m.LHgrid",   
+       "cteq5l.LHgrid",
+       "cteq5m.LHgrid",
+       "GRV98lo.LHgris",   
+       "cteq6.LHpdf",
+       "cteq61.LHpdf",
+       "cteq6m.LHpdf",
+       "cteq6l.LHpdf", 
+       "cetq6ll.LHpdf"
+    };
+    return pdfsetName[pdf];
+}
index 3bf613e..c48c211 100644 (file)
 // Author: andreas.morsch@cern.ch
 
 #include <TObject.h>
+#include <TString.h>
+typedef enum
+{
+    kCTEQ4L,  // cteq4l.LHgrid   
+    kCTEQ4M,  // cteq4m.LHgrid   
+    kCTEQ5L,  // cteq5l.LHgrid
+    kCTEQ5M,  // cteq5m.LHgrid
+    kGRVLO98, // GRV98lo.LHgris   
+    kCTEQ6,   // cteq6.LHpdf
+    kCTEQ61,  // cteq61.LHpdf
+    kCTEQ6m,  // cteq6m.LHpdf
+    kCTEQ6l,  // cteq6l.LHpdf 
+    kCTEQ6ll  // cetq6ll.LHpdf
+}
+StrucFunc_t;
+
 
 class AliStructFuncType : public TObject {
     
@@ -22,23 +38,10 @@ class AliStructFuncType : public TObject {
                        Double_t& dsea,
                        Double_t& str, Double_t& chm, Double_t& bot,
                        Double_t& top, Double_t& gl);
+    static Int_t   PDFsetIndex(StrucFunc_t pdf);
+    static TString PDFsetName(StrucFunc_t pdf);    
     ClassDef(AliStructFuncType,1) // Library for partonic energy loss
 };
 
-typedef enum
-{
-   kCTEQ4L     = 19170,    
-   kCTEQ4M     = 19150,    
-   kCTEQ5L     = 19070,
-   kCTEQ5M     = 19050,
-   kGRVLO98    = 80060,    
-   kCTEQ6      = 10040,
-   kCTEQ61     = 10100,
-   kCTEQ6m     = 10050,
-   kCTEQ6l     = 10041,
-   kCTEQ6ll    = 10042
-}
-StrucFunc_t;
-
 #endif