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