]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - LHC/AliLhcBeam.cxx
Cuts updated.
[u/mrichter/AliRoot.git] / LHC / AliLhcBeam.cxx
index 02eb0310dd46aac8d0bffd2cb200e9eec89d5d0c..27fa462d341f35b8abfceaffe5e8867565687629 100644 (file)
  **************************************************************************/
 
 /* $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 <TMath.h>
 #include <TCanvas.h>
 #include <TGraph.h>
+#include <TH1F.h>
+#include <TMath.h>
 #include <TMultiGraph.h>
 
+#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;