]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGenCocktailAfterBurner.h
Removing direct reference to ROOTSYS (K.Shileev)
[u/mrichter/AliRoot.git] / EVGEN / AliGenCocktailAfterBurner.h
1 #ifndef AliGenCocktailAfterBurner_H
2 #define AliGenCocktailAfterBurner_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 // Container class for AliGenerator through recursion.
9 // (Container is itself an AliGenerator)
10 // Author: piotr.skowronski@cern.ch 
11 //
12
13 #include <TMCProcess.h>
14
15 #include "AliGenCocktail.h"
16 #include "AliRun.h"
17
18 class AliGenCocktailEntry;
19 class AliStack;
20
21 class AliGenCocktailAfterBurner : public  AliGenCocktail
22 {
23 //container class for other generators
24 //extends AliGenCocktail functionality
25 //with possiblity of adding after-burners
26
27  public:
28     AliGenCocktailAfterBurner();
29     AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner& in);
30     virtual ~AliGenCocktailAfterBurner();
31     AliGenCocktailAfterBurner & operator=(const AliGenCocktailAfterBurner & rhs);
32     
33     virtual void  Init();
34     virtual void  Generate();
35     virtual void  SetTracks(Int_t stackno);
36     //
37     // Add a new generator to the list
38     virtual void  AddAfterBurner
39         (AliGenerator *Generator, char* Name, Float_t RateExp );
40     
41     AliStack*     GetStack(Int_t n) const;
42     AliStack*     GetActiveStack() const{return fActiveStack;}
43     
44     AliGenerator* GetCurrentGenerator() const;
45     virtual void  SetActiveEventNumber(Int_t actev);
46     Int_t         GetActiveEventNumber() const {return fActiveEvent;}
47     virtual Int_t GetNumberOfEvents() const {return gAlice->GetEventsPerRun() + fNBgEvents;}
48     void          SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;}
49
50     static TMCProcess IntToMCProcess(Int_t no);
51
52  protected:
53     Int_t fNAfterBurners;       // Number of afterburners  
54     TList  *fAfterBurnerEntries;// List of afterburners
55     Bool_t fGenerationDone;     // flag if generation is already done 
56                                 //   during first call of Generate method
57                                 //   if true just return event to gAlice
58                                 //   
59     TObjArray *fInternalStacks; //! List of internal stacks
60     Int_t fCurrentEvent;        //  Number of current event/stack
61     
62
63     AliStack* fActiveStack;   //! pointer to the current stack
64     Int_t fActiveEvent;       //HBT Processor needs more then one event to do correlations
65                               //Due to complications in fortran, it first calls C routine
66                               //that sets the active event to be read. All alihbtp_gettrack
67                               //are addressed to this event
68     
69     AliGenerator *fCurrentGenerator;      // Current event generator 
70     Int_t fNBgEvents;                     //Nuber of backgrouns events 
71                                           //(events that are generated only temporarly)
72                                           //needed by some afterburners that works better with higher statistics 
73                                           //this generates such a artificial one
74  private:
75     void Copy(TObject &arun) const;    
76
77     ClassDef(AliGenCocktailAfterBurner,2) // Particle cocktail generator a la SHAKER
78                                           //background events added
79 };
80
81 inline  AliGenerator*  
82     AliGenCocktailAfterBurner::GetCurrentGenerator() const
83 {
84   return fCurrentGenerator;
85 }
86
87
88 #endif
89
90
91
92
93