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