]>
Commit | Line | Data |
---|---|---|
2308c814 | 1 | AliAnalysisTaskITSTrackingCheck *AddTaskPerformanceITS(Bool_t readMC=kFALSE, |
2 | Bool_t readRP=kFALSE, | |
5ac4a99f | 3 | Bool_t fillNtuples=kFALSE, |
4 | Int_t minmult=0, | |
5 | Int_t maxmult=1000000) | |
8d63376d | 6 | { |
7 | // | |
8 | // Task for check of ITS tracking | |
9 | // | |
10 | // andrea.dainese@pd.infn.it | |
11 | // | |
12 | ||
13 | ||
14 | // Get the pointer to the existing analysis manager via the static access method. | |
15 | //============================================================================== | |
16 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
17 | if (!mgr) { | |
18 | ::Error("AddTask", "No analysis manager to connect to."); | |
19 | return NULL; | |
20 | } | |
21 | ||
22 | // Create the task | |
23 | AliAnalysisTaskITSTrackingCheck *taskITS = new AliAnalysisTaskITSTrackingCheck("ITStracking"); | |
edb8204b | 24 | taskITS->SetMultiplicityRange(minmult,maxmult); |
8d63376d | 25 | taskITS->SetReadMC(readMC); |
ab846928 | 26 | taskITS->SetReadRPLabels(readRP); |
2308c814 | 27 | taskITS->SetFillNtuples(fillNtuples); |
dbf573fb | 28 | taskITS->SetUseITSSAforNtuples(kFALSE); |
8d63376d | 29 | AliLog::SetClassDebugLevel("AliAnalysisTaskITSTrackingCheck",10); |
30 | // Add to the manager | |
31 | mgr->AddTask(taskITS); | |
32 | ||
33 | // | |
34 | // Create containers for input/output | |
5ac4a99f | 35 | TString cname="cOutputITS"; |
36 | if(maxmult<1000000) { | |
37 | cname.Append("_"); cname+=minmult; | |
38 | cname.Append("_"); cname+=maxmult; | |
39 | } | |
40 | AliAnalysisDataContainer *cOutputITS = mgr->CreateContainer(cname.Data(),TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:ITS_Performance",mgr->GetCommonFileName())); | |
8d63376d | 41 | |
42 | ||
43 | // Attach input | |
44 | mgr->ConnectInput(taskITS,0,mgr->GetCommonInputContainer()); | |
45 | // Attach output | |
d98a315a | 46 | mgr->ConnectOutput(taskITS, 1,cOutputITS); |
8d63376d | 47 | |
48 | return taskITS; | |
49 | } |