missing commits
[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;
cc41459d 20class AliCollisionGeometry;
9c64a93a 21class AliGenCocktailEventHeader;
22
cc41459d 23
0b359ada 24class AliGenCocktailAfterBurner : public AliGenCocktail
25{
20dddfab 26//container class for other generators
27//extends AliGenCocktail functionality
28//with possiblity of adding after-burners
29
0b359ada 30 public:
31 AliGenCocktailAfterBurner();
0b359ada 32 virtual ~AliGenCocktailAfterBurner();
20dddfab 33
34 virtual void Init();
35 virtual void Generate();
36 virtual void SetTracks(Int_t stackno);
0b359ada 37 //
38 // Add a new generator to the list
20dddfab 39 virtual void AddAfterBurner
0b359ada 40 (AliGenerator *Generator, char* Name, Float_t RateExp );
0b359ada 41
20dddfab 42 AliStack* GetStack(Int_t n) const;
43 AliStack* GetActiveStack() const{return fActiveStack;}
cc41459d 44
cc41459d 45 AliCollisionGeometry* GetCollisionGeometry(Int_t n) const;
cc41459d 46
20dddfab 47 AliGenerator* GetCurrentGenerator() const;
0b359ada 48 virtual void SetActiveEventNumber(Int_t actev);
20dddfab 49 Int_t GetActiveEventNumber() const {return fActiveEvent;}
ed15ce56 50 virtual Int_t GetNumberOfEvents() const {return AliRunLoader::Instance()->GetNumberOfEventsPerRun() + fNBgEvents;}
20dddfab 51 void SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;}
984c69bd 52
acc86a24 53 static TMCProcess IntToMCProcess(Int_t no);
0af12c00 54
0b359ada 55 protected:
984c69bd 56 Int_t fNAfterBurners; // Number of afterburners
57 TList *fAfterBurnerEntries;// List of afterburners
2b9786f4 58 Bool_t fGenerationDone; // flag if generation is already done
59 // during first call of Generate method
60 // if true just return event to gAlice
61 //
984c69bd 62 TObjArray *fInternalStacks; //! List of internal stacks
cc41459d 63
9c64a93a 64 AliCollisionGeometry** fCollisionGeometries; //! List of Collision Geometries
65 AliGenCocktailEventHeader** fHeaders; //! List of Headers
cc41459d 66
984c69bd 67 Int_t fCurrentEvent; // Number of current event/stack
0b359ada 68
984c69bd 69
70 AliStack* fActiveStack; //! pointer to the current stack
71 Int_t fActiveEvent; //HBT Processor needs more then one event to do correlations
72 //Due to complications in fortran, it first calls C routine
73 //that sets the active event to be read. All alihbtp_gettrack
74 //are addressed to this event
0b359ada 75
984c69bd 76 AliGenerator *fCurrentGenerator; // Current event generator
20dddfab 77 Int_t fNBgEvents; //Nuber of backgrouns events
78 //(events that are generated only temporarly)
79 //needed by some afterburners that works better with higher statistics
80 //this generates such a artificial one
198bb1c7 81 private:
93a2041b 82 AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner& in);
83 AliGenCocktailAfterBurner & operator=(const AliGenCocktailAfterBurner & rhs);
0af12c00 84
466bfded 85 ClassDef(AliGenCocktailAfterBurner,2) // Particle cocktail generator a la SHAKER
86 //background events added
0b359ada 87};
88
89inline AliGenerator*
20dddfab 90 AliGenCocktailAfterBurner::GetCurrentGenerator() const
0b359ada 91{
92 return fCurrentGenerator;
93}
94
95
96#endif
97
98
99
100
101