]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGenCorrHF.h
I performed modifications on AliGenCorrHF which allows to set cuts on
[u/mrichter/AliRoot.git] / EVGEN / AliGenCorrHF.h
1 #ifndef ALIGENCORRHF_H
2 #define ALIGENCORRHF_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //
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
13 //
14 // May 11: Added Flag for transportation Background While using SetForceDecay() function (L. Manceau)
15 // June 11 modification allowing Seting Cut on Children added (L. Manceau)
16
17 #include "AliGenMC.h"
18
19 class AliPythia;
20 class TParticle;
21 class TH2F;
22 class TFile;
23 class TString;
24 class TClonesArray;
25
26 //-------------------------------------------------------------
27 class AliGenCorrHF : public AliGenMC
28 {
29  public:
30     AliGenCorrHF();
31     AliGenCorrHF(Int_t npart, Int_t idquark, Int_t energy);
32     AliGenCorrHF(char* tname, Int_t npart, Int_t idquark, Int_t energy);
33      
34     virtual ~AliGenCorrHF();
35     virtual void Generate();
36     virtual void Init();
37     // force decay type
38     virtual void SetDecayer(AliDecayer* decayer) {fDecayer = decayer;}
39
40     // Hadron pair composition functions, needed by GetHadronPair
41     static void IpCharm(TH2F *hProbHH, Int_t &pdg3, Int_t &pdg4);
42     static void IpBeauty(TH2F *hProbHH, Int_t &pdg3, Int_t &pdg4);
43
44     // Computation of cumulative sums of cell wght-s, needed by GetQuarkPair
45     Double_t ComputeIntegral(TFile* fG);
46
47     // fG - input file with QQbar kinematical grid (TTree) and fragm. functions (24 TH2-s)
48     static void GetQuarkPair(TFile* fG, Double_t* fInt, Double_t &y1, Double_t &y2, Double_t &pt1, Double_t &pt2, Double_t &dphi);              
49     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); 
50
51     //Loading tracks in the stack
52     void LoadTracks(Int_t iquark, Float_t *pq, Int_t iPart, 
53                     Float_t *p, Int_t np, TClonesArray* particles,
54                     Float_t *origine0, Float_t *polar, Float_t wgtp, 
55                     Float_t wgtch, Int_t &nt, Int_t ncsel, Int_t *pSelected, 
56                     Int_t *trackIt);
57     //Setting the flag for Background transportation while using SetForceDecay()
58     void SetSelectAll(Bool_t selectall) {fSelectAll = selectall;}
59
60  protected:
61     TString     fFileName;    // Name of the input file
62     TFile*      fFile;        //! Pointer to input file
63     Int_t       fQuark;       // Quark type
64     Int_t       fEnergy;      // p-p c.m.s. energy 
65     Float_t     fBias;        // Biasing factor
66     Int_t       fTrials;      // Number of trials
67     Bool_t      fSelectAll;   // Flag for transportation of Background while using SetForceDecay()
68     AliDecayer* fDecayer;     //! Pointer to pythia object for decays
69
70  private:
71     AliGenCorrHF(const AliGenCorrHF &CorrHF);
72     AliGenCorrHF & operator=(const AliGenCorrHF & rhs);
73
74     Double_t* fgIntegral; //! Pointer to array of cumulative sums of wght-s
75     static Int_t  fgnptbins;             // =12 Number of bins for the fragm. 
76                                          //   function dependence on quark pt
77     // Number of the grid bins in deltaphi, y and pt:  18, 30 and 50
78     static Double_t fgdph[19];           // deltaphi bin coordinates  
79     static Double_t fgy[31];             // y bin coordinates
80     static Double_t fgpt[51];            // pt bin coordinates
81     static Double_t fgptbmin[12];        // min & max coordinates of pt bins for
82     static Double_t fgptbmax[12];        // the fragm. function
83
84     ClassDef(AliGenCorrHF,1)  // Generator using parameterized QQbar & fragm. functions
85 };
86 #endif
87
88
89
90
91
92
93
94
95