From: morsch Date: Mon, 15 Jul 2002 13:12:33 +0000 (+0000) Subject: Library class for parton quenching calculations. X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=3432b7c0ea4322fa24909bb73aa7cf6dec3c3578;ds=sidebyside Library class for parton quenching calculations. --- diff --git a/EVGEN/AliPartonicEnergyLoss.cxx b/EVGEN/AliPartonicEnergyLoss.cxx new file mode 100644 index 00000000000..69321af129b --- /dev/null +++ b/EVGEN/AliPartonicEnergyLoss.cxx @@ -0,0 +1,81 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* +$Log$ +*/ + + +#include "AliPartonicEnergyLoss.h" +#include + + +#ifndef WIN32 +# define lookup lookup_ +# define read read_ +# define readca3 readca3_ +# define type_of_call +#else +# define lookup LOOKUP +# define read READ +# define readca3 READCA3 +# define type_of_call _stdcall +#endif + + +extern "C" void type_of_call lookup(Double_t &, Double_t &, + Double_t &, Double_t &); +extern "C" void type_of_call read(); +extern "C" void type_of_call readca3(); + + +ClassImp(AliPartonicEnergyLoss) + +void AliPartonicEnergyLoss:: +QuenchingWeight(Double_t r, Double_t x, Double_t& cont, Double_t& disc) +{ +// +// Calculate quenching weight +// + lookup(r,x,cont,disc); +} + +void AliPartonicEnergyLoss::RunTest() +{ +// +// Test routine +// + Double_t cont, disc, rri, wwt; + + Init(); + + rri = 400.; + for (Int_t i = 1; i <= 40; i++) + { + wwt = TMath::Power(10., (-3.+5.*(i-1)/49.)); + QuenchingWeight(rri,wwt,cont,disc); + printf("%d %e %e\n", i, wwt, cont); + } +} + +void AliPartonicEnergyLoss::Init() +{ +// +// Read data +// + read(); + readca3(); +} + diff --git a/EVGEN/AliPartonicEnergyLoss.h b/EVGEN/AliPartonicEnergyLoss.h new file mode 100644 index 00000000000..9c6b768bf6b --- /dev/null +++ b/EVGEN/AliPartonicEnergyLoss.h @@ -0,0 +1,29 @@ +#ifndef ALIPARTONICENERGYLOSS_H +#define ALIPARTONICENERGYLOSS_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include + +class AliPartonicEnergyLoss : public TObject { + + public: + AliPartonicEnergyLoss(){;} + + virtual ~AliPartonicEnergyLoss(){;} + + static void QuenchingWeight(Double_t r, Double_t x, + Double_t& cont, Double_t& disc); + static void RunTest(); + private: + static void Init(); + + ClassDef(AliPartonicEnergyLoss,1) // Library for partonic energy loss +}; + +#endif + + +