forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AliGenCocktailAfterBurner.h
102 lines (74 loc) · 3.62 KB
/
AliGenCocktailAfterBurner.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef AliGenCocktailAfterBurner_H
#define AliGenCocktailAfterBurner_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
// Container class for AliGenerator through recursion.
// (Container is itself an AliGenerator)
// Author: [email protected]
//
#include <TMCProcess.h>
#include "AliGenCocktail.h"
#include "AliRunLoader.h"
class AliGenCocktailEntry;
class AliStack;
class AliCollisionGeometry;
class AliGenCocktailEventHeader;
class AliGenCocktailAfterBurner : public AliGenCocktail
{
//container class for other generators
//extends AliGenCocktail functionality
//with possiblity of adding after-burners
public:
AliGenCocktailAfterBurner();
virtual ~AliGenCocktailAfterBurner();
virtual void Init();
virtual void Generate();
virtual void SetTracks(Int_t stackno);
//
// Add a new generator to the list
virtual void AddAfterBurner
(AliGenerator *Generator, const char* Name, Float_t RateExp );
AliStack* GetStack(Int_t n) const;
AliStack* GetActiveStack() const{return fActiveStack;}
AliCollisionGeometry* GetCollisionGeometry(Int_t n) const;
AliGenerator* GetCurrentGenerator() const;
virtual void SetActiveEventNumber(Int_t actev);
Int_t GetActiveEventNumber() const {return fActiveEvent;}
virtual Int_t GetNumberOfEvents() const {return AliRunLoader::Instance()->GetNumberOfEventsPerRun() + fNBgEvents;}
void SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;}
AliGenCocktailEventHeader* GetActiveEventHeader() const { return fHeaders[fActiveEvent]; }
static TMCProcess IntToMCProcess(Int_t no);
protected:
Int_t fNAfterBurners; // Number of afterburners
TList *fAfterBurnerEntries;// List of afterburners
Bool_t fGenerationDone; // flag if generation is already done
// during first call of Generate method
// if true just return event to gAlice
//
TObjArray *fInternalStacks; //! List of internal stacks
AliCollisionGeometry** fCollisionGeometries; //! List of Collision Geometries
AliGenCocktailEventHeader** fHeaders; //! List of Headers
Int_t fCurrentEvent; // Number of current event/stack
AliStack* fActiveStack; //! pointer to the current stack
Int_t fActiveEvent; //HBT Processor needs more then one event to do correlations
//Due to complications in fortran, it first calls C routine
//that sets the active event to be read. All alihbtp_gettrack
//are addressed to this event
AliGenerator *fCurrentGenerator; // Current event generator
Int_t fNBgEvents; //Nuber of backgrouns events
//(events that are generated only temporarly)
//needed by some afterburners that works better with higher statistics
//this generates such a artificial one
private:
AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner& in);
AliGenCocktailAfterBurner & operator=(const AliGenCocktailAfterBurner & rhs);
ClassDef(AliGenCocktailAfterBurner,2) // Particle cocktail generator a la SHAKER
//background events added
};
inline AliGenerator*
AliGenCocktailAfterBurner::GetCurrentGenerator() const
{
return fCurrentGenerator;
}
#endif