Allow for differerent selection flag than kMB, take into account filterbit in the...
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 14 Nov 2010 10:15:55 +0000 (10:15 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 14 Nov 2010 10:15:55 +0000 (10:15 +0000)
PWG4/JetTasks/AliAnalysisTaskJetServices.cxx
PWG4/JetTasks/AliAnalysisTaskJetServices.h
PWG4/macros/AddTaskESDFilterPWG4Train.C
PWG4/macros/AddTaskJetCluster.C
PWG4/macros/AddTaskJetSpectrum2.C
PWG4/macros/AddTaskJets.C
PWG4/macros/AnalysisTrainPWG4Jets.C

index 387edbc..1709da3 100644 (file)
@@ -70,6 +70,7 @@ AliAnalysisTaskJetServices::AliAnalysisTaskJetServices(): AliAnalysisTaskSE(),
   fUseAODInput(kFALSE),
   fUsePhysicsSelection(kFALSE),
   fMC(kFALSE),
+  fPhysicsSelectionFlag(AliVEvent::kMB),
   fSelectionInfoESD(0),
   fEventCutInfoESD(0),
   fAvgTrials(1),
@@ -105,6 +106,7 @@ AliAnalysisTaskJetServices::AliAnalysisTaskJetServices(const char* name):
   fUseAODInput(kFALSE),
   fUsePhysicsSelection(kFALSE),
   fMC(kFALSE),
+  fPhysicsSelectionFlag(AliVEvent::kMB),
   fSelectionInfoESD(0),
   fEventCutInfoESD(0),
   fAvgTrials(1),
@@ -391,7 +393,7 @@ void AliAnalysisTaskJetServices::UserExec(Option_t */*option*/)
 
   Bool_t aodEventSelected = IsEventSelected(aod);
 
-  Bool_t physicsSelection = ((fInputHandler->IsEventSelected())&AliVEvent::kMB);
+  Bool_t physicsSelection = ((fInputHandler->IsEventSelected())&fPhysicsSelectionFlag);
   fEventCutInfoESD |= kPhysicsSelectionCut; // other alreay set via IsEventSelected
   fh1EventCutInfoESD->Fill(fEventCutInfoESD);
 
index d095137..67a1908 100644 (file)
@@ -54,6 +54,7 @@ class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
     virtual void SetRunRange(Float_t fLo,Float_t fUp){fRunRange[0] = fLo;fRunRange[1] = fUp;}
     virtual void SetMCData(Bool_t b){fMC = b;}
     virtual void SetUsePhysicsSelection(Bool_t b){fUsePhysicsSelection = b;}
+    virtual void SetPhysicsSelectionFlag(Int_t i){fPhysicsSelectionFlag = i;}
     Bool_t IsEventSelected(const AliESDEvent* esd);
     Bool_t IsEventSelected(const AliAODEvent* aod) const;
 
@@ -90,6 +91,7 @@ class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
     Bool_t        fUseAODInput;        // take jet from input AOD not from ouptu AOD
     Bool_t        fUsePhysicsSelection;// decide wether we take into account physicsselction task
     Bool_t        fMC;                 // true for MC data to allow correct trigger slection
+    UInt_t        fPhysicsSelectionFlag; // defines the glag for acceptance of events from physics selection
     UInt_t        fSelectionInfoESD;   // slection info bit mask
     UInt_t        fEventCutInfoESD;   // event selection info of what is cutted after physics selection
     Float_t       fAvgTrials;          // Average number of trials
@@ -119,7 +121,7 @@ class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
 
     TList *fHistList; // Output list
    
-    ClassDef(AliAnalysisTaskJetServices,8)
+    ClassDef(AliAnalysisTaskJetServices,9)
 };
  
 #endif
index a4ad5a0..bf75690 100644 (file)
@@ -80,6 +80,7 @@ AliAnalysisTaskESDfilter *AddTaskESDFilter(Bool_t useKineFilter=kTRUE,
    // take the standard cuts, which include already 
    // ITSrefit and use only primaries...
 
+   // loose DCA cuts
    AliESDtrackCuts* esdTrackCutsH = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kFALSE); 
    esdTrackCutsH->SetMaxDCAToVertexXY(2.4);
    esdTrackCutsH->SetMaxDCAToVertexZ(3.2);
@@ -115,23 +116,23 @@ AliAnalysisTaskESDfilter *AddTaskESDFilter(Bool_t useKineFilter=kTRUE,
 
    // Compose the filter
    AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
-   // 1
+   // 1, 1<<0
    trackFilter->AddCuts(esdTrackCutsL);
-   // 2
+   // 2 1<<1
    trackFilter->AddCuts(esdTrackCutsITSsa);
-   // 4
+   // 4 1<<2
    trackFilter->AddCuts(itsStrong);
    itsStrong->SetFilterMask(1);        // AND with Standard track cuts 
-   // 8
+   // 8 1<<3
    trackFilter->AddCuts(electronID);
    electronID->SetFilterMask(4);       // AND with Pixel Cuts
-   // 16
+   // 16 1<<4
    trackFilter->AddCuts(esdTrackCutsH);
-   // 32
+   // 32 1<<5
    trackFilter->AddCuts(esdTrackCutsH2);
-   // 64
+   // 64 1<<6
    trackFilter->AddCuts(esdTrackCutsH3);
-   // 128
+   // 128 1<<7
    trackFilter->AddCuts(esdTrackCutsH1);
  
    // Filter with cuts on V0s
index 2b6372d..08bceb0 100644 (file)
@@ -1,32 +1,32 @@
-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 = kFALSE);\r
+AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec = "AOD",char* bGen = "",UInt_t filterMask = 16, UInt_t iPhysicsSelectionFlag = AliVEvent::kMB,Char_t *jf = "KT", Float_t radius = 0.4,Int_t nSkip = 0,Int_t kWriteAOD = kFALSE);\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
+AliAnalysisTaskJetCluster *AddTaskJetClusterDelta(UInt_t filterMask = 16,Bool_t kUseAODMC = kFALSE,UInt_t iPhysicsSelectionFlag = AliVEvent::kMB,Char_t *jf = "KT", UInt_t iFlag){\r
   AliAnalysisTaskJetCluster *js = 0;\r
   if(kUseAODMC&&false){// do not use the MC info yet\r
-    if(iFlag&(1<<0))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelection,jf,0.00001);\r
-    if(iFlag&(1<<1))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelection,jf,0.1);\r
-    if(iFlag&(1<<2))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelection,jf,0.2);\r
-    if(iFlag&(1<<4))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelection,jf,0.4);\r
-    if(iFlag&(1<<6))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelection,jf,0.6);\r
-    if(iFlag&(1<<8))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelection,jf,0.8);\r
-    if(iFlag&(1<<10))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelection,jf,1.0);\r
+    if(iFlag&(1<<0))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelectionFlag,jf,0.00001);\r
+    if(iFlag&(1<<1))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelectionFlag,jf,0.1);\r
+    if(iFlag&(1<<2))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelectionFlag,jf,0.2);\r
+    if(iFlag&(1<<4))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelectionFlag,jf,0.4);\r
+    if(iFlag&(1<<6))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelectionFlag,jf,0.6);\r
+    if(iFlag&(1<<8))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelectionFlag,jf,0.8);\r
+    if(iFlag&(1<<10))js = AddTaskJetCluster("AOD","AODMC",filterMask,iPhysicsSelectionFlag,jf,1.0);\r
   }\r
   else{\r
-    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<<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
+    if(iFlag&(1<<0))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelectionFlag,jf,0.00001);\r
+    if(iFlag&(1<<1))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelectionFlag,jf,0.1);\r
+    if(iFlag&(1<<2))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelectionFlag,jf,0.2);\r
+    if(iFlag&(1<<4))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelectionFlag,jf,0.4);\r
+    if(iFlag&(1<<6))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelectionFlag,jf,0.6);\r
+    if(iFlag&(1<<8))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelectionFlag,jf,0.8);\r
+    if(iFlag&(1<<10))js = AddTaskJetCluster("AOD","",filterMask,iPhysicsSelectionFlag,jf,1.0);\r
   }\r
   \r
   return js;\r
 }\r
 \r
 \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
+AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filterMask,UInt_t iPhysicsSelectionFlag,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
@@ -129,7 +129,7 @@ AliAnalysisTaskJetCluster *AddTaskJetCluster(char* bRec,char* bGen ,UInt_t filte
 \r
    pwg4spec->SetNSkipLeadingRan(nSkip);\r
 \r
-   if(iPhysicsSelection)pwg4spec->SelectCollisionCandidates();\r
+   if(iPhysicsSelectionFlag)pwg4spec->SelectCollisionCandidates(iPhysicsSelectionFlag);\r
 \r
    mgr->AddTask(pwg4spec);\r
 \r
index 483a8da..9d0a2aa 100644 (file)
@@ -1,7 +1,7 @@
-AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec = "jets",const char* bGen = "jetsAODMC_UA104",const char* bBkg="",UInt_t filterMask = 32, Int_t iPhysicsSelection = 1,UInt_t iEventSelectionMask = 0,Bool_t kBackground=kTRUE,Int_t iFillCorrBkg = 0);\r
+AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec = "jets",const char* bGen = "jetsAODMC_UA104",const char* bBkg="",UInt_t filterMask = 32, Int_t iPhysicsSelectionFlag = AliVEvent::kMB,UInt_t iEventSelectionMask = 0,Bool_t kBackground=kTRUE,Int_t iFillCorrBkg = 0);\r
 \r
 \r
-AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2Delta(UInt_t filterMask = 32,Bool_t kUseAODMC = kFALSE,Int_t iPhysicsSelection = 1,UInt_t iFlag = 0xfffffff, UInt_t iEventSelectionMask = 0,Bool_t kBackground = kTRUE){\r
+AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2Delta(UInt_t filterMask = 32,Bool_t kUseAODMC = kFALSE,Int_t iPhysicsSelectionFlag = AliVEvent::kMB,UInt_t iFlag = 0xfffffff, UInt_t iEventSelectionMask = 0,Bool_t kBackground = kTRUE){\r
 \r
 \r
   AliAnalysisTaskJetSpectrum2 *js = 0;\r
@@ -10,62 +10,62 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2Delta(UInt_t filterMask = 32,Boo
 \r
   if(kUseAODMC){\r
     if(iFlag&(1<<0)){ // UA104\r
-      js = AddTaskJetSpectrum2("jets","jetsAODMC_UA104",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-      js = AddTaskJetSpectrum2("jets","jetsAODMC2_UA104",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jets","jetsAODMC_UA104",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jets","jetsAODMC2_UA104",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     }\r
     if(iFlag&(1<<1)){ // ANTIKT 04\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04",cBack.Data(),filterMask,iPhysicsSelection,  iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04",cBack.Data(),filterMask,iPhysicsSelectionFlag,  iEventSelectionMask,kBackground);\r
       // cross check MC only background subtration\r
-      js = AddTaskJetSpectrum2("jetsAODMC2_FASTJET04","jetsAODMC_FASTJET04",cBack.Data(),filterMask,iPhysicsSelection,  iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAODMC2_FASTJET04","jetsAODMC_FASTJET04",cBack.Data(),filterMask,iPhysicsSelectionFlag,  iEventSelectionMask,kBackground);\r
     }\r
     if(iFlag&(1<<2)){ // KT 04\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC_FASTKT04",cBack.Data(),filterMask,iPhysicsSelection,iEventSelectionMask,kBackground);\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC2_FASTKT04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC_FASTKT04",cBack.Data(),filterMask,iPhysicsSelectionFlag,iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","jetsAODMC2_FASTKT04",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     }\r
     if(iFlag&(1<<3)){ // SISCONE 04\r
-      js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","jetsAODMC_SISCONE04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
-      js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","jetsAODMC2_SISCONE04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","jetsAODMC_SISCONE04",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","jetsAODMC2_SISCONE04",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     }\r
     // here can go other radii\r
   }\r
   else { // only the data ... no MC\r
     if(iFlag&(1<<0)){ // UA104\r
-      js = AddTaskJetSpectrum2("jets","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jets","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     }\r
     if(iFlag&(1<<1)){ // ANTIKT 04\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     }\r
     if(iFlag&(1<<2)){ // KT 04\r
-      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","",cBack.Data(),filterMask,iPhysicsSelection,iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","",cBack.Data(),filterMask,iPhysicsSelectionFlag,iEventSelectionMask,kBackground);\r
     }\r
     if(iFlag&(1<<3)){ // SISCONE 04\r
-      js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+      js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     }\r
   }\r
     \r
   \r
   /*\r
-  if(iFlag&(1<<7))js = AddTaskJetSpectrum2("jets","jetsAOD_FASTJET04",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\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
+  if(iFlag&(1<<7))js = AddTaskJetSpectrum2("jets","jetsAOD_FASTJET04",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
+  if(iFlag&(1<<8))js = AddTaskJetSpectrum2("jetsAOD_FASTJET04","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
+  if(iFlag&(1<<9))js = AddTaskJetSpectrum2("jetsAOD_FASTKT04","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
+  if(iFlag&(1<<10))js = AddTaskJetSpectrum2("jetsAOD_SISCONE04","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
   \r
   \r
   if(iFlag&(1<<11)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_UA107","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_UA107","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
   }\r
   if(iFlag&(1<<12)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_FASTJET07","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_FASTJET07","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
   }\r
   if(iFlag&(1<<13)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_FASTKT07","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_FASTKT07","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
   }\r
   if(iFlag&(1<<14)){\r
-    js = AddTaskJetSpectrum2("jetsAOD_SISCONE07","",cBack.Data(),filterMask,iPhysicsSelection, iEventSelectionMask,kBackground);\r
+    js = AddTaskJetSpectrum2("jetsAOD_SISCONE07","",cBack.Data(),filterMask,iPhysicsSelectionFlag, iEventSelectionMask,kBackground);\r
     js->SetRecEtaWindow(0.2);\r
   }\r
   */\r
@@ -74,7 +74,7 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2Delta(UInt_t filterMask = 32,Boo
 }\r
 \r
 \r
-AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bGen ,const char* bBkg,UInt_t filterMask,Int_t iPhysicsSelection,UInt_t iEventSelectionMask,Bool_t kBackground,Int_t iFillCorrBkg)\r
+AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bGen ,const char* bBkg,UInt_t filterMask,Int_t iPhysicsSelectionFlag,UInt_t iEventSelectionMask,Bool_t kBackground,Int_t iFillCorrBkg)\r
 {\r
 // Creates a jet fider task, configures it and adds it to the analysis manager.\r
    // Get the pointer to the existing analysis manager via the static access method.\r
@@ -115,9 +115,19 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bG
    // if(iAODanalysis)pwg4spec->SetAODInput(kTRUE);\r
    // pwg4spec->SetDebugLevel(11); \r
 \r
+\r
+\r
+   // add the filter mask for non default jets branches\r
+   TString cAdd("");\r
+   cAdd += Form("_Filter%05d",filterMask);\r
+\r
    if(iFillCorrBkg)pwg4spec->SetBranchGen("");  \r
-   else   pwg4spec->SetBranchGen(bGen); \r
+   else {\r
+     pwg4spec->SetBranchGen(bGen); \r
+     if(typeGen.Contains("JETSAOD"))     pwg4spec->SetBranchGen(Form("%s%s",bGen,cAdd.Data())); \r
+   }\r
    pwg4spec->SetBranchRec(bRec); \r
+   if(typeRec.Contains("JETSAOD"))     pwg4spec->SetBranchRec(Form("%s%s",bRec,cAdd.Data())); \r
 \r
    if(bBkgName.Length()>0)pwg4spec->SetBranchBkg(bBkgName.Data());\r
 \r
@@ -166,9 +176,11 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bG
      pwg4spec->SetTrackTypeGen(AliAnalysisTaskJetSpectrum2::kTrackAOD);\r
    }\r
 \r
-   if(iPhysicsSelection)pwg4spec->SelectCollisionCandidates();\r
+   if(iPhysicsSelectionFlag)pwg4spec->SelectCollisionCandidates(iPhysicsSelectionFlag);\r
    if(iEventSelectionMask)pwg4spec->SetEventSelectionMask(iEventSelectionMask);\r
 \r
+   //   pwg4spec->SetDebugLevel(10);\r
+\r
    mgr->AddTask(pwg4spec);\r
      \r
    // Create ONLY the output containers for the data produced by the task.\r
index a9a6941..781bfea 100644 (file)
@@ -135,14 +135,7 @@ AliAnalysisTaskJets *AddTaskJets(Char_t *jr, Char_t *jf, Float_t radius,UInt_t f
    jetana = new AliAnalysisTaskJets(Form("JetAnalysis%s_%s%s",jr,jf,cRadius));\r
 \r
    TString cAdd = "";\r
-   if(filterMask==32){\r
-     // this is the standard mask do not add anything\r
-     // should be changed after current train over all data is finished \r
-     // now needed for merging\r
-   }\r
-   else{\r
-     cAdd += Form("_Filter%05d",filterMask);\r
-   }\r
+   cAdd += Form("_Filter%05d",filterMask);\r
 \r
    TString c_jr(jr);\r
    c_jr.ToLower();\r
@@ -179,7 +172,7 @@ AliAnalysisTaskJets *AddTaskJets(Char_t *jr, Char_t *jf, Float_t radius,UInt_t f
    jetana->SetConfigFile("");\r
    jetana->SetDebugLevel(2);\r
    if(TMath::Abs((radius-0.4))< 0.02&&c_jf.Contains("fastjet")){\r
-     jetana->SetFilterPt(10.);\r
+     jetana->SetFilterPt(100.);\r
    }\r
 \r
 \r
index 5d2ebb3..69bb230 100644 (file)
@@ -39,6 +39,7 @@ Int_t       iAODanalysis       = 1;      // Analysis on input AOD's
 Int_t       iAODhandler        = 1;      // Analysis produces an AOD or dAOD's
 Int_t       iESDfilter         = 0;      // ESD to AOD filter (barrel + muon tracks)
 Int_t       iPhysicsSelection  = 1;      // ESD to AOD filter (barrel + muon tracks)
+UInt_t      iPhysicsSelectionFlag = 0; // set by pyshics selection and passed to the task, kMB, kUserDefined etc
 Bool_t      useTender           = kFALSE; // use tender wagon 
 Bool_t      kUseKinefilter     = kFALSE; // use Kinematics filter
 Bool_t      kUseMuonfilter     = kFALSE; // use Kinematics filter
@@ -138,7 +139,7 @@ Int_t       kProofOffset = 0;
 //== grid plugin setup variables
 Bool_t      kPluginUse         = kTRUE;   // do not change
 Bool_t      kPluginUseProductionMode  = kFALSE;   // use the plugin in production mode
-TString     kPluginRootVersion       = "v5-27-06a-1";  // *CHANGE ME IF MORE RECENT IN GRID*
+TString     kPluginRootVersion       = "v5-27-06b";  // *CHANGE ME IF MORE RECENT IN GRID*
 TString     kPluginAliRootVersion    = "v4-19-15-AN";  // *CHANGE ME IF MORE RECENT IN GRID*                                          
 Bool_t      kPluginMergeViaJDL       = kTRUE;  // merge via JDL
 Bool_t      kPluginFastReadOption   = kFALSE;  // use xrootd tweaks
@@ -375,7 +376,14 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
 
    if(iPhysicsSelection && !iAODanalysis){
      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
-     AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kIsMC,kTRUE,kTRUE); // last flag also adds information on  
+     Int_t iTriggerHIC = 0;
+     Bool_t rejectBkg = true;
+     if(kGridPassPattern.CompareTo("LHC10h")==0) {
+       iTriggerHIC = 2;
+       rejectBkg = false; // for the moment...
+     }
+     AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kIsMC,rejectBkg);  
+     iPhysicsSelectionFlag = AliVEvent::kMB;
    }
 
    if (iESDfilter && !iAODanalysis) {
@@ -426,15 +434,15 @@ 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",0.4,0,1); // this one is for the background random jets
-       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"KT",0.6,0,1); // this one is for the background jets
-       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"ANTIKT",0.4,0,1); // this one is for the background random jets
+       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelectionFlag,"KT",0.4,0,1); // this one is for the background random jets
+       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelectionFlag,"KT",0.6,0,1); // this one is for the background jets
+       taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelectionFlag,"ANTIKT",0.4,0,1); // this one is for the background random jets
 
        if(kUseAODMC){
-        taskCl = AddTaskJetCluster("AODMC","",kHighPtFilterMask,iPhysicsSelection,"KT",0.6,0,1); // this one is for the background jets
-        taskCl = AddTaskJetCluster("AODMC2","",kHighPtFilterMask,iPhysicsSelection,"KT",0.6,0,1); // this one is for the background jets
-        taskCl = AddTaskJetCluster("AODMC","",kHighPtFilterMask,iPhysicsSelection,"KT",0.4,0,1); // this one is for the background random jets
-        taskCl = AddTaskJetCluster("AODMC2","",kHighPtFilterMask,iPhysicsSelection,"KT",0.4,0,1); // this one is for the background random jets
+        taskCl = AddTaskJetCluster("AODMC","",kHighPtFilterMask,iPhysicsSelectionFlag,"KT",0.6,0,1); // this one is for the background jets
+        taskCl = AddTaskJetCluster("AODMC2","",kHighPtFilterMask,iPhysicsSelectionFlag,"KT",0.6,0,1); // this one is for the background jets
+        taskCl = AddTaskJetCluster("AODMC","",kHighPtFilterMask,iPhysicsSelectionFlag,"KT",0.4,0,1); // this one is for the background random jets
+        taskCl = AddTaskJetCluster("AODMC2","",kHighPtFilterMask,iPhysicsSelectionFlag,"KT",0.4,0,1); // this one is for the background random jets
        }
 
        if (!taskCl) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskCluster cannot run for this train conditions - EXCLUDED");
@@ -445,7 +453,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;
        selection&=~(1<<4); // exluded R = .04 already the dafault
        selection&=~(1<<6); // exluded R = .04 already the dafault
-       AddTaskJetClusterDelta(kHighPtFilterMask,kUseAODMC,iPhysicsSelection,"KT",selection);
+       AddTaskJetClusterDelta(kHighPtFilterMask,kUseAODMC,iPhysicsSelectionFlag,"KT",selection);
      }
      if(iPWG4Cluster&4){
        UInt_t selection = 0;
@@ -456,7 +464,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;
        selection&=~(1<<4); // exluded R = .04 already the dafault
        selection&=~(1<<6); // exluded R = .04 already the dafault
-       AddTaskJetClusterDelta(kHighPtFilterMask,kUseAODMC,iPhysicsSelection,"ANTIKT",selection);
+       AddTaskJetClusterDelta(kHighPtFilterMask,kUseAODMC,iPhysicsSelectionFlag,"ANTIKT",selection);
        //       AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelection,"ANTIKT",0.4,0,1);
 
      }
@@ -532,6 +540,7 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
      else taskjetServ->SetRunRange(110000,160000);
      taskjetServ->SetMCData(kIsMC);
      taskjetServ->SetUsePhysicsSelection((Bool_t)iPhysicsSelection);
+     taskjetServ->SetPhysicsSelectionFlag(iPhysicsSelectionFlag); // 
      taskjetServ->SetDebugLevel(0);
    }
 
@@ -541,36 +550,35 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
 
      if(iPWG4JetSpectrum&1){
        UInt_t iSelection = 0xffff;
-       taskJetSpectrum = AddTaskJetSpectrum2Delta(kUseAODMC,kHighPtFilterMask,iPhysicsSelection,iSelection);  
+       taskJetSpectrum = AddTaskJetSpectrum2Delta(kHighPtFilterMask,kUseAODMC,iPhysicsSelectionFlag,iSelection);  // bug fixed 10.11.10
      }
      if(iPWG4JetSpectrum&2){
        if(kIsMC){
         UInt_t eventSelection =  AliAnalysisHelperJetTasks::kIsPileUp|AliAnalysisHelperJetTasks::kVertexIn;
         if(iPhysicsSelection)eventSelection |=  AliAnalysisHelperJetTasks::kPhysicsSelection;
-        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","",kHighPtFilterMask,iPhysicsSelection,eventSelection);  
-        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04","",kHighPtFilterMask,iPhysicsSelection,eventSelection);
+        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","",kHighPtFilterMask,iPhysicsSelectionFlag,eventSelection);  
+        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04","",kHighPtFilterMask,iPhysicsSelectionFlag,eventSelection);
         
         eventSelection =  AliAnalysisHelperJetTasks::kIsCosmic|AliAnalysisHelperJetTasks::kVertexIn;
         if(iPhysicsSelection)eventSelection |= AliAnalysisHelperJetTasks::kPhysicsSelection;
-        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","",kHighPtFilterMask,iPhysicsSelection,eventSelection);
+        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","",kHighPtFilterMask,iPhysicsSelectionFlag,eventSelection);
         
         eventSelection =  AliAnalysisHelperJetTasks::kNone;
-        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04","",kHighPtFilterMask,iPhysicsSelection,eventSelection);
-        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","",kHighPtFilterMask,iPhysicsSelection,eventSelection);
-        
+        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC2_FASTJET04","",kHighPtFilterMask,iPhysicsSelectionFlag,eventSelection);
+        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","jetsAODMC_FASTJET04","",kHighPtFilterMask,iPhysicsSelectionFlag,eventSelection);     
        }
        else{
         UInt_t eventSelection =  AliAnalysisHelperJetTasks::kIsPileUp|AliAnalysisHelperJetTasks::kVertexIn;
         if(iPhysicsSelection)eventSelection |= AliAnalysisHelperJetTasks::kPhysicsSelection;
-        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","",kHighPtFilterMask,iPhysicsSelection,eventSelection);       
+        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","",kHighPtFilterMask,iPhysicsSelectionFlag,eventSelection);       
         eventSelection =  AliAnalysisHelperJetTasks::kIsCosmic|AliAnalysisHelperJetTasks::kVertexIn;
         if(iPhysicsSelection)eventSelection |= AliAnalysisHelperJetTasks::kPhysicsSelection;
-        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","",kHighPtFilterMask,iPhysicsSelection,eventSelection); 
+        taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","",kHighPtFilterMask,iPhysicsSelectionFlag,eventSelection); 
        }
      }
-     if(iPWG4JetSpectrum&3){
+     if(iPWG4JetSpectrum&4){
        // jet backgrounds... just for testing...
-       taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","",kHighPtFilterMask,iPhysicsSelection,0,kTRUE,1); 
+       taskjetSpectrum = AddTaskJetSpectrum2("jetsAOD_FASTJET04","","",kHighPtFilterMask,iPhysicsSelectionFlag,0,kTRUE,1); 
      }
      if (!taskjetSpectrum) ::Warning("AnalysisTrainPWG4Jets", "AliAnalysisTaskJetSpectrum2 cannot run for this train conditions - EXCLUDED");
      //       taskjetSpectrum->SetDebugLevel(1);