coding convention
[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);
198bb1c7 51 private:
52 void Copy(AliGenCocktailAfterBurner &arun) const;
0b359ada 53 protected:
984c69bd 54 Int_t fNAfterBurners; // Number of afterburners
55 TList *fAfterBurnerEntries;// List of afterburners
2b9786f4 56 Bool_t fGenerationDone; // flag if generation is already done
57 // during first call of Generate method
58 // if true just return event to gAlice
59 //
984c69bd 60 TObjArray *fInternalStacks; //! List of internal stacks
61 Int_t fCurrentEvent; // Number of current event/stack
0b359ada 62
984c69bd 63
64 AliStack* fActiveStack; //! pointer to the current stack
65 Int_t fActiveEvent; //HBT Processor needs more then one event to do correlations
66 //Due to complications in fortran, it first calls C routine
67 //that sets the active event to be read. All alihbtp_gettrack
68 //are addressed to this event
0b359ada 69
984c69bd 70 AliGenerator *fCurrentGenerator; // Current event generator
20dddfab 71 Int_t fNBgEvents; //Nuber of backgrouns events
72 //(events that are generated only temporarly)
73 //needed by some afterburners that works better with higher statistics
74 //this generates such a artificial one
198bb1c7 75 private:
76
466bfded 77 ClassDef(AliGenCocktailAfterBurner,2) // Particle cocktail generator a la SHAKER
78 //background events added
0b359ada 79};
80
81inline AliGenerator*
20dddfab 82 AliGenCocktailAfterBurner::GetCurrentGenerator() const
0b359ada 83{
84 return fCurrentGenerator;
85}
86
87
88#endif
89
90
91
92
93