}
//
// Number of signals is calculated from Collision Geometry
+ // and entry with given centrality bin is selected
//
if (entry->Formula() != 0)
{
AliCollisionGeometry* coll = (collentry->Generator())->CollisionGeometry();
Float_t b = coll->ImpactParameter();
Int_t nsig = Int_t(entry->Formula()->Eval(b));
- if (nsig < 1) nsig = 1;
- AliInfo(Form("Signal Events %13.3f %5d %5d\n", b, coll->HardScatters(), nsig));
- ntimes = nsig;
+ Int_t bin = entry->Bin() - 100;
+ if (bin > 0) {
+ if (bin != nsig) continue;
+ } else {
+ if (nsig < 1) nsig = 1;
+ AliInfo(Form("Signal Events %13.3f %5d %5d\n", b, coll->HardScatters(), nsig));
+ ntimes = nsig;
+ }
}
- entry->Generator()->SetVertex(fVertex.At(0), fVertex.At(1), fVertex.At(2));
+ gen->SetVertex(fVertex.At(0), fVertex.At(1), fVertex.At(2));
- for (Int_t i = 0; i < ntimes; i++) entry->Generator()->Generate();
+ for (Int_t i = 0; i < ntimes; i++) gen->Generate();
entry->SetLast(partArray->GetEntriesFast());
preventry = entry;
}
Int_t GetFirst() const {return fFirst;}
Int_t GetLast () const {return fLast;}
Float_t Rate() const {return fRate;}
+ Int_t Bin() const {return Int_t(fRate);}
void PrintInfo() const;
TFormula* Formula() const {return fFormula;}
AliGenCocktailEntry & operator =(const AliGenCocktailEntry & rhs);