34d76e4b14c30c61787162bb0608f2114667085d
[u/mrichter/AliRoot.git] / PWGCF / EBYE / macros / configBalanceFunctionPsiAnalysis.C
1 //__________________________________________________//\r
2 AliBalancePsi *GetBalanceFunctionObject(const char* analysisLevel = "ESD", \r
3                                         const char* centralityName = 0x0,\r
4                                         Double_t centrMin = 0.,\r
5                                         Double_t centrMax = 100.,\r
6                                         Bool_t bShuffle = kFALSE) {\r
7   //Function to setup the AliBalance object and return it\r
8   AliBalancePsi *gBalance = new AliBalancePsi();\r
9   gBalance->SetAnalysisLevel(analysisLevel);\r
10   gBalance->SetShuffle(bShuffle);\r
11   if(centralityName) gBalance->SetCentralityIdentifier(centralityName);\r
12   gBalance->SetCentralityInterval(centrMin,centrMax);\r
13 \r
14   //Set all analyses separately\r
15   //Rapidity\r
16   gBalance->SetInterval(AliBalance::kRapidity,-0.8,0.8,32,-1.6,1.6,15.);  \r
17   //Eta\r
18   gBalance->SetInterval(AliBalance::kEta,-0.8,0.8,32,-1.6,1.6,15);\r
19   //Qlong\r
20   gBalance->SetInterval(AliBalance::kQlong,-1,1,200,0.0,4.0,15);\r
21   //Qout\r
22   gBalance->SetInterval(AliBalance::kQout,-1,1,200,0.0,4.0,15);\r
23   //Qside\r
24   gBalance->SetInterval(AliBalance::kQside,-1,1,200,0.0,4.0,15);\r
25   //Qinv\r
26   gBalance->SetInterval(AliBalance::kQinv,-1,1,200,0.0,4.0,15);\r
27   //Phi\r
28   gBalance->SetInterval(AliBalance::kPhi,0.,360.,90,-180.,180.0,15);\r
29 \r
30   //Init the histograms\r
31   gBalance->InitHistograms();\r
32   \r
33   return gBalance;\r
34 }\r
35 \r
36 //__________________________________________________//\r
37 AliESDtrackCuts *GetTrackCutsObject(Double_t ptMin, Double_t ptMax, Double_t etaMin, Double_t etaMax, Double_t maxTPCchi2, Double_t maxDCAz, Double_t maxDCAxy, Int_t minNClustersTPC) {\r
38 \r
39   // only used for ESDs\r
40   // Function to setup the AliESDtrackCuts object and return it\r
41   AliESDtrackCuts *cuts = AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();\r
42   cuts->SetRequireTPCStandAlone(kTRUE); // TPC only cuts!  \r
43 \r
44   // extra TPC cuts (Syst studies)\r
45   if(minNClustersTPC != -1)  cuts->SetMinNClustersTPC(minNClustersTPC);\r
46   else cuts->SetMinNClustersTPC(70); // standard for filter bit 128\r
47   \r
48   if(maxTPCchi2 != -1) cuts->SetMaxChi2PerClusterTPC(maxTPCchi2);\r
49 \r
50   // extra DCA cuts (Syst studies)  \r
51   if(maxDCAz!=-1 && maxDCAxy != -1){\r
52     cuts->SetMaxDCAToVertexZ(maxDCAz);\r
53     cuts->SetMaxDCAToVertexXY(maxDCAxy);\r
54   }\r
55 \r
56   cuts->SetPtRange(ptMin,ptMax);\r
57   cuts->SetEtaRange(etaMin,etaMax);\r
58   cuts->DefineHistograms(1);\r
59   //cuts->SaveHistograms("trackCuts");\r
60 \r
61   return cuts;\r
62 }\r
63 \r