Streamlining with the analyis framework:
[u/mrichter/AliRoot.git] / PWG1 / TRD / macros / AddTRDinfoGen.C
CommitLineData
1ee39b3a 1#if ! defined (__CINT__) || defined (__MAKECINT__)
3f19c2cd 2#include "AliLog.h"
1ee39b3a 3#include "AliAnalysisManager.h"
4#include "AliAnalysisDataContainer.h"
d4f4bb29 5#include "PWG1/TRD/AliTRDinfoGen.h"
6#include "PWG1/TRD/info/AliTRDeventInfo.h"
7#include "PWG1/TRD/macros/AliTRDperformanceTrain.h"
1ee39b3a 8#endif
9
d4f4bb29 10#include "PWG1/TRD/macros/helper.C"
1ee39b3a 11void AddTRDinfoGen(AliAnalysisManager *mgr, Char_t *trd, AliAnalysisDataContainer **/*ci*/, AliAnalysisDataContainer **co)
12{
13 Int_t map = ParseOptions(trd);
14 if(!(TSTBIT(map, kInfoGen))) return;
15
3f19c2cd 16 //AliLog::SetClassDebugLevel("AliTRDinfoGen", 5);
17 AliTRDinfoGen *info(NULL);
1ee39b3a 18 mgr->AddTask(info = new AliTRDinfoGen());
19 info->SetDebugLevel(0);
20 info->SetMCdata(mgr->GetMCtruthEventHandler());
21 mgr->ConnectInput( info, 0, mgr->GetCommonInputContainer());
3f19c2cd 22 // settings for collisions
23 info->SetCollision();
24 if(info->IsCollision()){
25 info->SetTrigger(
26 "CINT1B-ABCE-NOPF-ALL"
27 " CSCO1-ABCE-NOPF-CENT" // cosmic SPD trigger
28 );
29 info->SetLocalEvSelection();
30 info->SetLocalTrkSelection();
31 }
1ee39b3a 32 co[0] = mgr->CreateContainer("trackInfo", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
33 co[1] = mgr->CreateContainer("eventInfo", AliTRDeventInfo::Class(), AliAnalysisManager::kExchangeContainer);
34 co[2] = mgr->CreateContainer("v0Info", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
35 mgr->ConnectOutput(info, 0, co[0]);
36 mgr->ConnectOutput(info, 1, co[1]);
37 mgr->ConnectOutput(info, 2, co[2]);
38}
39