]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding rule violations corrected.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Nov 2003 08:46:01 +0000 (08:46 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Nov 2003 08:46:01 +0000 (08:46 +0000)
EVGEN/AliGenSlowNucleons.cxx
EVGEN/AliGenSlowNucleons.h

index 8eb7a6ec72123176a31248491637952e73bbb346..ea2f417d8ef51ad236d6d7c5320df7df281b23ce 100644 (file)
 
 /* $Id$ */
 
-/*
-  Generator for slow nucluons in pA interactions. 
-  Source is modelled by a relativistic Maxwell distributions.
-  Original code by  Ferenc Sikler  <sikler@rmki.kfki.hu>
- */
+//
+//  Generator for slow nucleons in pA interactions. 
+//  Source is modelled by a relativistic Maxwell distributions.
+//  This class cooparates with AliCollisionGeometry if used inside AliGenCocktail.
+//  In this case the number of slow nucleons is determined from the number of wounded nuclei
+//  using a realisation of AliSlowNucleonModel.
+//  Original code by  Ferenc Sikler  <sikler@rmki.kfki.hu>
+// 
 
 #include <TDatabasePDG.h>
 #include <TPDGCode.h>
@@ -56,6 +59,13 @@ AliGenSlowNucleons::AliGenSlowNucleons(Int_t npart)
     fDebug = 0;
 }
 
+AliGenSlowNucleons::AliGenSlowNucleons(const AliGenSlowNucleons & sn):
+    AliGenerator(sn)
+{
+// Copy constructor
+    sn.Copy(*this);
+}
+
 //____________________________________________________________
 AliGenSlowNucleons::~AliGenSlowNucleons()
 {
@@ -80,6 +90,8 @@ void AliGenSlowNucleons::Init()
 
 void AliGenSlowNucleons::FinishRun()
 {
+// End of run action
+// Show histogram for debugging if requested.
     if (fDebug) {
        TCanvas *c = new TCanvas("c","Canvas 1",400,10,600,700);
        c->Divide(2,1);
@@ -177,15 +189,15 @@ void AliGenSlowNucleons::Generate()
 
 
 void AliGenSlowNucleons::GenerateSlow(Int_t charge, Double_t T, Double_t beta, Float_t* q)
+
+{
 /* 
    Emit a slow nucleon with "temperature" T [GeV], 
    from a source moving with velocity beta         
    Three-momentum [GeV/c] is given back in q[3]    
 */
 
-{
  Double_t m, pmax, p, f, theta, phi;
  TDatabasePDG * pdg = TDatabasePDG::Instance();
  const Double_t kMassProton  = pdg->GetParticle(kProton) ->Mass();
  const Double_t kMassNeutron = pdg->GetParticle(kNeutron)->Mass();
@@ -244,6 +256,22 @@ void AliGenSlowNucleons::Lorentz(Double_t m, Double_t beta, Float_t* q)
     q[2] = gamma * (q[2] + beta*energy);
 }
 
+         
+AliGenSlowNucleons& AliGenSlowNucleons::operator=(const  AliGenSlowNucleons& rhs)
+{
+// Assignment operator
+    rhs.Copy(*this);
+    return *this;
+}
+
+void AliGenSlowNucleons::Copy(AliGenSlowNucleons&) const
+{
+    //
+    // Copy 
+    //
+    Fatal("Copy","Not implemented!\n");
+}
+
 
 
 
index f98875c241f665a53de9cf765e468ac1941fbcbd..776d32886e617d7b7cded927790327851e7688d8 100644 (file)
@@ -4,7 +4,12 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
-
+//
+//  Generator for slow nucleons in pA interactions. 
+//  Source is modelled by a relativistic Maxwell distributions.
+//  Original code by  Ferenc Sikler  <sikler@rmki.kfki.hu>
+//  This class: andreas.morsch@cern.ch
+//
 #include "AliGenerator.h"
 class AliSlowNucleonModel;
 class TH2F;
@@ -15,6 +20,7 @@ class AliGenSlowNucleons : public AliGenerator
 public:
     AliGenSlowNucleons();
     AliGenSlowNucleons(Int_t npart);
+    AliGenSlowNucleons(const AliGenSlowNucleons &sn);
     virtual ~AliGenSlowNucleons();
     virtual void Init();
     virtual void FinishRun();
@@ -41,6 +47,8 @@ public:
     void     GenerateSlow(Int_t charge, Double_t T, Double_t beta, Float_t* q);
     Double_t Maxwell(Double_t m, Double_t p, Double_t t);
     void     Lorentz(Double_t m, Double_t beta, Float_t* q);
+    void Copy(AliGenSlowNucleons&) const;
+    AliGenSlowNucleons & operator=(const AliGenSlowNucleons & rhs);
  protected:
     Float_t  fCMS;          // Center of mass energy
     Float_t  fMomentum;     // Target nucleus momentum