]>
Commit | Line | Data |
---|---|---|
0ffba3ee | 1 | AliAnalysisTaskQAMultistrange *AddTaskQAMultistrange( Bool_t isMC = kFALSE, |
2 | Int_t minnTPCcls = 70, | |
21cfe1dd | 3 | Float_t centrlowlim = 0., |
4 | Float_t centruplim = 90., | |
5 | TString centrest = "V0M", | |
6 | Bool_t kusecleaning = kTRUE, | |
7 | Float_t vtxlim = 10., | |
8 | TString collidingSystem = "PbPb", | |
0ffba3ee | 9 | Float_t minptondaughtertracks = 0., |
10 | Float_t etacutondaughtertracks = 0.8) { | |
21cfe1dd | 11 | |
12 | // Creates, configures and attaches to the train a cascades check task. | |
13 | // Get the pointer to the existing analysis manager via the static access method. | |
14 | //============================================================================== | |
15 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
16 | if (!mgr) { | |
17 | ::Error("AddTaskQAMultistrange", "No analysis manager to connect to."); | |
18 | return NULL; | |
19 | } | |
20 | ||
21 | // Check the analysis type using the event handlers connected to the analysis manager. | |
22 | //============================================================================== | |
23 | if (!mgr->GetInputEventHandler()) { | |
24 | ::Error("AddTaskQAMultistrange", "This task requires an input event handler"); | |
25 | return NULL; | |
26 | } | |
27 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
28 | ||
29 | // Create and configure the task | |
30 | AliAnalysisTaskQAMultistrange *taskcheckcascade = new AliAnalysisTaskQAMultistrange("TaskCheckCascade"); | |
31 | ||
0ffba3ee | 32 | taskcheckcascade->SetIsMC (isMC); |
21cfe1dd | 33 | taskcheckcascade->SetAnalysisType (type); |
34 | taskcheckcascade->SetCollidingSystem (collidingSystem); | |
21cfe1dd | 35 | taskcheckcascade->SetQualityCutZprimVtxPos (kTRUE); // selects vertices in +-10cm |
36 | taskcheckcascade->SetQualityCutNoTPConlyPrimVtx (kTRUE); // retains only events with tracking + SPD vertex | |
37 | taskcheckcascade->SetQualityCutTPCrefit (kTRUE); // requires TPC refit flag to be true to select a track | |
38 | taskcheckcascade->SetQualityCutnTPCcls (kTRUE); // rejects tracks that have less than n clusters in the TPC | |
39 | taskcheckcascade->SetQualityCutMinnTPCcls (minnTPCcls); // minimum number of TPC clusters to accept daughter tracks | |
40 | taskcheckcascade->SetQualityCutPileup (kFALSE); | |
21cfe1dd | 41 | taskcheckcascade->SetCentralityLowLim (centrlowlim); // setting centrality selection vriables |
42 | taskcheckcascade->SetCentralityUpLim (centruplim); | |
43 | taskcheckcascade->SetCentralityEst (centrest); | |
44 | taskcheckcascade->SetUseCleaning (kusecleaning); | |
45 | taskcheckcascade->SetVertexRange (vtxlim); | |
46 | taskcheckcascade->SetMinptCutOnDaughterTracks (minptondaughtertracks); | |
47 | taskcheckcascade->SetEtaCutOnDaughterTracks (etacutondaughtertracks); | |
21cfe1dd | 48 | |
49 | mgr->AddTask(taskcheckcascade); | |
50 | ||
51 | // Create ONLY the output containers for the data produced by the task. | |
52 | // Get and connect other common input/output containers via the manager as below | |
53 | //============================================================================== | |
54 | ||
55 | // User file name (if need be) | |
21cfe1dd | 56 | TString outputFileName = AliAnalysisManager::GetCommonFileName(); |
21cfe1dd | 57 | outputFileName += ":PWGLFStrangeness.outputCheckCascade"; |
21cfe1dd | 58 | |
b99cd383 | 59 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("fListHistMultistrangeQA", |
60 | TList::Class(), | |
61 | AliAnalysisManager::kOutputContainer, | |
62 | outputFileName ); | |
63 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("cfcontCuts", | |
21cfe1dd | 64 | AliCFContainer::Class(), |
65 | AliAnalysisManager::kOutputContainer, | |
66 | outputFileName ); | |
b99cd383 | 67 | AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("cfcontMCgen", |
0ffba3ee | 68 | AliCFContainer::Class(), |
69 | AliAnalysisManager::kOutputContainer, | |
70 | outputFileName ); | |
21cfe1dd | 71 | |
72 | mgr->ConnectInput( taskcheckcascade, 0, mgr->GetCommonInputContainer()); | |
73 | mgr->ConnectOutput(taskcheckcascade, 1, coutput1); | |
0ffba3ee | 74 | mgr->ConnectOutput(taskcheckcascade, 2, coutput2); |
b99cd383 | 75 | mgr->ConnectOutput(taskcheckcascade, 3, coutput3); |
0ffba3ee | 76 | |
21cfe1dd | 77 | return taskcheckcascade; |
78 | } | |
79 |