Changes for background calculations for jet spectrum, setting of track filter bits...
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 Sep 2010 20:10:50 +0000 (20:10 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 Sep 2010 20:10:50 +0000 (20:10 +0000)
PWG4/macros/AddTaskESDFilterPWG4Train.C
PWG4/macros/AddTaskJetCluster.C
PWG4/macros/AddTaskJetSpectrum2.C
PWG4/macros/AddTaskLeadingTrackUE.C
PWG4/macros/AnalysisTrainPWG4Jets.C

index 69ddb9f3dc0c163b8a8dbf79ad3699bbf4d58091..30db0f4aa55b0df34ae813a9844a4cd50a865975 100644 (file)
@@ -98,13 +98,18 @@ AliAnalysisTaskESDfilter *AddTaskESDFilter(Bool_t useKineFilter=kTRUE,
    */
    AliESDtrackCuts* esdTrackCutsH1 = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009();
    esdTrackCutsH1->SetName("StandardFromAliESDTrackCutsMaxRelPt");
-   esdTrackCutsH1->SetMaxRel1PtUncertainty(0.08); // new 
+   esdTrackCutsH1->SetMaxRel1PtUncertainty(0.4); // new 
 
 
    AliESDtrackCuts* esdTrackCutsH2 = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009();
-   esdTrackCutsH2->SetName("StandardFromAliESDTrackCutsNoSPDRequirement");
-   esdTrackCutsH2->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
+   esdTrackCutsH2->SetName("StandardFromAliESDTrackCutsExtraDCA");
+   esdTrackCutsH2->SetMaxDCAToVertexZ(2);
+
+   AliESDtrackCuts* esdTrackCutsH3 = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009();
+   esdTrackCutsH2->SetName("StandardFromAliESDTrackCutsExtraDCANoITS");
+   esdTrackCutsH3->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kNone);
+   esdTrackCutsH3->SetClusterRequirementITS(AliESDtrackCuts::kSDD, AliESDtrackCuts::kFirst);
+   esdTrackCutsH3->SetMaxDCAToVertexZ(2);
 
    // Compose the filter
    AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
@@ -124,6 +129,8 @@ AliAnalysisTaskESDfilter *AddTaskESDFilter(Bool_t useKineFilter=kTRUE,
    trackFilter->AddCuts(esdTrackCutsH1);
    // 64
    trackFilter->AddCuts(esdTrackCutsH2);
+   // 128
+   trackFilter->AddCuts(esdTrackCutsH2);
  
    // Filter with cuts on V0s
    AliESDv0Cuts*   esdV0Cuts = new AliESDv0Cuts("Standard V0 Cuts pp", "ESD V0 Cuts");
index f65beb5a3467fe974f897c389bcfd97b6b2dd2cb..3834a4b53332ede694d9e48b972dd70fe24f6ca8 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,Int_t nSkip = 0);\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,Int_t kWriteAOD);\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
@@ -16,7 +16,7 @@ AliAnalysisTaskJetCluster *AddTaskJetClusterDelta(UInt_t filterMask = 16,Bool_t
     if(iFlag&(1<<0))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,0.00001);\r
     if(iFlag&(1<<1))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,0.1);\r
     if(iFlag&(1<<2))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,0.2);\r
-    if(iFlag&(1<<4))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,0.4);\r
+    if(iFlag&(1<<4))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,0.4,0,1);\r
     if(iFlag&(1<<6))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,0.6);\r
     if(iFlag&(1<<8))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,0.8);\r
     if(iFlag&(1<<10))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelection,jf,1.0);\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,Int_t nSkip)\r
+AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filterMask,Int_t iPhysicsSelection,Char_t *jf,Float_t radius,Int_t nSkip,Int_t kWriteAOD)\r
 {\r
 // Creates a jet fider task, configures it and adds it to the analysis manager.\r
 \r
@@ -121,7 +121,7 @@ AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filte
    }\r
 \r
    \r
-   if(TMath::Abs(radius-0.4)<0.01){\r
+   if(kWriteAOD){\r
      pwg4spec->SetJetOutputBranch(Form("clusters%s_%s%s",bRec,jf,cRadius));\r
      pwg4spec->SetJetOutputMinPt(0); // store only jets / clusters above a certain threshold\r
    }\r
index 21a53cff1fb3b9889b32f559b34d551ffc9b5d12..e6c62f8c8aa088854c44980e48f06e0e65d307d7 100644 (file)
@@ -1,86 +1,48 @@
-AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec = "jets",const char* bGen = "jetsAODMC_UA104",const char* bBkg="jeteventbackground_jetsAOD_FASTKT04",UInt_t filterMask = 16, Int_t iPhysicsSelection = 1,UInt_t iEventSelectionMask = 0,Bool_t kBackground=kFALSE);\r
+AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec = "jets",const char* bGen = "jetsAODMC_UA104",const char* bBkg="jeteventbackground_clustersAOD_KT06",UInt_t filterMask = 16, Int_t iPhysicsSelection = 1,UInt_t iEventSelectionMask = 0,Bool_t kBackground=kTRUE);\r
 \r
 \r
 AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2Delta(UInt_t filterMask = 16,Bool_t kUseAODMC = kFALSE,Int_t iPhysicsSelection = 1,UInt_t iFlag = 0xfffffff, UInt_t iEventSelectionMask = 0,Bool_t kBackground = kFALSE){\r
   AliAnalysisTaskJetSpectrum2 *js = 0;\r
 \r
- if(!kBackground){\r
-  if(kUseAODMC){\r
-    if(iFlag&(1<<0))js = AddTaskJetSpectrum2("jets","jetsAODMC_UA104","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-    if(iFlag&(1<<1))js = AddTaskJetSpectrum2("jets","jetsAODMC2_UA104","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-\r
-    if(iFlag&(1<<2))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-    if(iFlag&(1<<3))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04","",filterMask,iPhysicsSelection,  iEventSelectionMask);\r
-\r
-    if(iFlag&(1<<4)){\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC_FASTKT04","",filterMask,iPhysicsSelection,iEventSelectionMask);\r
-    }\r
-    if(iFlag&(1<<5))js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC2_FASTKT04","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-    if(iFlag&(1<<6))js = AddTaskJetSpectrum2("jetsAOD_UA107","jetsAODMC_UA107","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-  }\r
-\r
-  if(iFlag&(1<<7))js = AddTaskJetSpectrum2("jets","jetsAOD_FASTJET04","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-\r
-  if(iFlag&(1<<8))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-  if(iFlag&(1<<9))js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-  if(iFlag&(1<<10))js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-  \r
-  if(iFlag&(1<<11)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_UA107","","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-    js->SetRecEtaWindow(0.2);\r
-  }\r
-  if(iFlag&(1<<12)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_FASTJET07","","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-    js->SetRecEtaWindow(0.2);\r
-  }\r
-  if(iFlag&(1<<13)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_FASTKT07","","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-    js->SetRecEtaWindow(0.2);\r
-  }\r
-  if(iFlag&(1<<14)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_SISCONE07","","",filterMask,iPhysicsSelection, iEventSelectionMask);\r
-    js->SetRecEtaWindow(0.2);\r
-  }}\r
+  TString cBack = "";\r
+  if(kBackground)cBack = "jeteventbackground_clustersAOD_KT06";\r
 \r
-\r
-  if(kBackground){\r
   if(kUseAODMC){\r
-    if(iFlag&(1<<0))js = AddTaskJetSpectrum2("jets","jetsAODMC_UA104","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-    if(iFlag&(1<<1))js = AddTaskJetSpectrum2("jets","jetsAODMC2_UA104","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-\r
-    if(iFlag&(1<<2))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-    if(iFlag&(1<<3))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection,  iEventSelectionMask,kBackground);\r
-\r
+    if(iFlag&(1<<0))js = AddTaskJetSpectrum2("jets","jetsAODMC_UA104",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    if(iFlag&(1<<1))js = AddTaskJetSpectrum2("jets","jetsAODMC2_UA104",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    \r
+    if(iFlag&(1<<2))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    if(iFlag&(1<<3))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04",cBack.Data(),filterMask,iPhysicsSelection,  iEventSelectionMask,kBackground);\r
+    \r
     if(iFlag&(1<<4)){\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC_FASTKT04","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection,iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC_FASTKT04",cBack.Data(),filterMask,iPhysicsSelection,iEventSelectionMask,kBackground);\r
     }\r
-    if(iFlag&(1<<5))js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC2_FASTKT04","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-    if(iFlag&(1<<6))js = AddTaskJetSpectrum2("jetsAOD_UA107","jetsAODMC_UA107","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    if(iFlag&(1<<5))js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC2_FASTKT04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    if(iFlag&(1<<6))js = AddTaskJetSpectrum2("jetsAOD_UA107","jetsAODMC_UA107",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
   }\r
-\r
-  if(iFlag&(1<<7))js = AddTaskJetSpectrum2("jets","jetsAOD_FASTJET04","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-\r
-  if(iFlag&(1<<8))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-  if(iFlag&(1<<9))js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-  if(iFlag&(1<<10))js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+  \r
+  if(iFlag&(1<<7))js = AddTaskJetSpectrum2("jets","jetsAOD_FASTJET04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+  \r
+  if(iFlag&(1<<8))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+  if(iFlag&(1<<9))js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+  if(iFlag&(1<<10))js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
   \r
   if(iFlag&(1<<11)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_UA107","","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_UA107","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
   }\r
   if(iFlag&(1<<12)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_FASTJET07","","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_FASTJET07","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
   }\r
   if(iFlag&(1<<13)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_FASTKT07","","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_FASTKT07","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
   }\r
   if(iFlag&(1<<14)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_SISCONE07","","jeteventbackground_jetsAOD_FASTKT04",filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_SISCONE07","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
-  }}\r
-\r
+  }\r
 \r
   return js;\r
 }\r
@@ -121,13 +83,15 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bG
 \r
    pwg4spec->SetBranchGen(bGen); \r
    pwg4spec->SetBranchRec(bRec); \r
-   pwg4spec->SetBranchBkg(bBkg);\r
+   if(strlen(bBkg)>0)pwg4spec->SetBranchBkg(bBkg);\r
 \r
    pwg4spec->SetFilterMask(filterMask); \r
    pwg4spec->SetUseGlobalSelection(kTRUE); \r
    pwg4spec->SetMinJetPt(5.);\r
-   if(kBackground) pwg4spec->SetBkgSubtraction(kTRUE);\r
-  \r
+   if(kBackground&&strlen(bBkg)>0){\r
+     pwg4spec->SetBkgSubtraction(kTRUE);\r
+   }  \r
+\r
    if(type == "AOD"){\r
      // Assume all jet are produced already\r
      pwg4spec->SetAODJetInput(kTRUE);\r
index 6929beb9bc4bc08ba50eddb78e8f5e53a5a8e5c3..05fb744cd47a5e35c2ea30fb98ed3d7e2ec5b176 100644 (file)
@@ -46,12 +46,12 @@ void ConfigTaskUE(AliAnalysisTaskLeadingTrackUE * ueana){
   // common config,\r
   ueana->SetDebugLevel(0); \r
   ueana->SetPtRangeInHist(100, 0., 100.);\r
-  ueana->SetFilterBit(16);  \r
-  //ueana->SetFilterBit(16+32);  \r
+  //  ueana->SetFilterBit(16);  \r
+  ueana->SetFilterBit(64+128);  \r
   ueana->SetTrackEtaCut(0.8);\r
   ueana->SetLeadingTrackEtaCut(0.8);\r
   ueana->SetEventSelectionBit(AliAnalysisHelperJetTasks::kIsPileUp);\r
-  //ueana->SetReduceMemoryFootprint(kTRUE);\r
+  ueana->SetReduceMemoryFootprint(kTRUE);\r
  \r
   if (1)\r
   {\r
index fb75057883179a1067cfaeb317e7493d82e2108e..5f5f18a7d87459fe60eab204d70bfe30ef4d0fc7 100644 (file)
@@ -170,6 +170,7 @@ TString     kLocalXMLDataset   = ""; // Change local xml dataset for local inter
 TString     kLocalDataList   = "local_deltaaod.txt"; // Change local xml dataset for local interactive analysis
 // == local process variables
 
+TString kPluginMode;
 
 
 // Temporaries.
@@ -188,13 +189,16 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
 // Main analysis train macro. If a configuration file is provided, all parameters
 // are taken from there but may be altered by CheckModuleFlags.
 
-   if (strlen(config_file) && !LoadConfig(config_file)) return;
+  // these flag may be needed by the config file
+  kPluginMode = plugin_mode;
+  
+  if (strlen(config_file) && !LoadConfig(config_file)) return;
 
    if(iOffset)kProofOffset = iOffset;
    TString smode(analysis_mode);
    smode.ToUpper();
    if (kSaveTrain)WriteConfig();
-   // Check compatibility of selected modules
+   // Check compatibility of selected modules 
    CheckModuleFlags(smode);
    //     gROOT->ProcessLine(".trace");
 
@@ -399,7 +403,11 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
      gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskJetCluster.C");
      AliAnalysisTaskJetCluster *taskCl = 0;
      if(iPWG4Cluster&1){
-       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"KT");
+       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"KT",0.4,0,1); // this one is for the background jets
+       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"KT",0.5,0,1); // this one is for the background jets
+       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"KT",0.6,0,1); // this one is for the background jets
+       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"KT",0.7,0,1); // this one is for the background jets
+
        if (!taskCl) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskCluster cannot run for this train conditions - EXCLUDED");
      }
      if(iPWG4Cluster&2){
@@ -417,7 +425,7 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
        }
        else selection = 1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<7|1<<8|1<<9;
        AddTaskJetClusterDelta(kHighPtFilterMask,kUseAODMC,iPhysicsSelection,"ANTIKT",selection);
-       AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"ANTIKT",0.4,1);
+       //       AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"ANTIKT",0.4,0,1);
 
      }
    }