3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 // Class to generate correlated Heavy Flavor hadron pairs using paramtrized
10 // kinematics of quark pairs from some generator and quark fragmentation functions.
11 // Is a generalisation of AliGenParam class for correlated pairs of hadrons.
12 // Author: S. Grigoryan, LPC Clermont-Fd & YerPhI, Smbat.Grigoryan@cern.ch
24 //-------------------------------------------------------------
25 class AliGenCorrHF : public AliGenMC
29 AliGenCorrHF(Int_t npart, Int_t idquark, Int_t energy);
30 AliGenCorrHF(char* tname, Int_t npart, Int_t idquark, Int_t energy);
32 virtual ~AliGenCorrHF();
33 virtual void Generate();
36 virtual void SetDecayer(AliDecayer* decayer) {fDecayer = decayer;}
38 // Hadron pair composition functions, needed by GetHadronPair
39 static void IpCharm(TH2F *hProbHH, Int_t &pdg3, Int_t &pdg4);
40 static void IpBeauty(TH2F *hProbHH, Int_t &pdg3, Int_t &pdg4);
42 // Computation of cumulative sums of cell wght-s, needed by GetQuarkPair
43 Double_t ComputeIntegral(TFile* fG);
45 // fG - input file with QQbar kinematical grid (TTree) and fragm. functions (24 TH2-s)
46 static void GetQuarkPair(TFile* fG, Double_t* fInt, Double_t &y1, Double_t &y2, Double_t &pt1, Double_t &pt2, Double_t &dphi);
47 static void GetHadronPair(TFile* fG, Int_t idq, Double_t y1, Double_t y2, Double_t pt1, Double_t pt2, Int_t &id3, Int_t &id4, Double_t &pz3, Double_t &pz4, Double_t &pt3, Double_t &pt4);
49 //Loading tracks in the stack
50 void LoadTracks(Int_t iquark, Float_t *pq, Int_t iPart,
51 Float_t *p, Int_t np, TClonesArray* particles,
52 Float_t *origine0, Float_t *polar, Float_t wgtp,
53 Float_t wgtch, Int_t &nt, Int_t ncsel, Int_t *pSelected,
55 //Setting the flag for Background transportation while using SetForceDecay()
56 void SetSelectAll(Bool_t selectall) {fSelectAll = selectall;}
59 TString fFileName; // Name of the input file
60 TFile* fFile; //! Pointer to input file
61 Int_t fQuark; // Quark type
62 Int_t fEnergy; // p-p c.m.s. energy
63 Float_t fBias; // Biasing factor
64 Int_t fTrials; // Number of trials
65 Bool_t fSelectAll; // Flag for transportation of Background while using SetForceDecay()
66 AliDecayer* fDecayer; //! Pointer to pythia object for decays
69 AliGenCorrHF(const AliGenCorrHF &CorrHF);
70 AliGenCorrHF & operator=(const AliGenCorrHF & rhs);
72 Double_t* fgIntegral; //! Pointer to array of cumulative sums of wght-s
73 static Int_t fgnptbins; // =12 Number of bins for the fragm.
74 // function dependence on quark pt
75 // Number of the grid bins in deltaphi, y and pt: 18, 30 and 50
76 static Double_t fgdph[19]; // deltaphi bin coordinates
77 static Double_t fgy[31]; // y bin coordinates
78 static Double_t fgpt[51]; // pt bin coordinates
79 static Double_t fgptbmin[12]; // min & max coordinates of pt bins for
80 static Double_t fgptbmax[12]; // the fragm. function
82 ClassDef(AliGenCorrHF,1) // Generator using parameterized QQbar & fragm. functions