]>
Commit | Line | Data |
---|---|---|
7e504402 | 1 | AliAnalysisTaskCheckCascade *AddTaskCheckCascade(Short_t lCollidingSystems = 0 /*0 = pp, 1 = AA*/, |
2 | const TString lMasterJobSessionFlag = "") | |
cc1236ed | 3 | { |
4 | // Creates, configures and attaches to the train a cascades check task. | |
5 | // Get the pointer to the existing analysis manager via the static access method. | |
6 | //============================================================================== | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
9 | ::Error("AddTaskCheckCascade", "No analysis manager to connect to."); | |
10 | return NULL; | |
11 | } | |
12 | ||
13 | // Check the analysis type using the event handlers connected to the analysis manager. | |
14 | //============================================================================== | |
15 | if (!mgr->GetInputEventHandler()) { | |
16 | ::Error("AddTaskCheckCascade", "This task requires an input event handler"); | |
17 | return NULL; | |
18 | } | |
19 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
20 | ||
21 | // Create and configure the task | |
22 | AliAnalysisTaskCheckCascade *taskcheckcascade = new AliAnalysisTaskCheckCascade("TaskCheckCascade"); | |
9d670198 | 23 | taskcheckcascade-> SetCollidingSystems (lCollidingSystems); |
24 | taskcheckcascade-> SetAnalysisType (type); | |
25 | ||
c525f360 | 26 | taskcheckcascade-> SetTriggerMaskType ("kMB"); |
9d670198 | 27 | taskcheckcascade-> SetRelaunchV0CascVertexers (0); //NOTE |
28 | taskcheckcascade-> SetQualityCutZprimVtxPos (kTRUE); | |
c525f360 | 29 | taskcheckcascade-> SetRejectEventPileUp (kTRUE); |
9d670198 | 30 | taskcheckcascade-> SetQualityCutNoTPConlyPrimVtx (kTRUE); |
31 | taskcheckcascade-> SetQualityCutTPCrefit (kTRUE); | |
32 | taskcheckcascade-> SetQualityCut80TPCcls (kTRUE); | |
c525f360 | 33 | taskcheckcascade-> SetAlephParamFor1PadTPCCluster(kTRUE); |
9d670198 | 34 | // taskcheckcascade-> SetExtraSelections (0); |
c525f360 | 35 | taskcheckcascade-> SetAngularCorrelationType ("TrigLeadingTrck-AssoCasc"); // 1.1 - "TrigAnyCasc-AssoAnyPrim", 1.2 - "TrigCascLeading-AssoAnyPrim", 2. - "TrigLeadingTrck-AssoCasc" |
f3dc9369 | 36 | |
cc1236ed | 37 | mgr->AddTask(taskcheckcascade); |
38 | ||
39 | // Create ONLY the output containers for the data produced by the task. | |
40 | // Get and connect other common input/output containers via the manager as below | |
41 | //============================================================================== | |
f3dc9369 | 42 | |
43 | // User file name (if need be) | |
44 | /* | |
90926f02 | 45 | TString DefaultCommonFileName = AliAnalysisManager::GetCommonFileName(); |
46 | ||
47 | if(DefaultCommonFileName == "AnalysisResults.root"){ | |
48 | // Just change the Common File name IF it was not change before | |
49 | // -> To avoid screwing-up the analysis train and send the output of the previous task to a non-existing file | |
c525f360 | 50 | TString lCommonFileName = "sLHC10-CheckCascade"; |
90926f02 | 51 | if(lMasterJobSessionFlag.Length()){ |
52 | lCommonFileName += "-"; | |
53 | lCommonFileName += lMasterJobSessionFlag.Data(); | |
54 | } | |
55 | lCommonFileName += ".root"; | |
56 | ||
57 | mgr->SetCommonFileName( lCommonFileName.Data() ); | |
f3dc9369 | 58 | } |
f3dc9369 | 59 | */ |
90926f02 | 60 | |
1ba92c7e | 61 | TString outputFileName = AliAnalysisManager::GetCommonFileName(); |
9d670198 | 62 | |
162aeefd | 63 | outputFileName += ":PWG2CheckCascade"; |
f3dc9369 | 64 | if (lCollidingSystems) outputFileName += "_AA_"; |
9d670198 | 65 | else outputFileName += "_PP"; |
66 | if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC"; | |
67 | //if(lMasterJobSessionFlag.Length()) outputFileName += lMasterJobSessionFlag.Data(); | |
90926f02 | 68 | |
69 | Printf("AddTaskCheckCascade - Set OutputFileName : \n %s\n", outputFileName.Data() ); | |
1ba92c7e | 70 | |
71 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("clistCasc", | |
72 | TList::Class(), | |
73 | AliAnalysisManager::kOutputContainer, | |
74 | outputFileName ); | |
75 | ||
9d670198 | 76 | // AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("cPaveTextBookKeeping", |
77 | // TPaveText::Class(), | |
78 | // AliAnalysisManager::kOutputContainer, | |
79 | // outputFileName ); | |
80 | ||
81 | ||
7e504402 | 82 | mgr->ConnectInput( taskcheckcascade, 0, mgr->GetCommonInputContainer()); |
cc1236ed | 83 | mgr->ConnectOutput(taskcheckcascade, 1, coutput1); |
9d670198 | 84 | //mgr->ConnectOutput(taskcheckcascade, 2, coutput2); |
7e504402 | 85 | |
cc1236ed | 86 | return taskcheckcascade; |
87 | } |