setting the eta range for clustered tracks, adding the correct signature for backgrou...
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Feb 2011 20:20:23 +0000 (20:20 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Feb 2011 20:20:23 +0000 (20:20 +0000)
PWG4/macros/AddTaskJetCluster.C
PWG4/macros/AnalysisTrainPWG4.C
PWG4/macros/AnalysisTrainPWG4Jets.C

index 39275a8..5b4aa36 100644 (file)
@@ -2,6 +2,7 @@
 
 Int_t kBackgroundMode = 0;
 Float_t kPtTrackCut = 0.15;
+Float_t kTrackEtaCut = 0.8;
 
 AliAnalysisTaskJetCluster *AddTaskJetClusterDelta(UInt_t filterMask = 16,Bool_t kUseAODMC = kFALSE,UInt_t iPhysicsSelectionFlag = AliVEvent::kMB,Char_t *jf = "KT", UInt_t iFlag){
    AliAnalysisTaskJetCluster *js = 0;
@@ -87,43 +88,33 @@ AliAnalysisTaskJetCluster *AddTaskJetClusterDelta(UInt_t filterMask = 16,Bool_t
 
    if(typeRec.Contains("AODMC2b")){// work down from the top AODMC2b -> AODMC2 -> AODMC -> AOD
      pwg4spec->SetTrackTypeRec(AliAnalysisTaskJetCluster::kTrackAODMCChargedAcceptance);
+     pwg4spec->SetTrackPtCut(kTrackEtaCut);
    }
    else if (typeRec.Contains("AODMC2")){
      pwg4spec->SetTrackTypeRec(AliAnalysisTaskJetCluster::kTrackAODMCCharged);
+     pwg4spec->SetTrackPtCut(5);
    }
    else if (typeRec.Contains("AODMC")){
      pwg4spec->SetTrackTypeRec(AliAnalysisTaskJetCluster::kTrackAODMCAll);
+     pwg4spec->SetTrackPtCut(5);
    }
    else if (typeRec.Contains("AODextraonly")) {
      pwg4spec->SetTrackTypeRec(AliAnalysisTaskJetCluster::kTrackAODextraonly);
      pwg4spec->SetTrackPtCut(kPtTrackCut);
+     pwg4spec->SetTrackPtCut(kTrackEtaCut);
    }
    else if (typeRec.Contains("AODextra")) {
      cout << "AliAnalysisTaskJetCluster::kTrackAODextra: " << AliAnalysisTaskJetCluster::kTrackAODextra << endl;
      pwg4spec->SetTrackTypeRec(AliAnalysisTaskJetCluster::kTrackAODextra);
      pwg4spec->SetTrackPtCut(kPtTrackCut);
+     pwg4spec->SetTrackPtCut(kTrackEtaCut);
    }
    else if (typeRec.Contains("AOD")) {
      pwg4spec->SetTrackTypeRec(AliAnalysisTaskJetCluster::kTrackAOD);
      pwg4spec->SetTrackPtCut(kPtTrackCut);
+     pwg4spec->SetTrackPtCut(kTrackEtaCut);
    }
 
-
-   if(typeGen.Contains("AODMC2b")){// work down from the top AODMC2b -> AODMC2 -> AODMC -> AOD
-     pwg4spec->SetTrackTypeGen(AliAnalysisTaskJetCluster::kTrackAODMCChargedAcceptance);
-   }
-   else if (typeGen.Contains("AODMC2")){
-     pwg4spec->SetTrackTypeGen(AliAnalysisTaskJetCluster::kTrackAODMCCharged);
-   }
-   else if (typeGen.Contains("AODMC")){
-     pwg4spec->SetTrackTypeGen(AliAnalysisTaskJetCluster::kTrackAODMCAll);
-   }
-   else if (typeGen.Contains("AOD")) {
-     pwg4spec->SetTrackTypeGen(AliAnalysisTaskJetCluster::kTrackAOD);
-   }
-
-
-
    pwg4spec->SetRparam(radius);
 
    switch (jf) {
index 9984a5e..9804f06 100644 (file)
@@ -494,12 +494,12 @@ void AnalysisTrainPWG4(const char *analysis_mode="local",
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskJetSpectrum2.C");
      AliAnalysisTaskJetSpectrum2 *taskjetSpectrum = 0;
      if(iPWG4JetSpectrum&1){
-       taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,kTRUE,1,0);
+       taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,0);
        if(kIsPbPb){
-        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,kTRUE,1,1);
-        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,kTRUE,1,2);
-        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,kTRUE,1,3);
-        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,kTRUE,1,4);
+        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,1);
+        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,2);
+        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,3);
+        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),"",kDefaultJetBackgroundBranch.Data(),kHighPtFilterMask,AliVEvent::kMB,0,4);
        }
      }
      if (!taskjetSpectrum) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskJetSpectrum2 cannot run for this train conditions - EXCLUDED");
index 3f2ead7..fc830c6 100644 (file)
@@ -721,6 +721,9 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
 if(iPWG4JetSpectrum){
      gROOT->LoadMacro("$ALICE_ROOT_SRC/PWG4/macros/AddTaskJetSpectrum2.C");
      AliAnalysisTaskJetSpectrum2 *taskjetSpectrum = 0;
+     TString bkgClusters = kDefaultJetBackgroundBranch.Data(); 
+     bkgClusters.ReplaceAll(Form("%s_",AliAODJetEventBackground::StdBranchName()),"");
+
      if(iPWG4JetSpectrum&1){
        if(kIsPbPb){
         for(int i = 0;i<5;i++){
@@ -729,8 +732,6 @@ if(iPWG4JetSpectrum){
           //      tmp.ReplaceAll(Form(kJetSubtractMask2.Data(),1),kJetSubtractMask1.Data());
           tmp.ReplaceAll(Form(kJetSubtractMask2.Data(),1),Form(kJetSubtractMask1.Data(),0));
 
-          TString bkgClusters = kDefaultJetBackgroundBranch.Data(); 
-          bkgClusters.ReplaceAll(Form("%s_",AliAODJetEventBackground::StdBranchName()),"");
           taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),tmp.Data(),"",kHighPtFilterMask,AliVEvent::kMB,0,i);
           taskjetSpectrum->SetBranchBkgRec(bkgClusters.Data());
           taskjetSpectrum->SetBranchBkgGen(bkgClusters.Data());
@@ -785,7 +786,7 @@ if(iPWG4JetSpectrum){
         //        tmp.ReplaceAll(Form(kJetSubtractMask2.Data(),1),kJetSubtractMask1.Data());
         //        tmp.ReplaceAll(Form(kJetSubtractMask2.Data(),1),kJetSubtractMask1.Data());
         tmp.ReplaceAll(Form(kJetSubtractMask2.Data(),0),Form(kJetSubtractMask1.Data(),1));
-        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),tmp.Data(),"",kHighPtFilterMask,AliVEvent::kMB,0,kFALSE,0,i);
+        taskjetSpectrum = AddTaskJetSpectrum2(kDefaultJetBranch.Data(),tmp.Data(),"",kHighPtFilterMask,AliVEvent::kMB,0,i);
         taskjetSpectrum->SetDebugLevel(3);
         //        taskjetSpectrum->SetMinJetPt(10);
         taskjetSpectrum->SetTrackEtaWindow(0.8);
@@ -795,20 +796,21 @@ if(iPWG4JetSpectrum){
         if(iAODanalysis)SetAODInput(taskjetSpectrum);
         
 
+        /*
         TString tmp2(kDefaultJetBranch.Data());
         tmp2.ReplaceAll(Form(kJetSubtractMask2.Data(),0),Form(kJetSubtractMask2.Data(),2));
-        taskjetSpectrum = AddTaskJetSpectrum2(tmp2.Data(),kDefaultJetBranch.Data(),"",kHighPtFilterMask,AliVEvent::kMB,0,kFALSE,0,i);
+        taskjetSpectrum = AddTaskJetSpectrum2(tmp2.Data(),kDefaultJetBranch.Data(),"",kHighPtFilterMask,AliVEvent::kMB,0,i);
         //      taskjetSpectrum->SetDebugLevel(3);
         //        taskjetSpectrum->SetMinJetPt(10);
         taskjetSpectrum->SetBranchBkgRec(bkgClusters.Data());
         taskjetSpectrum->SetBranchBkgGen(bkgClusters.Data());
-x       taskjetSpectrum->SetTrackEtaWindow(0.8);
+        taskjetSpectrum->SetTrackEtaWindow(0.8);
         taskjetSpectrum->SetJetEtaWindow(0.4);
 
         // check the old subtracted vs. the new subtracted
         TString tmp3(kDefaultJetBranch.Data());
         tmp3.ReplaceAll(Form(kJetSubtractMask2.Data(),0),Form(kJetSubtractMask2.Data(),3));
-        taskjetSpectrum = AddTaskJetSpectrum2(tmp3.Data(),kDefaultJetBranch.Data(),"",kHighPtFilterMask,AliVEvent::kMB,0,kFALSE,0,i);
+        taskjetSpectrum = AddTaskJetSpectrum2(tmp3.Data(),kDefaultJetBranch.Data(),"",kHighPtFilterMask,AliVEvent::kMB,0,i);
         //      taskjetSpectrum->SetDebugLevel(3);
         //        taskjetSpectrum->SetMinJetPt(10);
         taskjetSpectrum->SetBranchBkgRec(bkgClusters.Data());
@@ -816,6 +818,7 @@ x    taskjetSpectrum->SetTrackEtaWindow(0.8);
         taskjetSpectrum->SetTrackEtaWindow(0.8);
         taskjetSpectrum->SetJetEtaWindow(0.4);
         if(iAODanalysis)SetAODInput(taskjetSpectrum);
+        */
        }
        if (!taskjetSpectrum) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskJetSpectrum2 cannot run for this train conditions - EXCLUDED");
      }