]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/ConfigAnalysisGammaDirect.C
correct typo
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisGammaDirect.C
CommitLineData
c067518e 1/* $Id:$ */
d92b41ad 2
3//------------------------------------
4// Configuration macro example:
5//
6// Do prompt photon analysis with ESDs
7// Gamma in PHOS,
8// for EMCAL, PHOS by EMCAL where necessary
9//
10// Author : Gustavo Conesa Balbastre (INFN-LNF)
11//------------------------------------
12
13AliAnaMaker* ConfigAnalysis()
14{
15 //
16 // Configuration goes here
17 //
18 printf("======================== \n");
19 printf("ConfigAnalysis() \n");
20 printf("======================== \n");
21
22
23 //Detector Fidutial Cuts
24 AliFidutialCut * fidCut = new AliFidutialCut();
25 fidCut->DoCTSFidutialCut(kTRUE) ;
26 //fidCut->DoEMCALFidutialCut(kFALSE) ;
27 fidCut->DoPHOSFidutialCut(kTRUE) ;
28
29 fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
c067518e 30 //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
d92b41ad 31 fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
32
33 fidCut->Print("");
34
35 //-----------------------------------------------------------
36 // Reader
37 //-----------------------------------------------------------
38 AliCaloTrackReader *reader = new AliCaloTrackESDReader();
39 reader->SetDebug(-1);
40
41 //Switch on or off the detectors information that you want
42 reader->SwitchOffEMCAL();
43 reader->SwitchOnCTS();
44 reader->SwitchOnPHOS();
45
46 //Min particle pT
47 //reader->SetEMCALPtMin(0.5);
48 reader->SetPHOSPtMin(0.5);
49 reader->SetCTSPtMin(0.2);
50
51 reader->SetFidutialCut(fidCut);
52 reader->Print("");
53
54
55 //---------------------------------------------------------------------
56 // Analysis algorithm
57 //---------------------------------------------------------------------
58
59 //Detector Fidutial Cuts for analysis part
60 AliFidutialCut * fidCut2 = new AliFidutialCut();
61 fidCut2->DoCTSFidutialCut(kFALSE) ;
62 //fidCut2->DoEMCALFidutialCut(kTRUE) ;
63 fidCut2->DoPHOSFidutialCut(kFALSE) ;
64
65 fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
66 //fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
67 fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
68 fidCut2->Print("");
69
70 AliCaloPID * pid = new AliCaloPID();
71 // use selection with simple weights
72 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
73 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
74 // use more complicated selection, particle weight depending on cluster energy
75// pid->UsePHOSPIDWeightFormula(kTRUE);
76// 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))");
77// 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))");
78// pid->SetPHOSPhotonWeightFormula(photonF);
79// pid->SetPHOSPi0WeightFormula(pi0F);
80 pid->Print("");
81
82 AliIsolationCut * ic = new AliIsolationCut();
83 ic->SetConeSize(0.4);
84 ic->SetPtThreshold(1.);
85 ic->SetICMethod(AliIsolationCut::kPtThresIC);
86 ic->Print("");
87
88 AliAnaGammaDirect *ana = new AliAnaGammaDirect();
89 ana->SetDebug(-1);
90 ana->SetMinPt(5.);
91 ana->SetCaloPID(pid);
92 ana->SetFidutialCut(fidCut2);
93 ana->SetIsolationCut(ic) ;
94 ana->SetDetector("PHOS");
95 ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms
96
97 ana->SwitchOnCaloPID();
98 ana->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
99 ana->SwitchOnFidutialCut();
100 //Select clusters with no pair, if both clusters with pi0 mass
101 ana->SwitchOffInvariantMass();
102 //Do isolation cut
103 ana->SwitchOnIsolation();
104
105 //Do or not do isolation with previously produced AODs.
106 //No effect if use of SwitchOnSeveralIsolation()
107 ana->SwitchOffReIsolation();
108
109 //Multiple IC
110 ana->SwitchOffSeveralIsolation() ;
111// ana->SwitchOnSeveralIsolation() ;
112// ana->SetNCones(2) ;
113// ana->SetNPtThresFrac(2) ;
114// ana->SetConeSizes(0, 0.3) ; ana->SetConeSizes(1, 0.4) ;
115// ana->SetPtThresholds(0, 0.5) ; ana->SetPtThresholds(1, 1.) ;
116// ana->SetPtFractions(0, 1.) ; ana->SetPtFractions(1, 1.5) ;
117
118 ana->Print("");
119
120 //---------------------------------------------------------------------
121 // Set analysis algorithm and reader
122 //---------------------------------------------------------------------
123 maker = new AliAnaMaker();
124 maker->SetReader(reader);//pointer to reader
125 maker->AddAnalysis(ana,0);
126 maker->SetAODBranchName("Photon");
127 maker->SetAnaDebug(1) ;
128 maker->SwitchOnHistogramsMaker() ;
129 //maker->SwitchOffHistogramsMaker() ;
130 maker->SwitchOnAODsMaker() ;
131 //maker->SwitchOffAODsMaker() ;
132
133 maker->Print("");
134 //
135 printf("======================== \n");
136 printf("END ConfigAnalysis() \n");
137 printf("======================== \n");
138 return maker ;
139}