+/**************************************************************************
+ * 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>
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,
// 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) {
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);
}
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);