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