Updated documentation
[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;
3d83da78 15
3f19c2cd 16 //AliLog::SetClassDebugLevel("AliTRDinfoGen", 5);
17 AliTRDinfoGen *info(NULL);
3d83da78 18 info = new AliTRDinfoGen("genInfo");
19 mgr->AddTask(info);
1ee39b3a 20 info->SetDebugLevel(0);
21 info->SetMCdata(mgr->GetMCtruthEventHandler());
3d83da78 22 AliAnalysisDataContainer* cin = mgr->CreateContainer("dummy", TObjArray::Class(), AliAnalysisManager::kInputContainer);
23
24
1ee39b3a 25 mgr->ConnectInput( info, 0, mgr->GetCommonInputContainer());
3f19c2cd 26 // settings for collisions
27 info->SetCollision();
28 if(info->IsCollision()){
29 info->SetTrigger(
30 "CINT1B-ABCE-NOPF-ALL"
31 " CSCO1-ABCE-NOPF-CENT" // cosmic SPD trigger
32 );
33 info->SetLocalEvSelection();
34 info->SetLocalTrkSelection();
35 }
1ee39b3a 36 co[0] = mgr->CreateContainer("trackInfo", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
37 co[1] = mgr->CreateContainer("eventInfo", AliTRDeventInfo::Class(), AliAnalysisManager::kExchangeContainer);
3d83da78 38 co[2] = mgr->CreateContainer("v0Info", TObjArray::Class(), AliAnalysisManager::kExchangeContainer);
39
40 mgr->ConnectInput (info, 0, mgr->GetCommonInputContainer());
41 mgr->ConnectInput (info, 1, cin ); // Dummy to avoid orphan
42 mgr->ConnectOutput(info, 1, co[0]);
43 mgr->ConnectOutput(info, 2, co[1]);
44 mgr->ConnectOutput(info, 3, co[2]);
1ee39b3a 45}
46