AliPhysics  608b256 (608b256)
AliAnalysisTaskHadronicCocktailMC.h
Go to the documentation of this file.
1 #ifndef ALIANLYSISTASKHADRONICCOCKTAILMC_cxx
2 #define ALIANLYSISTASKHADRONICCOCKTAILMC_cxx
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliAnalysisManager.h"
6 #include "AliGenEMCocktailV2.h"
7 #include "AliMCGenHandler.h"
8 #include "AliGenerator.h"
9 
11  public:
12 
14  AliAnalysisTaskHadronicCocktailMC(const char *name);
16 
17  virtual void UserCreateOutputObjects();
18  virtual void UserExec(Option_t *);
19  virtual void Terminate(const Option_t*);
20 
21  // MC functions
23  void ProcessMCParticles();
24 
25  // setters
26  void SetMaxY(Double_t maxy){fMaxY = maxy;}
27  void SetMaxEta(Double_t maxeta){fMaxEta = maxeta;}
28  void SetMaxPt(Double_t maxpt){fMaxPt = maxpt;}
29  void SetPtBinWidth(Double_t widthpt){fPtBinWidth = widthpt;}
30  void SetLightOutput(Bool_t flag) {fDoLightOutput = flag;}
31  void SetAnalyzedParticle(Int_t flag);
32  void SetHasMother(UInt_t selectedMothers);
33  TH1* SetHist1D(TH1* hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Bool_t optSumw2);
34  TH2* SetHist2D(TH2* hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Int_t nBinsY, Double_t yMin, Double_t yMax, Bool_t optSumw2);
35  TH2* SetHist2D(TH2* hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Int_t nBinsY, Double_t* binsY, Bool_t optSumw2);
36  void SetLogBinningXTH1(TH1* histoRebin);
37  void SetLogBinningXTH2(TH2* histoRebin);
38 
39  // getters
41  Float_t GetDecayChannel(AliMCEvent* mcEvent, TParticle* part);
42  void GetAndSetPtParametrizations(AliGenEMCocktailV2* mcCocktailGen);
43  void GetAndSetPtYDistributions(AliGenEMCocktailV2* mcCocktailGen);
44 
45  // additional functions
46  void InitializeDecayChannelHist(TH1F* hist, Int_t np);
47  void FillPythiaBranchingRatio(TH1F* histo, Int_t np);
48 
49  protected:
50  TList* fOutputContainer; // Output container
51 
52  AliVEvent* fInputEvent; // current event
53  AliMCEvent* fMCEvent; // corresponding MC event
54  AliMCGenHandler* fMCGenHandler;
55  const AliGenerator* fMCGenerator;
56  AliGenEMCocktailV2* fMCCocktailGen;
57 
58  Int_t fAnalyzedMeson; // switch for analyzing pi0 (0), eta (1), pi+-(2)
59  Bool_t fAnalyzeNeutralPi; // switch for pi0 analysis
60  Bool_t fAnalyzeChargedPi; // switch for pi+- analysis
61  Bool_t fDoLightOutput; // switch for running light
62  Bool_t fHasMother[24]; // mother i produced
63 
64  // nEvent histogram
65  TH1F* fHistNEvents; // number of events histo
66 
67  // histograms mesons
73  TH1F** fHistPythiaBR;
74 
77 
80 
85 
86  Int_t* fParticleList; // array with particle Pdg values
87  TString* fParticleListNames; // array with particle names
88 
89  // generator settings
90  TF1* fPtParametrization[24];
93  TObjString* fCocktailSettings[12];
96 
99  Int_t fIsMC; // MC flag
100  Double_t fMaxY; // Max y
101  Double_t fMaxEta; // Max Eta
102  Double_t fMaxPt; // Max Pt
103  Double_t fPtBinWidth; // Pt binning
104 
105 
106  private:
107  AliAnalysisTaskHadronicCocktailMC(const AliAnalysisTaskHadronicCocktailMC&); // Prevent copy-construction
109 
110  ClassDef(AliAnalysisTaskHadronicCocktailMC, 12);
111 };
112 
113 #endif
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
Int_t pdg
TH2F ** fHistPtYInput
histo for phi of input particles
double Double_t
Definition: External.C:58
Definition: External.C:236
AliAnalysisTaskHadronicCocktailMC & operator=(const AliAnalysisTaskHadronicCocktailMC &)
void GetAndSetPtYDistributions(AliGenEMCocktailV2 *mcCocktailGen)
TH2F ** fHistPtYDaughterSource
histo for pi0/eta from input particles
TH1 * SetHist1D(TH1 *hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Bool_t optSumw2)
int Int_t
Definition: External.C:63
Float_t GetDecayChannel(AliMCEvent *mcEvent, TParticle *part)
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
TH1I * fHistPdgInputRest
histo for phi correlation of gammas from input particles to source
TH2 * SetHist2D(TH2 *hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Int_t nBinsY, Double_t yMin, Double_t yMax, Bool_t optSumw2)
Definition: External.C:212
TH1F ** fHistDecayChannelsInput
histo for input particles
TH2F ** fHistPtPhiInput
histo for phi of pi0/eta from input particles
TH2F ** fHistPtPhiGammaFromPi0FromInput
gammas from pi0 from k0s, k0l, lambda
Bool_t isMC
Definition: External.C:220
TH2F ** fHistPhiDaughterPhiSourceInput
histo for pt correlation of gammas from input particles to source
TH2F ** fHistPtDaughterPtSourceInput
histo for input particle BR from pythia
TH2F ** fHistPtYGammaFromXFromInput
histo for gamma from rest
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
TH2F ** fHistPtPhiGammaFromXFromInput
gammas from X from k0s, k0l, lambda
Double_t yMin
void GetAndSetPtParametrizations(AliGenEMCocktailV2 *mcCocktailGen)
Definition: External.C:196
TH1F ** fHistPythiaBR
histo for input particle decay channels
Double_t yMax