]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenFLUKAsource.cxx
Remove unused files and add ifdef at the beginning of .h file
[u/mrichter/AliRoot.git] / EVGEN / AliGenFLUKAsource.cxx
index dceb7b2341cb2d742089e772bb22c044953da021..733cb64b1bd27f434342229e2e589f0be58eb8a1 100644 (file)
@@ -1,8 +1,27 @@
+/**************************************************************************
+ * 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 "AliGenFLUKAsource.h"
 #include "AliGenMUONlib.h"
 #include "AliMC.h"
 #include "AliRun.h"
-#include "AliConst.h"
+#include "AliPDG.h"
 
 #include <TDirectory.h>
 #include <TFile.h>
@@ -114,8 +133,6 @@ void AliGenFLUKAsource::FlukaInit()
 void AliGenFLUKAsource::Generate()
 {
 
-  AliMC* pMC = AliMC::GetMC();
-
   const Int_t ifluge[28]={kProton, kProtonBar, kElectron, kPositron,
                          kNuE, kNuEBar, kGamma, kNeutron, kNeutronBar,
                          kMuonPlus, kMuonMinus, kK0Long , kPiPlus, kPiMinus,
@@ -146,7 +163,7 @@ void AliGenFLUKAsource::Generate()
   // loop over number of particles
   Int_t nb=0;
   for (i=0; i<fNpart;i++) {
-    Int_t ev=pMC->CurrentEvent();
+    Int_t ev=gMC->CurrentEvent();
     Int_t entry=fNpart*(ev-1)+i; 
     nb = (Int_t)h2->GetEvent(entry); 
     if (irwn > nentries) {
@@ -191,7 +208,7 @@ void AliGenFLUKAsource::Generate()
        part=13;
     } else {
        part=ifluge[int(Ip)-1];
-       pMC->Gfpart(part, name, itrtyp,  
+       gMC->Gfpart(part, name, itrtyp,  
                   amass, charge, tlife); 
        prwn=sqrt(Ekin*Ekin + 2.*amass);
     }
@@ -207,13 +224,13 @@ void AliGenFLUKAsource::Generate()
     wgt = (part == 13) ? Wgt*fAddWeight : Wgt;
     iwgt=Int_t(wgt);
     fwgt=wgt-Float_t(iwgt);
-    pMC->Rndm(random,2);
+    gMC->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(1,-1,part,p,origin,polar,0,"Primary",nt);
-       pMC->Rndm(random,2);
+       gMC->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);