Obsolete now: classes moved to AliGenHIJINGpara.h, AliGenBox.h, AliGenFixed.h
[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
fe4da5cc 8///////////////////////////////////////////////////////////
9// //
10// Class to generate the particles for the MC //
11// The base class is empty //
12// //
13///////////////////////////////////////////////////////////
14
fe4da5cc 15#include "AliGenerator.h"
886b6f73 16
fe4da5cc 17#include <TClass.h>
886b6f73 18#include <TNamed.h>
19#include <TF1.h>
20#include <TArrayF.h>
21#include <TTree.h>
fe4da5cc 22
23class AliGenCocktailEntry : public TObject
24{
25 protected:
26 AliGenerator *fGenerator;
27 Int_t fNGenerated;
28 Int_t fFirst;
29 Int_t fLast;
30 Float_t fRate;
31 Float_t fKineBias;
32 Float_t fBias;
33 TString fName;
34 public:
35 AliGenCocktailEntry()
36 {
37 fGenerator =0;
38 fNGenerated=0;
39 fFirst=-1;
40 fLast=-1;
41 fRate=0;
42 fKineBias=1;
43 fBias=1;
44 fName="unknown";
45 }
46
47 AliGenCocktailEntry
48 (AliGenerator* Generator, TString Name, Float_t RateExp)
49 {
50 fGenerator=Generator;
51 fNGenerated=0;
52 fFirst=-1;
53 fLast=-1;
54 fRate=RateExp;
55 fName=Name;
56//
57 fKineBias=1;
58 fBias=1;
59
60 }
61 ~AliGenCocktailEntry(){;}
62 AliGenerator* Generator() {return fGenerator;}
63 void SetGenerator(AliGenerator* generator){fGenerator=generator;}
64 void SetFirst(Int_t first){fFirst=first;}
65 void SetLast (Int_t last ){fLast =last;}
66 Int_t GetFirst(){return fFirst;}
67 Int_t GetLast (){return fLast;}
68 Float_t Rate(){return fRate;}
69 void PrintInfo();
70 private:
71 ClassDef(AliGenCocktailEntry,1)
72};
73
74
75class AliGenCocktail : public AliGenerator
76{
77 protected:
78 //
79 // Number of generators booked
80
81 Int_t fNGenerators;
82 //
83 // List of Generators
84 TList *fEntries;
85 // Iterators
86 TObjLink *flnk1;
87 TObjLink *flnk2;
88 public:
89 AliGenCocktail();
90 virtual ~AliGenCocktail();
91 virtual void Init();
92 virtual void Generate();
93 //
94 // Add a new generator to the list
95 virtual void AddGenerator
96 (AliGenerator *Generator, TString Name, Float_t RateExp );
97 virtual TList* Entries() {return fEntries;}
98 // Iterators
99 AliGenCocktailEntry* FirstGenerator();
100 AliGenCocktailEntry* NextGenerator();
101 void FirstGeneratorPair(AliGenCocktailEntry*&, AliGenCocktailEntry*&);
102 void NextGeneratorPair (AliGenCocktailEntry*&, AliGenCocktailEntry*&);
103 ClassDef(AliGenCocktail,1)
104//
105};
106
107#endif
108
109
110
111
112