]>
Commit | Line | Data |
---|---|---|
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 | ||
803d1ab0 | 16 | /* $Id$ */ |
3432b7c0 | 17 | |
18 | #include "AliPartonicEnergyLoss.h" | |
19 | #include <TMath.h> | |
20 | ||
21 | ||
22 | #ifndef WIN32 | |
d97c83d5 | 23 | # define eloss_lookup eloss_lookup_ |
24 | # define eloss_read eloss_read_ | |
25 | # define eloss_readca3 eloss_readca3_ | |
3432b7c0 | 26 | # define type_of_call |
27 | #else | |
d97c83d5 | 28 | # define eloss_lookup ELOSS_LOOKUP |
29 | # define eloss_read ELOSS_READ | |
30 | # define eloss_readca3 ELOSS_READCA3 | |
3432b7c0 | 31 | # define type_of_call _stdcall |
32 | #endif | |
33 | ||
34 | ||
d97c83d5 | 35 | extern "C" void type_of_call eloss_lookup(Double_t &, Double_t &, |
3432b7c0 | 36 | Double_t &, Double_t &); |
d97c83d5 | 37 | extern "C" void type_of_call eloss_read(); |
38 | extern "C" void type_of_call eloss_readca3(); | |
3432b7c0 | 39 | |
40 | ||
41 | ClassImp(AliPartonicEnergyLoss) | |
42 | ||
43 | void AliPartonicEnergyLoss:: | |
44 | QuenchingWeight(Double_t r, Double_t x, Double_t& cont, Double_t& disc) | |
45 | { | |
46 | // | |
47 | // Calculate quenching weight | |
48 | // | |
d97c83d5 | 49 | eloss_lookup(r,x,cont,disc); |
3432b7c0 | 50 | } |
51 | ||
52 | void AliPartonicEnergyLoss::RunTest() | |
53 | { | |
54 | // | |
55 | // Test routine | |
56 | // | |
57 | Double_t cont, disc, rri, wwt; | |
58 | ||
59 | Init(); | |
60 | ||
61 | rri = 400.; | |
62 | for (Int_t i = 1; i <= 40; i++) | |
63 | { | |
64 | wwt = TMath::Power(10., (-3.+5.*(i-1)/49.)); | |
65 | QuenchingWeight(rri,wwt,cont,disc); | |
66 | printf("%d %e %e\n", i, wwt, cont); | |
67 | } | |
68 | } | |
69 | ||
70 | void AliPartonicEnergyLoss::Init() | |
71 | { | |
72 | // | |
73 | // Read data | |
74 | // | |
d97c83d5 | 75 | eloss_read(); |
76 | eloss_readca3(); | |
3432b7c0 | 77 | } |
78 |