Update timestamps for new AMANDA simulation (17/02/2015)
[u/mrichter/AliRoot.git] / EVGEN / AliGenPileup.h
56f3f4a4 1#ifndef ALIGENPILEUP_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7// Class AliGenPileup
8// This is a generator of beam-beam pileup.
9// It generates interactions within 3 orbits (+-1) around
10// the trigger event. The trigger event itself is chosen
11// randomly among the bunch crossings within the central orbit.
12// The user can decide whenever to include in the simulation the
13// "trigger" interaction or not. This is handled by the
14// GenerateTrigInteraction(Bool_t flag) method.
15// In the case the trigger interaction is included, it is
16// generated using the same settings (vertex smear for example) as
17// the pileup events.
18// In case the trigger simulation is not included, the user can make
19// a cocktail of generator used to produce the trigger interaction and
20// AliGenPileup. In this case in order to avoid a fake increase of the rate around the
21// trigger, the number of background events within the bunch
22// crossing of the trigger is readuced by one.
23// The beam profile (the list of the active bunch crossings) can be
24// controlled via the SetBCMask(const char *mask) method. The syntax
25// follows the one in AliTriggerBCMask class. For example:
26// "3564H" would mean that all the bunch corssings within the orbit
27// are aloowed (which is of course unphysical). In case one wants to simulate
28// one-bunch-crossing-per-orbit scenario, the way to do it is to put something like:
29// "1H3563L" or similar.
30// The SetGenerator(AliGenerator *generator, Float_t rate) method is
31// used in order to define the generator to be used. The second argument is the pileup
32// rate in terms of #_of_interactions/bunch-crossing = sigma_tot * luminosity.
33// The pileup generation time window can be set via
34// AliGenerator::SetPileUpTimeWindow(Float_t pileUpTimeW) method. By the default the
35// window is set to 88micros (= TPC readout window).
37// cvetan.cheshkov@cern.ch 9/12/2008
40#include "AliGenCocktail.h"
41#include "AliTriggerBCMask.h"
10a07fe4 42class TFormula;
56f3f4a4 43class AliGenPileup : public AliGenCocktail
45 public:
46 AliGenPileup();
47 virtual ~AliGenPileup();
49 virtual void Generate();
50 virtual void SetRandomise(Bool_t flag);
51 virtual void UsePerEventRates();
aa0d2074 53 void SetGenerator(AliGenerator *generator, Float_t rate, Bool_t flag = kFALSE);
54 //void SetGenerator(AliGenerator *generator, Float_t rate);
56f3f4a4 55 Bool_t SetBCMask(const char *mask);
56 void GenerateTrigInteraction(Bool_t flag) {fGenTrig = flag;}
58 protected:
59 virtual void AddGenerator
df2fcbcb 60 (AliGenerator *Generator, const char* Name, Float_t RateExp, TFormula* formula = 0,
61 Int_t ntimes = 1);
56f3f4a4 62 AliTriggerBCMask fBCMask; // Mask used to tag the active bunch-crossings within an orbit
63 Bool_t fGenTrig; // Generate or not the trigger interaction
aa0d2074 64 Bool_t fFlag; // fixed interaction rate (integer)
56f3f4a4 65
66 private:
67 AliGenPileup(const AliGenPileup &gen);
68 AliGenPileup & operator=(const AliGenPileup & gen);
70 ClassDef(AliGenPileup,1) // Beam-beam pileup generator based on cocktail generator