]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/macros/configs/pp/ConfigHFEpid2SYSbeauty.C
add extra namings
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / configs / pp / ConfigHFEpid2SYSbeauty.C
CommitLineData
d84c68e9 1AliAnalysisTaskHFE* ConfigHFEpid2SYSbeauty(Bool_t useMC, UChar_t TPCcl=70, UChar_t TPCclPID = 80, UChar_t ITScl=3,
2 Double_t DCAxy=1000., Double_t DCAz=1000.,
3 Double_t TPCs=0., Double_t TPCu=3.09, Double_t TOFs=3.,
4 Double_t IpSig=3.){
5 //
6 // HFE task configuration PID2 (TOF-TPC only!)
7 //
8
9 Bool_t kAnalyseTaggedTracks = kTRUE;
10
11 Int_t iDCAxy = (Int_t)(DCAxy*10.);
12 Int_t iDCAz = (Int_t)(DCAz*10.);
13 Int_t iTPCs = (Int_t)(TPCs*1000.);
14 Int_t iIPsig = (Int_t)(IpSig*10.);
15 Int_t iTOFs = (Int_t)(TOFs*10.);
16 printf("\n hfeCutsPID2t%di%dr%dz%ds%db%dt%d \n",TPCcl,ITScl,iDCAxy,iDCAz,iTPCs,iIPsig,iTOFs);
17
18 AliHFEcuts *hfecuts = new AliHFEcuts(Form("hfeCutsPID2tc%dtp%di%dr%dz%ds%db%dt%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,iIPsig,iTOFs),"HFE cuts TOF TPC");
19 hfecuts->CreateStandardCuts();
20 hfecuts->SetMinNClustersTPC(TPCcl);
21 hfecuts->SetMinNClustersTPCPID(TPCclPID);
22 hfecuts->SetMinNClustersITS(ITScl);
23 hfecuts->SetMinRatioTPCclusters(0.6);
24 hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
25 hfecuts->SetCutITSpixel(AliHFEextraCuts::kFirst);
26 hfecuts->SetCheckITSLayerStatus(kFALSE);
27 if(IpSig<100) hfecuts->SetIPcutParam(0,0,0,IpSig,kTRUE);
28 else hfecuts->SetIPcutParam(0.0064,0.078,-0.56,0,kFALSE); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt))
29
30 hfecuts->SetProductionVertex(0,4.5,0,4.5);
31 //hfecuts->SetProductionVertex(0,100,0,100);
32
33 //hfecuts->SetSigmaToVertex(DCAsi);
34 hfecuts->SetMaxImpactParam(DCAxy,DCAz);
35
36 hfecuts->SetTOFPIDStep(kFALSE);
37 //hfecuts->SetQAOn();
38 hfecuts->SetUseMixedVertex(kTRUE);
39 hfecuts->SetVertexRange(10.);
40
41 AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(Form("HFEanalysisPID2tc%dtp%di%dr%dz%ds%db%dt%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,iIPsig,TOFs));
42 printf("task %p\n", task);
43 task->SetHFECuts(hfecuts);
44 task->SetRemovePileUp(kTRUE);
45 task->GetPIDQAManager()->SetHighResolutionHistos();
46
47 // Define Variables
48 Double_t ptbinning1[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
49 //Double_t etabinning[33] = {-0.8, -0.75, -0.7, -0.65, -0.6, -0.55, -0.5, -0.45, -0.4, -0.35, -0.3, -0.25, -0.2, -0.15, -0.1, 0.05, 0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8};
50 Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};
51
52 AliHFEvarManager *vm = task->GetVarManager();
53 //vm->AddVariable("pt");
54 vm->AddVariable("pt", 35, ptbinning1);
55 //vm->AddVariable("eta", 32, etabinning);
56 vm->AddVariable("eta", 16, etabinning);
57 vm->AddVariable("phi");
58 vm->AddVariable("charge");
59 vm->AddVariable("source");
60 //vm->AddVariable("centrality");
61
62 if(!useMC){
63 // New background model (LHC10d pass2)
64 TF1 *hBackground = new TF1("hadronicBackgroundFunction", "TMath::Exp(([0]/(x**1.5))+[1])", 0., 20.);
65 // These settings assume that the default is a cut on .ge.120 TPC clusters (Sep 27, 2011)
66 hBackground->SetParameter(0, -55.18);
67 hBackground->SetParameter(1, -0.0026);
68 if (TPCcl == 100){
69 hBackground->SetParameter(0, -39.5);
70 hBackground->SetParameter(1, -0.438);
71 } elseif (TPCcl == 140){
72 hBackground->SetParameter(0, -82.11);
73 hBackground->SetParameter(1, 1.138);
74 }
75
76 task->SetBackGroundFactorsFunction(hBackground);
77 }
78
79 // Define PID
80 AliHFEpid *pid = task->GetPID();
81 if(useMC) pid->SetHasMCData(kTRUE);
82 pid->AddDetector("TOF", 0);
83 pid->AddDetector("TPC", 1);
84 // HERE PUT THE STRAIGHT CUT
85 Double_t params[4];
86 char *cutmodel;
87 if(useMC){
88 // Monte-Carlo needs modelling of the falling mean with momentum at low momentum
89 // for high momentum it is consistent with a flat -0.94
90 cutmodel = "expo(0)+pol1(2)";//[0]*TMath::Exp([1]*x) + [2] + [3]*x";
91 Double_t paramsMC[4] = {-1.00625e-01, -2.09446e+00, -4.71247e-01, 1.80301e-02};
92 for(int ipar = 0; ipar < 4; ipar++) params[ipar] = paramsMC[ipar];
93 } else {
94 // Data is consistent with a flat constant: (Sep 27, 2011)
95 // 100 clusters: mean = -0.076, width = 1.035
96 // 120 clusters: mean = -0.113, width = 1.03
97 // 140 clusters: mean = -0.093, width = 1.004
98 cutmodel = "pol0(0)";
99 params[0] = TPCs;
100 }
101 pid->ConfigureTOF(TOFs);
102 pid->ConfigureTPCdefaultCut(cutmodel, params, TPCu);
103
104 if(kAnalyseTaggedTracks){
105 AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis");
106 v0trackCuts->CreateStandardCuts();
107 v0trackCuts->SetMinNClustersTPC(TPCcl);
108 v0trackCuts->SetMinRatioTPCclusters(0.6);
109 v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
110 v0trackCuts->SetMinNClustersITS(1);
111 v0trackCuts->SetCutITSpixel(AliHFEextraCuts::kAny);
112 v0trackCuts->SetCheckITSLayerStatus(kFALSE);
113 v0trackCuts->UnsetVertexRequirement();
114 //hfecuts->SetSigmaToVertex(10);
115 v0trackCuts->SetTOFPIDStep(kTRUE);
116 v0trackCuts->SetQAOn();
117
118 task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis);
119 task->SetTaggedTrackCuts(v0trackCuts);
120 task->SetCleanTaggedTrack(kTRUE);
121 }
122
123 // QA
124 printf("task %p\n", task);
125 task->SetQAOn(AliAnalysisTaskHFE::kPIDqa);
126 task->SetQAOn(AliAnalysisTaskHFE::kMCqa);
127 //task->SwitchOnPlugin(AliAnalysisTaskHFE::kIsElecBackGround);
128 //task->SwitchOnPlugin(AliAnalysisTaskHFE::kSecVtx);
129 task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep);
130 task->SetDebugStreaming();
131
132 printf("*************************************\n");
133 printf("Configuring standard Task:\n");
134 task->PrintStatus();
135 pid->PrintStatus();
136 printf("*************************************\n");
137 return task;
138}