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