]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TGeant3/AliGeant3.cxx
Small bug fixes to TPC files
[u/mrichter/AliRoot.git] / TGeant3 / AliGeant3.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.2  2000/02/29 19:11:17  fca
19 Move gucode into AliGeant3.cxx
20
21 Revision 1.1  2000/02/23 16:25:25  fca
22 AliVMC and AliGeant3 classes introduced
23 ReadEuclid moved from AliRun to AliModule
24
25 */
26
27 #include <TParticle.h>
28
29 #include "AliGeant3.h"
30 #include "AliRun.h"
31 #include "TGeant3.h"
32 #include "AliCallf77.h" 
33
34 #ifndef WIN32
35
36 # define rxgtrak rxgtrak_
37 # define rxstrak rxstrak_
38 # define rxkeep  rxkeep_ 
39 # define rxouth  rxouth_
40 #else
41
42 # define rxgtrak RXGTRAK 
43 # define rxstrak RXSTRAK 
44 # define rxkeep  RXKEEP  
45 # define rxouth  RXOUTH
46 #endif
47
48 ClassImp(AliGeant3)
49
50 AliGeant3::AliGeant3(const char *title) : 
51   TGeant3(title) {}
52
53 void AliGeant3::FinishGeometry()
54 {
55   TGeant3::FinishGeometry();
56   //Create the color table
57   SetColors();
58 }
59
60 void AliGeant3::Init()
61 {
62   //
63   //=================Create Materials and geometry
64   TObjArray *modules = gAlice->Modules();
65   TIter next(modules);
66   AliModule *detector;
67   while((detector = (AliModule*)next())) {
68     // Initialise detector materials and geometry
69     detector->CreateMaterials();
70     detector->CreateGeometry();
71     detector->BuildGeometry();
72     detector->Init();
73   }
74
75   //Terminate building of geometry
76   FinishGeometry();
77 }
78
79 //____________________________________________________________________________
80 void AliGeant3::ProcessRun(Int_t nevent)
81 {
82   Int_t todo = TMath::Abs(nevent);
83   for (Int_t i=0; i<todo; i++) {
84   // Process one run (one run = one event)
85      gAlice->Reset();
86      ProcessEvent();
87      gAlice->FinishEvent();
88   }
89 }
90
91 void AliGeant3::ProcessEvent()
92 {
93   Gtrigi();
94   Gtrigc();
95   Gtrig();
96 }
97
98 //_____________________________________________________________________________
99 void AliGeant3::SetColors()
100 {
101   //
102   // Set the colors for all the volumes
103   // this is done sequentially for all volumes
104   // based on the number of their medium
105   //
106   Int_t kv, icol;
107   Int_t jvolum=fGclink->jvolum;
108   //Int_t jtmed=fGclink->jtmed;
109   //Int_t jmate=fGclink->jmate;
110   Int_t nvolum=fGcnum->nvolum;
111   char name[5];
112   //
113   //    Now for all the volumes
114   for(kv=1;kv<=nvolum;kv++) {
115     //     Get the tracking medium
116     Int_t itm=Int_t (fZq[fZlq[jvolum-kv]+4]);
117     //     Get the material
118     //Int_t ima=Int_t (fZq[fZlq[jtmed-itm]+6]);
119     //     Get z
120     //Float_t z=fZq[fZlq[jmate-ima]+7];
121     //     Find color number
122     //icol = Int_t(z)%6+2;
123     //icol = 17+Int_t(z*150./92.);
124     //icol = kv%6+2;
125     icol = itm%6+2;
126     strncpy(name,(char*)&fZiq[jvolum+kv],4);
127     name[4]='\0';
128     Gsatt(name,"COLO",icol);
129   }
130 }
131
132 //_____________________________________________________________________________
133 //
134 //                 Interfaces to Fortran
135 //
136 //_____________________________________________________________________________
137
138 extern "C" void type_of_call  rxgtrak (Int_t &mtrack, Int_t &ipart, Float_t *pmom, 
139                                        Float_t &e, Float_t *vpos, Float_t *polar,
140                                        Float_t &tof)
141 {
142   //
143   //     Fetches next track from the ROOT stack for transport. Called by the
144   //     modified version of GTREVE.
145   //
146   //              Track number in the ROOT stack. If MTRACK=0 no
147   //      mtrack  more tracks are left in the stack to be
148   //              transported.
149   //      ipart   Particle code in the GEANT conventions.
150   //      pmom[3] Particle momentum in GeV/c
151   //      e       Particle energy in GeV
152   //      vpos[3] Particle position
153   //      tof     Particle time of flight in seconds
154   //
155   Int_t pdg;
156   gAlice->GetNextTrack(mtrack, pdg, pmom, e, vpos, polar, tof);
157   ipart = gMC->IdFromPDG(pdg);
158   mtrack++;
159 }
160
161 //_____________________________________________________________________________
162 extern "C" void type_of_call 
163 #ifndef WIN32
164 rxstrak (Int_t &keep, Int_t &parent, Int_t &ipart, Float_t *pmom, 
165                Float_t *vpos, Float_t &tof, const char* cmech, Int_t &ntr, const int cmlen)
166 #else
167 rxstrak (Int_t &keep, Int_t &parent, Int_t &ipart, Float_t *pmom,
168          Float_t *vpos, Float_t &tof, const char* cmech, const int cmlen,
169          Int_t &ntr)
170 #endif
171 {
172   //
173   //     Fetches next track from the ROOT stack for transport. Called by GUKINE
174   //     and GUSTEP.
175   //
176   //              Status of the track. If keep=0 the track is put
177   //      keep    on the ROOT stack but it is not fetched for
178   //              transport.
179   //      parent  Parent track. If parent=0 the track is a primary.
180   //              In GUSTEP the routine is normally called to store
181   //              secondaries generated by the current track whose
182   //              ROOT stack number is MTRACK (common SCKINE.
183   //      ipart   Particle code in the GEANT conventions.
184   //      pmom[3] Particle momentum in GeV/c
185   //      vpos[3] Particle position
186   //      tof     Particle time of flight in seconds
187   //
188   //      cmech   (CHARACTER*10) Particle origin. This field is user
189   //              defined and it is not used inside the GALICE code.
190   //      ntr     Number assigned to the particle in the ROOT stack.
191   //
192   char mecha[11];
193   Float_t polar[3]={0.,0.,0.};
194   for(int i=0; i<10 && i<cmlen; i++) mecha[i]=cmech[i];
195   mecha[10]=0;
196   Int_t pdg=gMC->PDGFromId(ipart);
197   gAlice->SetTrack(keep, parent-1, pdg, pmom, vpos, polar, tof, mecha, ntr);
198   ntr++;
199 }
200
201 //_____________________________________________________________________________
202 extern "C" void type_of_call  rxkeep(const Int_t &n)
203 {
204   if( NULL==gAlice ) exit(1);
205   
206   if( n<=0 || n>gAlice->Particles()->GetEntries() )
207     {
208       printf("  Bad index n=%d must be 0<n<=%d\n",
209              n,gAlice->Particles()->GetEntries());
210       exit(1);
211     }
212   
213   ((TParticle*)(gAlice->Particles()->UncheckedAt(n-1)))->SetBit(Keep_Bit);
214 }
215
216 //_____________________________________________________________________________
217 extern "C" void type_of_call  rxouth ()
218 {
219   //
220   // Called by Gtreve at the end of each primary track
221   //
222   gAlice->FinishPrimary();
223 }
224
225
226 #ifndef WIN32
227 #  define gudigi gudigi_
228 #  define guhadr guhadr_
229 #  define guout  guout_
230 #  define guphad guphad_
231 #  define gudcay gudcay_
232 #  define guiget guiget_
233 #  define guinme guinme_
234 #  define guinti guinti_
235 #  define gunear gunear_
236 #  define guskip guskip_
237 #  define guview guview_
238 #  define gupara gupara_
239 #  define gudtim gudtim_
240 #  define guplsh guplsh_
241 #  define gutrev gutrev_
242 #  define gutrak gutrak_
243 #  define guswim guswim_
244 #  define gufld  gufld_
245 #  define gustep gustep_
246 #  define gukine gukine_
247 #  define uglast uglast_
248
249 #  define gheish gheish_
250 #  define flufin flufin_
251 #  define gfmfin gfmfin_
252 #  define gpghei gpghei_
253 #  define fldist fldist_
254 #  define gfmdis gfmdis_
255 #  define ghelx3 ghelx3_
256 #  define ghelix ghelix_
257 #  define grkuta grkuta_
258 #  define gtrack gtrack_
259 #  define gtreve_root gtreve_root_
260 #  define glast  glast_
261
262 #else
263 #  define gudigi GUDIGI
264 #  define guhadr GUHADR
265 #  define guout  GUOUT
266 #  define guphad GUPHAD
267 #  define gudcay GUDCAY
268 #  define guiget GUIGET
269 #  define guinme GUINME
270 #  define guinti GUINTI
271 #  define gunear GUNEAR
272 #  define guskip GUSKIP
273 #  define guview GUVIEW
274 #  define gupara GUPARA
275 #  define gudtim GUDTIM
276 #  define guplsh GUPLSH
277 #  define gutrev GUTREV
278 #  define gutrak GUTRAK
279 #  define guswim GUSWIM
280 #  define gufld  GUFLD
281 #  define gustep GUSTEP
282 #  define gukine GUKINE
283 #  define uglast UGLAST
284
285 #  define gheish GHEISH
286 #  define flufin FLUFIN
287 #  define gfmfin GFMFIN
288 #  define gpghei GPGHEI
289 #  define fldist FLDIST
290 #  define gfmdis GFMDIS
291 #  define ghelx3 GHELX3
292 #  define ghelix GHELIX
293 #  define grkuta GRKUTA
294 #  define gtrack GTRACK
295 #  define gtreve_root GTREVE_ROOT
296 #  define glast  GLAST
297
298 #endif
299
300 extern "C" type_of_call void gheish();
301 extern "C" type_of_call void flufin();
302 extern "C" type_of_call void gfmfin();
303 extern "C" type_of_call void gpghei();
304 extern "C" type_of_call void fldist();
305 extern "C" type_of_call void gfmdis();
306 extern "C" type_of_call void ghelx3(Float_t&, Float_t&, Float_t*, Float_t*);
307 extern "C" type_of_call void ghelix(Float_t&, Float_t&, Float_t*, Float_t*);
308 extern "C" type_of_call void grkuta(Float_t&, Float_t&, Float_t*, Float_t*);
309 extern "C" type_of_call void gtrack();
310 extern "C" type_of_call void gtreve_root();
311 extern "C" type_of_call void glast();
312
313 extern "C" type_of_call {
314
315 //______________________________________________________________________
316 void gudigi() 
317 {
318 //
319 //    ******************************************************************
320 //    *                                                                *
321 //    *       User routine to digitize one event                       *
322 //    *                                                                *
323 //    *    ==>Called by : GTRIG                                        *
324 //    *                                                                *
325 //    ******************************************************************
326
327 }
328
329
330 //______________________________________________________________________
331 void guhadr()
332 {
333 //
334 //    ******************************************************************
335 //    *                                                                *
336 //    *       User routine to generate one hadronic interaction        *
337 //    *                                                                *
338 //    *    ==>Called by : GTHADR,GTNEUT                                *
339 //    *                                                                *
340 //    ******************************************************************
341 //
342 //
343 //    ------------------------------------------------------------------
344 //
345       TGeant3* geant3 = (TGeant3*) gMC;
346       Int_t ihadr=geant3->Gcphys()->ihadr;
347       if (ihadr<4)       gheish();
348       else if (ihadr==4) flufin();
349       else               gfmfin();
350 }
351
352 //______________________________________________________________________
353 void guout()
354 {
355 //
356 //    ******************************************************************
357 //    *                                                                *
358 //    *       User routine called at the end of each event             *
359 //    *                                                                *
360 //    *    ==>Called by : GTRIG                                        *
361 //    *                                                                *
362 //    ******************************************************************
363 //
364 //
365 //    ------------------------------------------------------------------
366 //
367 }
368
369 //______________________________________________________________________
370 void guphad()
371 {
372 //
373 //    ******************************************************************
374 //    *                                                                *
375 //    *       User routine to compute Hadron. inter. probabilities     *
376 //    *                                                                *
377 //    *    ==>Called by : GTHADR,GTNEUT                                *
378 //    *                                                                *
379 //    ******************************************************************
380 //
381 //
382 //    ------------------------------------------------------------------
383 //
384       TGeant3* geant3 = (TGeant3*) gMC;
385       Int_t ihadr=geant3->Gcphys()->ihadr;
386       if (ihadr<4)       gpghei();
387       else if (ihadr==4) fldist();
388       else               gfmdis();
389 }
390
391 //______________________________________________________________________
392 void gudcay()
393 {
394 //
395 //    ******************************************************************
396 //    *                                                                *
397 //    *       User routine to decay particles                          *
398 //    *                                                                *
399 //    *    ==>Called by : GDECAY                                       *
400 //    *                                                                *
401 //    ******************************************************************
402 //
403 //
404 //    ------------------------------------------------------------------
405 //
406 }
407
408 //______________________________________________________________________
409 void guiget(Int_t&, Int_t&, Int_t&)
410 {
411 //
412 //    ******************************************************************
413 //    *                                                                *
414 //    *       User routine for interactive control of GEANT            *
415 //    *                                                                *
416 //    *    ==>Called by : <GXINT>, GINCOM                              *
417 //    *                                                                *
418 //    ******************************************************************
419 //
420 //
421 //    ------------------------------------------------------------------
422 //
423 }
424
425 //______________________________________________________________________
426 void guinme(Float_t*, Int_t&, Float_t*, Int_t& IYES)
427 {
428 //
429 //    **********************************************
430 //    *                                            *
431 //    *    USER ROUTINE TO PROVIDE GINME FUNCTION  *
432 //    *    FOR ALL USER SHAPES IDENTIFIED BY THE   *
433 //    *    SHAPE NUMBER SH. POINT IS GIVEN IN X    *
434 //    *    THE PARAMETERS ARE GIVEN IN P. IYES IS  *
435 //    *    RETURNED 1 IF POINT IS IN, 0 IF POINT   *
436 //    *    IS OUT AND LESS THAN ZERO IF SHAPE      *
437 //    *    NUMBER IS NOT SUPPORTED.                *
438 //    *                                            *
439 //    *    ==>Called by : GINME                    *
440 //    *                                            *
441 //    **********************************************
442 //
443       IYES=-1;
444 }
445
446 //______________________________________________________________________
447 void guinti()
448 {
449 //
450 //    ******************************************************************
451 //    *                                                                *
452 //    *       User routine for interactive version                     *
453 //    *                                                                *
454 //    *    ==>Called by : <GXINT>,  GINTRI                             *
455 //    *                                                                *
456 //    ******************************************************************
457 //
458 //
459 //    ------------------------------------------------------------------
460 //
461 }
462
463 //______________________________________________________________________
464 void gunear(Int_t&, Int_t&, Float_t*, Int_t&)
465 {
466 //
467 //    ******************************************************************
468 //    *                                                                *
469 //    *    User search                                                 *
470 //    *       ISEARC to identify the given volume                      *
471 //    *       ICALL  to identify the calling routine                   *
472 //    *              1 GMEDIA like                                     *
473 //    *              2 GNEXT like                                      *
474 //    *       X      coordinates (+direction for ICALL=2)              *
475 //    *       JNEAR  address of default list of neighbours             *
476 //    *              (list to be overwriten by user)                   *
477 //    *                                                                *
478 //    *    Called by : GFTRAC, GINVOL, GTMEDI, GTNEXT, GNEXT, GMEDIA   *
479 //    *                                                                *
480 //    ******************************************************************
481 //
482 //
483 //    ------------------------------------------------------------------
484 //
485 }
486
487 //______________________________________________________________________
488 void guskip(Int_t& ISKIP)
489 {
490 //
491 //    ******************************************************************
492 //    *                                                                *
493 //    *   User routine to skip unwanted tracks                         *
494 //    *                                                                *
495 //    *   Called by : GSSTAK                                           *
496 //    *   Author    : F.Bruyant                                        *
497 //    *                                                                *
498 //    ******************************************************************
499 //
500 //
501 //    ------------------------------------------------------------------
502 //
503       ISKIP = 0;
504 }
505
506 //______________________________________________________________________
507 void guswim(Float_t& CHARGE, Float_t& STEP, Float_t* VECT, Float_t* VOUT)
508 {
509 //
510 //    ******************************************************************
511 //    *                                                                *
512 //    *       User routine to control tracking of one track            *
513 //    *       in a magnetic field                                      *
514 //    *                                                                *
515 //    *    ==>Called by : GTELEC,GTHADR,GTMUON                         *
516 //    *                                                                *
517 //    ******************************************************************
518 //
519 //
520 //    ------------------------------------------------------------------
521 //
522   TGeant3* geant3 = (TGeant3*) gMC;
523   Int_t ifield=geant3->Gctmed()->ifield;
524   Float_t fieldm=geant3->Gctmed()->fieldm;
525
526   if (ifield==3) {
527     Float_t fldcharge = fieldm*CHARGE;
528     ghelx3(fldcharge,STEP,VECT,VOUT);
529   }
530   else if (ifield==2) ghelix(CHARGE,STEP,VECT,VOUT);
531   else                grkuta(CHARGE,STEP,VECT,VOUT);
532 }
533
534 //______________________________________________________________________
535 void guview(Int_t&, Int_t&, DEFCHARD, Int_t& DEFCHARL)
536 {
537 //
538 //    ******************************************************************
539 //    *                                                                *
540 //    *       User routine for interactive version                     *
541 //    *                                                                *
542 //    *    ==>Called by : <GXINT>, GINC1                               *
543 //    *                                                                *
544 //    ******************************************************************
545 //
546 //
547 //    ------------------------------------------------------------------
548 //
549 }
550
551 //______________________________________________________________________
552 void gupara()
553 {
554 //
555 //    ******************************************************************
556 //    *                                                                *
557 //    *       User routine called every time a particle falls below    *
558 //    *       parametrization threshold. This routine should create    *
559 //    *       the parametrization stack, and, when this is full,       *
560 //    *       parametrize the shower and track the geantinos.          *
561 //    *                                                                *
562 //    *    ==>Called by : GTRACK                                       *
563 //    *                                                                *
564 //    ******************************************************************
565 //
566 //
567 //    ------------------------------------------------------------------
568 //
569 }
570
571 //______________________________________________________________________
572 Float_t gudtim(Float_t&, Float_t&, Int_t&, Int_t&)
573 {
574 //
575 //    ******************************************************************
576 //    *                                                                *
577 //    *       User function called by GCDRIF to return drift time      *
578 //    *                                                                *
579 //    *    ==>Called by : GCDRIF                                       *
580 //    *                                                                *
581 //    ******************************************************************
582 //
583 //
584 //    ------------------------------------------------------------------
585 //
586       return 0;
587 }
588
589
590 //______________________________________________________________________
591 Float_t guplsh(Int_t&, Int_t&)
592 {
593 //
594 //    ******************************************************************
595 //    *                                                                *
596 //    *                                                                *
597 //    *    ==>Called by : GLISUR                                       *
598 //    *                                                                *
599 //    ******************************************************************
600 //
601 //
602 //    ------------------------------------------------------------------
603 //
604 //
605 //*** By default this defines perfect smoothness
606       return 1;
607 }
608
609 //______________________________________________________________________
610 void gutrak()
611 {
612 //
613 //    ******************************************************************
614 //    *                                                                *
615 //    *       User routine to control tracking of one track            *
616 //    *                                                                *
617 //    *    ==>Called by : GTREVE                                       *
618 //    *                                                                *
619 //    ******************************************************************
620 //
621 //
622 //    ------------------------------------------------------------------
623 //
624      Int_t ndet = gAlice->Modules()->GetLast();
625      TObjArray &dets = *gAlice->Modules();
626      AliModule *module;
627      Int_t i;
628
629      for(i=0; i<=ndet; i++)
630        if((module = (AliModule*)dets[i]))
631          module->PreTrack();
632
633      gtrack();
634
635      for(i=0; i<=ndet; i++)
636        if((module = (AliModule*)dets[i]))
637          module->PostTrack();
638 }
639
640 //______________________________________________________________________
641 void gutrev()
642 {
643 //
644 //    ******************************************************************
645 //    *                                                                *
646 //    *       User routine to control tracking of one event            *
647 //    *                                                                *
648 //    *    ==>Called by : GTRIG                                        *
649 //    *                                                                *
650 //    ******************************************************************
651 //
652 //
653 //    ------------------------------------------------------------------
654 //
655   gtreve_root();
656 }
657
658
659 //______________________________________________________________________
660 void gufld(Float_t *x, Float_t *b)
661 {
662       if(gAlice->Field()) {
663          gAlice->Field()->Field(x,b);
664       } else {
665          printf("No mag field defined!\n");
666          b[0]=b[1]=b[2]=0;
667       }
668 }
669
670 //______________________________________________________________________
671 void gustep()
672 {
673 //
674 //    ******************************************************************
675 //    *                                                                *
676 //    *       User routine called at the end of each tracking step     *
677 //    *       INWVOL is different from 0 when the track has reached    *
678 //    *              a volume boundary                                 *
679 //    *       ISTOP is different from 0 if the track has stopped       *
680 //    *                                                                *
681 //    *    ==>Called by : GTRACK                                       *
682 //    *                                                                *
683 //    ******************************************************************
684 //
685
686
687   TLorentzVector x;
688   Float_t r;
689   Int_t ipp, jk, id, nt;
690   Float_t polar[3]={0,0,0};
691   Float_t mom[3];
692   const char *chproc;
693   
694   // --- Standard GEANT debug routine 
695   TGeant3* geant3 = (TGeant3*) gMC;
696   if(geant3->Gcflag()->idebug) geant3->Gdebug();
697
698   //     Stop particle if outside user defined tracking region 
699   gMC->TrackPosition(x);
700   r=TMath::Sqrt(x[0]*x[0]+x[1]*x[1]);
701   if (r > gAlice->TrackingRmax() || TMath::Abs(x[2]) > gAlice->TrackingZmax()) {
702         gMC->StopTrack();
703   }
704   // --- Add new created particles 
705   if (gMC->NSecondaries() > 0) {
706     chproc=gMC->ProdProcess();
707     for (jk = 0; jk < geant3->Gcking()->ngkine; ++jk) {
708       ipp = Int_t (geant3->Gcking()->gkin[jk][4]+0.5);
709       // --- Skip neutrinos! 
710       if (ipp != 4) {
711         gAlice->SetTrack(1,gAlice->CurrentTrack(),gMC->PDGFromId(ipp), geant3->Gcking()->gkin[jk], 
712                          geant3->Gckin3()->gpos[jk], polar,geant3->Gctrak()->tofg, chproc, nt);
713       }
714     }
715   }
716   // Cherenkov photons here
717   if ( geant3->Gckin2()->ngphot ) {
718     for (jk = 0; jk < geant3->Gckin2()->ngphot; ++jk) {
719       mom[0]=geant3->Gckin2()->xphot[jk][3]*geant3->Gckin2()->xphot[jk][6];
720       mom[1]=geant3->Gckin2()->xphot[jk][4]*geant3->Gckin2()->xphot[jk][6];
721       mom[2]=geant3->Gckin2()->xphot[jk][5]*geant3->Gckin2()->xphot[jk][6];
722       gAlice->SetTrack(1, gAlice->CurrentTrack(), gMC->PDGFromId(50),
723                        mom,                             //momentum
724                        geant3->Gckin2()->xphot[jk],     //position
725                        &geant3->Gckin2()->xphot[jk][7], //polarisation
726                        geant3->Gckin2()->xphot[jk][10], //time of flight
727                        "Cherenkov", nt);
728       }
729   }
730   // --- Particle leaving the setup ?
731   if (!gMC->IsTrackOut()) 
732     if ((id=gAlice->DetFromMate(geant3->Gctmed()->numed)) >= 0) gAlice->StepManager(id);
733 }
734
735 //______________________________________________________________________
736 void gukine ()
737 {
738 //
739 //    ******************************************************************
740 //    *                                                                *
741 //    *       Read or Generates Kinematics for primary tracks          *
742 //    *                                                                *
743 //    *    ==>Called by : GTRIG                                        *
744 //    *                                                                *
745 //    ******************************************************************
746 //
747 //
748 //    ------------------------------------------------------------------
749 //
750   gAlice->Generator()->Generate();
751 }
752
753
754 //______________________________________________________________________
755 void uglast()
756 {
757 //
758 //    ******************************************************************
759 //    *                                                                *
760 //    *       User routine called at the end of the run                *
761 //    *                                                                *
762 //    *    ==>Called by : GRUN                                         *
763 //    *                                                                *
764 //    ******************************************************************
765 //
766 //
767 }
768 }
769