]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliPartonicEnergyLoss.cxx
Field conversion factor added.
[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 /*
17 $Log$
18 Revision 1.1.2.1  2002/07/24 08:56:29  alibrary
19 Updating EVGEN on TVirtulaMC
20
21 Revision 1.1  2002/07/15 13:12:33  morsch
22 Library class for parton quenching calculations.
23
24 */
25
26
27 #include "AliPartonicEnergyLoss.h"
28 #include <TMath.h>
29
30
31 #ifndef WIN32
32 # define lookup   lookup_
33 # define read     read_
34 # define readca3  readca3_
35 # define type_of_call
36 #else
37 # define lookup   LOOKUP
38 # define read     READ
39 # define readca3  READCA3
40 # define type_of_call _stdcall
41 #endif
42
43
44 extern "C" void type_of_call lookup(Double_t &, Double_t &, 
45                                     Double_t &, Double_t &);
46 extern "C" void type_of_call read();
47 extern "C" void type_of_call readca3();
48
49
50 ClassImp(AliPartonicEnergyLoss)
51
52 void AliPartonicEnergyLoss::
53 QuenchingWeight(Double_t r, Double_t x, Double_t& cont, Double_t& disc)
54 {
55 //
56 //  Calculate quenching weight
57 //
58     lookup(r,x,cont,disc);
59 }
60
61 void AliPartonicEnergyLoss::RunTest()
62 {
63 //
64 // Test routine
65 //
66     Double_t cont, disc, rri, wwt;
67     
68     Init();
69
70     rri = 400.;
71     for (Int_t i = 1; i <= 40; i++) 
72     {
73         wwt = TMath::Power(10., (-3.+5.*(i-1)/49.));
74         QuenchingWeight(rri,wwt,cont,disc);
75         printf("%d %e %e\n", i, wwt, cont);
76     }
77 }
78  
79 void AliPartonicEnergyLoss::Init()
80 {
81 //
82 //  Read data
83 //
84     read();
85     readca3();
86 }
87