]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliPartonicEnergyLoss.cxx
Moving lib*.pkg
[u/mrichter/AliRoot.git] / EVGEN / AliPartonicEnergyLoss.cxx
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 //
19 // Calculate parton energy loss
20 // in nucleus nucleus
21 // reactions via calculation
22 // of quenching weights
23 // Author: A.Morsch
24 //
25
26 #include "AliPartonicEnergyLoss.h"
27 #include <TMath.h>
28
29
30 #ifndef WIN32
31 # define eloss_lookup   eloss_lookup_
32 # define eloss_read     eloss_read_
33 # define eloss_readca3  eloss_readca3_
34 # define type_of_call
35 #else
36 # define eloss_lookup   ELOSS_LOOKUP
37 # define eloss_read     ELOSS_READ
38 # define eloss_readca3  ELOSS_READCA3
39 # define type_of_call _stdcall
40 #endif
41
42
43 extern "C" void type_of_call eloss_lookup(Double_t &, Double_t &, 
44                                     Double_t &, Double_t &);
45 extern "C" void type_of_call eloss_read();
46 extern "C" void type_of_call eloss_readca3();
47
48
49 ClassImp(AliPartonicEnergyLoss)
50
51 void AliPartonicEnergyLoss::
52 QuenchingWeight(Double_t r, Double_t x, Double_t& cont, Double_t& disc)
53 {
54 //
55 //  Calculate quenching weight
56 //
57     eloss_lookup(r,x,cont,disc);
58 }
59
60 void AliPartonicEnergyLoss::RunTest()
61 {
62 //
63 // Test routine
64 //
65     Double_t cont, disc, rri, wwt;
66     
67     Init();
68
69     rri = 400.;
70     for (Int_t i = 1; i <= 40; i++) 
71     {
72         wwt = TMath::Power(10., (-3.+5.*(i-1)/49.));
73         QuenchingWeight(rri,wwt,cont,disc);
74         printf("%d %e %e\n", i, wwt, cont);
75     }
76 }
77  
78 void AliPartonicEnergyLoss::Init()
79 {
80 //
81 //  Read data
82 //
83     eloss_read();
84     eloss_readca3();
85 }
86