]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - THijing/THijing.cxx
Remove obsolete drawing methods and macros
[u/mrichter/AliRoot.git] / THijing / THijing.cxx
index d24050d48ef2e4862ebdd0e97b9b545f46fcd6d3..5868245be0aa2dfa9d9032e8d12a789d814da91a 100644 (file)
@@ -1,3 +1,20 @@
+/**************************************************************************
+ * 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$ */
+
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
 // THijing                                                                    //
 //****************************************************************************//
 
 
-#include "THijing.h"
-#include "TObjArray.h"
+#include <TClonesArray.h>
+#include <TObjArray.h>
+#include <TParticle.h>
+#include <TROOT.h>
+
 #include "Hcommon.h"
-#include "TParticle.h"
-#include "TROOT.h"
+#include "THijing.h"
 
 #ifndef WIN32
 # define hijset hijset_
@@ -36,6 +55,7 @@
 # define profile profile_
 # define rluget_hijing rluget_hijing_
 # define rluset_hijing rluset_hijing_
+# define lulist_hijing lulist_hijing_
 # define type_of_call
 #else
 # define hijset HIJSET
@@ -43,6 +63,7 @@
 # define profile PROFILE
 # define rluget_hijing RLUGET_HIJING
 # define rluset_hijing RLUSET_HIJING
+# define lulist_hijing LULIST_HIJING
 # define type_of_call _stdcall
 #endif
 
@@ -58,6 +79,7 @@ extern "C" void type_of_call hijing(const char *, Float_t  &,
 extern "C" void type_of_call rluget_hijing(Int_t & lfn, Int_t & move);
 
 extern "C" void type_of_call rluset_hijing(Int_t & lfn, Int_t & move);
+extern "C" void type_of_call lulist_hijing(Int_t &);
 
 #else
 #endif
@@ -66,30 +88,43 @@ extern "C" void type_of_call rluset_hijing(Int_t & lfn, Int_t & move);
 
 ClassImp(THijing)
 
-THijing::THijing() : TGenerator("Hijing","Hijing")
+
+THijing::THijing(): 
+    TGenerator("Hijing","Hijing"),
+    fEfrm(5500.),
+    fFrame("CMS"),
+    fProj("A"),
+    fTarg("A"),
+    fIap(208),
+    fIzp(82),
+    fIat(208),
+    fIzt(82),
+    fBmin(0.),
+    fBmax(5.)
 {
 // Default constructor 
 }
 
 //______________________________________________________________________________
 THijing::THijing(Float_t efrm, const char *frame="CMS", 
-       const char *proj="A", const char *targ="A", Int_t iap=207, 
-       Int_t izp=82, Int_t iat=207, Int_t izt=82, Float_t bmin=0, 
-       Float_t bmax=20) : TGenerator("Hijing","Hijing")
+                const char *proj="A", const char *targ="A", 
+                Int_t iap=207, Int_t izp=82, Int_t iat=207, Int_t izt=82,
+                Float_t bmin=0, Float_t bmax=20): 
+    TGenerator("Hijing","Hijing"),
+    fEfrm(efrm),
+    fFrame(frame),
+    fProj(proj),
+    fTarg(targ),
+    fIap(iap),
+    fIzp(izp),
+    fIat(iat),
+    fIzt(izt),
+    fBmin(bmin),
+    fBmax(bmax)
 {
 // THijing constructor: 
 // Note that there may be only one functional THijing object
 // at a time, so it's not use to create more than one instance of it.
-      fEfrm=efrm;
-      fFrame=frame;
-      fProj=proj;
-      fTarg=targ;
-      fIap=iap;
-      fIzp=izp;
-      fIat=iat;
-      fIzt=izt;
-      fBmin=bmin;
-      fBmax=bmax;
 }
 
 //______________________________________________________________________________
@@ -1097,9 +1132,9 @@ void THijing::SetPARJ(Int_t key, Float_t parm)
     if ( key < 1 || key > 200) {
        printf("ERROR in THijing::SetPARJ(key,parm):\n");
        printf("      key=%i is out of range [1..200]\n",key);
+    } else {
+      LUDAT1_HIJING.parj[key-1] = parm;
     }
-    
-    LUDAT1_HIJING.parj[key-1] = parm;
 }
 
 
@@ -1109,12 +1144,42 @@ void THijing::SetMSTJ(Int_t key, Int_t parm)
     if ( key < 1 || key > 200) {
        printf("ERROR in THijing::SetMSTJ(key,parm):\n");
        printf("      key=%i is out of range [1..200]\n",key);
+    } else {
+      LUDAT1_HIJING.mstj[key-1] = parm;
     }
-    
-    LUDAT1_HIJING.mstj[key-1] = parm;
 }
 
+void  THijing::SetMDCY(Int_t key1, Int_t key2, Int_t   parm)
+{
+  // Set value of array MDCY
+  if ( key1 < 1 || key1 > 500) {
+    printf("ERROR in THijing::SetMDCY(key1, key2, parm):\n");
+    printf("      key1=%i is out of range [1..200]\n", key1);
+  } else if ( key2 < 1 || key2 > 3) {
+    printf("ERROR in THijing::SetMDCY(key1, key2, parm):\n");
+    printf("      key2=%i is out of range [1..200]\n", key2);
+  } else {
+    LUDAT3_HIJING.mdcy[key2-1][key1-1] = parm;
+  }
+  
+}
+
+Int_t THijing::GetMDCY(Int_t key1, Int_t key2) 
+{
+  // Get value of array MDCY
+  if ( key1 < 1 || key1 > 500) {
+    printf("ERROR in THijing::GetMDCY(key1, key2, parm):\n");
+    printf("      key1=%i is out of range [1..200]\n", key1);
+    return -1;
+  } else if ( key2 < 1 || key2 > 3) {
+    printf("ERROR in THijing::GetMDCY(key1, key2, parm):\n");
+    printf("      key2=%i is out of range [1..200]\n", key2);
+    return -1;
+  } else {
+    return (LUDAT3_HIJING.mdcy[key2-1][key1-1]);
+  }
 
+}
 //====================== access to Hijing subroutines =========================
 
 
@@ -1221,3 +1286,8 @@ void  THijing::Rluset(Int_t lfn, Int_t move)
   rluset_hijing(lfn, move);
 }
 
+void  THijing::Pylist(Int_t flag)
+{
+// call lulist
+  lulist_hijing(flag);
+}