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