Event mixing

Some details about the official framework to perform event mixing can be found here: Offline event mixing page

Event mixing example code (courtesy of Dariusz Miskowiec

The following example gives an idea on how one can perform event mixing on the GRID. The events are grouped based on their multiplicity. Please note that the example hasn't been tested!!! Feel free to test it and provide any feedback.

AliEventPoolOTF* pool = new AliEventPoolOTF("event pool", "ESD");

if (TGrid::Connect("alien://")) return;

TChain *tr = CreateChainFromTags("wn.xml", "ESD");

TAlienCollection* coll = TAlienCollection::Open("wn.xml");

TGridResult* tagResult = coll->GetGridResult("",0,0);

pool->SetGridResult(tagResult);

pool->SetMultiplicityBin(0, 300, 10);

pool->Init();

AliMultiEventInputHandler* inpHandler = new AliMultiEventInputHandler(2, 0);

AliAnalysisManager *mgr = new AliAnalysisManager("Test Manager", "Test Manager");

mgr->SetInputEventHandler(inpHandler);

mgr->SetEventPool(pool);

inpHandler->SetEventPool(pool);

mgr->AddTask(mytask);

AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();

AliAnalysisDataContainer *cdummy = mgr->CreateContainer("tree", TTree::Class(),AliAnalysisManager::kExchangeContainer, "default");

mgr->ConnectInput (mytask,0,cinput);

mgr->ConnectOutput(mytask,0,cdummy);

mgr->InitAnalysis();

mgr->PrintStatus();

mgr->StartAnalysis("mix",tr);

-- PanosChristakoglou - 05 Aug 2008

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2012-01-26 - PanosChristakoglouCernCh
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    AliceEbyE All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback