3 AliJetEmbedding* AddTaskJetEmbedding(
4 const char *tracksName = "Tracks",
5 const char *clusName = "CaloClustersCorr",
6 const Float_t minPt = 50,
7 const Float_t maxPt = 60,
8 const Float_t minEta = -1,
9 const Float_t maxEta = 1,
10 const Float_t minPhi = 0,
11 const Float_t maxPhi = TMath::Pi() * 2,
12 const Int_t nTracks = 1,
13 const Int_t nClus = 0,
14 const Bool_t copyArray = kFALSE
17 // Get the pointer to the existing analysis manager via the static access method.
18 //==============================================================================
19 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
22 ::Error("AddTaskJetEmbedding", "No analysis manager to connect to.");
26 // Check the analysis type using the event handlers connected to the analysis manager.
27 //==============================================================================
28 if (!mgr->GetInputEventHandler())
30 ::Error("AddTaskJetEmbedding", "This task requires an input event handler");
34 //-------------------------------------------------------
35 // Init the task and do settings
36 //-------------------------------------------------------
38 AliJetEmbedding *jetEmb = new AliJetEmbedding("AliJetEmbedding");
39 jetEmb->SetTracksName(tracksName);
40 jetEmb->SetClusName(clusName);
41 jetEmb->SetEtaRange(minEta, maxEta);
42 jetEmb->SetPhiRange(minPhi, maxPhi);
43 jetEmb->SetPtRange(minPt, maxPt);
44 jetEmb->SetCopyArray(copyArray);
45 jetEmb->SetNClusters(nClus);
46 jetEmb->SetNTracks(nTracks);
48 //-------------------------------------------------------
49 // Final settings, pass to manager and set the containers
50 //-------------------------------------------------------
54 // Create containers for input/output
55 mgr->ConnectInput (jetEmb, 0, mgr->GetCommonInputContainer() );