bug fixes
[u/mrichter/AliRoot.git] / EVGEN / AliGenCocktail.h
CommitLineData
fe4da5cc 1#ifndef ALIGENCOCKTAIL_H
2#define ALIGENCOCKTAIL_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
675e9664 8// Container class for AliGenerator through recursion.
9// (Container is itself an AliGenerator)
10// Author: andreas.morsch@cern.ch
11//
12
fe4da5cc 13#include "AliGenerator.h"
1ebe6dc8 14#include <TArrayF.h>
7ca4655f 15#include <TList.h>
886b6f73 16
374924b5 17class AliGenCocktailEntry;
4f85aa78 18class AliGenCocktailEventHeader;
1ebe6dc8 19class TArrayF;
7c54213e 20class TFormula;
fe4da5cc 21
22class AliGenCocktail : public AliGenerator
23{
fe4da5cc 24 public:
25 AliGenCocktail();
374924b5 26
fe4da5cc 27 virtual ~AliGenCocktail();
28 virtual void Init();
09e2e187 29 virtual void FinishRun();
fe4da5cc 30 virtual void Generate();
c44d1c08 31 virtual void SetVertexSmear(VertexSmear_t smear);
ab834258 32 virtual void SetRandomise(Bool_t flag) {fSRandom = flag;}
c89fc3f1 33 virtual void UsePerEventRates() {fUsePerEventRate = kTRUE;}
1ebe6dc8 34
fe4da5cc 35 //
36 // Add a new generator to the list
37 virtual void AddGenerator
8c1efaa8 38 (AliGenerator *Generator, const char* Name, Float_t RateExp, TFormula* formula = 0, Int_t ntimes = 1);
fe4da5cc 39 virtual TList* Entries() {return fEntries;}
40 // Iterators
41 AliGenCocktailEntry* FirstGenerator();
42 AliGenCocktailEntry* NextGenerator();
374924b5 43 void FirstGeneratorPair(AliGenCocktailEntry*&e1, AliGenCocktailEntry*&e2);
44 void NextGeneratorPair (AliGenCocktailEntry*&e1, AliGenCocktailEntry*&e2);
4f85aa78 45 virtual void AddHeader(AliGenEventHeader* header);
46
374924b5 47 protected:
4f85aa78 48 Int_t fNGenerators; // Number of generators booked
8058ead1 49 Float_t fTotalRate; // Total rate of the generators booked
ab834258 50 Bool_t fSRandom; // Flag to select random generator from list
c89fc3f1 51 Bool_t fUsePerEventRate; // Flag to generate the events according to the rate per event
ab834258 52 TArrayF fProb; // Probability of an event (if fSRandom == kTRUE)
4f85aa78 53 TList *fEntries; // List of Generators
54 TObjLink *flnk1; // ! Iterator for first generator
55 TObjLink *flnk2; // ! Iterator for second generator
56 AliGenCocktailEventHeader* fHeader; // !Header container
57
fe4da5cc 58//
0af12c00 59 private:
93a2041b 60 AliGenCocktail(const AliGenCocktail &cocktail);
61 AliGenCocktail & operator=(const AliGenCocktail & rhs);
62
de5cddbe 63 ClassDef(AliGenCocktail, 2) // Particle cocktail generator a la SHAKER
fe4da5cc 64};
65
66#endif
67
68
69
70
71