Transition to NewIO
[u/mrichter/AliRoot.git] / EVGEN / AliGenCocktailAfterBurner.h
CommitLineData
0b359ada 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)
20dddfab 10// Author: piotr.skowronski@cern.ch
0b359ada 11//
88cb7938 12
13#include <TMCProcess.h>
14
0b359ada 15#include "AliGenCocktail.h"
2b9786f4 16#include "AliRun.h"
0b359ada 17
18class AliGenCocktailEntry;
19class AliStack;
20
21class AliGenCocktailAfterBurner : public AliGenCocktail
22{
20dddfab 23//container class for other generators
24//extends AliGenCocktail functionality
25//with possiblity of adding after-burners
26
0b359ada 27 public:
28 AliGenCocktailAfterBurner();
20dddfab 29 AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner& in);
0b359ada 30 virtual ~AliGenCocktailAfterBurner();
20dddfab 31 AliGenCocktailAfterBurner & operator=(const AliGenCocktailAfterBurner & rhs);
32
33 virtual void Init();
34 virtual void Generate();
35 virtual void SetTracks(Int_t stackno);
0b359ada 36 //
37 // Add a new generator to the list
20dddfab 38 virtual void AddAfterBurner
0b359ada 39 (AliGenerator *Generator, char* Name, Float_t RateExp );
0b359ada 40
20dddfab 41 AliStack* GetStack(Int_t n) const;
42 AliStack* GetActiveStack() const{return fActiveStack;}
0b359ada 43
20dddfab 44 AliGenerator* GetCurrentGenerator() const;
0b359ada 45 virtual void SetActiveEventNumber(Int_t actev);
20dddfab 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;}
984c69bd 49
acc86a24 50 static TMCProcess IntToMCProcess(Int_t no);
466bfded 51
0b359ada 52 protected:
984c69bd 53 Int_t fNAfterBurners; // Number of afterburners
54 TList *fAfterBurnerEntries;// List of afterburners
2b9786f4 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 //
984c69bd 59 TObjArray *fInternalStacks; //! List of internal stacks
60 Int_t fCurrentEvent; // Number of current event/stack
0b359ada 61
984c69bd 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
0b359ada 68
984c69bd 69 AliGenerator *fCurrentGenerator; // Current event generator
20dddfab 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:
466bfded 75 ClassDef(AliGenCocktailAfterBurner,2) // Particle cocktail generator a la SHAKER
76 //background events added
0b359ada 77};
78
79inline AliGenerator*
20dddfab 80 AliGenCocktailAfterBurner::GetCurrentGenerator() const
0b359ada 81{
82 return fCurrentGenerator;
83}
84
85
86#endif
87
88
89
90
91