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