X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenHalo.cxx;h=f69483c565866b4bdd0f094dba45dd0a72f594b8;hb=2a9c8c767e02a499e68585a3f725ffa57bf25cad;hp=cb0c814aeaafd1bd2308545fdc311fe55243e288;hpb=a99cf51f4e6eacc5eb0574989fa9749c16f30002;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVGEN/AliGenHalo.cxx b/EVGEN/AliGenHalo.cxx index cb0c814aeaa..f69483c5658 100644 --- a/EVGEN/AliGenHalo.cxx +++ b/EVGEN/AliGenHalo.cxx @@ -13,30 +13,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.10 2000/12/21 16:24:06 morsch -Coding convention clean-up - -Revision 1.9 2000/11/30 07:12:50 alibrary -Introducing new Rndm and QA classes - -Revision 1.8 2000/10/02 15:20:40 morsch -Direct reference to default input file removed. - -Revision 1.7 2000/06/30 12:19:07 morsch -Type of fFileName changed to TString, fp has been !-ed. - -Revision 1.6 2000/06/09 20:36:01 morsch -All coding rule violations except RS3 corrected - -Revision 1.5 1999/11/03 17:43:20 fca -New version from G.Martinez & A.Morsch - -Revision 1.4 1999/09/29 09:24:14 fca -Introduction of the Copyright and cvs Log - -*/ +/* $Id$ */ // Read background particles from a boundary source // Very specialized generator to simulate background from beam halo. @@ -44,16 +21,20 @@ Introduction of the Copyright and cvs Log // for this purpose. // Author: andreas.morsch@cern.ch +#include + +#include +#include + #include "AliGenHalo.h" #include "AliRun.h" -#include "AliPDG.h" -#include -#include +ClassImp(AliGenHalo) - ClassImp(AliGenHalo) - AliGenHalo::AliGenHalo() - :AliGenerator(-1) +AliGenHalo::AliGenHalo() + :AliGenerator(-1), + fp(0), + fFileName(0) { // Constructor fName="Halo"; @@ -61,11 +42,12 @@ Introduction of the Copyright and cvs Log // // Read all particles fNpart=-1; - fp=0; } AliGenHalo::AliGenHalo(Int_t npart) - :AliGenerator(npart) + :AliGenerator(npart), + fp(0), + fFileName(0) { // Constructor fName="Halo"; @@ -73,12 +55,15 @@ AliGenHalo::AliGenHalo(Int_t npart) // // Read all particles fNpart=-1; - fp=0; } AliGenHalo::AliGenHalo(const AliGenHalo & Halo) + :AliGenerator(Halo), + fp(0), + fFileName(0) { -// copy constructor +// Copy constructor + Halo.Copy(*this); } @@ -98,7 +83,7 @@ void AliGenHalo::Init() void AliGenHalo::Generate() { // Generate from input file - FILE *fp = fopen(fFileName,"r"); + fp = fopen(fFileName,"r"); if (fp) { printf("\n File %s opened for reading ! \n ", (char*) &fFileName); } else { @@ -142,12 +127,12 @@ void AliGenHalo::Generate() p[1]=p0*ty; p[2]=p0*tz; fParentWeight=wgt; - SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight); -// SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo+",nt,fParentWeight); + PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight); +// PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo+",nt,fParentWeight); origin[2]=-origin[2]; p[2]=-p[2]; - SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight); -// SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo-",nt,fParentWeight); + PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight); +// PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo-",nt,fParentWeight); origin[2]=-origin[2]; p[2]=-p[2]; } @@ -157,10 +142,20 @@ void AliGenHalo::Generate() AliGenHalo& AliGenHalo::operator=(const AliGenHalo& rhs) { // Assignment operator + rhs.Copy(*this); return *this; } +void AliGenHalo::Copy(TObject&) const +{ + // + // Copy + // + Fatal("Copy","Not implemented!\n"); +} + +