Lines getting the matched track moved to a method in AliCalorimeterUtils. Lines copie...
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / macros / Train / DEtaDPhiKaons / ConfigFemtoAnalysis.C
1 /*********************************************************************
2  *                                                                   *
3  * Configfemtoanalysis.C - configuration macro for the femtoscopic   *
4  * analysis, meant as a QA process for two-particle effects          *
5  *                                                                   *
6  * Author: Adam Kisiel (Adam.Kisiel@cern.ch)                         *
7  *                                                                   *
8  *********************************************************************/
9
10 #if !defined(__CINT__) || defined(__MAKECINT_)
11 #include "AliFemtoManager.h"
12 #include "AliFemtoEventReaderESDChain.h"
13 #include "AliFemtoEventReaderESDChainKine.h"
14 #include "AliFemtoEventReaderAODChain.h"
15 #include "AliFemtoSimpleAnalysis.h"
16 #include "AliFemtoBasicEventCut.h"
17 #include "AliFemtoESDTrackCut.h"
18 #include "AliFemtoCorrFctn.h"
19 #include "AliFemtoCutMonitorParticleYPt.h"
20 #include "AliFemtoCutMonitorParticleVertPos.h"
21 #include "AliFemtoCutMonitorParticleMomRes.h"
22 #include "AliFemtoCutMonitorParticlePID.h"
23 #include "AliFemtoCutMonitorEventMult.h"
24 #include "AliFemtoCutMonitorEventVertex.h"
25 #include "AliFemtoShareQualityTPCEntranceSepPairCut.h"
26 #include "AliFemtoPairCutAntiGamma.h"
27 #include "AliFemtoPairCutRadialDistance.h"
28 #include "AliFemtoQinvCorrFctn.h"
29 #include "AliFemtoCorrFctnNonIdDR.h"
30 #include "AliFemtoShareQualityCorrFctn.h"
31 #include "AliFemtoTPCInnerCorrFctn.h"
32 #include "AliFemtoVertexMultAnalysis.h"
33 #include "AliFemtoCorrFctn3DSpherical.h"
34 #include "AliFemtoChi2CorrFctn.h"
35 #include "AliFemtoCorrFctnTPCNcls.h"
36 #include "AliFemtoBPLCMS3DCorrFctn.h"
37 #include "AliFemtoCorrFctn3DLCMSSym.h"
38 #include "AliFemtoModelBPLCMSCorrFctn.h"
39 #include "AliFemtoModelCorrFctn3DSpherical.h"
40 #include "AliFemtoModelGausLCMSFreezeOutGenerator.h"
41 #include "AliFemtoModelGausRinvFreezeOutGenerator.h"
42 #include "AliFemtoModelManager.h"
43 #include "AliFemtoModelWeightGeneratorBasic.h"
44 #include "AliFemtoModelWeightGeneratorLednicky.h"
45 #include "AliFemtoCorrFctnDirectYlm.h"
46 #include "AliFemtoModelCorrFctnDirectYlm.h"
47 #include "AliFemtoModelCorrFctnSource.h"
48 #include "AliFemtoCutMonitorParticlePtPDG.h"
49 #include "AliFemtoKTPairCut.h"
50 #incude "AliFemtoPairCutPt.h"
51 #endif
52
53 //________________________________________________________________________
54 AliFemtoManager* ConfigFemtoAnalysis() {
55
56   double PionMass = 0.13956995;
57   double KaonMass = 0.493677;
58   double ProtonMass = 0.938272013;
59         
60
61   int runmults[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
62   int multbins[11] = {0.001, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900};
63   
64   int runch[3] = {1, 1, 1};
65   const char *chrgs[3] = { "KPKP", "KMKM", "KMKP" };
66   
67
68   int runktdep = 1;
69   double ktrng[3] = {0.0, 0.75, 100.0};
70   //  double ktrng[8] = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 1.0};
71
72   int numOfMultBins = 10;  
73   int numOfChTypes = 3;
74   int numOfkTbins = 2;
75
76   int runqinv = 1;
77   int runshlcms = 1;// 0:PRF(PAP), 1:LCMS(PP,APAP)
78
79   int runtype = 2; // Types 0 - global, 1 - ITS only, 2 - TPC Inner
80   int isrealdata = 1;
81
82   int gammacut = 1;
83   
84   double shqmax = 0.5;
85   int nbinssh = 100;
86
87   AliFemtoEventReaderAODChain *Reader = new AliFemtoEventReaderAODChain();
88   Reader->SetFilterBit(7);
89   Reader->SetCentralityPreSelection(0.001, 910);
90
91   AliFemtoManager* Manager = new AliFemtoManager();
92   Manager->SetEventReader(Reader);
93
94   AliFemtoVertexMultAnalysis    *anetaphitpc[320];
95   AliFemtoBasicEventCut         *mecetaphitpc[320];
96   AliFemtoCutMonitorEventMult   *cutPassEvMetaphitpc[320];
97   AliFemtoCutMonitorEventMult   *cutFailEvMetaphitpc[320];
98   AliFemtoCutMonitorEventVertex *cutPassEvVetaphitpc[320];
99   AliFemtoCutMonitorEventVertex *cutFailEvVetaphitpc[320];
100   AliFemtoESDTrackCut           *dtc1etaphitpc[320];
101   AliFemtoESDTrackCut           *dtc2etaphitpc[320];
102   AliFemtoCutMonitorParticleYPt *cutPass1YPtetaphitpc[320];
103   AliFemtoCutMonitorParticleYPt *cutFail1YPtetaphitpc[320];
104   AliFemtoCutMonitorParticlePID *cutPass1PIDetaphitpc[320];
105   AliFemtoCutMonitorParticlePID *cutFail1PIDetaphitpc[320];
106   AliFemtoCutMonitorParticleYPt *cutPass2YPtetaphitpc[320];
107   AliFemtoCutMonitorParticleYPt *cutFail2YPtetaphitpc[320];
108   AliFemtoCutMonitorParticlePID *cutPass2PIDetaphitpc[320];
109   AliFemtoCutMonitorParticlePID *cutFail2PIDetaphitpc[320];
110   //   AliFemtoPairCutAntiGamma      *sqpcetaphitpcdiff[320];
111   //   AliFemtoShareQualityTPCEntranceSepPairCut      *sqpcetaphitpcsame[320];
112   AliFemtoPairCutAntiGamma      *sqpcetaphitpc[320];
113   //  AliFemtoPairCutRadialDistance      *sqpcetaphitpc[320];
114   //  AliFemtoChi2CorrFctn          *cchiqinvetaphitpc[320];
115   AliFemtoPairCutPt             *ktpcuts[320];
116   AliFemtoCorrFctnDirectYlm     *cylmkttpc[320];
117   //AliFemtoCorrFctnDirectYlm     *cylmetaphitpc[320];
118   AliFemtoQinvCorrFctn          *cqinvkttpc[320];
119   AliFemtoQinvCorrFctn          *cqinvtpc[320];
120   AliFemtoCorrFctnNonIdDR       *ckstartpc[320];
121   AliFemtoCorrFctnDEtaDPhi      *cdedpetaphi[320];
122
123   //   AliFemtoCorrFctn3DLCMSSym     *cq3dlcmskttpc[20*2];
124   //   AliFemtoCorrFctnTPCNcls       *cqinvnclstpc[20];
125   //   AliFemtoShareQualityCorrFctn  *cqinvsqtpc[20*10];
126   //   AliFemtoChi2CorrFctn          *cqinvchi2tpc[20];
127   //   AliFemtoTPCInnerCorrFctn      *cqinvinnertpc[20*10];
128   
129   // *** Third QA task - HBT analysis with all pair cuts off, TPC only ***
130   // *** Begin pion-pion (positive) analysis ***
131   int aniter = 0;  
132
133   for (int imult = 0; imult < numOfMultBins; imult++) {
134     if (runmults[imult]) {
135
136       for (int ichg = 0; ichg < numOfChTypes; ichg++) {
137         if (runch[ichg]) {
138
139           aniter = ichg * numOfMultBins + imult;
140           anetaphitpc[aniter] = new AliFemtoVertexMultAnalysis(8, -8.0, 8.0, 4, multbins[imult], multbins[imult+1]);
141           anetaphitpc[aniter]->SetNumEventsToMix(5);
142           anetaphitpc[aniter]->SetMinSizePartCollection(1);
143
144           mecetaphitpc[aniter] = new AliFemtoBasicEventCut();
145           mecetaphitpc[aniter]->SetEventMult(0.001,100000);
146           mecetaphitpc[aniter]->SetVertZPos(-8,8);
147
148           if (isrealdata)
149             mecetaphitpc[aniter]->SetAcceptOnlyPhysics(kTRUE);
150                   
151           cutPassEvMetaphitpc[aniter] = new AliFemtoCutMonitorEventMult(Form("cutPass%stpcM%i", chrgs[ichg], imult));
152           cutFailEvMetaphitpc[aniter] = new AliFemtoCutMonitorEventMult(Form("cutFail%stpcM%i", chrgs[ichg], imult));
153           mecetaphitpc[aniter]->AddCutMonitor(cutPassEvMetaphitpc[aniter], cutFailEvMetaphitpc[aniter]);
154           
155           cutPassEvVetaphitpc[aniter] = new AliFemtoCutMonitorEventVertex(Form("cutPass%stpcM%i", chrgs[ichg], imult));
156           cutFailEvVetaphitpc[aniter] = new AliFemtoCutMonitorEventVertex(Form("cutFail%stpcM%i", chrgs[ichg], imult));
157           mecetaphitpc[aniter]->AddCutMonitor(cutPassEvVetaphitpc[aniter], cutFailEvVetaphitpc[aniter]);
158           
159           dtc1etaphitpc[aniter] = new AliFemtoESDTrackCut();
160           dtc2etaphitpc[aniter] = new AliFemtoESDTrackCut();
161
162           if (ichg == 0)
163             {
164               dtc1etaphitpc[aniter]->SetCharge(1.0);
165               //dtc2etaphitpc[aniter]->SetCharge(1.0);
166             }
167           else if (ichg == 1)
168             {
169               dtc1etaphitpc[aniter]->SetCharge(-1.0);
170               //dtc2etaphitpc[aniter]->SetCharge(-1.0);
171             }
172           else if (ichg == 2) 
173             {
174               dtc1etaphitpc[aniter]->SetCharge(-1.0);
175               dtc2etaphitpc[aniter]->SetCharge(1.0);
176             }
177           
178           dtc1etaphitpc[aniter]->SetEta(-0.8,0.8);
179           dtc1etaphitpc[aniter]->SetMass(KaonMass);       
180           dtc1etaphitpc[aniter]->SetMostProbableKaon();
181     
182           if(ichg==2)
183             {
184               dtc2etaphitpc[aniter]->SetEta(-0.8,0.8);
185               dtc2etaphitpc[aniter]->SetMass(KaonMass);   
186               dtc2etaphitpc[aniter]->SetMostProbableKaon();
187             }
188
189           
190           // Track quality cuts
191
192           if (runtype == 0) {
193             dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit|AliESDtrack::kITSrefit);
194             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit);
195             //    dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kITSrefit);
196             dtc1etaphitpc[aniter]->SetminTPCncls(80);
197             dtc1etaphitpc[aniter]->SetRemoveKinks(kTRUE);
198             dtc1etaphitpc[aniter]->SetLabel(kFALSE);
199             //    dtc1etaphitpc[aniter]->SetMaxITSChiNdof(6.0);
200             dtc1etaphitpc[aniter]->SetMaxTPCChiNdof(4.0);
201             dtc1etaphitpc[aniter]->SetMaxImpactXY(0.2);
202             //            dtc1etaphitpc[aniter]->SetMaxImpactXYPtDep(0.0182, 0.0350, -1.01);
203             dtc1etaphitpc[aniter]->SetMaxImpactZ(0.15);
204             //      dtc1etaphitpc[aniter]->SetMaxSigmaToVertex(6.0);
205           }
206           else if (runtype == 1) {
207             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit|AliESDtrack::kITSrefit);
208             //    dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit);
209             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kITSrefit|AliESDtrack::kITSpureSA);
210             //      dtc1etaphitpc[aniter]->SetminTPCncls(70);
211             dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kITSrefit);
212             dtc1etaphitpc[aniter]->SetRemoveKinks(kTRUE);
213             dtc1etaphitpc[aniter]->SetLabel(kFALSE);
214             //    dtc1etaphitpc[aniter]->SetMaxITSChiNdof(6.0);
215             //      dtc1etaphitpc[aniter]->SetMaxTPCChiNdof(6.0);
216             dtc1etaphitpc[aniter]->SetMaxImpactXY(0.2);
217             dtc1etaphitpc[aniter]->SetMaxImpactZ(0.25);
218             //      dtc1etaphitpc[aniter]->SetMaxSigmaToVertex(6.0);
219           }
220           else if (runtype == 2) {
221             dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCin);
222             dtc1etaphitpc[aniter]->SetminTPCncls(80);
223             dtc1etaphitpc[aniter]->SetRemoveKinks(kTRUE);
224             dtc1etaphitpc[aniter]->SetLabel(kFALSE);
225             dtc1etaphitpc[aniter]->SetMaxTPCChiNdof(4.0);
226             dtc1etaphitpc[aniter]->SetMaxImpactXY(2.4);
227             dtc1etaphitpc[aniter]->SetMaxImpactZ(3.0);
228
229
230             if(ichg==2)
231               {
232                 dtc2etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCin);
233                 dtc2etaphitpc[aniter]->SetminTPCncls(80);
234                 dtc2etaphitpc[aniter]->SetRemoveKinks(kTRUE);
235                 dtc2etaphitpc[aniter]->SetLabel(kFALSE);
236                 dtc2etaphitpc[aniter]->SetMaxTPCChiNdof(4.0);
237                 dtc2etaphitpc[aniter]->SetMaxImpactXY(2.4);
238                 dtc2etaphitpc[aniter]->SetMaxImpactZ(3.0);
239               }
240
241             
242           }
243           
244           cutPass1YPtetaphitpc[aniter] = new AliFemtoCutMonitorParticleYPt(Form("cutPass1%stpcM%i", chrgs[ichg], imult),KaonMass);
245           cutFail1YPtetaphitpc[aniter] = new AliFemtoCutMonitorParticleYPt(Form("cutFail1%stpcM%i", chrgs[ichg], imult),KaonMass);
246           dtc1etaphitpc[aniter]->AddCutMonitor(cutPass1YPtetaphitpc[aniter], cutFail1YPtetaphitpc[aniter]);
247           
248           cutPass1PIDetaphitpc[aniter] = new AliFemtoCutMonitorParticlePID(Form("cutPass1%stpcM%i", chrgs[ichg], imult),1);//0-pion,1-kaon,2-proton
249           cutFail1PIDetaphitpc[aniter] = new AliFemtoCutMonitorParticlePID(Form("cutFail1%stpcM%i", chrgs[ichg], imult),1);
250           dtc1etaphitpc[aniter]->AddCutMonitor(cutPass1PIDetaphitpc[aniter], cutFail1PIDetaphitpc[aniter]);
251
252           if(ichg==2)
253             {
254               cutPass2YPtetaphitpc[aniter] = new AliFemtoCutMonitorParticleYPt(Form("cutPass2%stpcM%i", chrgs[ichg], imult),KaonMass);
255               cutFail2YPtetaphitpc[aniter] = new AliFemtoCutMonitorParticleYPt(Form("cutFail2%stpcM%i", chrgs[ichg], imult),KaonMass);
256               dtc2etaphitpc[aniter]->AddCutMonitor(cutPass2YPtetaphitpc[aniter], cutFail2YPtetaphitpc[aniter]);
257
258               cutPass2PIDetaphitpc[aniter] = new AliFemtoCutMonitorParticlePID(Form("cutPass2%stpcM%i", chrgs[ichg], imult),1);//0-pion,1-kaon,2-proton
259               cutFail2PIDetaphitpc[aniter] = new AliFemtoCutMonitorParticlePID(Form("cutFail2%stpcM%i", chrgs[ichg], imult),1);
260               dtc2etaphitpc[aniter]->AddCutMonitor(cutPass2PIDetaphitpc[aniter], cutFail2PIDetaphitpc[aniter]);
261             }
262
263           sqpcetaphitpc[aniter] = new AliFemtoPairCutAntiGamma();
264
265           if (runtype == 0) {
266             sqpcetaphitpc[aniter]->SetShareQualityMax(1.0);
267             sqpcetaphitpc[aniter]->SetShareFractionMax(0.05);
268             sqpcetaphitpc[aniter]->SetRemoveSameLabel(kFALSE);
269             // sqpcetaphitpc[aniter]->SetMaxEEMinv(0.0);
270             // sqpcetaphitpc[aniter]->SetMaxThetaDiff(0.0);
271             //      sqpcetaphitpc[aniter]->SetTPCEntranceSepMinimum(1.5);
272             //sqpcetaphitpc[aniter]->SetRadialDistanceMinimum(0.12, 0.03);
273             //      sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(0.02);
274           }
275           else if (runtype == 1) {
276             sqpcetaphitpc[aniter]->SetShareQualityMax(1.0);
277             sqpcetaphitpc[aniter]->SetShareFractionMax(1.05);
278             sqpcetaphitpc[aniter]->SetRemoveSameLabel(kFALSE);
279             // sqpcetaphitpc[aniter]->SetMaxEEMinv(0.002);
280             // sqpcetaphitpc[aniter]->SetMaxThetaDiff(0.008);
281             //      sqpcetaphitpc[aniter]->SetTPCEntranceSepMinimum(5.0);
282             //sqpcetaphitpc[aniter]->SetRadialDistanceMinimum(1.2, 0.03);
283             //      sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(0.02);
284           }
285           else if (runtype == 2) {
286             sqpcetaphitpc[aniter]->SetUseAOD(kTRUE);
287             sqpcetaphitpc[aniter]->SetShareQualityMax(1.0);
288             sqpcetaphitpc[aniter]->SetShareFractionMax(0.05);
289             sqpcetaphitpc[aniter]->SetRemoveSameLabel(kFALSE);
290
291             if (gammacut == 0) {              
292               sqpcetaphitpc[aniter]->SetMaxEEMinv(0.0);
293               sqpcetaphitpc[aniter]->SetMaxThetaDiff(0.0);
294             }
295             else if (gammacut == 1) { 
296               sqpcetaphitpc[aniter]->SetMaxEEMinv(0.002);
297               sqpcetaphitpc[aniter]->SetMaxThetaDiff(0.008);
298             }
299
300             //phi-star cut - values from Johana
301             //      sqpcetaphitpc[aniter]->SetPhiStarDifferenceMinimum(0.012);
302             //      sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(0.017);
303
304           }
305           
306           anetaphitpc[aniter]->SetEventCut(mecetaphitpc[aniter]);
307
308           
309           if(ichg==2)
310             {
311               anetaphitpc[aniter]->SetFirstParticleCut(dtc1etaphitpc[aniter]);
312               anetaphitpc[aniter]->SetSecondParticleCut(dtc2etaphitpc[aniter]);
313             }
314           else
315             {
316               anetaphitpc[aniter]->SetFirstParticleCut(dtc1etaphitpc[aniter]);
317               anetaphitpc[aniter]->SetSecondParticleCut(dtc1etaphitpc[aniter]);
318             }
319
320           anetaphitpc[aniter]->SetPairCut(sqpcetaphitpc[aniter]);
321           
322
323           /*if (ichg == 2) {
324             ckstartpc[aniter] = new AliFemtoCorrFctnNonIdDR(Form("ckstar%stpcM%i", chrgs[ichg], imult),nbinssh,0.0,shqmax);
325             anetaphitpc[aniter]->AddCorrFctn(ckstartpc[aniter]);
326           }
327           else {  
328             cqinvtpc[aniter] = new AliFemtoQinvCorrFctn(Form("cqinv%stpcM%i", chrgs[ichg], imult),nbinssh,0.0,shqmax);
329             anetaphitpc[aniter]->AddCorrFctn(cqinvtpc[aniter]);
330             }*/
331
332           //cylmkttpc[aniter] = new AliFemtoCorrFctnDirectYlm(Form("cylm%stpcM%i", chrgs[ichg], imult),2,nbinssh, 0.0,shqmax,runshlcms);
333           //anetaphitpc[aniter]->AddCorrFctn(cylmkttpc[aniter]);
334
335           cdedpetaphi[aniter] = new AliFemtoCorrFctnDEtaDPhi(Form("cdedp%stpcM%i", chrgs[ichg], imult),45, 45);
336           anetaphitpc[aniter]->AddCorrFctn(cdedpetaphi[aniter]);
337
338           
339           if (runktdep) {
340             int ktm;
341             for (int ikt=0; ikt<numOfkTbins; ikt++) {
342
343               ktm = aniter * numOfkTbins + ikt;
344               ktpcuts[ktm] = new AliFemtoPairCutPt(ktrng[ikt], ktrng[ikt+1]);
345               
346               //              cylmkttpc[ktm] = new AliFemtoCorrFctnDirectYlm(Form("cylm%stpcM%ikT%i", chrgs[ichg], imult, ikt),3,
347               //                                                             nbinssh, 0.0,
348               //                                                             (imult>6)?shqmax*2.5:shqmax,
349               //                                                             runshlcms);
350               //              cylmkttpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
351               //              anetaphitpc[aniter]->AddCorrFctn(cylmkttpc[ktm]);
352               
353               //cqinvkttpc[ktm] = new AliFemtoQinvCorrFctn(Form("cqinv%stpcM%ikT%i", chrgs[ichg], imult, ikt),nbinssh,0.0,(imult>6)?shqmax*2.5:shqmax);
354               //cqinvkttpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
355               //anetaphitpc[aniter]->AddCorrFctn(cqinvkttpc[ktm]);
356
357               cdedpetaphi[ktm] = new AliFemtoCorrFctnDEtaDPhi(Form("cdedp%stpcM%ipT%i", chrgs[ichg], imult,ikt),45, 45);
358               cdedpetaphi[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
359               anetaphitpc[aniter]->AddCorrFctn(cdedpetaphi[ktm]);
360
361               //              cqinvsqtpc[ktm] = new AliFemtoShareQualityCorrFctn(Form("cqinvsq%stpcM%ikT%i", chrgs[ichg], imult, ikt),nbinssh,0.0,shqmax);
362               //              cqinvsqtpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
363               //              anetaphitpc[aniter]->AddCorrFctn(cqinvsqtpc[ktm]);
364
365               //              cqinvinnertpc[ktm] = new AliFemtoTPCInnerCorrFctn(Form("cqinvinner%stpcM%ikT%i", chrgs[ichg], imult, ikt),nbinssh,0.0,shqmax);
366               //              cqinvinnertpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
367               //              cqinvinnertpc[ktm]->SetRadius(1.2);
368               //              anetaphitpc[aniter]->AddCorrFctn(cqinvinnertpc[ktm]);
369
370               //              if (run3d) {
371               //                cq3dlcmskttpc[ktm] = new AliFemtoCorrFctn3DLCMSSym(Form("cq3d%stpcM%ikT%i", chrgs[ichg], imult, ikt),60,(imult>3)?((imult>6)?((imult>7)?0.6:0.4):0.25):0.15);
372               //                cq3dlcmskttpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
373               //                anetaphitpc[aniter]->AddCorrFctn(cq3dlcmskttpc[ktm]);
374               //              }
375             }
376           }
377           
378           Manager->AddAnalysis(anetaphitpc[aniter]);    
379         }
380       }
381     }
382   }
383   // *** End pion-pion (positive) analysis
384
385   return Manager;
386 }