Allowing modularity of the MUON geometry during the generation (geant) phase with...
[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;
4f85aa78 17class AliGenCocktailEventHeader;
1ebe6dc8 18class TArrayF;
fe4da5cc 19
20
21class AliGenCocktail : public AliGenerator
22{
fe4da5cc 23 public:
24 AliGenCocktail();
374924b5 25 AliGenCocktail(const AliGenCocktail &cocktail);
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);
1ebe6dc8 32 virtual void SetRandomise(Bool_t flag) {fRandom = flag;}
33
fe4da5cc 34 //
35 // Add a new generator to the list
36 virtual void AddGenerator
a764b7de 37 (AliGenerator *Generator, const char* Name, Float_t RateExp );
fe4da5cc 38 virtual TList* Entries() {return fEntries;}
39 // Iterators
40 AliGenCocktailEntry* FirstGenerator();
41 AliGenCocktailEntry* NextGenerator();
374924b5 42 void FirstGeneratorPair(AliGenCocktailEntry*&e1, AliGenCocktailEntry*&e2);
43 void NextGeneratorPair (AliGenCocktailEntry*&e1, AliGenCocktailEntry*&e2);
44 AliGenCocktail & operator=(const AliGenCocktail & rhs);
4f85aa78 45 virtual void AddHeader(AliGenEventHeader* header);
46
374924b5 47 protected:
4f85aa78 48 Int_t fNGenerators; // Number of generators booked
49 Bool_t fRandom; // Flag to select random generator from list
50 TArrayF fProb; // Probability of an event (if fRandom == kTRUE)
51 TList *fEntries; // List of Generators
52 TObjLink *flnk1; // ! Iterator for first generator
53 TObjLink *flnk2; // ! Iterator for second generator
54 AliGenCocktailEventHeader* fHeader; // !Header container
55
fe4da5cc 56//
0af12c00 57 private:
dc1d768c 58 void Copy(TObject &arun) const;
374924b5 59 ClassDef(AliGenCocktail,1) // Particle cocktail generator a la SHAKER
fe4da5cc 60};
61
62#endif
63
64
65
66
67