Adding option to skip leading tracks in randomized events
[u/mrichter/AliRoot.git] / PWG4 / macros / AddTaskJetCluster.C
index 6e924cc..2638bbf 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec = "AOD",char* bGen = "",UInt_t filterMask = 16, Int_t iPhysicsSelection = 1,Char_t *jf = "KT", Float_t radius = 0.4);\r
+AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec = "AOD",char* bGen = "",UInt_t filterMask = 16, Int_t iPhysicsSelection = 1,Char_t *jf = "KT", Float_t radius = 0.4,Int_t nSkip = 0);\r
 \r
 \r
 AliAnalysisTaskJetCluster *AddTaskJetClusterDelta(UInt_t filterMask = 16,Bool_t kUseAODMC = kFALSE,Int_t iPhysicsSelection = 1,Char_t *jf = "KT", UInt_t iFlag){\r
@@ -26,7 +26,7 @@ AliAnalysisTaskJetCluster *AddTaskJetClusterDelta(UInt_t filterMask = 16,Bool_t
 }\r
 \r
 \r
-AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filterMask,Int_t iPhysicsSelection,Char_t *jf,Float_t radius)\r
+AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filterMask,Int_t iPhysicsSelection,Char_t *jf,Float_t radius,Int_t nSkip)\r
 {\r
 // Creates a jet fider task, configures it and adds it to the analysis manager.\r
 \r
@@ -58,7 +58,7 @@ AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filte
    if(radius>0)cRadius = Form("%02d",(int)((radius+0.01)*10.));\r
 \r
    \r
-   AliAnalysisTaskJetCluster* pwg4spec = new  AliAnalysisTaskJetCluster(Form("JetCluster_%s_%s",jf,cRadius));\r
+   AliAnalysisTaskJetCluster* pwg4spec = new  AliAnalysisTaskJetCluster(Form("JetCluster_%s_%s_skip%d",jf,cRadius,nSkip));\r
       \r
    // or a config file\r
    // pwg4spec->SetAnalysisType(AliAnalysisTaskJetCluster::kAnaMC);\r
@@ -126,14 +126,16 @@ AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filte
      pwg4spec->SetJetOutputMinPt(1); // store only jets / clusters above a certain threshold\r
    }\r
 \r
+   pwg4spec->SetNSkipLeadingRan(nSkip);\r
+\r
    if(iPhysicsSelection)pwg4spec->SelectCollisionCandidates();\r
 \r
    mgr->AddTask(pwg4spec);\r
-     \r
+\r
    // Create ONLY the output containers for the data produced by the task.\r
    // Get and connect other common input/output containers via the manager as below\r
    //==============================================================================\r
-   AliAnalysisDataContainer *coutput1_Spec = mgr->CreateContainer(Form("pwg4cluster_%s_%s_%s_%s",bRec,bGen,jf,cRadius), TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:PWG4_cluster_%s_%s_%s_%s",AliAnalysisManager::GetCommonFileName(),bRec,bGen,jf,cRadius));\r
+   AliAnalysisDataContainer *coutput1_Spec = mgr->CreateContainer(Form("pwg4cluster_%s_%s_%s_%s_skip%d",bRec,bGen,jf,cRadius,nSkip), TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:PWG4_cluster_%s_%s_%s_%s_skip%d",AliAnalysisManager::GetCommonFileName(),bRec,bGen,jf,cRadius,nSkip));\r
 \r
    mgr->ConnectInput  (pwg4spec, 0, mgr->GetCommonInputContainer());\r
    mgr->ConnectOutput (pwg4spec, 0, mgr->GetCommonOutputContainer());\r