]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/macros/ConfigAnalysisOmegaToPi0Gamma.C
changed the order of call of endofcycle so that images are produced
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisOmegaToPi0Gamma.C
1
2 AliAnaPartCorrMaker*  ConfigAnalysis()
3 {
4         //
5         // Configuration goes here
6         // 
7         printf("======================== \n");
8         printf("ConfigAnalysis() \n");
9         printf("======================== \n");
10         
11         //Detector Fidutial Cuts
12         AliFidutialCut * fidCut = new AliFidutialCut();
13         fidCut->DoCTSFidutialCut(kFALSE) ;
14         fidCut->DoEMCALFidutialCut(kTRUE) ;
15         fidCut->DoPHOSFidutialCut(kTRUE) ;
16         
17         //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
18         fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
19         fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.);
20         
21         fidCut->Print("");
22         
23         //-----------------------------------------------------------  
24         // Reader
25         //-----------------------------------------------------------
26         AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
27         reader->SetDebug(-1);//10 for lots of messages
28         
29         //Switch on or off the detectors information that you want
30         reader->SwitchOnPHOS();
31         reader->SwitchOnEMCAL();
32         reader->SwitchOffCTS();
33         
34         //Min particle pT
35         reader->SetEMCALPtMin(0.2); 
36         reader->SetPHOSPtMin(0.2);
37         //reader->SetCTSPtMin(0.2);
38         
39         reader->SetFidutialCut(fidCut);
40                 
41         //Remove the temporal AODs we create.   
42         reader->SwitchOnCleanStdAOD();  
43         
44         reader->Print("");
45         
46         
47         //---------------------------------------------------------------------
48         // Analysis algorithm
49         //---------------------------------------------------------------------
50         
51         AliCaloPID * pid = new AliCaloPID();
52         // use selection with simple weights
53         //pid->SetEMCALPhotonWeight(0.7);    pid->SetEMCALPi0Weight(0.7);
54         pid->SetPHOSPhotonWeight(0.7);    pid->SetPHOSPi0Weight(0.7);
55         pid->SetDispersionCut(2);
56         pid->SetTOFCut(5.e-9);
57         pid->SetDebug(-1);
58         pid->Print("");
59
60         AliAnaPhoton *anaphoton = new AliAnaPhoton();
61         anaphoton->SetDebug(-1); //10 for lots of messages
62         anaphoton->SetMinPt(0.2);
63         anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
64         anaphoton->SetCaloPID(pid);
65 //        anaphoton->SetFidutialCut(fidCut); //More acceptance selections if needed at this level
66         anaphoton->SetCalorimeter("PHOS");
67         anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
68         anaphoton->SwitchOffCaloPID();
69         anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
70         anaphoton->SwitchOffFidutialCut();
71         anaphoton->SetOutputAODName("PhotonsPHOS");
72         anaphoton->SetOutputAODClassName("AliAODPWG4Particle");
73         anaphoton->AddToHistogramsName("AnaPhotonPHOS_");
74          //Set Histrograms bins and ranges
75         anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
76         anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
77         anaphoton->SetHistoEtaRangeAndNBins(-0.2, 0.2, 100) ;
78         anaphoton->Print("");
79
80         fidCut->Print("");
81         
82         // >>> Second Analysis <<<
83         
84         AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
85         nms->SetInvMassCutRange(0.1, 0.17)      ;
86         nms->KeepNeutralMesonSelectionHistos(kTRUE);
87         //Set Histrograms bins and ranges
88         nms->SetHistoERangeAndNBins(0, 50, 100) ;
89         nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
90         nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
91         nms->SetHistoIMRangeAndNBins(0, 0.4, 100) ;  
92
93         AliAnaPi0EbE *anapi0 = new AliAnaPi0EbE();
94         anapi0->SetDebug(-1);//10 for lots of messages
95         anapi0->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
96         anapi0->SetInputAODName("PhotonsPHOS");
97         anapi0->SetOutputAODName("Pi0sPHOS");
98         anapi0->SetOutputAODClassName("AliAODPWG4Particle");
99         anapi0->SwitchOffDataMC() ;//Access MC stack and fill more histograms
100         anapi0->SetNeutralMesonSelection(nms);
101         anapi0->AddToHistogramsName("AnaPi0EbEPHOS_");
102         //Set Histrograms bins and ranges
103         anapi0->SetHistoPtRangeAndNBins(0, 50, 100) ;
104         anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
105         anapi0->SetHistoEtaRangeAndNBins(-0.2, 0.2, 100) ;
106         anapi0->Print("");
107         
108         AliAnaOmegaToPi0Gamma *anaomega = new AliAnaOmegaToPi0Gamma();
109         anaomega->SetDebug(-1);//10 for lots of messages
110         anaomega->SetInputAODName("Pi0sPHOS");
111         anaomega->SetInputAODPhotonName("PhotonsPHOS");
112         anaomega->SetNPID(3);
113         anaomega->SetNEventsMixed(4);
114         anaomega->SetNPtBinsMinMax(200,0,20.);
115         anaomega->SetNMassBinsMinMas(200,0,1.);
116         anaomega->SetPi0MassPeakWidthCut(0.015);
117         anaomega->SwitchOnFidutialCut();
118         anaomega->SwitchOnDataMC() ;//Access MC stack and fill more histograms
119         anaomega->AddToHistogramsName("AnaNeuPHOS_");
120         anaomega->Print("");
121
122
123 //for EMCAL
124         AliCaloPID * pid1 = new AliCaloPID();
125         // use selection with simple weights
126         pid1->SetEMCALPhotonWeight(0.7);    pid1->SetEMCALPi0Weight(0.7);
127         pid1->SetDispersionCut(2);
128         pid1->SetTOFCut(5.e-9);
129         pid1->SetDebug(-1);
130         pid1->Print("");
131
132         AliAnaPhoton *anaphoton1 = new AliAnaPhoton();
133         anaphoton1->SetDebug(-1); //10 for lots of messages
134         anaphoton1->SetMinPt(0.2);
135         anaphoton1->SetMinDistanceToBadChannel(2, 4, 5);
136         anaphoton1->SetCaloPID(pid);
137         anaphoton1->SetCalorimeter("EMCAL");
138         anaphoton1->SwitchOffDataMC() ;//Access MC stack and fill more histograms
139         anaphoton1->SwitchOffCaloPID();
140         anaphoton1->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
141         anaphoton1->SwitchOffFidutialCut();
142         anaphoton1->SetOutputAODName("PhotonsEMCAL");
143         anaphoton1->SetOutputAODClassName("AliAODPWG4Particle");
144         anaphoton1->AddToHistogramsName("AnaPhotonEMCAL_");
145          //Set Histrograms bins and ranges
146         anaphoton1->SetHistoPtRangeAndNBins(0, 50, 100) ;
147         anaphoton1->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
148         anaphoton1->SetHistoEtaRangeAndNBins(-0.8, 0.8, 100) ;
149         anaphoton1->Print("");
150
151         AliNeutralMesonSelection *nms1 = new AliNeutralMesonSelection();
152         nms1->SetInvMassCutRange(0.1, 0.17)     ;
153         nms1->KeepNeutralMesonSelectionHistos(kTRUE);
154         //Set Histrograms bins and ranges
155         nms1->SetHistoERangeAndNBins(0, 50, 100) ;
156         nms1->SetHistoPtRangeAndNBins(0, 50, 100) ;
157         nms1->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
158         nms1->SetHistoIMRangeAndNBins(0, 0.4, 100) ;
159
160
161         AliAnaPi0EbE *anapi01 = new AliAnaPi0EbE();
162         anapi01->SetDebug(-1);//10 for lots of messages
163         anapi01->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
164         anapi01->SetInputAODName("PhotonsEMCAL");
165         anapi01->SetOutputAODName("Pi0sEMCAL");
166         anapi01->SetOutputAODClassName("AliAODPWG4Particle");
167         anapi01->SwitchOffDataMC() ;//Access MC stack and fill more histograms
168         anapi01->SetNeutralMesonSelection(nms1);
169         anapi01->AddToHistogramsName("AnaPi0EbEEMCAL_");
170         //Set Histrograms bins and ranges
171         anapi01->SetHistoPtRangeAndNBins(0, 50, 100) ;
172         anapi01->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
173         anapi01->SetHistoEtaRangeAndNBins(-0.8, 0.8, 100) ;
174         anapi01->Print("");
175
176         AliAnaOmegaToPi0Gamma *anaomega1 = new AliAnaOmegaToPi0Gamma();
177         anaomega1->SetDebug(-1);//10 for lots of messages
178         anaomega1->SetInputAODName("Pi0sEMCAL");
179         anaomega1->SetInputAODPhotonName("PhotonsEMCAL");
180         anaomega1->SetNPID(3);
181         anaomega1->SetNEventsMixed(4);
182         //anaomega1->SetNAsyBinsMinMax(200,0,1.);
183         anaomega1->SetNPtBinsMinMax(200,0,20.);
184         anaomega1->SetNMassBinsMinMas(200,0,1.);
185         anaomega1->SetPi0MassPeakWidthCut(0.015);
186         anaomega1->SwitchOnFidutialCut();
187         anaomega1->SwitchOnDataMC() ;//Access MC stack and fill more histograms
188         anaomega1->AddToHistogramsName("AnaNeuEMCAL_");
189         anaomega1->Print("");
190
191
192         //---------------------------------------------------------------------
193         // Set  analysis algorithm and reader
194         //---------------------------------------------------------------------
195         maker = new AliAnaPartCorrMaker();
196         maker->SetReader(reader);//pointer to reader
197         maker->SetAnaDebug(0);
198         maker->AddAnalysis(anaphoton,0);
199         maker->AddAnalysis(anapi0,1);
200         maker->AddAnalysis(anaomega,2);
201
202         maker->AddAnalysis(anaphoton1,3);
203         maker->AddAnalysis(anapi01,4);
204        maker->AddAnalysis(anaomega1,5);
205
206         maker->SwitchOnHistogramsMaker()  ;
207         maker->SwitchOnAODsMaker()  ;
208         
209         maker->Print("");
210         //
211         printf("======================== \n");
212         printf("END ConfigAnalysis() \n");
213         printf("======================== \n");
214         return maker ;
215 }