X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=LHC%2FAliLhcBeam.cxx;h=27fa462d341f35b8abfceaffe5e8867565687629;hb=782d2143f0a00b8862f2f3776e1d8a48d7367a81;hp=02eb0310dd46aac8d0bffd2cb200e9eec89d5d0c;hpb=803d1ab0e2c9c9a8116c05954c3d3cdcf1f33759;p=u%2Fmrichter%2FAliRoot.git diff --git a/LHC/AliLhcBeam.cxx b/LHC/AliLhcBeam.cxx index 02eb0310dd4..27fa462d341 100644 --- a/LHC/AliLhcBeam.cxx +++ b/LHC/AliLhcBeam.cxx @@ -14,23 +14,65 @@ **************************************************************************/ /* $Id$ */ +// +// Class that holds all parameters about an LHC beam. +// The parameters can change with time. +// A monitor can be set that stores the time distribution of +// emittance and number of particles per bunch. +// Author: Andreas Morsch +// andreas.morsch@cern.ch +// -#include "AliLhcBeam.h" -#include "AliLHC.h" -#include #include #include +#include +#include #include +#include "AliLhcBeam.h" +#include "AliLHC.h" + ClassImp(AliLhcBeam) -AliLhcBeam::AliLhcBeam(AliLHC* lhc) +AliLhcBeam::AliLhcBeam(AliLHC* lhc): + fAccelerator(lhc), + fN(0), + fN0(0), + fNEmittance(0.), + fEmittance(0.), + fEmittance0(0.), + fEmittanceL(0.), + fEmittanceL0(0.), + fEnergySpread(0.), + fA(0), + fZ(0), + fEnergy(0.), + fGamma(0.), + fTimeArray(0), + fEmittanceArray(0), + fEmittanceLArray(0) { // Constructor - fAccelerator = lhc; } -AliLhcBeam::AliLhcBeam(const AliLhcBeam& beam) +AliLhcBeam::AliLhcBeam(const AliLhcBeam& beam): + TNamed(beam), AliLhcMonitor(beam), + fAccelerator(0), + fN(0), + fN0(0), + fNEmittance(0.), + fEmittance(0.), + fEmittance0(0.), + fEmittanceL(0.), + fEmittanceL0(0.), + fEnergySpread(0.), + fA(0), + fZ(0), + fEnergy(0.), + fGamma(0.), + fTimeArray(0), + fEmittanceArray(0), + fEmittanceLArray(0) { // copy constructor } @@ -67,18 +109,22 @@ void AliLhcBeam::RemoveParticles(Float_t loss) void AliLhcBeam::IncreaseEmittance(Float_t de, Float_t del) { +// +// Increase the emittance fEmittance *= (1.+de); fEmittanceL *= (1.+del); fEnergySpread *= (1.+del); } -AliLhcBeam& AliLhcBeam::operator=(const AliLhcBeam & rhs) +AliLhcBeam& AliLhcBeam::operator=(const AliLhcBeam & /*rhs*/) { // Assignment operator return *this; } void AliLhcBeam::SetMonitor(Int_t n) { +// +// Initialize a monitor with n time bins fNmax = n; if (fEmittanceArray) delete fEmittanceArray; if (fEmittanceLArray) delete fEmittanceLArray;