]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/ConfigGammaAnalysis.C
Keep more MC information in ntuples
[u/mrichter/AliRoot.git] / PWG4 / ConfigGammaAnalysis.C
CommitLineData
bdcfac30 1
2AliAnaGamma* ConfigGammaAnalysis()
3{
4 //
5 // Configuration goes here
6 //
7 printf("ConfigGammaAnalysis() \n");
8
9 //----------------------------------------------------------
10 //-----------------------------------------------------------
11 // Define reader , uncomment 1 of the 2 options
12 //-----------------------------------------------------------
13 //----------------------------------------------------------
14
15 // -----Option 1------ Data, ESDs
4b707925 16 //AliGammaDataReader *reader = new AliGammaDataReader();
17 // AliGammaMCDataReader *reader = new AliGammaMCDataReader(); //Copy of AliGammaDataReader + Montecarlo Information
bdcfac30 18// //Set detectors acceptance (in real and montecarlo data)
19// reader->SetCTSEtaCut(1); reader->SetEMCALEtaCut(1); reader->SetPHOSEtaCut(0.2);
20// reader->SetPhiEMCALCut(40*TMath::DegToRad(), 200*TMath::DegToRad());
21// reader->SetPhiPHOSCut(200*TMath::DegToRad(), 350*TMath::DegToRad());
22// //Set minimum pt for particles in analysis (in real and montecarlo data)
23// reader->SetNeutralPtCut(0.4); reader->SetChargedPtCut(0.4);
24// //pid of measured particles
4b707925 25 //reader->SetEMCALPIDOn(kTRUE); reader->SetPHOSPIDOn(kTRUE); //No pid, accept all particles
bdcfac30 26// //if previous kTrue
27// reader->SetPHOSPhotonWeight(0.7); reader->SetPHOSPi0Weight(0.7);
28// reader->SetEMCALPhotonWeight(0.7); reader->SetEMCALPi0Weight(0.7);
4b707925 29 //reader->UsePHOSPIDWeightFormula(kTRUE);
30 //TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
31 //TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
32 //reader->SetPHOSPhotonWeightFormula(photonF);
33 //reader->SetPHOSPi0WeightFormula(pi0F);
34
bdcfac30 35 // -----Option 2------ Kinematics
4b707925 36 AliGammaMCReader *reader = new AliGammaMCReader();
bdcfac30 37// //Set detectors acceptance (in real and montecarlo data)
38// reader->SetCTSEtaCut(1); reader->SetEMCALEtaCut(1); reader->SetPHOSEtaCut(0.2);
39// reader->SetPhiEMCALCut(40*TMath::DegToRad(), 200*TMath::DegToRad());
40// reader->SetPhiPHOSCut(200*TMath::DegToRad(), 350*TMath::DegToRad());
41// //Set minimum pt for particles in analysis (in real and montecarlo data)
42// reader->SetNeutralPtCut(0.4); reader->SetChargedPtCut(0.4);
4b707925 43 reader->SetDecayPi0Flag(AliGammaMCReader::kGeantDecay) ; //Options
bdcfac30 44// //kNoDecay :Do not decay pi0, keep them in the list as they are
45// //kGeantDecay: Look for gamma decayed by GEANT
46// //kDecay: Decay pi0 by hand (geant was not used)
4b707925 47// //kDecayGamma: Pi0 is decayed by PYTHIA, pi0 is not final check if photons overlapp
bdcfac30 48// //parameters to study if decay is overlapped:
49// reader->SetEMCALIPDistance(450.); reader->SetPHOSIPDistance(460.);
50// reader->SetEMCALMinDistance(3.6); reader->SetPHOSMinDistance(11.); //Miimum overlapp distance
4b707925 51 reader->SetCheckOverlapping(kTRUE);
bdcfac30 52
53 //----------------------------------------------------------
54 //----------------------------------------------------
55 //Define analysis algorithms
56 //----------------------------------------------------
57 //----------------------------------------------------------
58 //3 analysis types
59 //kPrompt: Find prompt gamma for a fixed cone and pt cut value
60 //kIsolationCut: Find prompt gamma for several cones and pt cuts values
61 //kCorrelation: Do prompt gamma - something correlation. Something can be
62 // kParton: Gamma-Parton correlation
63 // kHadron: Gamma-Hadron correlation
64 // kJetLeadCone: Gamma-Jet correlation : constructed in cone around leading particle
65 // kJetFinder: Gamma-Jet correlation : Jet reconstructed with standard algorithms. --Still not implemented--
66 //One of the first 3 analysis types is selected in the end with ana->SetAnalysisType(AliAnaGamma::kCorrelation);
67 //The 4 correlation analysis are selected when the corresponding class is initialized
68
69 //============================
70 //First initialize prompt photon algoritm
71 //==============================
72 AliAnaGammaDirect *gd = new AliAnaGammaDirect();
73 gd->SetMinGammaPt(1.);
74 //not used in option kIsolationCut
4b707925 75 //gd->SetConeSize(0.5); gd->SetPtThreshold(0.); gd->SetPtSumThreshold(0.);
76 gd->SetICMethod(AliAnaGammaDirect::kPtIC) ;//Options:
bdcfac30 77 //kNoIC: Accept all photons, no isolation used
78 //kPtIC: IC with cut on pT
79 //kSumPtIC: IC with cut on pT sum in cone
80 //kSeveralIC: Not allowed in kCorrelation analysis
81// //for option kSeveralIC:
4b707925 82// gd->SetNCones(2); gd->SetNPtThresholds(3);
83// gd->SetConeSizes(0,0.2); gd->SetConeSizes(1,0.3); //gd->SetConeSizes(2,0.4);
84// gd->SetPtThresholds(0,0); gd->SetPtThresholds(1,1.); gd->SetPtThresholds(2,2);
bdcfac30 85
86 //============================
87 //Second, select the correlation algoritm
88 //==============================
89 //Uncomment 1 of the 4 options
90
91 //--- Option 1 ---
92 //AliAnaGammaParton *gc = new AliAnaGammaParton();
93 //No associated setters and getters for the moment.
94
95 //--- Option 2 ---
4b707925 96 AliAnaGammaHadron *gc = new AliAnaGammaHadron();
bdcfac30 97// gc->SetDeltaPhiCutRange(1,4); //Correlation in delta phi (gamma-particle), radians
98// gc->SetMinPtHadron(5.);
99// gc->SetJetsOnlyInCTS(kFALSE); // Don't consider particles in opposite calorimeter
100
101 //--- Option 3 ---
4b707925 102 // AliAnaGammaJetLeadCone *gc = new AliAnaGammaJetLeadCone();
bdcfac30 103// gc->SetDeltaPhiCutRange(2.8,3.5); //Correlation with leading particle delta phi (gamma-particle), radians
104// gc->SetRatioCutRange(0.1,1.2);
105// gc->SetJetsOnlyInCTS(kFALSE); // Don't consider particles in opposite calorimeter
106// //and many more setters and getters
107
108 //--- Option 4 ---
109 // AliAnaGammaJetFinder *gc = new AliAnaGammaJetFinder();
110 //It does nothing for the moment
111
112 //In case of option 1 or 2, we need to select pairs to be candidate to pi0
113 //correlated with the opposite prompt photon. Need to play with this class
114 AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
115 nms->SetInvMassCutRange(0.1,0.17);
4b707925 116 nms->KeepNeutralMesonSelectionHistos(kTRUE); //keep in file several histograms or not.
bdcfac30 117 // and other parameters
118
119 //---------------------------------------------------------------------
120 // Finally: Set analysis algorithm and reader
121 //---------------------------------------------------------------------
122 ana = new AliAnaGamma();
123 ana->SetReader(reader);//pointer to reader
4b707925 124 ana->SetAnalysisType(AliAnaGamma::kCorrelation); //set kPrompt, kCorrelation
bdcfac30 125 ana->SetGammaDirect(gd);//pointer to direct photon algorithm
126 ana->SetGammaCorrelation(gc);//pointer to correlation algorithm
127 ana->SetNeutralMesonSelection(nms); //pi0 pair selection
128 ana->SetCalorimeter("EMCAL"); //Prompt photon calorimeter
129
130 //
131 return ana ;
132}