]>
Commit | Line | Data |
---|---|---|
c683985a | 1 | AliAnalysisTask *AddTask_shin_pPbTRD(){ |
2 | //get the current analysis manager | |
3 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
4 | if (!mgr) { | |
5 | Error("AddTask_sweber_JPsi_pPb_TRDtrigger", "No analysis manager found."); | |
6 | return 0; | |
7 | } | |
8 | ||
9 | ||
10 | //Do we have an MC handler? | |
11 | Bool_t hasMC=(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()!=0x0); | |
12 | ||
13 | //Get the current train configuration | |
14 | // TString trainConfig=gSystem->Getenv("CONFIG_FILE"); | |
15 | ||
16 | //set config file name | |
17 | TString configBasePath("$ALICE_ROOT/PWGDQ/dielectron/macrosLMEE/"); | |
18 | TString configFile("Config_shin_pPbTRD.C"); | |
19 | TString configFilePath(configBasePath+configFile); | |
20 | ||
21 | ||
22 | ||
23 | ||
24 | // TString list=gSystem->Getenv("LIST"); | |
25 | //create task and add it to the manager | |
26 | AliAnalysisTaskMultiDielectron *task=new AliAnalysisTaskMultiDielectron("MultiDieDataTRDtrigger"); | |
27 | if (!hasMC ) task->UsePhysicsSelection();//taking out for testing | |
28 | task->SetTriggerMask(AliVEvent::kTRD); | |
29 | task->SetFiredTriggerName("CINT7WUHJT-B-NOPF-CENT",kTRUE); | |
30 | //task->SetTRDtrigger(3); | |
31 | // task->SetFiredTriggerName("HQU",kFALSE);//take not kTRUE in order not to get both triggers, exclude (since not yet otherwise possible) | |
32 | // | |
33 | //not yet implemented to get a logical or of 2 different trigger classes, therefore exclude HJT, not exactly what I want... | |
34 | // if (list.Contains("LHC11d")) task->SetTriggerMask(AliVEvent::kEMCEJE+AliVEvent::kEMC7+AliVEvent::kEMCEGA); | |
35 | //if (list.Contains("LHC12h")) task->SetTRDtrigger(1+2); | |
36 | mgr->AddTask(task); | |
37 | ||
38 | ||
39 | //load dielectron configuration file | |
40 | gROOT->LoadMacro(configFilePath.Data()); | |
41 | ||
42 | //add dielectron analysis with different cuts to the task | |
43 | for (Int_t i=0; i<nDie; ++i){ //nDie defined in config file | |
44 | AliDielectron *dile=Config_shin_pPbTRD(i); | |
45 | if (!dile) continue; | |
46 | task->AddDielectron(dile); | |
47 | } | |
48 | ||
49 | //Add event filter | |
50 | AliDielectronEventCuts *eventCuts=new AliDielectronEventCuts("eventCuts","Vertex Track && |vtxZ|<10 && ncontrib>0"); | |
51 | eventCuts->SetRequireVertex();//NOTE: all of these cuts can for some reasons not be applied to self-filtered AODs by mwinn in | |
52 | //(list/hera/alice/mwinn/mwinn/train/lists/...) | |
53 | eventCuts->SetMinVtxContributors(1); | |
54 | eventCuts->SetVertexZ(-10.,10.); | |
55 | task->SetEventFilter(eventCuts); | |
56 | ||
57 | ||
58 | //create output container | |
59 | TString containerName = "hayashi_lowmass.root"; | |
60 | AliAnalysisDataContainer *coutput1 = | |
61 | mgr->CreateContainer("tree_lowmass", | |
62 | TTree::Class(), | |
63 | AliAnalysisManager::kExchangeContainer, | |
64 | containerName.Data()); | |
65 | ||
66 | AliAnalysisDataContainer *cOutputHist1 = | |
67 | mgr->CreateContainer("Histos_diel_lowmass", | |
68 | TList::Class(), | |
69 | AliAnalysisManager::kOutputContainer, | |
70 | containerName.Data()); | |
71 | ||
72 | AliAnalysisDataContainer *cOutputHist2 = | |
73 | mgr->CreateContainer("CF_diel_lowmass", | |
74 | TList::Class(), | |
75 | AliAnalysisManager::kOutputContainer, | |
76 | containerName.Data()); | |
77 | ||
78 | AliAnalysisDataContainer *cOutputHist3 = | |
79 | mgr->CreateContainer("sweber_EventStat", | |
80 | TH1D::Class(), | |
81 | AliAnalysisManager::kOutputContainer, | |
82 | containerName.Data()); | |
83 | ||
84 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
85 | mgr->ConnectOutput(task, 0, coutput1 ); | |
86 | mgr->ConnectOutput(task, 1, cOutputHist1); | |
87 | mgr->ConnectOutput(task, 2, cOutputHist2); | |
88 | mgr->ConnectOutput(task, 3, cOutputHist3); | |
89 | ||
90 | return task; | |
91 | } |