/*
$Log$
+Revision 1.3 2001/07/27 17:09:36 morsch
+Use local SetTrack, KeepTrack and SetHighWaterMark methods
+to delegate either to local stack or to stack owned by AliRun.
+(Piotr Skowronski, A.M.)
+
Revision 1.2 2001/06/14 12:15:27 morsch
Bugs corrected. SetSide() method added.
Int_t inuc;
//
Int_t ipart, ncols, nt;
+ Int_t nskip = 0;
Int_t nread = 0;
while(1) {
ncols = fscanf(fFile,"%f %d %d %f %f %f %f %f %f",
&tx, &ty);
/*
printf(" \n %f %d %d %f %f %f %f %f %f",
- zPrimary, inuc, ipart, wgt,
- ekin, origin[0], origin[1],
- tx, ty);
+ zPrimary, inuc, ipart, wgt,
+ ekin, origin[0], origin[1],
+ tx, ty);
*/
+
if (ncols < 0) break;
- nread++;
+ nskip++;
+ if (fNpart !=-1 && nskip <= fNskip) continue;
+
+ nread++;
if (fNpart !=-1 && nread > fNpart) break;
-
-
amass = TDatabasePDG::Instance()->GetParticle(ipart)->Mass();
//
// Momentum vector
//
- p0=sqrt(ekin*ekin + 2.*amass);
+ p0=sqrt(ekin*ekin + 2.*amass*ekin);
txy=TMath::Sqrt(tx*tx+ty*ty);
if (txy == 1.) {
p[0]=p0*tx;
p[1]=p0*ty;
p[2]=-p0*tz;
-
- origin[2] = 21.965;
+
+ origin[2] = -2196.5;
//
//
origin[2] = -origin[2];
p[2] = -p[2];
}
-
+
SetTrack(0,-1,kProton,pP,originP,polar,0,kPNoProcess,ntP);
KeepTrack(ntP);
fParentWeight=wgt*GassPressureWeight(zPrimary);
//
// Assume particles come from two directions with same probability
- origin[2]=-origin[2];
- p[2]=-p[2];
- fParentWeight=wgt*GassPressureWeight(-zPrimary);
- SetTrack(fTrackIt,ntP,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
- origin[2]=-origin[2];
- p[2]=-p[2];
- origin[2]=-origin[2];
+ // Both Side are considered
+ if (fSide > 1) {
+ origin[2]=-origin[2];
+ p[2]=-p[2];
+ fParentWeight=wgt*GassPressureWeight(-zPrimary);
+ SetTrack(fTrackIt,ntP,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+ }
+
}
}
virtual void Generate();
virtual Float_t GassPressureWeight(Float_t zPrimary);
virtual void SetSide(Int_t flag = 1) {fSide = flag;}
-
+ virtual void SetNskip(Int_t nskip) {fNskip = nskip;}
+
AliGenHaloProtvino & operator=(const AliGenHaloProtvino & rhs);
protected:
FILE* fFile; // ! Pointer to file
TString fFileName; // Choose the file
Int_t fSide; // Muon arm side (1) / Castor side (-1)
+ Int_t fNskip; //
ClassDef(AliGenHaloProtvino,1) // LHC background boundary source (Protvino Group results)
};