AliGenPileup::AliGenPileup():
AliGenCocktail(),
fBCMask("bcm","3564H"),
- fGenTrig(kFALSE)
+ fGenTrig(kFALSE),
+ fFlag(kFALSE)
{
// Constructor
// The pileup time window is by default
// Destructor
}
-void AliGenPileup::SetGenerator(AliGenerator *generator, Float_t rate)
+void AliGenPileup::SetGenerator(AliGenerator *generator, Float_t rate, Bool_t flag)
{
// The method sets the geenrator to be used
// for pileup simulation.
}
}
AddGenerator(generator,"pileup generator",rate);
+ fFlag = flag;
}
void AliGenPileup::AddGenerator(AliGenerator *Generator,
if (!fBCMask.GetMask(iBC)) continue;
- Int_t nInteractions = gRandom->Poisson(rate);
+ // Int_t nInteractions = gRandom->Poisson(rate);
+ Int_t nInteractions;
+ if (!fFlag)
+ nInteractions = gRandom->Poisson(rate);
+ else
+ nInteractions = TMath::Nint(rate) + 1;
+
if (nInteractions == 0) continue;
nIntBC[nTotBC] = nInteractions;
virtual void SetRandomise(Bool_t flag);
virtual void UsePerEventRates();
- void SetGenerator(AliGenerator *generator, Float_t rate);
+ void SetGenerator(AliGenerator *generator, Float_t rate, Bool_t flag = kFALSE);
+ //void SetGenerator(AliGenerator *generator, Float_t rate);
Bool_t SetBCMask(const char *mask);
void GenerateTrigInteraction(Bool_t flag) {fGenTrig = flag;}
AliTriggerBCMask fBCMask; // Mask used to tag the active bunch-crossings within an orbit
Bool_t fGenTrig; // Generate or not the trigger interaction
+ Bool_t fFlag; // fixed interaction rate (integer)
private:
AliGenPileup(const AliGenPileup &gen);