]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Library class for parton quenching calculations.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Jul 2002 13:12:33 +0000 (13:12 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Jul 2002 13:12:33 +0000 (13:12 +0000)
EVGEN/AliPartonicEnergyLoss.cxx [new file with mode: 0644]
EVGEN/AliPartonicEnergyLoss.h [new file with mode: 0644]

diff --git a/EVGEN/AliPartonicEnergyLoss.cxx b/EVGEN/AliPartonicEnergyLoss.cxx
new file mode 100644 (file)
index 0000000..69321af
--- /dev/null
@@ -0,0 +1,81 @@
+/**************************************************************************
+ * 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.                  *
+ **************************************************************************/
+
+/*
+$Log$
+*/
+
+
+#include "AliPartonicEnergyLoss.h"
+#include <TMath.h>
+
+
+#ifndef WIN32
+# define lookup   lookup_
+# define read     read_
+# define readca3  readca3_
+# define type_of_call
+#else
+# define lookup   LOOKUP
+# define read     READ
+# define readca3  READCA3
+# define type_of_call _stdcall
+#endif
+
+
+extern "C" void type_of_call lookup(Double_t &, Double_t &, 
+                                   Double_t &, Double_t &);
+extern "C" void type_of_call read();
+extern "C" void type_of_call readca3();
+
+
+ClassImp(AliPartonicEnergyLoss)
+
+void AliPartonicEnergyLoss::
+QuenchingWeight(Double_t r, Double_t x, Double_t& cont, Double_t& disc)
+{
+//
+//  Calculate quenching weight
+//
+    lookup(r,x,cont,disc);
+}
+
+void AliPartonicEnergyLoss::RunTest()
+{
+//
+// Test routine
+//
+    Double_t cont, disc, rri, wwt;
+    
+    Init();
+
+    rri = 400.;
+    for (Int_t i = 1; i <= 40; i++) 
+    {
+       wwt = TMath::Power(10., (-3.+5.*(i-1)/49.));
+       QuenchingWeight(rri,wwt,cont,disc);
+       printf("%d %e %e\n", i, wwt, cont);
+    }
+}
+void AliPartonicEnergyLoss::Init()
+{
+//
+//  Read data
+//
+    read();
+    readca3();
+}
+
diff --git a/EVGEN/AliPartonicEnergyLoss.h b/EVGEN/AliPartonicEnergyLoss.h
new file mode 100644 (file)
index 0000000..9c6b768
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef ALIPARTONICENERGYLOSS_H
+#define ALIPARTONICENERGYLOSS_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#include <TObject.h>
+
+class AliPartonicEnergyLoss : public TObject {
+    
+ public:
+    AliPartonicEnergyLoss(){;}
+    
+    virtual ~AliPartonicEnergyLoss(){;}
+    
+    static void QuenchingWeight(Double_t r, Double_t x,
+                               Double_t& cont, Double_t& disc);
+    static void RunTest();
+ private:
+    static void Init();
+    
+    ClassDef(AliPartonicEnergyLoss,1) // Library for partonic energy loss
+};
+
+#endif 
+
+
+