]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Introducing new Rndm and QA classes
authoralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Nov 2000 07:12:56 +0000 (07:12 +0000)
committeralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Nov 2000 07:12:56 +0000 (07:12 +0000)
65 files changed:
EVGEN/AliGenBox.cxx
EVGEN/AliGenDoubleScan.cxx
EVGEN/AliGenExtFile.cxx
EVGEN/AliGenFLUKAsource.cxx
EVGEN/AliGenFLUKAsource.h
EVGEN/AliGenFixed.cxx
EVGEN/AliGenGSIlib.cxx
EVGEN/AliGenGSIlib.h
EVGEN/AliGenHIJINGpara.cxx
EVGEN/AliGenHIJINGpara.h
EVGEN/AliGenHalo.cxx
EVGEN/AliGenHijing.cxx
EVGEN/AliGenHijing.h
EVGEN/AliGenLib.h
EVGEN/AliGenMUONlib.cxx
EVGEN/AliGenMUONlib.h
EVGEN/AliGenPHOSlib.cxx
EVGEN/AliGenPHOSlib.h
EVGEN/AliGenPMDlib.cxx
EVGEN/AliGenPMDlib.h
EVGEN/AliGenParam.cxx
EVGEN/AliGenParam.h
EVGEN/AliGenPythia.cxx
EVGEN/AliGenPythia.h
EVGEN/AliGenScan.cxx
EVGEN/AliPythia.cxx
EVGEN/EVGENLinkDef.h
EVGEN/Makefile
GEANT321/Makefile
GEODB/AliGEODB.cxx
GEODB/AliGEODB.h
HIJING/Makefile
PYTHIA6/pythia6150.f
STEER/AliDetector.cxx
STEER/AliDisplay.cxx
STEER/AliGenerator.h
STEER/AliLego.cxx
STEER/AliLegoGenerator.cxx
STEER/AliLegoGeneratorEta.cxx
STEER/AliLegoGeneratorEta.h
STEER/AliLegoGeneratorPhiZ.cxx
STEER/AliLegoGeneratorXYZ.cxx
STEER/AliMC.cxx
STEER/AliMC.h
STEER/AliMCProcess.h [new file with mode: 0644]
STEER/AliMCQA.cxx [new file with mode: 0644]
STEER/AliMCQA.h [new file with mode: 0644]
STEER/AliMagFCM.cxx
STEER/AliMagFCM.h
STEER/AliModule.cxx
STEER/AliModule.h
STEER/AliRecPoint.cxx
STEER/AliRecPoint.h
STEER/AliRndm.cxx [new file with mode: 0644]
STEER/AliRndm.h [new file with mode: 0644]
STEER/AliRun.cxx
STEER/AliRun.h
STEER/Makefile
STEER/STEERLinkDef.h
TGeant3/AliGeant3.cxx
TGeant3/TGeant3.cxx
TGeant3/TGeant3.h
TGeant3/TGeant3Dummy.cxx
conf/MachineDef.Linux
macros/loadlibs.C

index 10fee115dfb2e05dad044c32d7e44fdfbbef37bd..f0edfd32f91ea7dc45e1192def3d8bc0284eaa84 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/10/02 21:28:06  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.2  2000/07/11 18:24:55  fca
 Coding convention corrections + few minor bug fixes
 
@@ -63,7 +66,6 @@ Introduction of the Copyright and cvs Log
 #include "AliRun.h"
 #include "AliConst.h"
 #include "AliPDG.h"
-#include "AliMC.h"
 
 ClassImp(AliGenBox)
 
@@ -109,14 +111,14 @@ void AliGenBox::Generate()
   //
     for (j=0;j<3;j++) origin[j]=fOrigin[j];
     if(fVertexSmear==kPerEvent) {
-       gMC->Rndm(random,6);
+       Rndm(random,6);
        for (j=0;j<3;j++) {
            origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
                TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
        }
     }
     for(i=0;i<fNpart;i++) {
-       gMC->Rndm(random,3);
+       Rndm(random,3);
        theta=fThetaMin+random[0]*(fThetaMax-fThetaMin);
        if(TestBit(kMomentumRange)) {
            pmom=fPMin+random[1]*(fPMax-fPMin);
@@ -132,13 +134,13 @@ void AliGenBox::Generate()
        p[2] = pmom*TMath::Cos(theta);
 
        if(fVertexSmear==kPerTrack) {
-           gMC->Rndm(random,6);
+           Rndm(random,6);
            for (j=0;j<3;j++) {
                origin[j]=fOrigin[j]+fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
                    TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
            }
        }
-       gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,"Primary",nt);
+       gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt);
     }
 }
 
index 3224846770d12dd094a744d38eb53fc4fb9f695b..3d8e47404cfaeb0b872d7417456a392c5fc540f6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/10/02 21:28:06  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.2  2000/06/09 20:37:51  morsch
 All coding rule violations except RS3 corrected
 
@@ -25,7 +28,6 @@ First commit of this file
 
 #include "AliGenDoubleScan.h"
 #include "AliRun.h"
-#include "AliMC.h"
 
  ClassImp(AliGenDoubleScan)
     
@@ -84,7 +86,7 @@ void AliGenDoubleScan::Generate()
     for (Int_t ix=0; ix<fNx; ix++) {
       for (Int_t iy=0; iy<fNy; iy++) {
          for (Int_t iz=0; iz<fNz; iz++){
-             gMC->Rndm(random,6);
+             Rndm(random,6);
              origin[0]=fXmin+ix*dx+2*(random[0]-0.5)*fOsigma[0];
              origin[1]=fYmin+iy*dy+2*(random[1]-0.5)*fOsigma[1];
              origin[2]=fZmin+iz*dz+2*(random[2]-0.5)*fOsigma[2];            
@@ -94,11 +96,11 @@ void AliGenDoubleScan::Generate()
              p[0] = pmom*TMath::Cos(phi)*TMath::Sin(theta);
              p[1] = pmom*TMath::Sin(phi)*TMath::Sin(theta);
              p[2] = pmom*TMath::Cos(theta);
-             gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,"Primary",nt);
+             gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt);
 //
 // Generate 2nd particle at distance fDistance from  the first
 //
-             gMC->Rndm(random,6);
+             Rndm(random,6);
              Float_t phi2=2.*TMath::Pi()*random[0];
              Float_t dx  =fDistance*TMath::Sin(phi2);
              Float_t dy  =fDistance*TMath::Cos(phi2);        
@@ -110,7 +112,7 @@ void AliGenDoubleScan::Generate()
              p[0] = pmom*TMath::Cos(phi)*TMath::Sin(theta);
              p[1] = pmom*TMath::Sin(phi)*TMath::Sin(theta);
              p[2] = pmom*TMath::Cos(theta);
-             gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,"Primary",nt);
+             gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt);
          }
       }
   }
index fd95412eb160ea087b1f2a4fa670ea5f24aea9ae..02890c85bf269b3322c487973944c679837d5a0e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.12  2000/10/27 13:54:45  morsch
+Remove explicite reference to input file from constuctor.
+
 Revision 1.11  2000/10/02 21:28:06  fca
 Removal of useless dependecies via forward declarations
 
@@ -145,7 +148,7 @@ void AliGenExtFile::Generate()
 
   for (j=0;j<3;j++) origin[j]=fOrigin[j];
   if(fVertexSmear==kPerTrack) {
-    gMC->Rndm(random,6);
+    Rndm(random,6);
     for (j=0;j<3;j++) {
        origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
            TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
@@ -188,14 +191,14 @@ void AliGenExtFile::Generate()
          p[2]=prwn*TMath::Cos(fTheta);
          
          if(fVertexSmear==kPerTrack) {
-             gMC->Rndm(random,6);
+             Rndm(random,6);
              for (j=0;j<3;j++) {
                  origin[j]=fOrigin[j]
                      +fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
                      TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
              }
          }
-         gAlice->SetTrack(fTrackIt,-1,fIdpart,p,origin,polar,0,"Primary",nt);
+         gAlice->SetTrack(fTrackIt,-1,fIdpart,p,origin,polar,0,kPPrimary,nt);
       }
       fNcurrent++;
       nb = (Int_t)h2->GetEvent(fNcurrent); 
index 255ffb672760d78c64b6578377cc77cdae1b6619..b42f7a071cfb0e71bd33f24c583ba652a6618fe5 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.11  2000/06/14 15:20:40  morsch
+Include clean-up (IH)
+
 Revision 1.10  2000/06/09 20:31:34  morsch
 All coding rule violations except RS3 corrected
 
@@ -251,13 +254,13 @@ void AliGenFLUKAsource::Generate()
        wgt = (part == 13) ? fWgt*fAddWeight : fWgt;
        iwgt=Int_t(wgt);
        fwgt=wgt-Float_t(iwgt);
-       gMC->Rndm(random,2);
+       Rndm(random,2);
        if (random[0] < fwgt) iwgt++;
        if (part==1 && iwgt>100) iwgt=100;
        Int_t nstack=0;
        for (j=0; j<iwgt; j++) {
-           gAlice->SetTrack(fTrackIt,-1,part,p,origin,polar,fAge,"Primary",nt);
-           gMC->Rndm(random,2);
+           gAlice->SetTrack(fTrackIt,-1,part,p,origin,polar,fAge,kPPrimary,nt);
+           Rndm(random,2);
            phi=2*random[1]*TMath::Pi();
            Float_t pn1=p[0]*TMath::Sin(phi) - p[1]*TMath::Cos(phi);
            Float_t pn2=p[0]*TMath::Cos(phi) + p[1]*TMath::Sin(phi);
index 600621fa38d099cdb86dc11fd53be9127bb1bd13..0d40f1b46b1255e0699f88da6ba10396341ed29f 100644 (file)
@@ -7,7 +7,7 @@
 
 
 #include "AliGenerator.h"
-#include <TChain.h>
+class TChain;
 
 class TTree;
 
index b27af24a5770befadf4293f64e150079119fabbd..b18eb0378f8774d60096b7d7d1324a75500e7b01 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2000/10/02 15:17:54  morsch
+Unused includes removed.
+
 Revision 1.1  2000/06/09 20:24:00  morsch
 Same class as previously in AliSimpleGen.cxx
 All coding rule violations except RS3 corrected (AM)
@@ -83,7 +86,7 @@ void AliGenFixed::Generate()
   Int_t i, nt;
   //
   for(i=0;i<fNpart;i++) {
-    gAlice->SetTrack(fTrackIt,-1,fIpart,p,fOrigin.GetArray(),polar,0,"Primary",nt);
+    gAlice->SetTrack(fTrackIt,-1,fIpart,p,fOrigin.GetArray(),polar,0,kPPrimary,nt);
   }
 }
   
index fb923d3b83b1c1a9c5837eac638f0efd4b532404..a1da695b473bfddeb1aa173d195ff10a9d91e01d 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.1  2000/06/15 08:48:43  morsch
+AliGenGSIlib with parametersations for GSI physics simulation added (YF, MI)
+
 Revision 1.7  2000/05/02 08:12:13  morsch
 Coding rule violations corrected.
 
@@ -23,8 +26,10 @@ Introduction of the Copyright and cvs Log
 
 */
 
+#include "TMath.h"
+#include "TString.h"
+
 #include "AliGenGSIlib.h"
-#include "AliRun.h"
 #include "iostream.h"
 
 ClassImp(AliGenGSIlib)
@@ -81,7 +86,7 @@ Double_t AliGenGSIlib::YUpsilonRitman(Double_t *py, Double_t *dummy)
 }
 //                 particle composition
 //
-Int_t AliGenGSIlib::IpUpsilonRitman()
+Int_t AliGenGSIlib::IpUpsilonRitman(TRandom *)
 {
 // y composition
   if (fgDebug) cout<<"Ritman Ip paramtrisation\n";
@@ -113,7 +118,7 @@ Double_t AliGenGSIlib::YUpsilonKarel(Double_t *py, Double_t *dummy)
 //                 particle composition
 //
 
-Int_t AliGenGSIlib::IpUpsilonKarel()
+Int_t AliGenGSIlib::IpUpsilonKarel(TRandom *)
 {
   // y composition//
   //to implement
@@ -153,7 +158,7 @@ Double_t AliGenGSIlib::YUpsilonMUON(Double_t *py, Double_t *dummy)
 }
 //                 particle composition
 //
-Int_t AliGenGSIlib::IpUpsilonMUON()
+Int_t AliGenGSIlib::IpUpsilonMUON(TRandom *)
 {
 // y composition
     return 553;
@@ -162,7 +167,7 @@ Int_t AliGenGSIlib::IpUpsilonMUON()
 
 typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
 
-typedef Int_t (*GenFuncIp) ();
+typedef Int_t (*GenFuncIp) (TRandom *);
 
 
 
index 24fcfd085163ac26f984a1612b3a3b4275e2393f..826738181a28c0cec100da9dc24e3d5762f797be 100644 (file)
@@ -6,6 +6,7 @@
 /* $Id$ */
 
 #include "AliGenLib.h"
+class TRandom;
 
 class AliGenGSIlib :public AliGenLib {
  public:
@@ -13,19 +14,19 @@ class AliGenGSIlib :public AliGenLib {
 // Upsilon RITMAN   
     static Double_t PtUpsilonRitman( Double_t *px, Double_t *dummy );
     static Double_t YUpsilonRitman(Double_t *py, Double_t *dummy);
-    static Int_t    IpUpsilonRitman();
+    static Int_t    IpUpsilonRitman(TRandom *ran);
 // Upsilon Karel
     static Double_t PtUpsilonKarel( Double_t *px, Double_t *dummy );
     static Double_t YUpsilonKarel(Double_t *py, Double_t *dummy);
-    static Int_t    IpUpsilonKarel();
+    static Int_t    IpUpsilonKarel(TRandom *ran);
 // YpsMUON
     static Double_t PtUpsilonMUON( Double_t *px, Double_t *dummy );
     static Double_t YUpsilonMUON(Double_t *py, Double_t *dummy);
-    static Int_t    IpUpsilonMUON();
+    static Int_t    IpUpsilonMUON(TRandom *ran);
 
 //
     typedef Double_t (*GenFunc)  (Double_t *, Double_t *);
-    typedef Int_t    (*GenFuncIp)();
+    typedef Int_t    (*GenFuncIp)(TRandom *ran);
     
     GenFunc   GetPt(Param_t param, const char * tname=0);
     GenFunc   GetY(Param_t param,  const char * tname=0);
index c2a60c03247b89382e2a51ddc90ac002582f01ce..e5d7bc270e5fcb70b943b82de32a82d01a334e2e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/10/02 21:28:06  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.2  2000/07/11 18:24:55  fca
 Coding convention corrections + few minor bug fixes
 
@@ -44,8 +47,8 @@ All coding rule violations except RS3 corrected (AM)
 ///////////////////////////////////////////////////////////////////
 
 #include "AliGenHIJINGpara.h"
+#include "TF1.h"
 #include "AliRun.h"
-#include "AliMC.h"
 #include "AliConst.h"
 #include "AliPDG.h"
 
@@ -257,7 +260,7 @@ void AliGenHIJINGpara::Generate()
     //
     for (j=0;j<3;j++) origin[j]=fOrigin[j];
     if(fVertexSmear==kPerEvent) {
-       gMC->Rndm(random,6);
+       Rndm(random,6);
        for (j=0;j<3;j++) {
            origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
                TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
@@ -265,7 +268,7 @@ void AliGenHIJINGpara::Generate()
     }
     for(i=0;i<fNpart;i++) {
        while(1) {
-           gMC->Rndm(random,3);
+           Rndm(random,3);
            if(random[0]<kBorne) {
                part=kPions[Int_t (random[1]*3)];
                ptf=fPtpi;
@@ -286,13 +289,13 @@ void AliGenHIJINGpara::Generate()
            p[1]=pt*TMath::Sin(phi);
            p[2]=pl;
            if(fVertexSmear==kPerTrack) {
-               gMC->Rndm(random,6);
+               Rndm(random,6);
                for (j=0;j<3;j++) {
                    origin[j]=fOrigin[j]+fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
                        TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
                }
            }
-           gAlice->SetTrack(fTrackIt,-1,part,p,origin,polar,0,"Primary",nt,fParentWeight);
+           gAlice->SetTrack(fTrackIt,-1,part,p,origin,polar,0,kPPrimary,nt,fParentWeight);
            break;
        }
     }
index effa0faf5189666ceb264b2c2634273b9f92a7df..5350809f3ce5824f2d66a8df52d29fa24e4a5504 100644 (file)
@@ -6,7 +6,7 @@
 /* $Id$ */
 
 #include "AliGenerator.h"
-#include "TF1.h"
+class TF1;
 
 class AliGenHIJINGpara : public AliGenerator
 {
index 16ccf3d8492e1463c2f496a0f3e3be265fd5ae51..4eef63b879c4a448d93c6d91c7bb688e27c9b19f 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+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.
 
@@ -127,10 +130,12 @@ void AliGenHalo::Generate()
       p[1]=p0*ty;
       p[2]=p0*tz;
       fParentWeight=wgt;
-      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo+",nt,fParentWeight);
+      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo+",nt,fParentWeight);
       origin[2]=-origin[2];
       p[2]=-p[2];
-      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo-",nt,fParentWeight);
+      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo-",nt,fParentWeight);
       origin[2]=-origin[2];
       p[2]=-p[2];
   }
index 780427f2619e7db65775b12837b42db6e6a99ba8..ad9434f7b93c5d79fe1b8596428c7c622044a3bc 100644 (file)
 
 /*
 $Log$
+Revision 1.13  2000/11/09 17:40:27  morsch
+Possibility to select/unselect spectator protons and neutrons.
+Method SetSpectators(Int_t spect) added. (FCA, Ch. Oppedisano)
+
 Revision 1.12  2000/10/20 13:38:38  morsch
 Debug printouts commented.
 
@@ -60,7 +64,6 @@ AliGenerator interface class to HIJING using THijing (test version)
 #include "AliGenHijing.h"
 #include "AliGenHijingEventHeader.h"
 #include "AliRun.h"
-#include "AliMC.h"
 
 #include <TArrayI.h>
 #include <TParticle.h>
@@ -155,7 +158,7 @@ void AliGenHijing::Generate()
     fTrials=0;
     for (j=0;j<3;j++) origin0[j]=fOrigin[j];
     if(fVertexSmear==kPerEvent) {
-       gMC->Rndm(random,6);
+       Rndm(random,6);
        for (j=0;j<3;j++) {
            origin0[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
                TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
@@ -223,7 +226,7 @@ void AliGenHijing::Generate()
 //             printf("\n set track mother: %d %d %d %d %d %d ",i,imo, kf, nt+1, selected, hasSelectedDaughters);
 
                gAlice->SetTrack(0,imo,kf,p,origin,polar,
-                                tof,"Primary",nt);
+                                tof,kPPrimary,nt);
 // ... and keep it there
                gAlice->KeepTrack(nt);
 //
@@ -268,7 +271,8 @@ void AliGenHijing::Generate()
                }
 // Put particle on the stack
                gAlice->SetTrack(fTrackIt,imo,kf,p,origin,polar,
-                                tof,"Secondary",nt);
+                                tof,kPNoProcess,nt);
+//                              tof,"Secondary",nt);
 
 //             printf("\n set track final: %d %d %d",imo, kf, nt);
                gAlice->KeepTrack(nt);
@@ -481,6 +485,30 @@ AliGenHijing& AliGenHijing::operator=(const  AliGenHijing& rhs)
     return *this;
 }
 
+#ifndef WIN32
+# define rluget_hijing rluget_hijing_
+# define rluset_hijing rluset_hijing_
+# define rlu_hijing    rlu_hijing_
+# define type_of_call
+#else
+# define rluget_hijing RLUGET_HIJING
+# define rluset_hijing RLUSET_HIJING
+# define rlu_hijing    RLU_HIJING
+# define type_of_call _stdcall
+#endif
+
+
+extern "C" {
+  void type_of_call rluget_hijing(Int_t & /*lfn*/, Int_t & /*move*/)
+  {printf("Dummy version of rluget_hijing reached\n");}
+
+  void type_of_call rluset_hijing(Int_t & /*lfn*/, Int_t & /*move*/)
+  {printf("Dummy version of rluset_hijing reached\n");}
+
+  Double_t type_of_call rlu_hijing(Int_t & /*idum*/) 
+  {return sRandom->Rndm();}
+}
+
 
 
 
index a7c37a5017c652c28a7f54dd955b35e4df0ed54b..e6512bfccb8804d82b10618abf4aa65c8ed0f029 100644 (file)
@@ -8,10 +8,10 @@
 
 #include "AliGenerator.h"
 #include "GenTypeDefs.h"
-#include <THijing.h>
 #include <TString.h>
 #include <TArrayI.h>
 
+class THijing;
 class TArrayI;
 class TParticle;
 
index 10073beccc0928a09766f99b35139514d6795c3e..1d491d2ac371013ad77ba6c6d36cf66537e7c86f 100644 (file)
@@ -6,15 +6,17 @@
 /* $Id$ */
 
 #include <TObject.h>
+
 #include "GenTypeDefs.h"
+class TRandom;
 
 class AliGenLib :
-public TObject
+  public TObject
 {
  public:
 //
     typedef Double_t (*GenFunc)  (Double_t *, Double_t *);
-    typedef Int_t    (*GenFuncIp)();    
+    typedef Int_t    (*GenFuncIp)(TRandom *);    
     virtual GenFunc   GetPt(Param_t param, const char *tname)   = 0;
     virtual GenFunc   GetY (Param_t param, const char *tname)  = 0;
     virtual GenFuncIp GetIp(Param_t param, const char *tname)  = 0;    
index b86f9183f00077332cbd44a6674cae372e4626b4..53a4597f59cad7cb2c7d03cd5aecb83c48b7e087 100644 (file)
 
 /*
 $Log$
+Revision 1.10  2000/06/29 21:08:27  morsch
+All paramatrisation libraries derive from the pure virtual base class AliGenLib.
+This allows to pass a pointer to a library directly to AliGenParam and avoids the
+use of function pointers in Config.C.
+
 Revision 1.9  2000/06/14 15:20:56  morsch
 Include clean-up (IH)
 
@@ -29,8 +34,10 @@ Introduction of the Copyright and cvs Log
 
 */
 
+#include "TMath.h"
+#include "TRandom.h"
+
 #include "AliGenMUONlib.h"
-#include "AliMC.h"
 
 ClassImp(AliGenMUONlib)
 //
@@ -77,12 +84,10 @@ Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
 }
 //                 particle composition
 //
-Int_t AliGenMUONlib::IpPion()
+Int_t AliGenMUONlib::IpPion(TRandom *ran)
 {
 // Pion composition 
-    Float_t random[1];
-    gMC->Rndm(random,1);
-    if (random[0] < 0.5) {
+    if (ran->Rndm() < 0.5) {
        return  211;
     } else {
        return -211;
@@ -137,12 +142,10 @@ Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
 
 //                 particle composition
 //
-Int_t AliGenMUONlib::IpKaon()
+Int_t AliGenMUONlib::IpKaon(TRandom *ran)
 {
 // Kaon composition
-    Float_t random[1];
-    gMC->Rndm(random,1);
-    if (random[0] < 0.5) {
+    if (ran->Rndm() < 0.5) {
        return  321;
     } else {
        return -321;
@@ -183,7 +186,7 @@ Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
 }
 //                 particle composition
 //
-Int_t AliGenMUONlib::IpJpsi()
+Int_t AliGenMUONlib::IpJpsi(TRandom *)
 {
 // J/Psi composition
     return 443;
@@ -224,7 +227,7 @@ Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
 }
 //                 particle composition
 //
-Int_t AliGenMUONlib::IpUpsilon()
+Int_t AliGenMUONlib::IpUpsilon(TRandom *)
 {
 // y composition
     return 553;
@@ -250,7 +253,7 @@ Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
 }
 //                 particle composition
 //
-Int_t AliGenMUONlib::IpPhi()
+Int_t AliGenMUONlib::IpPhi(TRandom *)
 {
 // Phi composition
     return 41;
@@ -280,23 +283,23 @@ Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
     return YJpsi(px,dum);
 }
 
-Int_t AliGenMUONlib::IpCharm()
+Int_t AliGenMUONlib::IpCharm(TRandom *ran)
 {  
 // Charm composition
-    Float_t random[2];
+    Float_t random;
     Int_t ip;
 //    411,421,431,4122
-    gMC->Rndm(random,2);
-    if (random[0] < 0.5) {
+    random = ran->Rndm();
+    if (random < 0.5) {
        ip=411;
-    } else if (random[0] < 0.75) {
+    } else if (random < 0.75) {
        ip=421;
-    } else if (random[0] < 0.90) {
+    } else if (random < 0.90) {
        ip=431;
     } else {
        ip=4122;
     }
-    if (random[1] < 0.5) {ip=-ip;}
+    if (ran->Rndm() < 0.5) {ip=-ip;}
     
     return ip;
 }
@@ -326,22 +329,22 @@ Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
     return YJpsi(px,dum);
 }
 
-Int_t AliGenMUONlib::IpBeauty()
+Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
 {  
 // Beauty Composition
-    Float_t random[2];
+    Float_t random;
     Int_t ip;
-    gMC->Rndm(random,2);
-    if (random[0] < 0.5) {
+    random = ran->Rndm();
+    if (random < 0.5) {
        ip=511;
-    } else if (random[0] < 0.75) {
+    } else if (random < 0.75) {
        ip=521;
-    } else if (random[0] < 0.90) {
+    } else if (random < 0.90) {
        ip=531;
     } else {
        ip=5122;
     }
-    if (random[1] < 0.5) {ip=-ip;}
+    if (ran->Rndm() < 0.5) {ip=-ip;}
     
     return ip;
 }
@@ -414,7 +417,7 @@ GenFunc AliGenMUONlib::GetY(Param_t param, const char* tname)
     }
     return func;
 }
-typedef Int_t (*GenFuncIp) ();
+typedef Int_t (*GenFuncIp) (TRandom *);
 GenFuncIp AliGenMUONlib::GetIp(Param_t param,  const char* tname)
 {
 // Return pointer to particle type parameterisation
index d1eb4ae4479d4cca69655a0ffbfbc6725b956805..4c71e354eae72b5fdd4e64acfaa14b7165430c7c 100644 (file)
@@ -8,40 +8,40 @@
 #include "AliGenLib.h"
 
 class AliGenMUONlib :
-public AliGenLib
+  public AliGenLib
 {
  public:
 // pions
     static Double_t PtPion(Double_t *px, Double_t *dummy);
     static Double_t PtScal(Double_t pt, Int_t np);
     static Double_t YPion( Double_t *py, Double_t *dummy);
-    static Int_t    IpPion();
+    static Int_t    IpPion(TRandom *ran);
 // kaons
     static Double_t PtKaon(Double_t *px, Double_t *dummy);
     static Double_t YKaon( Double_t *py, Double_t *dummy);
-    static Int_t    IpKaon();
+    static Int_t    IpKaon(TRandom *ran);
 // Phi
     static Double_t PtPhi( Double_t *px, Double_t *dummy);
     static Double_t YPhi( Double_t *px, Double_t *dummy);
-    static Int_t    IpPhi();
+    static Int_t    IpPhi(TRandom *ran);
 // J/Psi     
     static Double_t PtJpsi( Double_t *px, Double_t *dummy);
     static Double_t YJpsi(Double_t *py, Double_t *dummy);
-    static Int_t    IpJpsi();
+    static Int_t    IpJpsi(TRandom *ran);
 // Upsilon    
     static Double_t PtUpsilon( Double_t *px, Double_t *dummy );
     static Double_t YUpsilon(Double_t *py, Double_t *dummy);
-    static Int_t    IpUpsilon();
+    static Int_t    IpUpsilon(TRandom *ran);
 //
 // Charm    
     static Double_t PtCharm( Double_t *px, Double_t *dummy );
     static Double_t YCharm(Double_t *py, Double_t *dummy);
-    static Int_t    IpCharm();
+    static Int_t    IpCharm(TRandom *ran);
 //
 // Beauty
     static Double_t PtBeauty( Double_t *px, Double_t *dummy );
     static Double_t YBeauty(Double_t *py, Double_t *dummy);
-    static Int_t    IpBeauty();
+    static Int_t    IpBeauty(TRandom *ran);
 //
     GenFunc   GetPt(Param_t param, const char* tname=0);
     GenFunc   GetY (Param_t param, const char* tname=0);
index 80141ab927f2e9040925288a2a349a53e1f542ba..3d8e95749f378b3c568a759c8800e3ef9d7d2559 100644 (file)
 
 /*
 $Log$
+Revision 1.5  2000/06/29 21:08:27  morsch
+All paramatrisation libraries derive from the pure virtual base class AliGenLib.
+This allows to pass a pointer to a library directly to AliGenParam and avoids the
+use of function pointers in Config.C.
+
 Revision 1.4  2000/06/14 15:21:05  morsch
 Include clean-up (IH)
 
@@ -51,8 +56,10 @@ New version from G.Martinez & A.Morsch
 //     martinez@subatech.in2p3.fr
 //======================================================================
 
+#include "TMath.h"
+#include "TRandom.h"
+
 #include "AliGenPHOSlib.h"
-#include "AliMC.h"
 
 ClassImp(AliGenPHOSlib)
 
@@ -105,21 +112,20 @@ ClassImp(AliGenPHOSlib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenPHOSlib::IpPion()
+ Int_t AliGenPHOSlib::IpPion(TRandom *ran)
 {
 //                 particle composition pi+, pi0, pi-
 //
 
-    Float_t random[1];
-    gMC->Rndm(random,1);
+    Float_t random = ran->Rndm();
 
-    if ( (3.*random[0])  < 1. ) 
+    if ( (3.*random)  < 1. ) 
     {
           return 211 ;
     } 
     else
     {  
-      if ( (3.*random[0]) >= 2.)
+      if ( (3.*random) >= 2.)
       {
          return -211 ;
       }
@@ -185,17 +191,16 @@ ClassImp(AliGenPHOSlib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenPHOSlib::IpKaon()
+ Int_t AliGenPHOSlib::IpKaon(TRandom *ran)
 {
 //                 particle composition
 //
 
-    Float_t random[1],random2[1];
-    gMC->Rndm(random,1);
-    gMC->Rndm(random2,1);
-    if (random2[0] < 0.5) 
+    Float_t random = ran->Rndm();
+    Float_t random2 = ran->Rndm();
+    if (random2 < 0.5) 
     {
-      if (random[0] < 0.5) {       
+      if (random < 0.5) {       
         return  321;   //   K+
       } else {
         return -321;   // K-
@@ -203,7 +208,7 @@ ClassImp(AliGenPHOSlib)
     }
     else
     {  
-      if (random[0] < 0.5) {       
+      if (random < 0.5) {       
         return  130;   // K^0 short
       } else {  
         return  310;   // K^0 long
@@ -238,7 +243,7 @@ ClassImp(AliGenPHOSlib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenPHOSlib::IpEta()
+ Int_t AliGenPHOSlib::IpEta(TRandom *)
 {
 //                 particle composition
 //
@@ -273,7 +278,7 @@ ClassImp(AliGenPHOSlib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenPHOSlib::IpOmega()
+ Int_t AliGenPHOSlib::IpOmega(TRandom *)
 {
 //                 particle composition
 //
@@ -308,7 +313,7 @@ ClassImp(AliGenPHOSlib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenPHOSlib::IpEtaprime()
+ Int_t AliGenPHOSlib::IpEtaprime(TRandom *)
 {
 //                 particle composition
 //
@@ -343,7 +348,7 @@ ClassImp(AliGenPHOSlib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenPHOSlib::IpPhi()
+ Int_t AliGenPHOSlib::IpPhi(TRandom *)
 {
 //                 particle composition
 //
@@ -378,17 +383,16 @@ ClassImp(AliGenPHOSlib)
   return ka*TMath::Exp(-ex);
 }
 
- Int_t AliGenPHOSlib::IpBaryon()
+ Int_t AliGenPHOSlib::IpBaryon(TRandom *ran)
 {
 //                 particle composition
 //
 
-    Float_t random[1],random2[1];
-    gMC->Rndm(random,1);
-    gMC->Rndm(random2,1);
-    if (random2[0] < 0.5) 
+    Float_t random = ran->Rndm();
+    Float_t random2 = ran->Rndm();
+    if (random2 < 0.5) 
     {
-      if (random[0] < 0.5) {       
+      if (random < 0.5) {       
         return  2212;   //   p
       } else {
         return -2212;   // pbar
@@ -396,7 +400,7 @@ ClassImp(AliGenPHOSlib)
     }
     else
     {  
-      if (random[0] < 0.5) {       
+      if (random < 0.5) {       
         return  2112;   // n
       } else {  
         return -2112;   // n bar
@@ -473,7 +477,7 @@ typedef Double_t (*GenFunc) (Double_t*,  Double_t*);
     }
     return func;
 }
-typedef Int_t (*GenFuncIp) ();
+typedef Int_t (*GenFuncIp) (TRandom *);
  GenFuncIp AliGenPHOSlib::GetIp(Param_t param,  const char* tname)
 {
 // Return pointer to particle composition
index 9827d86890ed9c6c93410c87d21dd03ca5eb73a1..8a01e2a15a4ee691d240ccb334d93acfce6af7ee 100644 (file)
@@ -6,6 +6,8 @@
 
 /* $Id$ */
 
+class TRandom;
+
 class AliGenPHOSlib :
 public AliGenLib
 {
@@ -14,31 +16,31 @@ public AliGenLib
     static Double_t PtPion(Double_t *px, Double_t *dummy);
     static Double_t PtScal(Double_t pt, Int_t np);
     static Double_t YPion( Double_t *py, Double_t *dummy);
-    static Int_t    IpPion();
+    static Int_t    IpPion(TRandom* ran);
 // kaons
     static Double_t PtKaon(Double_t *px, Double_t *dummy);
     static Double_t YKaon( Double_t *py, Double_t *dummy);
-    static Int_t    IpKaon();
+    static Int_t    IpKaon(TRandom* ran);
 // etas
     static Double_t PtEta(Double_t *px, Double_t *dummy);
     static Double_t YEta( Double_t *py, Double_t *dummy);
-    static Int_t    IpEta();
+    static Int_t    IpEta(TRandom *ran);
 // omegas
     static Double_t PtOmega(Double_t *px, Double_t *dummy);
     static Double_t YOmega( Double_t *py, Double_t *dummy);
-    static Int_t    IpOmega();
+    static Int_t    IpOmega(TRandom *ran);
 // etaprime
     static Double_t PtEtaprime(Double_t *px, Double_t *dummy);
     static Double_t YEtaprime( Double_t *py, Double_t *dummy);
-    static Int_t    IpEtaprime();
+    static Int_t    IpEtaprime(TRandom* ran);
 // phis
     static Double_t PtPhi(Double_t *px, Double_t *dummy);
     static Double_t YPhi( Double_t *py, Double_t *dummy);
-    static Int_t    IpPhi();
+    static Int_t    IpPhi(TRandom* ran);
 // baryons
     static Double_t PtBaryon(Double_t *px, Double_t *dummy);
     static Double_t YBaryon( Double_t *py, Double_t *dummy);
-    static Int_t    IpBaryon();
+    static Int_t    IpBaryon(TRandom *ran);
     
     GenFunc   GetPt(Param_t param, const char* tname=0);
     GenFunc   GetY (Param_t param, const char* tname=0);
index fcf3242209f03307593ce30df5f29ebafc885fa9..5c60ce474e1412f7d68fb2d6593ce4f1caa40f6a 100644 (file)
 
 /*
 $Log$
+Revision 1.1  2000/09/08 15:37:58  morsch
+pt and y-parameterisations for PMD physics simulation.
+THIS VERSION IS JUST A TEMPLATE THE PT AND Y DISTRIBUTIONS HAVE TO BE CORRECTED !!!!.
+
 */
 
 #include "AliGenPMDlib.h"
-#include "AliMC.h"
 #include "AliPDG.h"
+#include "TMath.h"
 
 ClassImp(AliGenPMDlib)
 //
@@ -75,7 +79,7 @@ Double_t AliGenPMDlib::YPi0( Double_t *py, Double_t *dummy)
 
 //                 particle composition
 //
-Int_t AliGenPMDlib::IpPi0()
+Int_t AliGenPMDlib::IpPi0(TRandom *)
 {
 // Pi0
     return kPi0;
@@ -135,7 +139,7 @@ Double_t AliGenPMDlib::YEta( Double_t *py, Double_t *dummy)
 
 //                 particle composition
 //
-Int_t AliGenPMDlib::IpEta()
+Int_t AliGenPMDlib::IpEta(TRandom *)
 {
     return 221;
 }
@@ -180,7 +184,7 @@ GenFunc AliGenPMDlib::GetY(Param_t param, const char* tname)
     return func;
 
 }
-typedef Int_t (*GenFuncIp) ();
+typedef Int_t (*GenFuncIp) (TRandom *);
 GenFuncIp AliGenPMDlib::GetIp(Param_t param,  const char* tname)
 {
 // Return pointer to particle type parameterisation
index b5d0549fd8eb400e772e5acc3a7da9264d8ccee8..d231d58c4760e5cd8586ce327ae0fc5c2b282ab3 100644 (file)
@@ -6,6 +6,7 @@
 /* $Id$ */
 
 #include "AliGenLib.h"
+class TRandom;
 
 class AliGenPMDlib :
 public AliGenLib
@@ -15,11 +16,11 @@ public AliGenLib
     static Double_t PtPi0(Double_t *px, Double_t *dummy);
     static Double_t PtScal(Double_t pt, Int_t np);
     static Double_t YPi0( Double_t *py, Double_t *dummy);
-    static Int_t    IpPi0();
+    static Int_t    IpPi0(TRandom *ran);
 // Etas
     static Double_t PtEta(Double_t *px, Double_t *dummy);
     static Double_t YEta( Double_t *py, Double_t *dummy);
-    static Int_t    IpEta();
+    static Int_t    IpEta(TRandom *ran);
 //
     GenFunc   GetPt(Param_t param, const char* tname=0);
     GenFunc   GetY (Param_t param, const char* tname=0);
index a6fa964e6ad024d4eb5065b8bef261ecd3c93fb4..b15b80c644b11ee05670cadbc73d354cee1fa7c9 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.24  2000/10/18 19:11:27  hristov
+Division by zero fixed
+
 Revision 1.23  2000/10/02 21:28:06  fca
 Removal of useless dependecies via forward declarations
 
@@ -65,8 +68,6 @@ Introduction of the Copyright and cvs Log
 #include "AliDecayerPythia.h"
 #include "AliGenMUONlib.h"
 #include "AliRun.h"
-#include "AliMC.h"
-#include "AliPythia.h"
 #include <TParticle.h>
 #include <TParticlePDG.h>
 #include <TDatabasePDG.h>
@@ -87,7 +88,6 @@ ClassImp(AliGenParam)
 //____________________________________________________________
 //____________________________________________________________
 AliGenParam::AliGenParam()
-                 :AliGenerator()
 {
 // Deafault constructor
     fPtPara = 0;
@@ -155,7 +155,7 @@ AliGenParam::AliGenParam(Int_t npart, Param_t param, char* tname):AliGenerator(n
 AliGenParam::AliGenParam(Int_t npart, Param_t param,
                          Double_t (*PtPara) (Double_t*, Double_t*),
                          Double_t (*YPara ) (Double_t* ,Double_t*),
-                        Int_t    (*IpPara) ())                  
+                        Int_t    (*IpPara) (TRandom *))                 
     :AliGenerator(npart)
 {
 // Constructor
@@ -306,7 +306,7 @@ void AliGenParam::Generate()
 // Calculating vertex position per event
   for (j=0;j<3;j++) origin0[j]=fOrigin[j];
   if(fVertexSmear==kPerEvent) {
-      gMC->Rndm(random,6);
+      Rndm(random,6);
       for (j=0;j<3;j++) {
          origin0[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
              TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
@@ -318,12 +318,12 @@ void AliGenParam::Generate()
       while(1) {
 //
 // particle type
-         Int_t iPart = fIpParaFunc();
+         Int_t iPart = fIpParaFunc(fRandom);
          fChildWeight=(fDecayer->GetPartialBranchingRatio(iPart))*fParentWeight;          
          TParticlePDG *particle = DataBase->GetParticle(iPart);
          Float_t am = particle->Mass();
 
-         gMC->Rndm(random,2);
+         Rndm(random,2);
 //
 // phi
          phi=fPhiMin+random[0]*(fPhiMax-fPhiMin);
@@ -355,7 +355,7 @@ void AliGenParam::Generate()
          p[1]=pt*TMath::Sin(phi);
          p[2]=pl;
          if(fVertexSmear==kPerTrack) {
-             gMC->Rndm(random,6);
+             Rndm(random,6);
              for (j=0;j<3;j++) {
                  origin0[j]=
                      fOrigin[j]+fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
@@ -428,13 +428,13 @@ void AliGenParam::Generate()
 //
 // parent
                  gAlice->
-                     SetTrack(0,-1,iPart,p,origin0,polar,0,"Primary",nt,wgtp);
+                     SetTrack(0,-1,iPart,p,origin0,polar,0,kPPrimary,nt,wgtp);
                  iparent=nt;
                  gAlice->KeepTrack(nt); 
                  for (i=0; i< ncsel; i++) {
                      gAlice->SetTrack(fTrackIt,iparent,kfch[i],
                                       &pch[i][0],och,polar,
-                                      0,"Decay",nt,wgtch);
+                                      0,kPDecay,nt,wgtch);
                      gAlice->KeepTrack(nt); 
                  }
              }  // Decays by Lujet
@@ -442,7 +442,7 @@ void AliGenParam::Generate()
          else  // nodecay option, so parent will be tracked by GEANT (pions, kaons, eta, omegas, baryons)
          {
            gAlice->
-               SetTrack(fTrackIt,-1,iPart,p,origin0,polar,0,"Primary",nt,wgtp);
+               SetTrack(fTrackIt,-1,iPart,p,origin0,polar,0,kPPrimary,nt,wgtp);
             ipa++; 
          }
          break;
index 938043626f12f8d0a37a0046c622659176e8937d..4520602d528674f97517ebd329e8a6bbf38125d8 100644 (file)
@@ -6,10 +6,10 @@
 /* $Id$ */
 
 #include "AliGenerator.h"
-#include "AliDecayer.h"
 #include "GenTypeDefs.h"
 #include <TArrayI.h>
 
+class AliDecayer;
 class AliPythia;
 class TParticle;
 class AliGenLib;
@@ -25,7 +25,7 @@ class AliGenParam : public AliGenerator
     AliGenParam(Int_t npart, Param_t param,
                Double_t (*PtPara)(Double_t*, Double_t*),
                Double_t (*YPara )(Double_t*, Double_t*),
-               Int_t    (*IpPara)()                      );
+               Int_t    (*IpPara)(TRandom*)           );
     AliGenParam(const AliGenParam &Param);
      
     virtual ~AliGenParam();
@@ -53,7 +53,7 @@ class AliGenParam : public AliGenerator
  protected:
     Double_t (*fPtParaFunc)(Double_t*, Double_t*); //! Pointer to Pt parametrisation function
     Double_t (*fYParaFunc )(Double_t*, Double_t*); //! Pointer to Y parametrisation function
-    Int_t    (*fIpParaFunc )();    //! Pointer to particle type parametrisation function
+    Int_t    (*fIpParaFunc )(TRandom*);    //! Pointer to particle type parametrisation function
     TF1* fPtPara;              // Transverse momentum parameterisation
     TF1* fYPara;               // Rapidity parameterisation
     Param_t     fParam;        // Parameterisation type 
index 50fbb57288465e5a3a4f94e13e2d77c1ac56af13..b8c869f68bd31a1b65ba537efcefbb5e7f3aaae8 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.25  2000/10/18 19:11:27  hristov
+Division by zero fixed
+
 Revision 1.24  2000/09/18 10:41:35  morsch
 Add possibility to use nuclear structure functions from PDF library V8.
 
@@ -271,7 +274,8 @@ void AliGenPythia::Generate()
                            pP[3] = massP;
                            gAlice->SetTrack(0,-1,-1,
                                             pP,originP,polar,
-                                            0,"Hard Scat.",ntP,fParentWeight);
+                                            0,kPPrimary,ntP,fParentWeight);
+//                                          0,"Hard Scat.",ntP,fParentWeight);
                            gAlice->KeepTrack(ntP);
                        }
                        nc++;
@@ -292,7 +296,7 @@ void AliGenPythia::Generate()
                          if (fForceDecay == nodecay) trackit = 1;
                            gAlice->SetTrack(trackit,ntP,kf,
                                             p,origin,polar,
-                                            0,"Primary",nt,fParentWeight);
+                                            0,kPPrimary,nt,fParentWeight);
                            gAlice->KeepTrack(nt);
                            Int_t iparent = nt;
 //
@@ -315,7 +319,7 @@ void AliGenPythia::Generate()
                                    Float_t tof=kconv*ichild->T();
                                    gAlice->SetTrack(fTrackIt, iparent, kf,
                                                     p,origin,polar,
-                                                    tof,"Decay",nt,fChildWeight);
+                                                    tof,kPDecay,nt,fChildWeight);
                                    gAlice->KeepTrack(nt);
                                  } // select child
                                } // child loop
@@ -342,7 +346,7 @@ void AliGenPythia::Generate()
                        origin[2]=origin0[2]+iparticle->Vz()/10.;
                        Float_t tof=kconv*iparticle->T();
                        gAlice->SetTrack(fTrackIt,-1,kf,p,origin,polar,
-                                        tof,"Primary",nt);
+                                        tof,kPPrimary,nt);
                        gAlice->KeepTrack(nt);
                } // select particle
            } // particle loop 
@@ -550,8 +554,18 @@ void AliGenPythia::Streamer(TBuffer &R__b)
 
 
 
+#ifndef WIN32
+#define pyr    pyr_
+#define pyrset pyrset_
+#define pyrget pyrget_
+#else
+#define pyr    PYR
+#define pyrset PYRSET
+#define pyrget PYRGET
+#endif
 
-
-
-
-
+extern "C" {
+  Double_t pyr(Int_t*) {return sRandom->Rndm();}
+  void pyrset(Int_t*,Int_t*) {}
+  void pyrget(Int_t*,Int_t*) {}
+}
index 31ce52a601940fffa3d4e42868340643d9f372c4..73b7b4fde357f862a5d4e97cd7d298de4ffd3983 100644 (file)
@@ -7,10 +7,10 @@
 
 
 #include "AliGenerator.h"
-#include "AliDecayer.h"
 #include "GenTypeDefs.h"
 #include <TArrayI.h>    
 
+class AliDecayer;
 class AliPythia;
 class TParticle;
 
index ca69cb926d278b5899055d9a217beb1dc14ac510..2ed0a4cb49b84b160c0ccc850c7477333ebcaaba 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.6  2000/10/02 21:28:06  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.5  2000/06/09 20:37:20  morsch
 All coding rule violations except RS3 corrected
 
@@ -28,7 +31,6 @@ Introduction of the Copyright and cvs Log
 
 #include "AliGenScan.h"
 #include "AliRun.h"
-#include "AliMC.h"
 
  ClassImp(AliGenScan)
     
@@ -125,7 +127,7 @@ void AliGenScan::Generate()
   for (Int_t ix=0; ix<fNx; ix++) {
       for (Int_t iy=0; iy<fNy; iy++) {
          for (Int_t iz=0; iz<fNz; iz++){
-             gMC->Rndm(random,6);
+             Rndm(random,6);
              origin[0]=fXmin+ix*dx+2*(random[0]-0.5)*fOsigma[0];
              origin[1]=fYmin+iy*dy+2*(random[1]-0.5)*fOsigma[1];
              origin[2]=fZmin+iz*dz+2*(random[2]-0.5)*fOsigma[2];            
@@ -135,7 +137,7 @@ void AliGenScan::Generate()
              p[0] = pmom*TMath::Cos(phi)*TMath::Sin(theta);
              p[1] = pmom*TMath::Sin(phi)*TMath::Sin(theta);
              p[2] = pmom*TMath::Cos(theta);
-             gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,"Primary",nt);
+             gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt);
          }
       }
   }
index dbc0c500d3f6741a0e0c559188274703a611cda6..e1b945b72ffb4bcb2ffeb56b531219c52878f685 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.11  2000/10/20 06:30:06  fca
+Use version 0 to avoid streamer generation
+
 Revision 1.10  2000/10/06 14:18:44  morsch
 Upper cut of prim. pT distribution set to 5. GeV
 
@@ -41,7 +44,6 @@ Introduction of the Copyright and cvs Log
 
 
 #include "AliPythia.h"
-#include "AliRun.h"
 
 ClassImp(AliPythia)
 
index adadabba648861eb3bf15b4b9bc93f4d459a838a..5aedaf919085ef9062c2bcc07289a122cc2cb43d 100644 (file)
@@ -22,7 +22,6 @@
 #pragma link C++ class  AliGenCocktail;
 #pragma link C++ class  AliGenCocktailEntry;
 #pragma link C++ class  AliGenExtFile;
-#pragma link C++ class  AliGenExtFileCH;
 #pragma link C++ class  AliGenScan;
 #pragma link C++ class  AliGenDoubleScan;
 #pragma link C++ class  AliPythia;
index bbcc0b46b2801554ddf00220c66bac01260c584a..6590865e0ec3eb2d818cbb9091be0f2bd965479b 100644 (file)
@@ -22,7 +22,9 @@ SRCS          = AliGenHIJINGpara.cxx AliGenBox.cxx AliGenFixed.cxx \
                AliDecayer.cxx AliDecayerPythia.cxx
 # C++ Headers
 
-HDRS          = $(SRCS:.cxx=.h) EVGENLinkDef.h
+HDRS          = $(SRCS:.cxx=.h) $(ALICE_ROOT)/include/THijing.h \
+               $(ROOTSYS)/include/TF1.h $(ROOTSYS)/include/TChain.h \
+               EVGENLinkDef.h
 
 # Library dictionary
 
index 6ca0e1f6c07449003b903a720da497ea72562c42..1db628c2477355ce42ce3a55a1e6b0f2899a843f 100644 (file)
@@ -7,7 +7,7 @@ include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
 
 PACKAGE = GEANT321
 
-GDIRS = gbase gcons gdraw geocad ggeom gheisha ghits ghrout ghutils giface \
+GDIRS := gbase gcons gdraw geocad ggeom gheisha ghits ghrout ghutils giface \
         giopa gkine gparal gphys gscan gstrag gtrak matx55 miface miguti \
         neutron peanut fiface cgpack fluka block comad erdecks erpremc
 
@@ -18,9 +18,10 @@ XDIRS = gxint cdf
 SRCS          =
 ##### MACROS #####
 
-GFSRC  = $(wildcard $(patsubst %,%/*.F,$(GDIRS))) gcinit.F
-GCSRC  = $(wildcard $(patsubst %,%/*.c,$(GDIRS))) 
-GCXXSRC        = $(wildcard $(patsubst %,%/*.cxx,$(GDIRS))) 
+GFSRC  := $(wildcard $(patsubst %,%/*.F,$(GDIRS))) gcinit.F
+GFSRC  := $(filter-out gtrak/grndm%.F,$(GFSRC))
+GCSRC  := $(wildcard $(patsubst %,%/*.c,$(GDIRS))) 
+GCXXSRC        := $(wildcard $(patsubst %,%/*.cxx,$(GDIRS))) 
 
 GSRC   = $(GFSRC) $(GCSRC)
 GFOBJ  = $(patsubst %.F,tgt_$(ALICE_TARGET)/%.o,$(GFSRC))
@@ -46,15 +47,17 @@ ALLOBJS       = $(OBJS) $(FOBJS) $(COBJS) $(DICTO)
 
 # C++ compilation flags
 
-CXXFLAGS      = $(CXXOPTS) $(CLIBCXXOPTS) $(CLIBDEFS) -I.
+CXXFLAGS      := $(CXXOPTS) $(CLIBCXXOPTS) $(CLIBDEFS) -I.
+CXXFLAGS      := $(filter-out -O%,$(CXXFLAGS))  
  
 # C compilation flags
 
-CFLAGS      = $(COPT) $(CLIBCOPT) $(CLIBDEFS) -I.
+CFLAGS      := $(COPT) $(CLIBCOPT) $(CLIBDEFS) -I.
  
 # FORTRAN compilation flags
 
-FFLAGS      = $(FOPT) $(CLIBFOPT) $(CLIBDEFS) -I.
+FFLAGS      := $(FOPT) $(CLIBFOPT) $(CLIBDEFS) -I.
+FFLAGS      := $(filter-out -O%,$(FFLAGS))  
  
 ##### TARGETS #####
  
index 8720aa53e2cefb1e26bb08f2ac788ec7171bda8c..21d75cc589043e92dc8ae6ad4ea0a8393339b91a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  1999/11/03 13:17:05  fca
+Have ProdProcess return const char*
+
 Revision 1.2  1999/09/29 09:24:19  fca
 Introduction of the Copyright and cvs Log
 
@@ -273,7 +276,7 @@ Int_t   AliGEODB::NSecondaries() const
 
 /***********************************************************************/
 
-const char* AliGEODB::ProdProcess() const 
+AliMCProcess AliGEODB::ProdProcess() const 
 {
     cout << " ProdProcess" << endl;
     return 0;
index 2218573d2065b467bbe8893525e3164e39b487bf..3863d6a79055eeb411af79f84c5a293a37945d21 100644 (file)
@@ -53,7 +53,7 @@ public:
   Bool_t TrackAlive() const;
   Int_t   NSecondaries() const;
   Int_t   CurrentEvent() const;
-  const char*  ProdProcess() const;
+  AliMCProcess  ProdProcess() const;
   void    GetSecondary(Int_t, Int_t&, Float_t*, Float_t*);
   void   StopTrack();
   void   StopEvent();
index 7ca9dd1a3cdb951af4c86ec2c3f69f5cf930482a..a6293bd403a820a63476eda7ac973cc9090d34c3 100644 (file)
@@ -12,7 +12,10 @@ PACKAGE = HIJING
 SRCS          =
 ##### MACROS #####
 
-FSRCS  = $(wildcard hipyset1_35/*.F) $(wildcard hijing1_36/*.F)
+FSRCS  := $(wildcard hipyset1_35/*.F) $(wildcard hijing1_36/*.F)
+FSRCS   := $(filter-out %rluget_hijing.F,$(FSRCS))
+FSRCS   := $(filter-out %rluset_hijing.F,$(FSRCS))
+FSRCS   := $(filter-out %rlu_hijing.F,$(FSRCS))
 
 FOBJS  = $(patsubst %.F,tgt_$(ALICE_TARGET)/%.o,$(FSRCS))
 
index 46b82e37b52df507252fa3a6c9125f7f0dbc244c..cfffeb5fec03980c01c953500207a257dd605af4 100644 (file)
@@ -45998,171 +45998,171 @@ C...Commonblocks.
       RETURN
       END
  
-C*********************************************************************
-C...PYR
-C...Generates random numbers uniformly distributed between
-C...0 and 1, excluding the endpoints.
-      FUNCTION PYR(IDUMMY)
-C...Double precision and integer declarations.
-      IMPLICIT DOUBLE PRECISION(A-H, O-Z)
-      IMPLICIT INTEGER(I-N)
-      INTEGER PYK,PYCHGE,PYCOMP
-C...Commonblocks.
-      COMMON/PYDATR/MRPY(6),RRPY(100)
-      SAVE /PYDATR/
-C...Equivalence between commonblock and local variables.
-      EQUIVALENCE (MRPY1,MRPY(1)),(MRPY2,MRPY(2)),(MRPY3,MRPY(3)),
-     &(MRPY4,MRPY(4)),(MRPY5,MRPY(5)),(MRPY6,MRPY(6)),
-     &(RRPY98,RRPY(98)),(RRPY99,RRPY(99)),(RRPY00,RRPY(100))
-C...Initialize generation from given seed.
-      IF(MRPY2.EQ.0) THEN
-        IJ=MOD(MRPY1/30082,31329)
-        KL=MOD(MRPY1,30082)
-        I=MOD(IJ/177,177)+2
-        J=MOD(IJ,177)+2
-        K=MOD(KL/169,178)+1
-        L=MOD(KL,169)
-        DO 110 II=1,97
-          S=0D0
-          T=0.5D0
-          DO 100 JJ=1,48
-            M=MOD(MOD(I*J,179)*K,179)
-            I=J
-            J=K
-            K=M
-            L=MOD(53*L+1,169)
-            IF(MOD(L*M,64).GE.32) S=S+T
-            T=0.5D0*T
-  100     CONTINUE
-          RRPY(II)=S
-  110   CONTINUE
-        TWOM24=1D0
-        DO 120 I24=1,24
-          TWOM24=0.5D0*TWOM24
-  120   CONTINUE
-        RRPY98=362436D0*TWOM24
-        RRPY99=7654321D0*TWOM24
-        RRPY00=16777213D0*TWOM24
-        MRPY2=1
-        MRPY3=0
-        MRPY4=97
-        MRPY5=33
-      ENDIF
-C...Generate next random number.
-  130 RUNI=RRPY(MRPY4)-RRPY(MRPY5)
-      IF(RUNI.LT.0D0) RUNI=RUNI+1D0
-      RRPY(MRPY4)=RUNI
-      MRPY4=MRPY4-1
-      IF(MRPY4.EQ.0) MRPY4=97
-      MRPY5=MRPY5-1
-      IF(MRPY5.EQ.0) MRPY5=97
-      RRPY98=RRPY98-RRPY99
-      IF(RRPY98.LT.0D0) RRPY98=RRPY98+RRPY00
-      RUNI=RUNI-RRPY98
-      IF(RUNI.LT.0D0) RUNI=RUNI+1D0
-      IF(RUNI.LE.0D0.OR.RUNI.GE.1D0) GOTO 130
-C...Update counters. Random number to output.
-      MRPY3=MRPY3+1
-      IF(MRPY3.EQ.1000000000) THEN
-        MRPY2=MRPY2+1
-        MRPY3=0
-      ENDIF
-      PYR=RUNI
-      RETURN
-      END
-C*********************************************************************
-C...PYRGET
-C...Dumps the state of the random number generator on a file
-C...for subsequent startup from this state onwards.
-      SUBROUTINE PYRGET(LFN,MOVE)
-C...Double precision and integer declarations.
-      IMPLICIT DOUBLE PRECISION(A-H, O-Z)
-      IMPLICIT INTEGER(I-N)
-      INTEGER PYK,PYCHGE,PYCOMP
-C...Commonblocks.
-      COMMON/PYDATR/MRPY(6),RRPY(100)
-      SAVE /PYDATR/
-C...Local character variable.
-      CHARACTER CHERR*8
-C...Backspace required number of records (or as many as there are).
-      IF(MOVE.LT.0) THEN
-        NBCK=MIN(MRPY(6),-MOVE)
-        DO 100 IBCK=1,NBCK
-          BACKSPACE(LFN,ERR=110,IOSTAT=IERR)
-  100   CONTINUE
-        MRPY(6)=MRPY(6)-NBCK
-      ENDIF
-C...Unformatted write on unit LFN.
-      WRITE(LFN,ERR=110,IOSTAT=IERR) (MRPY(I1),I1=1,5),
-     &(RRPY(I2),I2=1,100)
-      MRPY(6)=MRPY(6)+1
-      RETURN
-C...Write error.
-  110 WRITE(CHERR,'(I8)') IERR
-      CALL PYERRM(18,'(PYRGET:) error when accessing file, IOSTAT ='//
-     &CHERR)
-      RETURN
-      END
-C*********************************************************************
-C...PYRSET
-C...Reads a state of the random number generator from a file
-C...for subsequent generation from this state onwards.
-      SUBROUTINE PYRSET(LFN,MOVE)
-C...Double precision and integer declarations.
-      IMPLICIT DOUBLE PRECISION(A-H, O-Z)
-      IMPLICIT INTEGER(I-N)
-      INTEGER PYK,PYCHGE,PYCOMP
-C...Commonblocks.
-      COMMON/PYDATR/MRPY(6),RRPY(100)
-      SAVE /PYDATR/
-C...Local character variable.
-      CHARACTER CHERR*8
-C...Backspace required number of records (or as many as there are).
-      IF(MOVE.LT.0) THEN
-        NBCK=MIN(MRPY(6),-MOVE)
-        DO 100 IBCK=1,NBCK
-          BACKSPACE(LFN,ERR=120,IOSTAT=IERR)
-  100   CONTINUE
-        MRPY(6)=MRPY(6)-NBCK
-      ENDIF
-C...Unformatted read from unit LFN.
-      NFOR=1+MAX(0,MOVE)
-      DO 110 IFOR=1,NFOR
-        READ(LFN,ERR=120,IOSTAT=IERR) (MRPY(I1),I1=1,5),
-     &  (RRPY(I2),I2=1,100)
-  110 CONTINUE
-      MRPY(6)=MRPY(6)+NFOR
-      RETURN
-C...Write error.
-  120 WRITE(CHERR,'(I8)') IERR
-      CALL PYERRM(18,'(PYRSET:) error when accessing file, IOSTAT ='//
-     &CHERR)
-      RETURN
-      END
+*C*********************************************************************
+* 
+*C...PYR
+*C...Generates random numbers uniformly distributed between
+*C...0 and 1, excluding the endpoints.
+* 
+*      FUNCTION PYR(IDUMMY)
+* 
+*C...Double precision and integer declarations.
+*      IMPLICIT DOUBLE PRECISION(A-H, O-Z)
+*      IMPLICIT INTEGER(I-N)
+*      INTEGER PYK,PYCHGE,PYCOMP
+*C...Commonblocks.
+*      COMMON/PYDATR/MRPY(6),RRPY(100)
+*      SAVE /PYDATR/
+*C...Equivalence between commonblock and local variables.
+*      EQUIVALENCE (MRPY1,MRPY(1)),(MRPY2,MRPY(2)),(MRPY3,MRPY(3)),
+*     &(MRPY4,MRPY(4)),(MRPY5,MRPY(5)),(MRPY6,MRPY(6)),
+*     &(RRPY98,RRPY(98)),(RRPY99,RRPY(99)),(RRPY00,RRPY(100))
+* 
+*C...Initialize generation from given seed.
+*      IF(MRPY2.EQ.0) THEN
+*        IJ=MOD(MRPY1/30082,31329)
+*        KL=MOD(MRPY1,30082)
+*        I=MOD(IJ/177,177)+2
+*        J=MOD(IJ,177)+2
+*        K=MOD(KL/169,178)+1
+*        L=MOD(KL,169)
+*        DO 110 II=1,97
+*          S=0D0
+*          T=0.5D0
+*          DO 100 JJ=1,48
+*            M=MOD(MOD(I*J,179)*K,179)
+*            I=J
+*            J=K
+*            K=M
+*            L=MOD(53*L+1,169)
+*            IF(MOD(L*M,64).GE.32) S=S+T
+*            T=0.5D0*T
+*  100     CONTINUE
+*          RRPY(II)=S
+*  110   CONTINUE
+*        TWOM24=1D0
+*        DO 120 I24=1,24
+*          TWOM24=0.5D0*TWOM24
+*  120   CONTINUE
+*        RRPY98=362436D0*TWOM24
+*        RRPY99=7654321D0*TWOM24
+*        RRPY00=16777213D0*TWOM24
+*        MRPY2=1
+*        MRPY3=0
+*        MRPY4=97
+*        MRPY5=33
+*      ENDIF
+* 
+*C...Generate next random number.
+*  130 RUNI=RRPY(MRPY4)-RRPY(MRPY5)
+*      IF(RUNI.LT.0D0) RUNI=RUNI+1D0
+*      RRPY(MRPY4)=RUNI
+*      MRPY4=MRPY4-1
+*      IF(MRPY4.EQ.0) MRPY4=97
+*      MRPY5=MRPY5-1
+*      IF(MRPY5.EQ.0) MRPY5=97
+*      RRPY98=RRPY98-RRPY99
+*      IF(RRPY98.LT.0D0) RRPY98=RRPY98+RRPY00
+*      RUNI=RUNI-RRPY98
+*      IF(RUNI.LT.0D0) RUNI=RUNI+1D0
+*      IF(RUNI.LE.0D0.OR.RUNI.GE.1D0) GOTO 130
+* 
+*C...Update counters. Random number to output.
+*      MRPY3=MRPY3+1
+*      IF(MRPY3.EQ.1000000000) THEN
+*        MRPY2=MRPY2+1
+*        MRPY3=0
+*      ENDIF
+*      PYR=RUNI
+* 
+*      RETURN
+*      END
+* 
+*C*********************************************************************
+* 
+*C...PYRGET
+*C...Dumps the state of the random number generator on a file
+*C...for subsequent startup from this state onwards.
+* 
+*      SUBROUTINE PYRGET(LFN,MOVE)
+* 
+*C...Double precision and integer declarations.
+*      IMPLICIT DOUBLE PRECISION(A-H, O-Z)
+*      IMPLICIT INTEGER(I-N)
+*      INTEGER PYK,PYCHGE,PYCOMP
+*C...Commonblocks.
+*      COMMON/PYDATR/MRPY(6),RRPY(100)
+*      SAVE /PYDATR/
+*C...Local character variable.
+*      CHARACTER CHERR*8
+* 
+*C...Backspace required number of records (or as many as there are).
+*      IF(MOVE.LT.0) THEN
+*        NBCK=MIN(MRPY(6),-MOVE)
+*        DO 100 IBCK=1,NBCK
+*          BACKSPACE(LFN,ERR=110,IOSTAT=IERR)
+*  100   CONTINUE
+*        MRPY(6)=MRPY(6)-NBCK
+*      ENDIF
+* 
+*C...Unformatted write on unit LFN.
+*      WRITE(LFN,ERR=110,IOSTAT=IERR) (MRPY(I1),I1=1,5),
+*     &(RRPY(I2),I2=1,100)
+*      MRPY(6)=MRPY(6)+1
+*      RETURN
+* 
+*C...Write error.
+*  110 WRITE(CHERR,'(I8)') IERR
+*      CALL PYERRM(18,'(PYRGET:) error when accessing file, IOSTAT ='//
+*     &CHERR)
+* 
+*      RETURN
+*      END
+* 
+*C*********************************************************************
+* 
+*C...PYRSET
+*C...Reads a state of the random number generator from a file
+*C...for subsequent generation from this state onwards.
+* 
+*      SUBROUTINE PYRSET(LFN,MOVE)
+* 
+*C...Double precision and integer declarations.
+*      IMPLICIT DOUBLE PRECISION(A-H, O-Z)
+*      IMPLICIT INTEGER(I-N)
+*      INTEGER PYK,PYCHGE,PYCOMP
+*C...Commonblocks.
+*      COMMON/PYDATR/MRPY(6),RRPY(100)
+*      SAVE /PYDATR/
+*C...Local character variable.
+*      CHARACTER CHERR*8
+* 
+*C...Backspace required number of records (or as many as there are).
+*      IF(MOVE.LT.0) THEN
+*        NBCK=MIN(MRPY(6),-MOVE)
+*        DO 100 IBCK=1,NBCK
+*          BACKSPACE(LFN,ERR=120,IOSTAT=IERR)
+*  100   CONTINUE
+*        MRPY(6)=MRPY(6)-NBCK
+*      ENDIF
+* 
+*C...Unformatted read from unit LFN.
+*      NFOR=1+MAX(0,MOVE)
+*      DO 110 IFOR=1,NFOR
+*        READ(LFN,ERR=120,IOSTAT=IERR) (MRPY(I1),I1=1,5),
+*     &  (RRPY(I2),I2=1,100)
+*  110 CONTINUE
+*      MRPY(6)=MRPY(6)+NFOR
+*      RETURN
+* 
+*C...Write error.
+*  120 WRITE(CHERR,'(I8)') IERR
+*      CALL PYERRM(18,'(PYRSET:) error when accessing file, IOSTAT ='//
+*     &CHERR)
+* 
+*      RETURN
+*      END
+* 
 C*********************************************************************
  
 C...PYROBO
index 444deba761505d7ef9b5878156cb92a90c4b3417..3b64bd66948ce8f6ec219f41efd47a3f944212a4 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.7  2000/10/02 21:28:14  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.6  2000/07/12 08:56:25  fca
 Coding convention correction and warning removal
 
@@ -40,9 +43,7 @@ Introduction of the Copyright and cvs Log
 //End_Html
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
-#include <TClass.h>
-#include <TNode.h>
-#include <TRandom.h>
+
 #include <TTree.h>
 #include "TBrowser.h"
 
index 01ab9780c6dcf80c9df02336f5e1e5f750d2e7fe..e7b49b38e82727665dd2dba691b1c2fdfe289386 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.10  2000/10/02 21:28:14  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.9  2000/07/13 16:19:09  fca
 Mainly coding conventions + some small bug fixes
 
@@ -41,33 +44,25 @@ Introduction of the Copyright and cvs Log
 //                                                                      //
 //////////////////////////////////////////////////////////////////////////
 
-#include <TROOT.h>
 #include <TTree.h>
 #include <TButton.h>
 #include <TCanvas.h>
 #include <TView.h>
-#include <TText.h>
-#include <TPolyMarker3D.h>
 #include <TPaveLabel.h>
 #include <TPaveText.h>
-#include <TList.h>
 #include <TDiamond.h>
-#include <TNode.h>
 #include <TArc.h>
-#include <TTUBE.h>
 #include <TSlider.h>
 #include <TSliderBox.h>
 #include <TGaxis.h>
 #include <TVirtualX.h>
 #include <TMath.h>
-#include <X3DBuffer.h>
 
 #include "AliRun.h"
 #include "AliDetector.h"
 #include "AliDisplay.h"
 #include "AliPoints.h"
 #include "TParticle.h"
-#include "AliGeometry.h"
 #include "TGeometry.h"
 
 static const Float_t kptcutmax  = 2;
index 6c3c00aaccd42f1ef294d6c3c9f8cfc0fdc2869d..70c04e3a31de1d4eeae3e34206eb13cd774efe99 100644 (file)
 #include "TLorentzVector.h"
 #include "TArrayF.h"
 #include "TGenerator.h"
+#include "AliRndm.h"
 
 typedef enum { kNoSmear, kPerEvent, kPerTrack } VertexSmear_t;
 
-class AliGenerator : public TNamed
+class AliGenerator : public TNamed, public AliRndm
 {
 
  public:
index 530f325a916a6cde5c4b1b02f80724308aace549..9a43a5b5ca71ac367fb3cb0402f293074ed13af9 100644 (file)
 
 /*
 $Log$
+Revision 1.19  2000/10/26 14:13:05  morsch
+- Change from coordinates theta, phi to general coordinates Coor1 and Coor2.
+- Lego generator instance can be passed in constructor.
+
 Revision 1.18  2000/10/02 21:28:14  fca
 Removal of useless dependecies via forward declarations
 
@@ -88,7 +92,6 @@ Introduction of the Copyright and cvs Log
 
 #include "AliLego.h"
 #include "AliLegoGenerator.h"
-#include "AliRun.h"
 #include "AliConst.h"
 #include "AliMC.h"
 #include "TH2.h"
index a95fab6c3f613c474b75daf034ca2011b20804f3..bfda2539c5dbfb5156bb4e37519c360b44d5d1d2 100644 (file)
 
 /*
 $Log$
+Revision 1.3  2000/10/26 14:15:54  morsch
+- Base class now
+- Change from theta, phi to general coordinates Coor1, Coor2
+- PropagateCylinder: bug in calculation of distance to limiting radius corrected.
+
 Revision 1.2  2000/07/13 16:19:09  fca
 Mainly coding conventions + some small bug fixes
 
@@ -135,7 +140,7 @@ void AliLegoGenerator::Generate()
    
    Float_t polar[3]={0.,0.,0.};
    Int_t ntr;
-   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, "LEGO ray", ntr);
+   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, kPPrimary, ntr);
    
 }
 
index 5a4b679e0b919f0f407fde9ffc41119889250222..e5304b61e122e45a9ad37a458264c633b1e8ec00 100644 (file)
 
 /*
 $Log$
+Revision 1.1  2000/10/26 14:18:05  morsch
+Add new AliLegoGenerator classes:
+AliLegoGeneratorXYZ: carthesian binning
+AliLegoGeneratorEta: eta-phi binning
+
 */
 
 #include "AliLegoGeneratorEta.h"
@@ -75,6 +80,6 @@ void AliLegoGeneratorEta::Generate()
    
    Float_t polar[3]={0.,0.,0.};
    Int_t ntr;
-   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, "LEGO ray", ntr);
+   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, kPPrimary, ntr);
    
 }
index 36739cf5cebe6799874a3f4d10aca4e0ed388096..e1ea917a245dce9f4062e7425295c2f5ac31dae8 100644 (file)
@@ -19,6 +19,7 @@ class AliLegoGeneratorEta : public AliLegoGenerator
 {
 
  public:
+    virtual ~AliLegoGeneratorEta() {}
     virtual void    Generate();
     ClassDef(AliLegoGeneratorEta,1) //Lego GeneratorEta
 };
index a25576b0112c8e82925c2fc952db85a2e2ecc1a6..1897cfb408eec5611f4ace5b2a58f988da016d94 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2000/10/27 11:40:01  morsch
+Error in printouts corrected
+
 Revision 1.1  2000/10/27 08:13:02  morsch
 Lego generator for phi-z binning.
 
@@ -77,6 +80,6 @@ void AliLegoGeneratorPhiZ::Generate()
    
    Float_t polar[3]={0.,0.,0.};
    Int_t ntr;
-   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, "LEGO ray", ntr);
+   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, kPPrimary, ntr);
    
 }
index 0de3bf25d92fe2c5516a10aa551069eb14d3d6a8..d278e47df212f1bf269ce915ac3af65809ebc91d 100644 (file)
 
 /*
 $Log$
+Revision 1.1  2000/10/26 14:18:05  morsch
+Add new AliLegoGenerator classes:
+AliLegoGeneratorXYZ: carthesian binning
+AliLegoGeneratorEta: eta-phi binning
+
 */
 
 #include "AliLegoGeneratorXYZ.h"
@@ -123,7 +128,7 @@ void AliLegoGeneratorXYZ::Generate()
    
    Float_t polar[3]={0.,0.,0.};
    Int_t ntr;
-   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, "LEGO XYZ ray", ntr);
+   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, kPPrimary, ntr);
    
 }
 
index a69c6a3d1e12c25368477d92085ccab8bfc81096..6deb98b0511428b780cef368a4df51f79bd53962 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.6  2000/07/13 16:19:09  fca
+Mainly coding conventions + some small bug fixes
+
 Revision 1.5  2000/07/12 08:56:25  fca
 Coding convention correction and warning removal
 
@@ -51,3 +54,5 @@ AliMC::AliMC(const char *name, const char *title) : TNamed(name,title)
     gMC=this;
   }
 }
+
+
index 080405c7069808914cb8c1a00e21dc3d7c52cb4a..37cff1ebca6ae9bb51946ba9d69aa3b5c5f7b37a 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <TNamed.h>
-class TLorentzVector;
+#include <AliRndm.h>
+#include "AliMCProcess.h"
 
+class TLorentzVector;
 class AliMC;
 class AliDecayer;
 
-
 R__EXTERN AliMC *gMC;
 
-class AliMC : public TNamed 
+class AliMC : public TNamed, public AliRndm
 {
   public:
     AliMC(const char *name, const char *title);
-    AliMC() {}
-    virtual ~AliMC() {fgMC=gMC=0;}
+    AliMC() {fRandom=0;}
+    virtual ~AliMC() {fgMC=gMC=0;fRandom=0;}
   
     // static access method
     static AliMC* GetMC() { return fgMC; }
@@ -163,13 +164,12 @@ class AliMC : public TNamed
     virtual Int_t NSecondaries() const=0;
     virtual void  GetSecondary(Int_t isec, Int_t& particleId, 
                     TLorentzVector& position, TLorentzVector& momentum) =0;
-    virtual const char* ProdProcess() const =0; 
+    virtual AliMCProcess ProdProcess() const =0; 
 
     //
     // other (then geometry/step/run management) methods
     // ----------------------------------------------
     //
-    virtual void Rndm(Float_t* array, const Int_t size) const=0; 
     
     //
     // Geant3 specific methods
diff --git a/STEER/AliMCProcess.h b/STEER/AliMCProcess.h
new file mode 100644 (file)
index 0000000..7207f32
--- /dev/null
@@ -0,0 +1,104 @@
+#ifndef ALIMCPROCESS_H
+#define ALIMCPROCESS_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id $ */
+
+// 
+// List of MonteCarlo processes
+//
+
+static const Int_t kMaxMCProcess = 33;
+
+enum AliMCProcess
+{
+  kPPrimary,  // Primary interaction
+
+  kPMultipleScattering, // multiple scattering
+  kPEnergyLoss, // continuous energy loss
+  kPMagneticFieldL, // bending in mag. field
+  kPDecay, // particle decay
+  kPPair, // photon pair production or
+             // muon direct pair production
+  kPCompton, // Compton scattering
+  kPPhotoelectric, // photoelectric effect
+  kPBrem, // bremsstrahlung
+  kPDeltaRay, // delta-ray production
+  kPAnnihilation, // positron annihilation
+
+  kPHadronic, // hadronic interaction
+  kPEvaporation, // nuclear evaporation
+  kPNuclearFission, // nuclear fission
+  kPNuclearAbsorption, // nuclear absorption
+  kPPbarAnnihilation, // antiproton annihilation
+  kPNCapture, // neutron capture
+  kPHElastic, // hadronic elastic incoherent 
+             // scattering
+  kPHInhelastic, // hadronic inelastic scattering
+
+  kPMuonNuclear, // muon nuclear interaction
+
+  kPTOFlimit, // exceeded time of flight cut
+  kPPhotoFission, // nuclear photofission
+               
+  kPRayleigh, // Rayleigh scattering
+
+  kPNull, // no mechanism is active, usually at the entrance 
+             // of a new volume
+  kPStop, // particle has fallen below energy threshold
+             // and tracking stops
+  
+  kPLightAbsorption, // Cerenkov photon absorption
+  kPLightScattering, // Cerenkov photon  
+             // reflection/refraction
+  kStepMax, // step limited by STEMAX
+
+  kPCerenkov, // Cerenkov photon generation
+  kPFeedBackPhoton, //Feed back photon in RICH -- ALICE specific
+  kPLightReflection, // Cerenkov photon reflection
+  kPLightRefraction, // Cerenkov photon refraction
+  kPSynchrotron, // synchrotron radiation 
+             // generation
+  kPNoProcess // unknown process
+};
+
+static const char * const AliMCProcessName[kMaxMCProcess] = {
+  "Primary particle emission",
+  "Multiple scattering",
+  "Energy loss",
+  "Bending in magnetic field",
+  "Decay",
+  "Lepton pair production",
+  "Compton scattering",
+  "Photoelectric effect",
+  "Bremstrahlung",
+  "Delta ray",
+  "Positron annihilation",
+  "Hadronic interaction",
+  "Nuclear evaporation",
+  "Nuclear fission",
+  "Nuclear absorbtion",
+  "Antiproton annihilation",
+  "Neutron capture",
+  "Hadronic elastic",
+  "Hadronic inelastic",
+  "Muon nuclear interaction",
+  "Time of flight limit",
+  "Nuclear photofission",
+  "Rayleigh effect",
+  "No active process",
+  "Energy threshold",
+  "Light absorption",
+  "Light scattering",
+  "Maximum allowed step",
+  "Cerenkov production",
+  "Cerenkov feed back photon",
+  "Cerenkov photon reflection",
+  "Cerenkov photon refraction",
+  "Synchrotron radiation"
+  "Unknown process"
+};
+
+#endif //ALIMCPROCESS_H
diff --git a/STEER/AliMCQA.cxx b/STEER/AliMCQA.cxx
new file mode 100644 (file)
index 0000000..aab642e
--- /dev/null
@@ -0,0 +1,147 @@
+/**************************************************************************
+ * 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 <strings.h>
+
+#include "TObjArray.h"
+#include "TH1.h"
+#include "TList.h"
+#include "TROOT.h"
+#include "TBrowser.h"
+#include "TMath.h"
+#include "TLorentzVector.h"
+#include "TDatabasePDG.h"
+#include "TMath.h"
+
+#include "AliMCQA.h"
+#include "AliRun.h"
+#include "AliModule.h"
+#include "AliMC.h"
+
+ClassImp(AliMCQA)
+
+
+//_____________________________________________________________________________
+AliMCQA::AliMCQA(Int_t ndets): fNdets(ndets)
+{
+  //
+  // Constructor, creates the list of lists of histograms
+  //
+  TList *list;
+
+  fQAList = new TObjArray(ndets);
+  TObjArray &hist = *fQAList;
+
+  char title[100];
+  //
+  TObjArray &mods = *(gAlice->Modules());
+  AliModule *mod;
+  TList *dir = gDirectory->GetList();
+  for (Int_t i=0; i<ndets; i++) {
+    hist[i] = list = new TList();
+    mod = (AliModule *) mods[i];
+
+    // Energy Spectrum
+    sprintf(title,"Spectrum entering: %s ",mod->GetName());
+    list->Add(new TH1F("hEnIn",strcat(title,mod->GetTitle()),100,-4,2));
+    dir->Remove(dir->FindObject("hEnIn"));
+
+    sprintf(title,"Spectrum exiting: %s ",mod->GetName());
+    list->Add(new TH1F("hEnOut",strcat(title,mod->GetTitle()),100,-4,2));
+    dir->Remove(dir->FindObject("hEnOut"));
+
+    // Z position
+    sprintf(title,"Z coordinate entering: %s ",mod->GetName());
+    list->Add(new TH1F("hZIn",strcat(title,mod->GetTitle()),100,
+                      mod->ZMin(),mod->ZMax()));
+    dir->Remove(dir->FindObject("hZIn"));
+
+    sprintf(title,"Z coordinate exiting: %s ",mod->GetName());
+    list->Add(new TH1F("hZOut",strcat(title,mod->GetTitle()),100,
+                      mod->ZMin(),mod->ZMax()));
+    dir->Remove(dir->FindObject("hZOut"));
+  }
+  //
+  gROOT->GetListOfBrowsables()->Add(this,"AliMCQA");
+
+  fDetDone = new Int_t[fNdets];
+}
+
+//_____________________________________________________________________________
+void AliMCQA::Browse(TBrowser *b)
+{
+  //
+  // Called when the item "Run" is clicked on the left pane
+  // of the Root browser.
+  // It displays the Root Trees and all detectors.
+  //
+
+  TIter next(fQAList);
+  TList *histos;
+  TH1 *hist;
+  while((histos = (TList*)next())) {
+    TIter next1(histos);
+    while((hist = (TH1*)next1())) {
+      b->Add(hist,hist->GetTitle());
+    }
+  }
+}
+
+//_____________________________________________________________________________
+void AliMCQA::PreTrack()
+{
+  fOldId=-1;
+  for(Int_t i=0; i<fNdets; i++) fDetDone[i]=0;
+}
+
+//_____________________________________________________________________________
+void AliMCQA::StepManager(Int_t id)
+{
+  if(fOldId != id) {
+    TH1F *hist;
+    TLorentzVector p, x;
+    gMC->TrackMomentum(p);
+    gMC->TrackPosition(x);
+    Double_t energy = TMath::Max(
+      p[3]-gAlice->PDGDB()->GetParticle(gMC->TrackPid())->Mass(),1.e-12);
+    if(fOldId > -1) {
+      if(!fDetDone[fOldId] && !gMC->IsNewTrack()) {
+       TList *histold = (TList*) (*fQAList)[fOldId];
+       hist = (TH1F*) histold->FindObject("hEnOut");
+       hist->Fill(TMath::Log10(energy));
+       hist = (TH1F*) histold->FindObject("hZOut");
+       hist->Fill(x[2]);
+       fDetDone[fOldId]=1;
+      }
+    }
+    if(!fDetDone[id] && !gMC->IsNewTrack()) {
+      TList *histnew = (TList*) (*fQAList)[id];
+      hist = (TH1F*) histnew->FindObject("hEnIn");
+      hist->Fill(TMath::Log10(energy));
+      hist = (TH1F*) histnew->FindObject("hZIn");
+      hist->Fill(x[2]);
+    }
+    fOldId=id;
+  }
+}
diff --git a/STEER/AliMCQA.h b/STEER/AliMCQA.h
new file mode 100644 (file)
index 0000000..91273f0
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef ALIMCQA_H
+#define ALIMCQA_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//   Quality assurance services for MC                                       //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TObject.h"
+class TObjArray;
+class TBrowser;
+
+class AliMCQA : public TObject
+{
+public:
+  AliMCQA() {}
+  AliMCQA(Int_t ndets);
+  virtual ~AliMCQA() {delete fQAList;fQAList=0;}
+  Bool_t  IsFolder() const {return kTRUE;}
+  virtual  void  Browse(TBrowser *b);
+  virtual  void  PreTrack();
+  virtual  TObjArray *GetQAList() const {return fQAList;}
+  
+  // QA step manager
+  virtual void StepManager(Int_t id);
+
+protected:
+  Int_t      fNdets;       // Number of detectors
+  TObjArray *fQAList;      // QA histograms
+  Int_t      fOldId;       //! ID of the current module
+  Int_t     *fDetDone;     //! Detector done flag 
+
+private:
+  AliMCQA(const AliMCQA &) {}
+  AliMCQA & operator=(const AliMCQA &) {return (*this);}
+
+  ClassDef(AliMCQA,1)  //Quality Assurance class for the MC
+};
+
+#endif 
+
index d145de1bbbb00df2757d7a7c6ece0b19acb5b88c..4953030f0503a09f107264da2cf9e905da13048b 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/11/10 18:09:55  fca
+New field map for the ZDC
+
 Revision 1.2  2000/07/12 08:56:25  fca
 Coding convention correction and warning removal
 
@@ -22,6 +25,7 @@ Revision 1.1  2000/07/11 18:24:59  fca
 Coding convention corrections + few minor bug fixes
 
 */
+#include "TVector.h"
 
 #include "AliMagFCM.h"
 #include "TSystem.h"
index 99395f5f6c94c9ae1a9cd8f2c44572dcfb5db4db..adf2055f9000e0d6c94af3ba660595c945b13c70 100644 (file)
@@ -6,7 +6,7 @@
 /* $Id$ */
 
 #include "AliMagF.h"
-#include "TVector.h"
+class TVector;
 
 class AliMagFCM : public AliMagF
 {
index 57afb02446db132fbf062e2671add8ea370ca99b..e09477e3624a5ba546857332e40577164cfd1dac 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.12  2000/10/02 21:28:14  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.11  2000/07/12 08:56:25  fca
 Coding convention correction and warning removal
 
@@ -50,15 +53,11 @@ Introduction of the Copyright and cvs Log
 //End_Html
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
-#include <TClass.h>
 #include <TNode.h>
-#include <TRandom.h>
 #include "TSystem.h"
 
 #include "AliModule.h"
 #include "AliRun.h"
-#include "AliHit.h"
-#include "AliPoints.h"
 #include "AliMagF.h"
 #include "AliMC.h"
 
@@ -113,6 +112,7 @@ AliModule::AliModule(const char* name,const char *title):TNamed(name,title)
   // Prepare to find the tracking media range
   fLoMedium = 65536;
   fHiMedium = 0;
+  SetDebug(gAlice->GetDebug());
 }
  
 //_____________________________________________________________________________
@@ -334,6 +334,18 @@ AliModule& AliModule::operator=(const AliModule &mod)
   return (*this);
 }
 
+//_____________________________________________________________________________
+Float_t AliModule::ZMin() const
+{
+  return -500;
+}
+
+//_____________________________________________________________________________
+Float_t AliModule::ZMax() const
+{
+  return 500;
+}
+
 //_____________________________________________________________________________
 void AliModule::SetEuclidFile(char* material, char* geometry)
 {
index 8edb4ac3ffcea55affbcd1bb1489e2a35957b073..a66e53d95b42c6d5a039b00565d9184f6c59da13 100644 (file)
@@ -8,13 +8,15 @@
 #include "TNamed.h"
 #include "TAttLine.h"
 #include "TAttMarker.h"
+#include "AliRndm.h"
 
 //#include <TSystem.h>
 class TClonesArray;
 class TBrowser;
 class TArrayI;
 
-class AliModule : public TNamed , public TAttLine, public TAttMarker {
+class AliModule : public TNamed , public TAttLine, public TAttMarker,
+                  public AliRndm {
 public:
 
   // Creators - distructors
@@ -38,6 +40,8 @@ public:
   virtual  Bool_t        IsFolder() const {return kTRUE;}
   virtual  Int_t&        LoMedium() {return fLoMedium;}
   virtual  Int_t&        HiMedium() {return fHiMedium;}
+  virtual  Int_t         GetDebug() const {return fDebug;}
+  virtual  void          SetDebug(Int_t deb=0) {fDebug=deb;}
 
   // Module composition
   virtual void AliMaterial(Int_t imat, const char* name, Float_t a, 
@@ -93,6 +97,8 @@ public:
   virtual Float_t     GetTimeGate() const {return 1.e10;}
   virtual void        StepManager() {}
   virtual void        SetBufferSize(Int_t) {}  
+  virtual Float_t     ZMin() const;
+  virtual Float_t     ZMax() const;
   virtual void        SetEuclidFile(char *material,char *geometry=0);
   virtual void ReadEuclid(const char *filnam, char *topvol);
   virtual void ReadEuclidMedia(const char *filnam);
@@ -113,6 +119,7 @@ protected:
   Bool_t        fActive;      //Detector activity flag
   TList        *fHistograms;  //List of histograms
   TList        *fNodes;       //List of geometry nodes
+  Int_t         fDebug;       //Debug flag
 
   ClassDef(AliModule,1)  //Base class for ALICE Modules
 };
index e03649a69c2f0f5260f18bb94950b112fe8df3ee..d8d21b9efb8620cca111a335383bcbc198198647 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.6  2000/10/02 21:28:14  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.5  2000/07/11 18:24:59  fca
 Coding convention corrections + few minor bug fixes
 
@@ -43,9 +46,8 @@ Y.Schutz new classes for reconstruction
 //*-- Author : Yves Schutz  SUBATECH 
 //////////////////////////////////////////////////////////////////////////////
 
-// --- ROOT system ---
 
-#include "TObjArray.h"
+// --- ROOT system ---
 
 // --- Standard library ---
 
index daf0a5df0fc8f7a27297e7d1af95c089d49802d0..473f8a9c6f658465ec199a694aab21649f67ef29 100644 (file)
@@ -15,8 +15,6 @@
 
 // --- Standard library ---
 
-#include "assert.h"
-#include "iostream.h"
 
 // --- ROOT system ---
 
diff --git a/STEER/AliRndm.cxx b/STEER/AliRndm.cxx
new file mode 100644 (file)
index 0000000..bb02a35
--- /dev/null
@@ -0,0 +1,85 @@
+/**************************************************************************
+ * 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 "TSystem.h"
+#include "TFile.h"
+
+#include "AliRndm.h"
+#include "TRandom3.h"
+
+ClassImp(AliRndm)
+
+
+//_____________________________________________________________________________
+void AliRndm::Rndm(Float_t* array, const Int_t size) const
+{
+  //
+  // Return an array of n random numbers uniformly distributed 
+  // between 0 and 1 not included
+  //
+  for(Int_t i=0; i<size; i++) 
+#ifdef CKNONE
+    array[i]=fRandom->Rndm();
+#else
+    do array[i]=fRandom->Rndm(); while(0>=array[i] || array[i]>=1);
+#endif
+}
+
+//_____________________________________________________________________________
+void AliRndm::SetRandom(TRandom *ran)
+{
+  if(ran) fRandom=ran;
+  else fRandom=sRandom=gRandom;
+}
+
+//_____________________________________________________________________________
+void AliRndm::ReadRandom(const char *filename)
+{
+  char *fntmp = gSystem->ExpandPathName(filename);
+  TFile *file = new TFile(fntmp,"r");
+  delete [] fntmp;
+  if(!file) {
+    printf("AliRndm:: Could not open file %s\n",filename);
+  } else {
+    if(!fRandom) fRandom = new TRandom();
+    fRandom->Read("Random");
+    file->Close();
+    delete file;
+  }
+}
+
+//_____________________________________________________________________________
+void AliRndm::WriteRandom(const char *filename) const
+{
+  char *fntmp = gSystem->ExpandPathName(filename);
+  TFile *file = new TFile(fntmp,"new");
+  delete [] fntmp;
+  if(!file) {
+    printf("AliRndm:: Could not open file %s\n",filename);
+  } else {
+    fRandom->Write();
+    file->Close();
+    delete file;
+  }
+}
diff --git a/STEER/AliRndm.h b/STEER/AliRndm.h
new file mode 100644 (file)
index 0000000..d3cb295
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef ALIRNDM_H
+#define ALIRNDM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//   Random Number Interface                                                 //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include <TRandom.h>
+
+static TRandom *sRandom;
+
+class AliRndm 
+{
+public:
+  AliRndm() {SetRandom();}
+  virtual ~AliRndm() {fRandom=sRandom=0;}
+  
+  // Random number generator bit
+  virtual void SetRandom(TRandom *ran=0);
+  virtual TRandom* GetRandom() const {return fRandom;}
+  virtual void Rndm(Float_t* array, const Int_t size) const; 
+#ifdef CKNONE
+  virtual Float_t Rndm() const {return fRandom->Rndm();}
+#else
+  virtual Float_t Rndm() const {
+    Float_t r;
+    do r=fRandom->Rndm(); while(0>=r || r>=1); return r;}
+#endif
+  virtual void WriteRandom(const char *filename) const;
+  virtual void ReadRandom(const char *filename);
+
+  protected:
+  TRandom *fRandom;       // Pointer to the random number generator
+
+  private:
+  AliRndm(const AliRndm &) {}
+  AliRndm & operator=(const AliRndm &) {return (*this);}
+
+  ClassDef(AliRndm,1)  //Random Number generator wrapper
+};
+
+#endif 
+
index 00f0d7f8b92fb6e7888c361264ea5ce57f643905..a90b4da0c33b30701370c626fcd17c0ed06d62c0 100644 (file)
 
 /*
 $Log$
+Revision 1.44  2000/10/26 13:58:59  morsch
+Add possibility to choose the lego generator (of type AliGeneratorLego or derived) when running
+RunLego(). Default is the base class AliGeneratorLego.
+
 Revision 1.43  2000/10/09 09:43:17  fca
 Special remapping of hits for TPC and TRD. End-of-primary action introduced
 
@@ -140,6 +144,10 @@ Introduction of the Copyright and cvs Log
 #include "AliMagFCM.h"
 #include "AliMagFDM.h"
 #include "AliHit.h"
+#include "TRandom3.h"
+#include "AliMCQA.h"
+#include "AliGenerator.h"
+#include "AliLegoGenerator.h"
 
 #include "AliDetector.h"
 
@@ -180,6 +188,9 @@ AliRun::AliRun()
   fPDGDB     = 0;        //Particle factory object!
   fHitLists  = 0;
   fConfigFunction    = "\0";
+  fRandom = 0;
+  fMCQA = 0;
+  fTransParName = "\0";
 }
 
 //_____________________________________________________________________________
@@ -207,6 +218,9 @@ AliRun::AliRun(const char *name, const char *title)
   fLego      = 0;
   fField     = 0;
   fConfigFunction    = "Config();";
+
+  // Set random number generator
+  gRandom = fRandom = new TRandom3();
   
   gROOT->GetListOfBrowsables()->Add(this,name);
   //
@@ -244,6 +258,8 @@ AliRun::AliRun(const char *name, const char *title)
   //
   // Create HitLists list
   fHitLists  = new TList();
+  //
+  SetTransPar();
 }
 
 
@@ -316,6 +332,7 @@ void AliRun::Browse(TBrowser *b)
   while((detector = (AliModule*)next())) {
     b->Add(detector,detector->GetName());
   }
+  b->Add(fMCQA,"AliMCQA");
 }
 
 //_____________________________________________________________________________
@@ -457,6 +474,30 @@ void AliRun::FillTree()
   if (fTreeR) fTreeR->Fill();
 }
  
+//_____________________________________________________________________________
+void AliRun::PreTrack()
+{
+     TObjArray &dets = *fModules;
+     AliModule *module;
+
+     for(Int_t i=0; i<=fNdets; i++)
+       if((module = (AliModule*)dets[i]))
+        module->PreTrack();
+
+     fMCQA->PreTrack();
+}
+
+//_____________________________________________________________________________
+void AliRun::PostTrack()
+{
+     TObjArray &dets = *fModules;
+     AliModule *module;
+
+     for(Int_t i=0; i<=fNdets; i++)
+       if((module = (AliModule*)dets[i]))
+        module->PostTrack();
+}
+
 //_____________________________________________________________________________
 void AliRun::FinishPrimary()
 {
@@ -907,6 +948,9 @@ void AliRun::InitMC(const char *setup)
   //=================Create Materials and geometry
   gMC->Init();
 
+  // Added also after in case of interactive initialisation of modules
+  fNdets = fModules->GetLast()+1;
+
    TIter next(fModules);
    AliModule *detector;
    while((detector = (AliModule*)next())) {
@@ -938,6 +982,8 @@ void AliRun::InitMC(const char *setup)
    
    fInitDone = kTRUE;
 
+   fMCQA = new AliMCQA(fNdets);
+
    //
    // Save stuff at the beginning of the file to avoid file corruption
    Write();
@@ -1026,7 +1072,13 @@ void AliRun::ResetGenerator(AliGenerator *generator)
 }
 
 //____________________________________________________________________________
-void AliRun::SetTransPar(char* filename)
+void AliRun::SetTransPar(char *filename)
+{
+  fTransParName = filename;
+}
+
+//____________________________________________________________________________
+void AliRun::ReadTransPar()
 {
   //
   // Read filename to set the transport parameters
@@ -1049,11 +1101,11 @@ void AliRun::SetTransPar(char* filename)
   FILE *lun;
   //
   // See whether the file is there
-  filtmp=gSystem->ExpandPathName(filename);
+  filtmp=gSystem->ExpandPathName(fTransParName.Data());
   lun=fopen(filtmp,"r");
   delete [] filtmp;
   if(!lun) {
-    Warning("SetTransPar","File %s does not exist!\n",filename);
+    Warning("ReadTransPar","File %s does not exist!\n",fTransParName.Data());
     return;
   }
   //
@@ -1089,7 +1141,7 @@ void AliRun::SetTransPar(char* filename)
     if(!iret) continue;
     if(iret<0) {
       //reading error
-      Warning("SetTransPar","Error reading file %s\n",filename);
+      Warning("ReadTransPar","Error reading file %s\n",fTransParName.Data());
       continue;
     }
     // Check that the module exist
@@ -1101,7 +1153,7 @@ void AliRun::SetTransPar(char* filename)
       if(0<=itmed && itmed < 100) {
        ktmed=idtmed[itmed];
        if(!ktmed) {
-         Warning("SetTransPar","Invalid tracking medium code %d for %s\n",itmed,mod->GetName());
+         Warning("ReadTransPar","Invalid tracking medium code %d for %s\n",itmed,mod->GetName());
          continue;
        }
        // Set energy thresholds
@@ -1121,11 +1173,11 @@ void AliRun::SetTransPar(char* filename)
          }
        }
       } else {
-       Warning("SetTransPar","Invalid medium code %d *\n",itmed);
+       Warning("ReadTransPar","Invalid medium code %d *\n",itmed);
        continue;
       }
     } else {
-      Warning("SetTransPar","Module %s not present\n",detName);
+      Warning("ReadTransPar","Module %s not present\n",detName);
       continue;
     }
   }
@@ -1523,7 +1575,7 @@ void AliRun::SetCurrentTrack(Int_t track)
 //_____________________________________________________________________________
 void AliRun::SetTrack(Int_t done, Int_t parent, Int_t pdg, Float_t *pmom,
                      Float_t *vpos, Float_t *polar, Float_t tof,
-                     const char* /* mecha */, Int_t &ntr, Float_t weight)
+                     AliMCProcess mech, Int_t &ntr, Float_t weight)
 { 
   //
   // Load a track on the stack
@@ -1564,10 +1616,9 @@ void AliRun::SetTrack(Int_t done, Int_t parent, Int_t pdg, Float_t *pmom,
   particle=new(particles[fNtrack]) TParticle(pdg,kS,parent,-1,kfirstdaughter,
                                             klastdaughter,pmom[0],pmom[1],pmom[2],
                                             e,vpos[0],vpos[1],vpos[2],tof);
-  //                                        polar[0],polar[1],polar[2],tof,
-  //                                        mecha,weight);
   ((TParticle*)particles[fNtrack])->SetPolarisation(TVector3(polar[0],polar[1],polar[2]));
   ((TParticle*)particles[fNtrack])->SetWeight(weight);
+  particle->SetUniqueID(mech);
   if(!done) particle->SetBit(kDoneBit);
   //Declare that the daughter information is valid
   ((TParticle*)particles[fNtrack])->SetBit(kDaughtersBit);
@@ -1616,7 +1667,10 @@ void AliRun::StepManager(Int_t id)
   
     //Call the appropriate stepping routine;
     AliModule *det = (AliModule*)fModules->At(id);
-    if(det) det->StepManager();
+    if(det) {
+      fMCQA->StepManager(id);
+      det->StepManager();
+    }
   }
 }
 
@@ -1658,6 +1712,14 @@ void AliRun::Streamer(TBuffer &R__b)
     } else {
       fConfigFunction="Config();";
     }
+    if(R__v>3) {
+      R__b >> fRandom;
+      gRandom = fRandom;
+      R__b >> fMCQA;
+    } else {
+      fRandom = gRandom = new TRandom3();
+      fMCQA = new AliMCQA();
+    }
   } else {
     R__b.WriteVersion(AliRun::IsA());
     TNamed::Streamer(R__b);
@@ -1675,5 +1737,7 @@ void AliRun::Streamer(TBuffer &R__b)
     R__b << fGenerator;
     R__b << fPDGDB;        //Particle factory object!
     fConfigFunction.Streamer(R__b);
+    R__b << fRandom;
+    R__b << fMCQA;
   }
 } 
index 5dbd721feea15db5919e6c5fe561fe36b111ad0c..567c864beed73bf172943a5b217722207ecfa3fe 100644 (file)
@@ -10,9 +10,13 @@ class TList;
 class TTree;
 class TGeometry;
 class TDatabasePDG;
+class TRandom;
+class AliMCQA;
 #include <TArrayI.h>
+#include "TClonesArray.h"
 #include <TArrayF.h>
 #include <TStopwatch.h>
+#include "TNamed.h"
 
 class AliDetector;
 class AliModule;
@@ -22,8 +26,9 @@ class AliLego;
 class AliDisplay;
 class AliLegoGenerator;
 #include "AliHeader.h"
-#include "AliGenerator.h"
-#include "AliLegoGenerator.h"
+class AliGenerator;
+class AliLegoGenerator;
+#include "AliMCProcess.h"
 
 enum {kKeepBit=1, kDaughtersBit=2, kDoneBit=4};
 
@@ -52,6 +57,8 @@ public:
    virtual  void  DumpPStack () const;
    virtual AliMagF *Field() const {return fField;}
    virtual  void  FillTree();
+   virtual  void  PreTrack();
+   virtual  void  PostTrack();
    virtual  void  FinishPrimary();
    virtual  void  FinishEvent();
    virtual  void  FinishRun();
@@ -64,6 +71,7 @@ public:
    Int_t          GetDebug() const {return fDebug;}
    AliModule     *GetModule(const char *name) const;
    AliDetector   *GetDetector(const char *name) const;
+   AliMCQA       *GetMCQA() const {return fMCQA;}
    Int_t          GetModuleID(const char *name) const;
    virtual  Int_t GetEvent(Int_t event);
    virtual  void  SetEvent(Int_t event) {fEvent=event;}
@@ -90,6 +98,7 @@ public:
    virtual  void  ResetHits();
    virtual  void  ResetPoints();
    virtual  void  SetTransPar(char *filename="$(ALICE_ROOT)/data/galice.cuts");
+   virtual  void  ReadTransPar();
    virtual  void  ResetStack() {fCurrent=-1;fHgwmk=0;fNtrack=0;fParticles->Clear();}
    virtual  void  RunMC(Int_t nevent=1, const char *setup="Config.C");
    virtual  void  Run(Int_t nevent=1, const char *setup="Config.C") 
@@ -105,7 +114,7 @@ public:
    virtual  void  SetField(Int_t type=2, Int_t version=1, Float_t scale=1, Float_t maxField=10, char*filename="$(ALICE_ROOT)/data/field01.dat");
    virtual  void  SetTrack(Int_t done, Int_t parent, Int_t pdg, 
                               Float_t *pmom, Float_t *vpos, Float_t *polar, 
-                               Float_t tof, const char *mecha, Int_t &ntr,
+                               Float_t tof, AliMCProcess mech, Int_t &ntr,
                                Float_t weight=1);
   virtual  void  KeepTrack(const Int_t itra);
    virtual  void  MediaTable();
@@ -159,13 +168,16 @@ protected:
   TArrayF       fSummEnergy;   //Energy per event in each volume
   TArrayF       fSum2Energy;   //Energy squared per event in each volume
   TString       fConfigFunction; //Configuration file to be executed
+  TRandom      *fRandom;       // Pointer to the random number generator
+  AliMCQA      *fMCQA;         //Pointer to MC Quality assurance class
+  TString       fTransParName; // Name of the transport parameters file
 
 private:
 
    AliRun(const AliRun &) {}
    AliRun& operator = (const AliRun &) {return *this;}
 
-   ClassDef(AliRun,3)      //Supervisor class for all Alice detectors
+   ClassDef(AliRun,4)      //Supervisor class for all Alice detectors
 };
  
 R__EXTERN  AliRun *gAlice;
index 990431e66df92567fbf6f976188dc97f3ec6c9a5..0a8c18f92e088f8397888e4a26ec957e2c459cf6 100644 (file)
@@ -16,12 +16,14 @@ SRCS          = AliDetector.cxx     AliHeader.cxx   AliMagF.cxx \
                AliGeometry.cxx AliRecPoint.cxx AliSegmentation.cxx \
                AliHitMap.cxx   AliMagFC.cxx    AliMagFCM.cxx \
                AliMagFDM.cxx   AliLegoGenerator.cxx AliLegoGeneratorXYZ.cxx\
-                AliLegoGeneratorEta.cxx \
-               AliKalmanTrack.cxx              AliCluster.cxx
+                AliLegoGeneratorEta.cxx        AliRndm.cxx \
+               AliKalmanTrack.cxx              AliCluster.cxx \
+               AliMCQA.cxx
 
 # C++ Headers
 
-HDRS          = $(SRCS:.cxx=.h) AliPDG.h $(ROOTSYS)/include/TH2.h STEERLinkDef.h 
+HDRS          = $(SRCS:.cxx=.h) AliPDG.h $(ROOTSYS)/include/TH2.h \
+                               $(ROOTSYS)/include/TRandom.h STEERLinkDef.h 
 
 # Library dictionary
 
@@ -64,7 +66,7 @@ $(DICT):                              $(HDRS)
 
 depend:                                        $(SRCS)
 
-HEADERS        = $(SRCS:.cxx=.h) AliPDG.h AliConst.h AliCallf77.h 
+HEADERS        = $(SRCS:.cxx=.h) AliPDG.h AliConst.h AliCallf77.h AliMCProcess.h
 
 TOCLEAN                = $(OBJS) *Cint.cxx *Cint.h
 
index 2583ec54a58a3dc44af43700f0e99f3ff0d2c13d..4814dbf83ef446c72f244b85c3a4e0827d622e5f 100644 (file)
@@ -39,6 +39,8 @@
 #pragma link C++ class  AliHitMap;
 #pragma link C++ class  AliCluster;
 #pragma link C++ class  AliKalmanTrack-;
+#pragma link C++ class  AliRndm;
+#pragma link C++ class  AliMCQA;
 #endif
 
 
index da4a512ccad4882f1b5a9f4978ec0878ab345e5c..3f02c2fcc5442fe0da866265f4c580b6e12016b9 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.12  2000/11/06 11:35:46  morsch
+Call BuildGeometry() after Init() to be able to share common detector parameters.
+
 Revision 1.11  2000/10/04 16:30:22  fca
 Add include for exit()
 
@@ -64,18 +67,15 @@ ReadEuclid moved from AliRun to AliModule
 #include "AliCallf77.h" 
 #include "AliModule.h"
 #include "AliMagF.h"
+#include "AliGenerator.h"
 
 #ifndef WIN32
 
 # define rxgtrak rxgtrak_
-# define rxstrak rxstrak_
-# define rxkeep  rxkeep_ 
 # define rxouth  rxouth_
 #else
 
 # define rxgtrak RXGTRAK 
-# define rxstrak RXSTRAK 
-# define rxkeep  RXKEEP  
 # define rxouth  RXOUTH
 #endif
 
@@ -205,61 +205,6 @@ extern "C" void type_of_call  rxgtrak (Int_t &mtrack, Int_t &ipart, Float_t *pmo
   mtrack++;
 }
 
-//_____________________________________________________________________________
-extern "C" void type_of_call 
-#ifndef WIN32
-rxstrak (Int_t &keep, Int_t &parent, Int_t &ipart, Float_t *pmom, 
-              Float_t *vpos, Float_t &tof, const char* cmech, Int_t &ntr, const int cmlen)
-#else
-rxstrak (Int_t &keep, Int_t &parent, Int_t &ipart, Float_t *pmom,
-        Float_t *vpos, Float_t &tof, const char* cmech, const int cmlen,
-        Int_t &ntr)
-#endif
-{
-  //
-  //     Fetches next track from the ROOT stack for transport. Called by GUKINE
-  //     and GUSTEP.
-  //
-  //              Status of the track. If keep=0 the track is put
-  //      keep    on the ROOT stack but it is not fetched for
-  //              transport.
-  //      parent  Parent track. If parent=0 the track is a primary.
-  //              In GUSTEP the routine is normally called to store
-  //              secondaries generated by the current track whose
-  //              ROOT stack number is MTRACK (common SCKINE.
-  //      ipart   Particle code in the GEANT conventions.
-  //      pmom[3] Particle momentum in GeV/c
-  //      vpos[3] Particle position
-  //      tof     Particle time of flight in seconds
-  //
-  //      cmech   (CHARACTER*10) Particle origin. This field is user
-  //              defined and it is not used inside the GALICE code.
-  //      ntr     Number assigned to the particle in the ROOT stack.
-  //
-  char mecha[11];
-  Float_t polar[3]={0.,0.,0.};
-  for(int i=0; i<10 && i<cmlen; i++) mecha[i]=cmech[i];
-  mecha[10]=0;
-  Int_t pdg=gMC->PDGFromId(ipart);
-  gAlice->SetTrack(keep, parent-1, pdg, pmom, vpos, polar, tof, mecha, ntr);
-  ntr++;
-}
-
-//_____________________________________________________________________________
-extern "C" void type_of_call  rxkeep(const Int_t &n)
-{
-  if( NULL==gAlice ) exit(1);
-  
-  if( n<=0 || n>gAlice->Particles()->GetEntries() )
-    {
-      printf("  Bad index n=%d must be 0<n<=%d\n",
-            n,gAlice->Particles()->GetEntries());
-      exit(1);
-    }
-  
-  ((TParticle*)(gAlice->Particles()->UncheckedAt(n-1)))->SetBit(kKeepBit);
-}
-
 //_____________________________________________________________________________
 extern "C" void type_of_call  rxouth ()
 {
@@ -269,7 +214,6 @@ extern "C" void type_of_call  rxouth ()
   gAlice->FinishPrimary();
 }
 
-
 #ifndef WIN32
 #  define gudigi gudigi_
 #  define guhadr guhadr_
@@ -728,20 +672,11 @@ void gutrak()
 //
 //    ------------------------------------------------------------------
 //
-     Int_t ndet = gAlice->Modules()->GetLast();
-     TObjArray &dets = *gAlice->Modules();
-     AliModule *module;
-     Int_t i;
-
-     for(i=0; i<=ndet; i++)
-       if((module = (AliModule*)dets[i]))
-        module->PreTrack();
+     gAlice->PreTrack();
 
      gtrack();
 
-     for(i=0; i<=ndet; i++)
-       if((module = (AliModule*)dets[i]))
-        module->PostTrack();
+     gAlice->PostTrack();
 }
 
 //______________________________________________________________________
@@ -796,7 +731,7 @@ void gustep()
   Int_t ipp, jk, id, nt;
   Float_t polar[3]={0,0,0};
   Float_t mom[3];
-  const char *kChproc;
+  AliMCProcess pProc;
 
   
   TGeant3* geant3 = (TGeant3*) gMC;
@@ -809,13 +744,13 @@ void gustep()
 
   // --- Add new created particles 
   if (gMC->NSecondaries() > 0) {
-    kChproc=gMC->ProdProcess();
+    pProc=gMC->ProdProcess();
     for (jk = 0; jk < geant3->Gcking()->ngkine; ++jk) {
       ipp = Int_t (geant3->Gcking()->gkin[jk][4]+0.5);
       // --- Skip neutrinos! 
       if (ipp != 4) {
        gAlice->SetTrack(1,gAlice->CurrentTrack(),gMC->PDGFromId(ipp), geant3->Gcking()->gkin[jk], 
-                        geant3->Gckin3()->gpos[jk], polar,geant3->Gctrak()->tofg, kChproc, nt);
+                        geant3->Gckin3()->gpos[jk], polar,geant3->Gctrak()->tofg, pProc, nt);
       }
     }
   }
@@ -830,7 +765,7 @@ void gustep()
                       geant3->Gckin2()->xphot[jk],     //position
                       &geant3->Gckin2()->xphot[jk][7], //polarisation
                       geant3->Gckin2()->xphot[jk][10], //time of flight
-                      "Cherenkov", nt);
+                      kPCerenkov, nt);
       }
   }
   // --- Particle leaving the setup ?
index cf07aedc1aa7f23fc9735963dd06a854e70337a9..d87dc654750647f807c1807986d75db83ba0f713 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.38  2000/10/30 15:19:06  morsch
+Xi(b) (pdg code 5232) added to Pdg data base.
+
 Revision 1.37  2000/10/02 21:28:16  fca
 Removal of useless dependecies via forward declarations
 
@@ -116,7 +119,7 @@ Introduction of the Copyright and cvs Log
 #include "AliCallf77.h" 
 #include "AliDecayer.h" 
 #include "TLorentzVector.h"
+
 #ifndef WIN32 
 # define gzebra  gzebra_ 
 # define grfile  grfile_ 
@@ -387,10 +390,12 @@ extern "C"
 
   void type_of_call gtreveroot(); 
 
-  void type_of_call grndm(Float_t *, const Int_t &); 
+  void type_of_call grndm(Float_t *r, const Int_t &n)
+  {gMC->Rndm(r,n);}
 
   void type_of_call grndmq(Int_t &, Int_t &, const Int_t &,
-                          DEFCHARD DEFCHARL); 
+                          DEFCHARD DEFCHARL)
+  {/*printf("Dummy grndmq called\n");*/}
 
   void type_of_call gdtom(Float_t *, Float_t *, Int_t &); 
 
@@ -1481,34 +1486,27 @@ Int_t   TGeant3::CurrentEvent() const
 }
 
 //_____________________________________________________________________________
-const char* TGeant3::ProdProcess() const
+AliMCProcess TGeant3::ProdProcess() const
 {
   //
   // Name of the process that has produced the secondary particles
   // in the current step
   //
-  static char proc[5];
   const Int_t kIpMec[13] = { 5,6,7,8,9,10,11,12,21,23,25,105,108 };
-  Int_t mec, km, im;
-  //
-  if(fGcking->ngkine>0) {
-    for (km = 0; km < fGctrak->nmec; ++km) {
-      for (im = 0; im < 13; ++im) {
-       if (fGctrak->lmec[km] == kIpMec[im]) {
-         mec = fGctrak->lmec[km];
-         if (0 < mec && mec < 31) {
-           strncpy(proc,(char *)&fGctrak->namec[mec - 1],4);
-         } else if (mec - 100 <= 30 && mec - 100 > 0) {
-           strncpy(proc,(char *)&fGctpol->namec1[mec - 101],4);
-         }
-         proc[4]='\0';
-         return proc;
-       }
-      }
-    }
-    strcpy(proc,"UNKN");
-  } else strcpy(proc,"NONE");
-  return proc;
+  const Int_t kIpProc[13] = { kPDecay, kPPair, kPCompton, 
+                             kPPhotoelectric, kPBrem, kPDeltaRay,
+                             kPAnnihilation, kPHadronic, 
+                             kPMuonNuclear, kPPhotoFission,
+                             kPRayleigh, kPCerenkov, kPSynchrotron};
+  Int_t km, im;
+  //
+  if(fGcking->ngkine>0) 
+    for (km = 0; km < fGctrak->nmec; ++km) 
+      for (im = 0; im < 13; ++im) 
+       if (fGctrak->lmec[km] == kIpMec[im]) 
+           return (AliMCProcess) kIpProc[im];
+  //  
+  return (AliMCProcess) kPNoProcess;
 }
 
 //_____________________________________________________________________________
@@ -1789,16 +1787,6 @@ Float_t TGeant3::Etot() const
   return fGctrak->getot;
 }
 
-//_____________________________________________________________________________
-void TGeant3::Rndm(Float_t* r, const Int_t n) const
-{
-  //
-  // Return an array of n random numbers uniformly distributed 
-  // between 0 and 1 not included
-  //
-  Grndm(r,n);
-}
-
 //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 //
 //                        Functions from GBASE
@@ -2417,17 +2405,17 @@ void  TGeant3::Grndm(Float_t *rvec, const Int_t len) const
   //
   //   To generate a vector RVECV of LEN random numbers 
   //   Copy of the CERN Library routine RANECU 
-  grndm(rvec,len);
+  Rndm(rvec,len);
 }
 
 //_____________________________________________________________________________
-void  TGeant3::Grndmq(Int_t &is1, Int_t &is2, const Int_t iseq,
-                     const Text_t *chopt)
+void  TGeant3::Grndmq(Int_t &/*is1*/, Int_t &/*is2*/, const Int_t /*iseq*/,
+                     const Text_t */*chopt*/)
 {
   //
   //  To set/retrieve the seed of the random number generator
   //
-  grndmq(is1,is2,iseq,PASSCHARD(chopt) PASSCHARL(chopt));
+  /*printf("Dummy grndmq called\n");*/
 }
 
 //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
@@ -4287,4 +4275,3 @@ void TGeant3::Streamer(TBuffer &R__b)
   }
 }
 
-
index 9c9e0afa420fcc8ffac3207bad9be33ba3a1547f..8fce1ed06aa5fa4fddc3a5bb8360bb822bd48cf0 100644 (file)
@@ -576,7 +576,7 @@ public:
   Bool_t IsTrackAlive() const;
   Int_t  NSecondaries() const;
   Int_t  CurrentEvent() const;
-  const char*  ProdProcess() const;
+  AliMCProcess  ProdProcess() const;
   void   GetSecondary(Int_t isec, Int_t& ipart, TLorentzVector &x, 
                      TLorentzVector &p);
   void   StopTrack();
@@ -596,7 +596,6 @@ public:
   virtual Int_t GetMedium() const;
   virtual Float_t Edep() const;
   virtual Float_t Etot() const;
-  virtual void    Rndm(Float_t* r, const Int_t n) const;
 
   virtual void   Material(Int_t& kmat, const char* name, Float_t a, Float_t z,
                           Float_t dens, Float_t radl, Float_t absl, 
index 047804188ccca3b2dbcf211872e5b88dd1bbf93d..fc520aed5d3740929f779264d54bdd693a1fde19 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.24  2000/09/14 07:08:42  fca
+Introducing glvolu in the interface
+
 Revision 1.23  2000/07/12 08:56:32  fca
 Coding convention correction and warning removal
 
@@ -113,7 +116,7 @@ Bool_t  TGeant3::IsTrackOut() const {return 0;}
 Bool_t  TGeant3::IsTrackDisappeared() const {return 0;}
 Bool_t  TGeant3::IsTrackStop() const {return 0;}
 Int_t   TGeant3::NSecondaries() const {return 0;}
-const char* TGeant3::ProdProcess() const {return 0;}
+AliMCProcess TGeant3::ProdProcess() const {return kPNoProcess;}
 void    TGeant3::GetSecondary(Int_t, Int_t&, 
                              TLorentzVector&, TLorentzVector&){}
 Float_t TGeant3::MaxStep() const {return 0;}
@@ -122,7 +125,6 @@ Int_t   TGeant3::CurrentEvent() const {return 0;}
 Int_t   TGeant3::GetMedium() const {return 0;}
 Float_t TGeant3::Edep() const {return 0;}
 Float_t TGeant3::Etot() const {return 0;}
-void    TGeant3::Rndm(Float_t*, const Int_t) const {}
 Float_t TGeant3::TrackStep() const {return 0;}
 Float_t TGeant3::TrackLength() const {return 0;}
 Float_t TGeant3::TrackTime() const {return 0;}
index fc7e0dc90918faad3ee842d971d52dd4ecc49914..c328074da6b22efe01a6f321ca2b253760e2d7eb 100644 (file)
@@ -4,12 +4,12 @@
 PLATFORM      = linux
 
 # The compilers
-CXX           = echo $*.cxx ; g++
+CXX           = echo $*.cxx ; g++ 
 F77          = echo $*.F ; g77
 CC           = echo $*.c ; gcc
 
 # Global optimisation
-OPT           = -O
+OPT           = -O -g
 
 # Shared library suffix
 SL           = so
index cdbf4ad1b262242e8a518782a1176e074b9d197e..25ab0c2dfcdd6c56cadf5dd590165fd00b8886e2 100644 (file)
@@ -5,8 +5,8 @@ void loadlibs ()
   gSystem->Load("$(ROOTSYS)/lib/libEG");
   gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTEER");
   gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTGeant3Dummy");
-  gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libhijing.so");
-  gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTHijing");
+  //  gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libhijing.so");
+  //  gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTHijing");
   gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libdummypythia6");
   gSystem->Load("$(ROOTSYS)/lib/libEGPythia6");
   gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libCONTAINERS");