AliPhysics  64f4410 (64f4410)
AddTaskBasicHFQA.C
Go to the documentation of this file.
2  Bool_t readMC,
3  TString suffix=""){
4 
5  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
6  if (!mgr) {
7  ::Error("AddTaskBasicHFQA", "No analysis manager to connect to.");
8  return NULL;
9  }
10 
11  AliRDHFCuts *analysiscuts=0x0;
12  switch (ch){
13  case 0:
14  analysiscuts = new AliRDHFCutsDplustoKpipi();
15  suffix="Dplus";
16  break;
17  case 1:
18  analysiscuts = new AliRDHFCutsD0toKpi();
19  suffix="D0";
20  break;
21  case 2:
22  analysiscuts = new AliRDHFCutsDstoKKpi();
23  suffix="Ds";
24  break;
25  case 4:
26  analysiscuts = new AliRDHFCutsD0toKpipipi();
27  suffix="D04";
28  break;
29  case 5:
30  analysiscuts = new AliRDHFCutsLctopKpi();
31  suffix="Lc";
32  break;
33  case 6:
34  analysiscuts = new AliRDHFCutsLctoV0();
35  suffix="LcToV0x";
36  break;
37  }
38 
39  analysiscuts->SetTriggerClass("");
40  analysiscuts->SetTriggerMask(AliVEvent::kAnyINT);
42 
43  AliAODPidHF* pid4hf=new AliAODPidHF();
44  Double_t plim[2]={0.6,0.8};
45  Double_t nsigma[5]={2.,1.,2.,3.,0.};
46  pid4hf->SetPLimit(plim,2);
47  pid4hf->SetAsym(kTRUE);
48  pid4hf->SetSigma(nsigma);
49  pid4hf->SetMatch(1);
50  pid4hf->SetTPC(1);
51  pid4hf->SetTOF(1);
52  pid4hf->SetITS(0);
53  pid4hf->SetTRD(0);
54  pid4hf->SetCompat(kTRUE);
55  analysiscuts->SetPidHF(pid4hf);
56 
57  AliAnalysisTaskSEHFQA* taskQA=new AliAnalysisTaskSEHFQA(Form("QA%s",suffix.Data()),ch,analysiscuts);
58  taskQA->SetReadMC(readMC);
59  taskQA->SetSimpleMode(kTRUE);
60  taskQA->SetTrackOn(kTRUE);
61  taskQA->SetPIDOn(kTRUE);
62  taskQA->SetCentralityOn(kFALSE);
63  taskQA->SetEvSelectionOn(kTRUE);
64  taskQA->SetFlowObsOn(kFALSE);
66  mgr->AddTask(taskQA);
67 
68  TString filename="",out1name="nEntriesQA",out2name="outputPid",out3name="outputTrack",out4name="cuts",out5name="countersCentrality",out6name="outputCentrCheck",out7name="outputEvSel",out8name="outputFlowObs",inname="input",cutsobjname="",centr="";
69  filename = AliAnalysisManager::GetCommonFileName();
70  filename += ":PWG3_D2H_QA";
71  inname+=suffix;
72  out1name+=suffix;
73  out2name+=suffix;
74  out3name+=suffix;
75  out4name+=suffix;
76  out5name+=suffix;
77  out6name+=suffix;
78  out7name+=suffix;
79  out8name+=suffix;
80 
81 
82  //
83  // Create containers for input/output
84  AliAnalysisDataContainer *cinput = mgr->CreateContainer(inname,TChain::Class(), AliAnalysisManager::kInputContainer);
85  mgr->ConnectInput(taskQA,0,mgr->GetCommonInputContainer());
86 
87  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(out1name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //events analysed
88  mgr->ConnectOutput(taskQA,1,coutput1);
89 
90  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(out2name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //PID
91  mgr->ConnectOutput(taskQA,2,coutput2);
92 
93  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(out3name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //quality of tracks
94  mgr->ConnectOutput(taskQA,3,coutput3);
95 
96  AliAnalysisDataContainer *coutput4 = mgr->CreateContainer(out4name,AliRDHFCuts::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //cuts
97  mgr->ConnectOutput(taskQA,4,coutput4);
98 
99  AliAnalysisDataContainer *coutput7 = mgr->CreateContainer(out7name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //event selection
100  mgr->ConnectOutput(taskQA,7,coutput7);
101 
102  return taskQA;
103 }
const char * filename
Definition: TestFCM.C:1
void SetAsym(Bool_t asym)
Definition: AliAODPidHF.h:88
double Double_t
Definition: External.C:58
void SetEvSelectionOn(Bool_t evselon=kTRUE)
void SetTRD(Bool_t trd)
Definition: AliAODPidHF.h:97
void SetUseCentrality(Int_t flag=1)
void SetPIDOn(Bool_t pidon=kTRUE)
void SetPidHF(AliAODPidHF *pidObj)
see enum below
Definition: AliRDHFCuts.h:215
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:95
Class for cuts on AOD reconstructed D+->Kpipi.
void SetTrackOn(Bool_t trackon=kTRUE)
void SetReadMC(Bool_t mcflag)
setters
Double_t nsigma
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
void SetFlowObsOn(Bool_t flowobson=kTRUE)
void SetFillDistributionsForTrackEffChecks(Bool_t filldistrtrackeffcheckson=kFALSE)
void SetSimpleMode(Bool_t flag)
AliAnalysisTaskSEHFQA * AddTaskBasicHFQA(AliAnalysisTaskSEHFQA::DecChannel ch, Bool_t readMC, TString suffix="")
void SetITS(Bool_t its)
Definition: AliAODPidHF.h:96
void SetMatch(Int_t match)
Definition: AliAODPidHF.h:98
void SetPLimit(Double_t *plim, Int_t npLim)
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
bool Bool_t
Definition: External.C:53
void SetCompat(Bool_t comp)
Definition: AliAODPidHF.h:100
void SetTriggerClass(TString trclass0, TString trclass1="")
Definition: AliRDHFCuts.h:197
void SetCentralityOn(Bool_t centron=kTRUE)
void SetTriggerMask(ULong64_t mask=0)
Definition: AliRDHFCuts.h:67