Randomized generator selection added.
[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>
886b6f73 15
374924b5 16class AliGenCocktailEntry;
1ebe6dc8 17class TArrayF;
fe4da5cc 18
19
20class AliGenCocktail : public AliGenerator
21{
fe4da5cc 22 public:
23 AliGenCocktail();
374924b5 24 AliGenCocktail(const AliGenCocktail &cocktail);
25
fe4da5cc 26 virtual ~AliGenCocktail();
27 virtual void Init();
09e2e187 28 virtual void FinishRun();
fe4da5cc 29 virtual void Generate();
c44d1c08 30 virtual void SetVertexSmear(VertexSmear_t smear);
1ebe6dc8 31 virtual void SetRandomise(Bool_t flag) {fRandom = flag;}
32
fe4da5cc 33 //
34 // Add a new generator to the list
35 virtual void AddGenerator
a764b7de 36 (AliGenerator *Generator, const char* Name, Float_t RateExp );
fe4da5cc 37 virtual TList* Entries() {return fEntries;}
38 // Iterators
39 AliGenCocktailEntry* FirstGenerator();
40 AliGenCocktailEntry* NextGenerator();
374924b5 41 void FirstGeneratorPair(AliGenCocktailEntry*&e1, AliGenCocktailEntry*&e2);
42 void NextGeneratorPair (AliGenCocktailEntry*&e1, AliGenCocktailEntry*&e2);
43 AliGenCocktail & operator=(const AliGenCocktail & rhs);
0af12c00 44
374924b5 45 protected:
46 Int_t fNGenerators; // Number of generators booked
1ebe6dc8 47 Bool_t fRandom; // Flag to select random generator from list
48 TArrayF fProb; // Probability of an event (if fRandom == kTRUE)
374924b5 49 TList *fEntries; // List of Generators
a436e7fc 50 TObjLink *flnk1; // ! Iterator for first generator
51 TObjLink *flnk2; // ! Iterator for second generator
1ebe6dc8 52
fe4da5cc 53//
0af12c00 54 private:
dc1d768c 55 void Copy(TObject &arun) const;
374924b5 56 ClassDef(AliGenCocktail,1) // Particle cocktail generator a la SHAKER
fe4da5cc 57};
58
59#endif
60
61
62
63
64