1 AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
\r
2 UChar_t TPCcl=70, UChar_t TPCclPID = 80,
\r
3 UChar_t ITScl=3, Double_t DCAxy=1000., Double_t DCAz=1000.,
\r
4 Double_t* tpcdEdxcutlow=NULL,Double_t* tpcdEdxcuthigh=NULL,
\r
5 Double_t TOFs=3., Int_t TOFmis=0,
\r
6 Int_t itshitpixel = 0){
\r
8 Bool_t kAnalyseTaggedTracks = kTRUE;
\r
10 //***************************************//
\r
11 // Setting up the HFE cuts //
\r
12 //***************************************//
\r
14 AliHFEcuts *hfecuts = new AliHFEcuts(appendix,"HFE cuts for pPb");
\r
16 //hfecuts->SetQAOn();
\r
17 hfecuts->CreateStandardCuts();
\r
18 hfecuts->SetMinNClustersTPC(TPCcl);
\r
19 hfecuts->SetMinNClustersTPCPID(TPCclPID);
\r
20 hfecuts->SetMinNClustersITS(ITScl);
\r
21 hfecuts->SetMinRatioTPCclusters(0.6);
\r
22 hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
\r
23 hfecuts->SetCutITSpixel(itshitpixel);
\r
24 hfecuts->SetCheckITSLayerStatus(kFALSE);
\r
25 if(isAOD) hfecuts->SetAODFilterBit(4);
\r
27 //if((iPixelAny==AliHFEextraCuts::kAny) || (iPixelAny==AliHFEextraCuts::kSecond))
\r
28 //hfecuts->SetProductionVertex(0,7,0,7);
\r
30 hfecuts->SetMaxImpactParam(DCAxy,DCAz);
\r
31 hfecuts->SetUseMixedVertex(kTRUE);
\r
32 hfecuts->SetVertexRange(10.);
\r
33 // New pPb cuts (February 2013)
\r
34 hfecuts->SetUseCorrelationVertex();
\r
35 hfecuts->SetSPDVtxResolutionCut();
\r
39 Bool_t kTOFmis=kFALSE;
\r
42 printf("CONFIGURATION FILE: TOF is used \n");
\r
43 hfecuts->SetTOFPIDStep(kTRUE);
\r
44 printf("CONFIGURATION FILE: TOF PID step is requested !!!! \n");
\r
47 printf("CONFIGURATION FILE: TOF mismatch rejection is set ON \n");
\r
51 //***************************************//
\r
52 // Setting up the task //
\r
53 //***************************************//
\r
55 AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(appendix);
\r
56 printf("task %p\n", task);
\r
57 task->SetpPbAnalysis();
\r
58 if(!isAOD) task->SetRemoveFirstEventInChunk();
\r
59 task->SetRemovePileUp(kFALSE);
\r
60 task->SetHFECuts(hfecuts);
\r
61 task->GetPIDQAManager()->SetHighResolutionHistos();
\r
63 //***************************************//
\r
64 // Variable manager //
\r
65 //***************************************//
\r
68 Double_t ptbinning[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.};
\r
70 Double_t etabinning[9] = {-0.8, -0.6, -0.4, -0.2, 0., 0.2, 0.4, 0.6, 0.8};
\r
71 //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};
\r
73 Int_t sizept=(sizeof(ptbinning)/sizeof(double))-1;
\r
74 Int_t sizeeta=(sizeof(etabinning)/sizeof(double))-1;
\r
76 AliHFEvarManager *vm = task->GetVarManager();
\r
77 vm->AddVariable("pt", sizept, ptbinning);
\r
78 vm->AddVariable("eta", sizeeta, -0.8,0.8);
\r
79 vm->AddVariable("phi",21, -0, 2*TMath::Pi());
\r
80 vm->AddVariable("charge");
\r
81 vm->AddVariable("source");
\r
82 vm->AddVariable("centrality");
\r
84 // For the moment, remove the part dedicated to the background subtraction.
\r
85 // It will be implemented in a different way, reading it from a root file.
\r
87 //***************************************//
\r
88 // Configure the PID //
\r
89 //***************************************//
\r
92 AliHFEpid *pid = task->GetPID();
\r
93 if(useMC) pid->SetHasMCData(kTRUE);
\r
96 pid->AddDetector("TOF", 0);
\r
97 pid->AddDetector("TPC", 1);
\r
99 pid->AddDetector("TPC", 0);
\r
102 // Configure TPC PID
\r
104 Double_t paramsTPCdEdxcutlow[12] ={0.0, 0.0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
\r
105 if(tpcdEdxcutlow) memcpy(paramsTPCdEdxcutlow,tpcdEdxcutlow,sizeof(paramsTPCdEdxcutlow));
\r
107 Double_t paramsTPCdEdxcuthigh[12] ={3.0, 3.0, 3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
\r
108 if(tpcdEdxcuthigh) memcpy(paramsTPCdEdxcuthigh,tpcdEdxcuthigh,sizeof(paramsTPCdEdxcuthigh));
\r
113 for(Int_t a=0;a<11;a++)
\r
115 // cout << a << " " << paramsTPCdEdxcut[a] << endl;
\r
116 Double_t tpcparamlow[1]={paramsTPCdEdxcutlow[a]};
\r
117 Float_t tpcparamhigh=paramsTPCdEdxcuthigh[a];
\r
118 pid->ConfigureTPCcentralityCut(a,cutmodel,tpcparamlow,tpcparamhigh);
\r
122 // Configure TOF PID
\r
124 pid->ConfigureTOF(TOFs);
\r
125 AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid);
\r
127 tofpid->SetRejectTOFmismatch();
\r
130 // To make different upper TOF cut to see contamination effect
\r
131 // The below two lines should be removed after this check
\r
132 //AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid);
\r
133 //if(TOFs<3.) tofpid->SetTOFnSigmaBand(-3,TOFs); //only to check the assymmetric tof cut
\r
135 //***************************************//
\r
136 // V0 tagged tracks //
\r
137 //***************************************//
\r
138 if(kAnalyseTaggedTracks){
\r
139 AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis");
\r
140 v0trackCuts->CreateStandardCuts();
\r
141 v0trackCuts->SetMinNClustersTPC(TPCcl);
\r
142 v0trackCuts->SetMinNClustersTPCPID(TPCclPID);
\r
143 v0trackCuts->SetMinRatioTPCclusters(0.6);
\r
144 v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
\r
145 v0trackCuts->SetMinNClustersITS(1);
\r
146 v0trackCuts->SetCutITSpixel(AliHFEextraCuts::kFirst);
\r
147 v0trackCuts->SetCheckITSLayerStatus(kFALSE);
\r
148 v0trackCuts->UnsetVertexRequirement();
\r
149 //hfecuts->SetSigmaToVertex(10);
\r
150 v0trackCuts->SetTOFPIDStep(kTRUE);
\r
151 v0trackCuts->SetQAOn();
\r
153 task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis);
\r
154 task->SetTaggedTrackCuts(v0trackCuts);
\r
155 task->SetCleanTaggedTrack(kTRUE);
\r
159 printf("task %p\n", task);
\r
160 task->SetQAOn(AliAnalysisTaskHFE::kPIDqa);
\r
161 task->SetQAOn(AliAnalysisTaskHFE::kMCqa);
\r
162 task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep);
\r
164 printf("*************************************\n");
\r
165 printf("Configuring standard Task:\n");
\r
166 task->PrintStatus();
\r
167 pid->PrintStatus();
\r
168 printf("*************************************\n");
\r