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