update of macros for kaon femto train
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / macros / Train / KchKch_purity_test / PbPb2011 / 1090 / 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 "AliFemtoKKTrackCut.h"
20 #include "AliFemtoCorrFctn.h"
21 #include "AliFemtoCutMonitorParticleYPt.h"
22 #include "AliFemtoCutMonitorParticleVertPos.h"
23 #include "AliFemtoCutMonitorParticleMomRes.h"
24 #include "AliFemtoCutMonitorParticlePID.h"
25 #include "AliFemtoCutMonitorEventMult.h"
26 #include "AliFemtoCutMonitorEventVertex.h"
27 #include "AliFemtoShareQualityTPCEntranceSepPairCut.h"
28 #include "AliFemtoPairCutAntiGamma.h"
29 #include "AliFemtoPairCutRadialDistance.h"
30 #include "AliFemtoPairCutRadialDistanceKK.h"
31 #include "AliFemtoQinvCorrFctn.h"
32 #include "AliFemtoShareQualityCorrFctn.h"
33 #include "AliFemtoTPCInnerCorrFctn.h"
34 #include "AliFemtoVertexMultAnalysis.h"
35 #include "AliFemtoCorrFctn3DSpherical.h"
36 #include "AliFemtoChi2CorrFctn.h"
37 #include "AliFemtoCorrFctnTPCNcls.h"
38 #include "AliFemtoBPLCMS3DCorrFctn.h"
39 #include "AliFemtoCorrFctn3DLCMSSym.h"
40 #include "AliFemtoModelBPLCMSCorrFctn.h"
41 #include "AliFemtoModelCorrFctn3DSpherical.h"
42 #include "AliFemtoModelGausLCMSFreezeOutGenerator.h"
43 #include "AliFemtoModelGausRinvFreezeOutGenerator.h"
44 #include "AliFemtoModelManager.h"
45 #include "AliFemtoModelWeightGeneratorBasic.h"
46 #include "AliFemtoModelWeightGeneratorLednicky.h"
47 #include "AliFemtoCorrFctnDirectYlm.h"
48 #include "AliFemtoModelCorrFctnDirectYlm.h"
49 #include "AliFemtoModelCorrFctnSource.h"
50 #include "AliFemtoKTPairCut.h"
51 #endif
52
53 //________________________________________________________________________
54 AliFemtoManager* ConfigFemtoAnalysis() {
55
56   double PionMass = 0.13956995;
57   double KaonMass = 0.493677;
58   const int cMu=3;
59   const int cKt=3;
60
61   //-------Single track cuts------------------------------------------------->
62   //STANDART
63   double DCAxy=2.4;//cm // our standard is 0.20 cm; super narrow was 0.015cm
64   double DCAz =3.0;//cm // our standard is 0.15 cm;
65  //test //ptdependent cut
66   //double DCAxy=2.4;//cm // our standard is 0.20 cm; super narrow was 0.015cm
67   //double DCAz =2.0;//cm // our standard is 0.15 cm;
68   
69   
70   //-------Single track cuts-------------------------------------------------<
71   //=======Double track cuts=================================================>
72   //Dhevan's : PhiStarDifferenceMinimum=0.06; EtaDifferenceMinimum=0.02;
73   double PhiStarDifferenceMinimum=0.03;//0.017; //[radian]
74   double EtaDifferenceMinimum=0.02;//0.015; //[radian]
75   //=======Double track cuts=================================================<
76
77   // Switches for QA analyses
78  
79   int runmults[4] = {0, 1, 1, 1};
80   int multbins[5] = {0, 100, 300, 500, 900};
81
82   //.................................................
83
84   int runch[2] = {1, 1};
85   const char *chrgs[2] = { "Kp", "Km"};
86   
87   
88   int runktdep = 1;
89 //YS  double ktrng[cKt+1] = {0.2, 0.36, 0.48, 0.6, 1.0, 1.5};
90   double ktrng[cKt+1] = {0.2, 0.4, 0.6, 1.5};
91
92 // double ktrng[8] = {0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 2.0};
93
94   int run3d = 1;
95   int runshlcms = 0;
96
97   int runtype = 2; // Types 0 - global, 1 - ITS only, 2 - TPC Inner
98   int isrealdata = 1;
99
100   //   AliFemtoEventReaderESDChainKine* Reader=new AliFemtoEventReaderESDChainKine();
101   //   Reader->SetConstrained(true);
102   //   Reader->SetUseTPCOnly(false);
103
104   double shqmax;
105   double shqmaxSH;
106   int nbinssh = 100;
107
108 //ml  if (runshlcms) shqmax = 0.25;
109 //  else shqmax = 0.9;
110   
111
112   if (runshlcms) shqmaxSH = 0.25;
113   shqmax = 0.9;
114   
115
116   // AliFemtoEventReaderESDChain* Reader=new AliFemtoEventReaderESDChain();
117   // Reader->SetConstrained(true);
118   // Reader->SetUseTPCOnly(false);
119   // Reader->SetReadTPCInner(false);
120   // Reader->SetUseMultiplicity(AliFemtoEventReaderESDChain::kV0Centrality);
121
122   // if (runtype == 0)
123   //   Reader->SetReadTrackType(AliFemtoEventReaderESDChain::kGlobal);
124   // else if (runtype == 1)
125   //   Reader->SetReadTrackType(AliFemtoEventReaderESDChain::kITSOnly);
126   // else if (runtype == 2)
127   //   Reader->SetReadTrackType(AliFemtoEventReaderESDChain::kTPCOnly);
128   // if (isrealdata)
129   //   Reader->SetUsePhysicsSelection(kTRUE);
130   // else
131   //   Reader->SetUsePhysicsSelection(kFALSE);
132
133   // Reader->SetUseMultiplicity(AliFemtoEventReaderESDChain::kV0Centrality);
134
135   AliFemtoEventReaderAODChain *Reader = new AliFemtoEventReaderAODChain();
136     Reader->SetFilterBit(7);
137 //    Reader->SetCentralityPreSelection(0, 100);
138     Reader->SetCentralityPreSelection(100, 900);
139     Reader->SetDCAglobalTrack(kTRUE);//option the DCA information from global tracks (ITS+TPC)
140     
141   AliFemtoManager* Manager=new AliFemtoManager();
142   Manager->SetEventReader(Reader);
143
144   AliFemtoVertexMultAnalysis    *anetaphitpc[20];
145   AliFemtoBasicEventCut         *mecetaphitpc[20];
146   AliFemtoCutMonitorEventMult   *cutPassEvMetaphitpc[20];
147   AliFemtoCutMonitorEventMult   *cutFailEvMetaphitpc[20];
148   AliFemtoCutMonitorEventVertex *cutPassEvVetaphitpc[20];
149   AliFemtoCutMonitorEventVertex *cutFailEvVetaphitpc[20];
150   AliFemtoKKTrackCut           *dtc1etaphitpc[20];
151   AliFemtoKKTrackCut           *dtc2etaphitpc[20];
152 //  AliFemtoESDTrackCut           *dtc1etaphitpc[20];
153 //  AliFemtoESDTrackCut           *dtc2etaphitpc[20];
154   AliFemtoCutMonitorParticleYPt *cutPass1YPtetaphitpc[20];
155   AliFemtoCutMonitorParticleYPt *cutFail1YPtetaphitpc[20];
156   AliFemtoCutMonitorParticlePID *cutPass1PIDetaphitpc[20];
157   AliFemtoCutMonitorParticlePID *cutFail1PIDetaphitpc[20];
158   AliFemtoCutMonitorParticleYPt *cutPass2YPtetaphitpc[20];
159   AliFemtoCutMonitorParticleYPt *cutFail2YPtetaphitpc[20];
160   AliFemtoCutMonitorParticlePID *cutPass2PIDetaphitpc[20];
161   AliFemtoCutMonitorParticlePID *cutFail2PIDetaphitpc[20];
162 //AliFemtoPairCutAntiGamma      *sqpcetaphitpc[20];
163 //    AliFemtoShareQualityTPCEntranceSepPairCut      *sqpcetaphitpc[20];
164   //AliFemtoPairCutRadialDistance      *sqpcetaphitpc[20];//AliFemto dphi* cut
165   AliFemtoPairCutRadialDistanceKK      *sqpcetaphitpc[20];//Dhevan's dphi* cut
166   AliFemtoCorrFctnDirectYlm     *cylmetaphitpc[20];
167   AliFemtoCorrFctnDEtaDPhi      *cdedpetaphi[20*10];//20->20*10 due to kT
168   AliFemtoChi2CorrFctn          *cchiqinvetaphitpc[20];
169   AliFemtoKTPairCut             *ktpcuts[20*8];
170   AliFemtoCorrFctnDirectYlm     *cylmkttpc[20*8];
171   AliFemtoQinvCorrFctn          *cqinvkttpc[20*8];
172  // AliFemtoCorrFctn3DLCMSSym     *cq3dlcmskttpc[20*8];
173   AliFemtoBPLCMS3DCorrFctn  *cq3dlcmskttpc[20*8];
174  
175   AliFemtoCorrFctnTPCNcls       *cqinvnclstpc[20];
176   AliFemtoShareQualityCorrFctn  *cqinvsqtpc[20*10];
177   AliFemtoChi2CorrFctn          *cqinvchi2tpc[20];
178   AliFemtoTPCInnerCorrFctn      *cqinvinnertpc[20*10];
179
180   // *** Third QA task - HBT analysis with all pair cuts off, TPC only ***
181   // *** Begin Kaon-Kaon (positive) analysis ***
182   int aniter = 0;
183
184   for (int imult=0; imult<cMu/*4*/; imult++) {
185     if (runmults[imult]) {
186       for (int ichg=0; ichg<2; ichg++) {
187         if (runch[ichg]) {
188           aniter = ichg*5+imult;
189
190           anetaphitpc[aniter] = new AliFemtoVertexMultAnalysis(4, -8.0, 8.0, 5, multbins[imult], multbins[imult+1]);
191           anetaphitpc[aniter]->SetNumEventsToMix(3);
192           anetaphitpc[aniter]->SetMinSizePartCollection(1);
193
194           mecetaphitpc[aniter] = new AliFemtoBasicEventCut();
195           mecetaphitpc[aniter]->SetEventMult(0,100000);
196           mecetaphitpc[aniter]->SetVertZPos(-8.0,8.0);
197           /* //was in aliroot 5.03.76
198           if (isrealdata)
199              mecetaphitpc[aniter]->SetAcceptOnlyPhysics(kTRUE);
200           */
201           //    mecetaphitpc->SetAcceptBadVertex(kTRUE);
202           
203           cutPassEvMetaphitpc[aniter] = new AliFemtoCutMonitorEventMult(Form("cutPass%stpcM%i", chrgs[ichg], imult));
204           cutFailEvMetaphitpc[aniter] = new AliFemtoCutMonitorEventMult(Form("cutFail%stpcM%i", chrgs[ichg], imult));
205           mecetaphitpc[aniter]->AddCutMonitor(cutPassEvMetaphitpc[aniter], cutFailEvMetaphitpc[aniter]);
206           
207           cutPassEvVetaphitpc[aniter] = new AliFemtoCutMonitorEventVertex(Form("cutPass%stpcM%i", chrgs[ichg], imult));
208           cutFailEvVetaphitpc[aniter] = new AliFemtoCutMonitorEventVertex(Form("cutFail%stpcM%i", chrgs[ichg], imult));
209           mecetaphitpc[aniter]->AddCutMonitor(cutPassEvVetaphitpc[aniter], cutFailEvVetaphitpc[aniter]);
210           
211           dtc1etaphitpc[aniter] = new AliFemtoKKTrackCut();
212 //        dtc1etaphitpc[aniter] = new AliFemtoESDTrackCut();
213           //     dtc1etaphitpc[aniter]->SetPidProbPion(0.0,1.001);
214           //     dtc1etaphitpc[aniter]->SetPidProbMuon(0.0,1.0);
215           //     dtc1etaphitpc[aniter]->SetPidProbKaon(0.0,1.0);
216           //     dtc1etaphitpc[aniter]->SetPidProbProton(0.0,1.0);
217           if (ichg == 0)
218             dtc1etaphitpc[aniter]->SetCharge(1.0);
219           else if (ichg == 1)
220             dtc1etaphitpc[aniter]->SetCharge(-1.0);
221             
222           dtc1etaphitpc[aniter]->SetPt(0.14,1.5);
223           //      dtc1etaphitpc[aniter]->SetEta(-1.2,1.2);
224           dtc1etaphitpc[aniter]->SetEta(-0.8,0.8); //0.5
225           //    //    dtc1etaphitpc[aniter]->SetEta(-0.5,0.5);
226 ///       dtc1etaphitpc[aniter]->SetMass(PionMass);
227           dtc1etaphitpc[aniter]->SetMass(KaonMass);
228           
229           
230           ////    dtc1etaphitpc[aniter]->SetminTPCncls(80);
231                   
232 ///////   ----!!!!!!       
233           dtc1etaphitpc[aniter]->SetMostProbableKaon();  //!!!!!!
234           //------------------- November 2013 -----------------------------------< 
235           //New class in AliFemo: PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoKKTrackCut.cxx
236           dtc1etaphitpc[aniter]->SetNsigmaTPCle250(2.0);
237           dtc1etaphitpc[aniter]->SetNsigmaTPC250_400(2.0);
238           dtc1etaphitpc[aniter]->SetNsigmaTPC400_450(2.0);
239           dtc1etaphitpc[aniter]->SetNsigmaTPC450_500(2.0);
240           dtc1etaphitpc[aniter]->SetNsigmaTPCge500(3.0);
241           // new cuts are stronger, better separation of pion in TOF 
242           // when momentum is greater then 800 MeV/c
243           dtc1etaphitpc[aniter]->SetNsigmaTOF500_800(2.0);
244           dtc1etaphitpc[aniter]->SetNsigmaTOF800_1000(1.5);
245           dtc1etaphitpc[aniter]->SetNsigmaTOFge1000(1.0);
246           //------------------- November 2013 ----------------------------------->
247
248 ////              dtc1etaphitpc[aniter]->SetMostProbablePion();
249           //    // Track quality cuts
250           if (runtype == 0) {
251             dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit|AliESDtrack::kITSrefit);
252             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit);
253             //    dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kITSrefit);
254             dtc1etaphitpc[aniter]->SetminTPCncls(80);
255             dtc1etaphitpc[aniter]->SetRemoveKinks(kTRUE);
256             dtc1etaphitpc[aniter]->SetLabel(kFALSE);
257             //    dtc1etaphitpc[aniter]->SetMaxITSChiNdof(6.0);
258             dtc1etaphitpc[aniter]->SetMaxTPCChiNdof(4.0);
259             dtc1etaphitpc[aniter]->SetMaxImpactXY(DCAxy);
260             //Poland: dtc1etaphitpc[aniter]->SetMaxImpactXYPtDep(0.0182, 0.0350, -1.01);
261             dtc1etaphitpc[aniter]->SetMaxImpactZ(DCAz);
262             //      dtc1etaphitpc[aniter]->SetMaxSigmaToVertex(6.0);
263           }
264           else if (runtype == 1) {
265             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit|AliESDtrack::kITSrefit);
266             //    dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit);
267             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kITSrefit|AliESDtrack::kITSpureSA);
268             //      dtc1etaphitpc[aniter]->SetminTPCncls(70);
269             dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kITSrefit);
270             dtc1etaphitpc[aniter]->SetRemoveKinks(kTRUE);
271             dtc1etaphitpc[aniter]->SetLabel(kFALSE);
272             //    dtc1etaphitpc[aniter]->SetMaxITSChiNdof(6.0);
273             //      dtc1etaphitpc[aniter]->SetMaxTPCChiNdof(6.0);
274             dtc1etaphitpc[aniter]->SetMaxImpactXY(DCAxy);
275             dtc1etaphitpc[aniter]->SetMaxImpactZ(DCAz);
276             //      dtc1etaphitpc[aniter]->SetMaxSigmaToVertex(6.0);
277           }
278           else if (runtype == 2) {
279             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit|AliESDtrack::kITSrefit);
280             dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCin);
281             //      dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kTPCrefit);
282             //    dtc1etaphitpc[aniter]->SetStatus(AliESDtrack::kITSrefit);
283             dtc1etaphitpc[aniter]->SetminTPCncls(80); //was "0"
284             dtc1etaphitpc[aniter]->SetRemoveKinks(kTRUE);
285             dtc1etaphitpc[aniter]->SetLabel(kFALSE);
286             //    dtc1etaphitpc[aniter]->SetMaxITSChiNdof(6.0);
287             dtc1etaphitpc[aniter]->SetMaxTPCChiNdof(4.0);
288             dtc1etaphitpc[aniter]->SetMaxImpactXY(DCAxy);
289 //for TEST !!!!
290         //    dtc1etaphitpc[aniter]->SetMaxImpactXYPtDep(0.0182, 0.0350, -1.01);
291             dtc1etaphitpc[aniter]->SetMaxImpactZ(DCAz);  //3.0
292             //      dtc1etaphitpc[aniter]->SetMaxSigmaToVertex(6.0);
293           }
294
295           
296 /*
297           cutPass1YPtetaphitpc[aniter] = new AliFemtoCutMonitorParticleYPt(Form("cutPass1%stpcM%i", chrgs[ichg], imult), 0.493677);
298           cutFail1YPtetaphitpc[aniter] = new AliFemtoCutMonitorParticleYPt(Form("cutFail1%stpcM%i", chrgs[ichg], imult), 0.493677);
299           dtc1etaphitpc[aniter]->AddCutMonitor(cutPass1YPtetaphitpc[aniter], cutFail1YPtetaphitpc[aniter]);
300           
301           cutPass1PIDetaphitpc[aniter] = new AliFemtoCutMonitorParticlePID(Form("cutPass1%stpcM%i", chrgs[ichg], imult),1);
302           cutFail1PIDetaphitpc[aniter] = new AliFemtoCutMonitorParticlePID(Form("cutFail1%stpcM%i", chrgs[ichg], imult),1);
303           dtc1etaphitpc[aniter]->AddCutMonitor(cutPass1PIDetaphitpc[aniter], cutFail1PIDetaphitpc[aniter]);
304 */
305           
306          // sqpcetaphitpc[aniter] = new AliFemtoPairCutAntiGamma();
307         //  sqpcetaphitpc[aniter] = new AliFemtoShareQualityTPCEntranceSepPairCut();
308           
309           if (ichg < 2) {
310             //sqpcetaphitpc[aniter] = new AliFemtoPairCutRadialDistance();//AliFemto dphi* cut
311           sqpcetaphitpc[aniter] = new AliFemtoPairCutRadialDistanceKK();  //Dhevan's dphi* cut
312           if (runtype == 0) {
313             sqpcetaphitpc[aniter]->SetShareQualityMax(1.0);
314             sqpcetaphitpc[aniter]->SetShareFractionMax(0.05);
315             sqpcetaphitpc[aniter]->SetRemoveSameLabel(kFALSE);
316             // sqpcetaphitpc[aniter]->SetMaxEEMinv(0.0);
317             // sqpcetaphitpc[aniter]->SetMaxThetaDiff(0.0);
318                     //ml sqpcetaphitpc[aniter]->SetTPCEntranceSepMinimum(1.5);
319 //ml        sqpcetaphitpc[aniter]->SetRadialDistanceMinimum(0.12, 0.03);
320 //ml        sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(0.02);
321
322         
323            //--------- km:  eta-phi* Dhevan's custs ----------->>>>
324             sqpcetaphitpc[aniter]->SetPhiStarDifferenceMinimum(PhiStarDifferenceMinimum);
325             sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(EtaDifferenceMinimum);
326            //sqpcetaphitpc[aniter]->SetMinimumRadius(0.8);//not need for AliFemtoPairCutRadialDistanceKK()
327            //--------- km:  eta-phi* Dhevan's custs -----------<<<
328
329           //////////////sqpcetaphitpc[aniter]->SetMagneticFieldSign(1);
330           
331          
332             
333           }
334           else if (runtype == 1) {
335             sqpcetaphitpc[aniter]->SetShareQualityMax(1.0);
336             sqpcetaphitpc[aniter]->SetShareFractionMax(1.05);
337             sqpcetaphitpc[aniter]->SetRemoveSameLabel(kFALSE);
338             // sqpcetaphitpc[aniter]->SetMaxEEMinv(0.002);
339             // sqpcetaphitpc[aniter]->SetMaxThetaDiff(0.008);
340                     //ml sqpcetaphitpc[aniter]->SetTPCEntranceSepMinimum(5.0);
341 //          sqpcetaphitpc[aniter]->SetRadialDistanceMinimum(1.2, 0.03);
342 //          sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(0.02);
343
344 //  void SetPhiStarDifferenceMinimum(double dtpc);
345 //  void SetEtaDifferenceMinimum(double etpc);
346 //  void SetMinimumRadius(double minrad);
347 //  void SetMagneticFieldSign(int magsign);
348
349            //--------- km:  eta-phi* Dhevan's custs ----------->>>>
350             sqpcetaphitpc[aniter]->SetPhiStarDifferenceMinimum(PhiStarDifferenceMinimum);
351             sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(EtaDifferenceMinimum);
352            //sqpcetaphitpc[aniter]->SetMinimumRadius(0.8);//not need for AliFemtoPairCutRadialDistanceKK()
353            //--------- km:  eta-phi* Dhevan's custs -----------<<<
354
355          /////////sqpcetaphitpc[aniter]->SetMagneticFieldSign(1);
356      //sqpcetaphitpc[aniter]->SetMagneticFieldSign(1.0);
357
358
359           }
360           else if (runtype == 2) {
361             sqpcetaphitpc[aniter]->SetDataType(AliFemtoPairCut::kAOD);
362             sqpcetaphitpc[aniter]->SetShareQualityMax(1.0);
363             sqpcetaphitpc[aniter]->SetShareFractionMax(0.05);
364             sqpcetaphitpc[aniter]->SetRemoveSameLabel(kFALSE);
365             // sqpcetaphitpc[aniter]->SetMaxEEMinv(0.0);
366             // sqpcetaphitpc[aniter]->SetMaxThetaDiff(0.0);
367                 //ml    sqpcetaphitpc[aniter]->SetTPCEntranceSepMinimum(0.0);
368 //ml        sqpcetaphitpc[aniter]->SetRadialDistanceMinimum(1.2, 0.045);
369 //ml        sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(0.016);
370
371            //--------- km:  eta-phi* Dhevan's custs ----------->>>>
372             sqpcetaphitpc[aniter]->SetPhiStarDifferenceMinimum(PhiStarDifferenceMinimum);
373             sqpcetaphitpc[aniter]->SetEtaDifferenceMinimum(EtaDifferenceMinimum);
374            //sqpcetaphitpc[aniter]->SetMinimumRadius(0.8);//not need for AliFemtoPairCutRadialDistanceKK()
375            //--------- km:  eta-phi* Dhevan's custs -----------<<<
376
377            ////////sqpcetaphitpc[aniter]->SetMagneticFieldSign(1);
378          
379
380           }
381          }        
382
383           
384           anetaphitpc[aniter]->SetEventCut(mecetaphitpc[aniter]);
385           anetaphitpc[aniter]->SetFirstParticleCut(dtc1etaphitpc[aniter]);
386           anetaphitpc[aniter]->SetSecondParticleCut(dtc1etaphitpc[aniter]);
387           anetaphitpc[aniter]->SetPairCut(sqpcetaphitpc[aniter]);
388           
389          //       cylmetaphitpc[aniter] = new AliFemtoCorrFctnDirectYlm(Form("cylm%stpcM%i", chrgs[ichg], imult),3,nbinssh,0.0,shqmaxSH,runshlcms);
390           ///     anetaphitpc[aniter]->AddCorrFctn(cylmetaphitpc[aniter]);
391           
392           // cqinvnclstpc[aniter] = new AliFemtoCorrFctnTPCNcls(Form("cqinvncls%stpcM%i", chrgs[ichg], imult),nbinssh,0.0,shqmax);
393           // anetaphitpc[aniter]->AddCorrFctn(cqinvnclstpc[aniter]);
394
395           //      cqinvchi2tpc[aniter] = new AliFemtoChi2CorrFctn(Form("cqinvchi2%stpcM%i", chrgs[ichg], imult),nbinssh,0.0,shqmax);
396           //      anetaphitpc[aniter]->AddCorrFctn(cqinvchi2tpc[aniter]);
397
398           if (runktdep) {
399             int ktm;
400             for (int ikt=0; ikt<cKt/*8*/; ikt++) {
401               ktm = aniter*cKt/*8*/ + ikt;
402               ktpcuts[ktm] = new AliFemtoKTPairCut(ktrng[ikt], ktrng[ikt+1]);
403               
404 ////////              cylmkttpc[ktm] = new AliFemtoCorrFctnDirectYlm(Form("cylm%stpcM%ikT%i", chrgs[ichg], imult, ikt),3,
405 ///////                                                      nbinssh, 0.0,
406 //////                                                       (imult>6)?shqmaxSH*2.5:shqmaxSH,
407 /////                                                        runshlcms);
408 //////                cylmkttpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
409 /////                 anetaphitpc[aniter]->AddCorrFctn(cylmkttpc[ktm]);
410               
411               cqinvkttpc[ktm] = new AliFemtoQinvCorrFctn(Form("cqinv%stpcM%ikT%i", chrgs[ichg], imult, ikt),nbinssh,0.0,(imult>6)?shqmax*2.5:shqmax);
412 //            cqinvkttpc[ktm] = new AliFemtoQinvCorrFctn(Form("cqinv%stpcM%ikT%i", chrgs[ichg], imult, ikt),nbinssh,0.0,0.5);
413               cqinvkttpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
414               anetaphitpc[aniter]->AddCorrFctn(cqinvkttpc[ktm]);
415
416               cqinvsqtpc[ktm] = new AliFemtoShareQualityCorrFctn(Form("cqinvsq%stpcM%ikT%i", chrgs[ichg], imult, ikt),nbinssh,0.0,shqmax);
417               cqinvsqtpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
418               anetaphitpc[aniter]->AddCorrFctn(cqinvsqtpc[ktm]);
419
420 //            cqinvinnertpc[ktm] = new AliFemtoTPCInnerCorrFctn(Form("cqinvinner%stpcM%ikT%i", chrgs[ichg], imult, ikt),nbinssh,0.0,shqmax);
421 //            cqinvinnertpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
422 //            cqinvinnertpc[ktm]->SetRadius(1.2);
423 //            anetaphitpc[aniter]->AddCorrFctn(cqinvinnertpc[ktm]);
424
425 //---- Correlation Function vs Delta_Eta and Delta_Phi (not Phi*)---->>>
426 //            cdedpetaphi[ktm] = new AliFemtoCorrFctnDEtaDPhi(Form("cdedp%stpcM%ikT%i", chrgs[ichg], imult, ikt),100,100);
427 //            anetaphitpc[aniter]->AddCorrFctn(cdedpetaphi[ktm]);
428 //---- Correlation Function vs Delta_Eta and Delta_Phi (not Phi*)----<<<
429
430               if (run3d) {
431         //      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);
432
433         //    AliFemtoBPLCMS3DCorrFctn *cq3dallpiptpc = new AliFemtoBPLCMS3DCorrFctn("cq3dallpiptpc",100,-1.5,1.5);
434                                  
435         cq3dlcmskttpc[ktm] = new AliFemtoBPLCMS3DCorrFctn(Form("cq3d%stpcM%ikT%i", chrgs[ichg], imult, ikt),60,-0.3,0.3);
436 //      cq3dlcmskttpc[ktm] = new AliFemtoCorrFctn3DLCMSSym(Form("cq3d%stpcM%ikT%i", chrgs[ichg], imult, ikt),50,0.5);
437                 cq3dlcmskttpc[ktm]->SetPairSelectionCut(ktpcuts[ktm]);
438                 anetaphitpc[aniter]->AddCorrFctn(cq3dlcmskttpc[ktm]);
439               }
440             }
441           }
442           
443           // cdedpetaphi[aniter] = new AliFemtoCorrFctnDEtaDPhi(Form("cdedp%stpcM%i", chrgs[ichg], imult),24, 24);
444           // anetaphitpc[aniter]->AddCorrFctn(cdedpetaphi[aniter]);
445           
446           Manager->AddAnalysis(anetaphitpc[aniter]);    
447         }
448       }
449     }
450   }
451   // *** End Kaon-Kaon (positive) analysis
452
453   return Manager;
454 }                         
455