Added flag for V0-based filtering
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Jun 2013 09:49:59 +0000 (09:49 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Jun 2013 09:49:59 +0000 (09:49 +0000)
ANALYSIS/macros/AddTaskESDFilter.C

index 631c40d..2fbdd73 100644 (file)
@@ -12,8 +12,10 @@ AliAnalysisTaskESDfilter *AddTaskESDFilter(Bool_t useKineFilter=kTRUE,
                                            Bool_t useCentralityTask=kFALSE, /*obsolete*/\r
                                            Bool_t enableTPCOnlyAODTracks=kFALSE,\r
                                            Bool_t disableCascades=kFALSE,\r
-                                           Bool_t disableKinks=kFALSE, Int_t runFlag = 1100,\r
-                                          Int_t  muonMCMode = 2)\r
+                                           Bool_t disableKinks=kFALSE, \r
+                                           Int_t runFlag = 1100,\r
+                                           Int_t  muonMCMode = 2, \r
+                                           Bool_t useV0Filter=kTRUE)\r
 {\r
   // Creates a filter task and adds it to the analysis manager.\r
    // Get the pointer to the existing analysis manager via the static access method.\r
@@ -87,17 +89,19 @@ AliAnalysisTaskESDfilter *AddTaskESDFilter(Bool_t useKineFilter=kTRUE,
    }\r
 \r
    // Filter with cuts on V0s\r
-   AliESDv0Cuts*   esdV0Cuts = new AliESDv0Cuts("Standard V0 Cuts pp", "ESD V0 Cuts");\r
-   esdV0Cuts->SetMinRadius(0.2);\r
-   esdV0Cuts->SetMaxRadius(200);\r
-   esdV0Cuts->SetMinDcaPosToVertex(0.05);\r
-   esdV0Cuts->SetMinDcaNegToVertex(0.05);\r
-   esdV0Cuts->SetMaxDcaV0Daughters(1.5);\r
-   esdV0Cuts->SetMinCosinePointingAngle(0.99);\r
-   AliAnalysisFilter* v0Filter = new AliAnalysisFilter("v0Filter");\r
-   v0Filter->AddCuts(esdV0Cuts);\r
-\r
-   esdfilter->SetV0Filter(v0Filter);\r
+   if (useV0Filter) {\r
+     AliESDv0Cuts*   esdV0Cuts = new AliESDv0Cuts("Standard V0 Cuts pp", "ESD V0 Cuts");\r
+     esdV0Cuts->SetMinRadius(0.2);\r
+     esdV0Cuts->SetMaxRadius(200);\r
+     esdV0Cuts->SetMinDcaPosToVertex(0.05);\r
+     esdV0Cuts->SetMinDcaNegToVertex(0.05);\r
+     esdV0Cuts->SetMaxDcaV0Daughters(1.5);\r
+     esdV0Cuts->SetMinCosinePointingAngle(0.99);\r
+     AliAnalysisFilter* v0Filter = new AliAnalysisFilter("v0Filter");\r
+     v0Filter->AddCuts(esdV0Cuts);\r
+\r
+     esdfilter->SetV0Filter(v0Filter);\r
+   }  \r
 \r
    // Enable writing of Muon AODs\r
    esdmuonfilter->SetWriteMuonAOD(writeMuonAOD);\r