1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.3 2001/07/27 17:09:36 morsch
19 Use local SetTrack, KeepTrack and SetHighWaterMark methods
20 to delegate either to local stack or to stack owned by AliRun.
21 (Piotr Skowronski, A.M.)
23 Revision 1.2 2001/06/14 12:15:27 morsch
24 Bugs corrected. SetSide() method added.
26 Revision 1.1 2001/01/23 15:04:33 morsch
27 Generator to read beam halo file from Protvino group.
31 // Read background particles from a boundary source
32 // Very specialized generator to simulate background from beam halo.
33 // The input file is a text file specially prepared
35 // Author: andreas.morsch@cern.ch
37 #include "AliGenHaloProtvino.h"
42 #include <TDatabasePDG.h>
45 ClassImp(AliGenHaloProtvino)
46 AliGenHaloProtvino::AliGenHaloProtvino()
50 printf("\n Calling Default Constructor");
52 fName = "HaloProtvino";
53 fTitle = "Halo from LHC Tunnel";
61 AliGenHaloProtvino::AliGenHaloProtvino(Int_t npart)
65 printf("\n Calling Constructor");
67 fTitle= "Halo from LHC Tunnel";
74 AliGenHaloProtvino::AliGenHaloProtvino(const AliGenHaloProtvino & HaloProtvino)
80 //____________________________________________________________
81 AliGenHaloProtvino::~AliGenHaloProtvino()
86 //____________________________________________________________
87 void AliGenHaloProtvino::Init()
90 fFile = fopen(fFileName,"r");
92 printf("\n File %s opened for reading, %p ! \n ", fFileName.Data(), fFile);
94 printf("\n Opening of file %s failed, %p ! \n ", fFileName.Data(), fFile);
98 //____________________________________________________________
99 void AliGenHaloProtvino::Generate()
101 // Generate from input file
103 Float_t polar[3]= {0,0,0};
106 Float_t ekin, wgt, tx, ty, tz, txy;
111 Int_t ipart, ncols, nt;
115 ncols = fscanf(fFile,"%f %d %d %f %f %f %f %f %f",
116 &zPrimary, &inuc, &ipart, &wgt,
117 &ekin, &origin[0], &origin[1],
120 printf(" \n %f %d %d %f %f %f %f %f %f",
121 zPrimary, inuc, ipart, wgt,
122 ekin, origin[0], origin[1],
126 if (ncols < 0) break;
129 if (fNpart !=-1 && nskip <= fNskip) continue;
132 if (fNpart !=-1 && nread > fNpart) break;
134 amass = TDatabasePDG::Instance()->GetParticle(ipart)->Mass();
139 p0=sqrt(ekin*ekin + 2.*amass*ekin);
141 txy=TMath::Sqrt(tx*tx+ty*ty);
145 tz=-TMath::Sqrt(1.-txy);
158 Float_t originP[3] = {0., 0., 0.};
159 originP[2] = zPrimary;
161 Float_t pP[3] = {0., 0., 0.};
165 originP[2] = -zPrimary;
166 origin[2] = -origin[2];
170 SetTrack(0,-1,kProton,pP,originP,polar,0,kPNoProcess,ntP);
172 fParentWeight=wgt*GassPressureWeight(zPrimary);
173 SetTrack(fTrackIt,ntP,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
174 SetHighWaterMark(nt);
177 // Assume particles come from two directions with same probability
179 // Both Side are considered
181 origin[2]=-origin[2];
183 fParentWeight=wgt*GassPressureWeight(-zPrimary);
184 SetTrack(fTrackIt,ntP,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
191 AliGenHaloProtvino& AliGenHaloProtvino::operator=(const AliGenHaloProtvino& rhs)
193 // Assignment operator
198 Float_t AliGenHaloProtvino::GassPressureWeight(Float_t zPrimary)
200 // Return z-dependent gasspressure weight
202 Float_t weight = 500.;
204 if (zPrimary > 45000.) weight = 2.e4;
210 # Title: README file for the sources of IR8 machine induced background
211 # Author: Vadim Talanov <Vadim.Talanov@cern.ch>
212 # Modified: 12-12-2000
216 There are three files, named ring.one.beta.[01,10,50].m, which
217 contain the lists of background particles, induced by proton losses
218 upstream of IP8 in the LHC ring one, for the beta* values of 1, 10
219 and 50 m, respectively.
223 Each line in the files contains the coordinates of particle track
224 crossing with the infinite plane, positioned at z=-1m, together with
225 the physical properties of corresponding particle, namely:
227 S - S coordinate of the primary interaction vertex, cm;
228 N - type of the gas nuclei at interaction, 1 is H, 2 - C and 3 - O;
229 I - particle ID in PDG particle numbering scheme;
231 E - particle kinetic energy, GeV;
232 X - x coordinate of the crossing point, cm;
233 Y - y coordinate of the crossing point, cm;
234 Dx - x direction cosine;
235 Dy - y direction cosine.
239 Each file is given per unity of linear density of proton inelastic
240 interactions with the gas nuclei, [1 inelastic interaction/m].
242 # ~/vtalanov/public/README.mib: the end.