8 #ifndef ALIFLOWONTHEFLYEVENTGENERATOR_H
9 #define ALIFLOWONTHEFLYEVENTGENERATOR_H
12 #include "TClonesArray.h"
17 #include "TParticle.h"
20 class TVirtualMCDecayer;
30 NaiveFlowAndSpectrumGenerator(
Short_t pdg,
Bool_t qa,
Int_t ff) :
fPdg(pdg),
fQA(qa),
fFF(ff),
fpt(0),
fv2(0),
fv3(0),
fQApt(0),
fQAv2(0),
fQAv3(0) {
31 TParticle* t =
new TParticle(); t->SetPdgCode(
fPdg);
32 fpt =
new TF1(Form(
"pt_%i", pdg), Form(
"x/TMath::Power(1+2*TMath::Sqrt(%f*%f+x*x),4)", t->GetMass(), t->GetMass()),0.,20);
33 fv2 =
new TF1(Form(
"v2_%i", pdg), Form(
"TMath::Log(x+1)*.2/TMath::Power(%f*%f+x*x,.2)", t->GetMass(), t->GetMass()), 0., 20);
34 fv3 =
new TF1(Form(
"v3_%i", pdg), Form(
"TMath::Log(x+1)*.1/TMath::Power(%f*%f+x*x,.2)", t->GetMass(), t->GetMass()), 0., 20);
35 if(
fQA) {
fQApt =
new TH1F(Form(
"pt_%i",
fPdg),Form(
"pt_%i",
fPdg),400,0,20);
37 fQAv3 =
new TH2F(Form(
"v3_%i",
fPdg),Form(
"v3_%i",
fPdg),400,0,20, 400, -.5, .5); }
81 void AddV2(TClonesArray* event);
TH1 * GetQAType(Int_t t) const
AliFlowOnTheFlyEventGenerator()
NaiveFlowAndSpectrumGenerator * Find(Short_t pdg, Bool_t make)
void SetPtSpectrum(TF1 *s)
virtual ~NaiveFlowAndSpectrumGenerator()
TVirtualMCDecayer * fDecayer
flow event simple for output
TH1 * GetQAType(Short_t pdg, Int_t type)
void AddV3Mothers(Bool_t b)
void FillV2(Double_t p, Double_t v)
AliFlowEventSimple * GenerateOnTheFlyEvent(TClonesArray *event, Int_t nSpecies, Int_t species[], Int_t mult[], Int_t bg, Bool_t fluc)
AliFlowEventSimple * fFlowEvent
void SetPtDependentV2(const char *func, Short_t pdg)
AliFlowEventSimple * ConvertTClonesToFlowEvent(TClonesArray *event, Int_t totalMultiplicity)
TF1 * GetDifferentialV2(Short_t pdg)
AliFlowOnTheFlyEventGenerator & operator=(const AliFlowOnTheFlyEventGenerator &dummy)
void SetPtDependentV3(const char *func, Short_t pdg)
void SetDifferentialV3(TF1 *v3)
void SetAfterBurnerPrecision(Double_t a, Int_t b)
Double_t GetV3(Double_t pt) const
void DecayOnTheFlyTracks(TClonesArray *event)
void AddV3Daughters(Bool_t b)
void DoGeneratorQA(Bool_t v2, Bool_t v3)
void EmbedEvent(TClonesArray *embedMe)
void AddV2Mothers(Bool_t b)
NaiveFlowAndSpectrumGenerator(Short_t pdg, Bool_t qa, Int_t ff)
void ForceGammaDecay(TClonesArray *arr, TParticle *part)
TF1 * GetPtSpectrum() const
Int_t fMaxNumberOfIterations
void SetPtSpectrum(const char *func, Short_t pdg)
TObjArray * GetGenerators()
NaiveFlowAndSpectrumGenerator & operator=(const NaiveFlowAndSpectrumGenerator &dummy)
void GenerateOnTheFlyTracks(Int_t mult, Int_t pid, TClonesArray *event, Double_t fluc)
void AddV2Daughters(Bool_t b)
TF1 * GetDifferentialV2() const
void AddV2(TParticle *particle, Double_t v2, Double_t fluc)
void SetDifferentialV2(TF1 *v2)
TF1 * GetDifferentialV3(Short_t pdg)
TF1 * GetPtSpectrum(Short_t pdg)
TF1 * GetDifferentialV3() const
virtual ~AliFlowOnTheFlyEventGenerator()
Double_t GetV2(Double_t pt) const
Short_t GetPDGCode() const