-- trigger selecion changed
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Apr 2011 11:42:40 +0000 (11:42 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Apr 2011 11:42:40 +0000 (11:42 +0000)
M    dNdPt/AlidNdPtAnalysis.cxx
M    dNdPt/AlidNdPtAnalysisPbPb.cxx
-- post output in CreateOutputObjects
M    dNdPt/AlidNdPtTask.cxx
-- new TPC track selection criteria (M. Knichel)
M    dNdPt/macros/CreatedNdPtTrackCuts.C

PWG0/dNdPt/AlidNdPtAnalysis.cxx
PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx
PWG0/dNdPt/AlidNdPtTask.cxx
PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C

index f8f290a..c9536c6 100644 (file)
@@ -34,6 +34,8 @@
 #include "THnSparse.h"\r
 \r
 #include "AliHeader.h"  \r
+#include "AliInputEventHandler.h"  \r
+#include "AliAnalysisManager.h"  \r
 #include "AliGenEventHeader.h"  \r
 #include "AliStack.h"  \r
 #include "AliESDEvent.h"  \r
@@ -1023,11 +1025,56 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
 \r
   // trigger selection\r
   Bool_t isEventTriggered = kTRUE;\r
-  AliPhysicsSelection *trigSel = NULL;\r
-  AliTriggerAnalysis *trigAna = NULL;\r
+  AliPhysicsSelection *physicsSelection = NULL;\r
+  AliTriggerAnalysis* triggerAnalysis = NULL;\r
+\r
+  // \r
+  AliInputEventHandler* inputHandler = (AliInputEventHandler*) AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler();\r
+  if (!inputHandler)\r
+  {\r
+    Printf("ERROR: Could not receive input handler");\r
+    return;\r
+  }\r
 \r
   if(evtCuts->IsTriggerRequired())  \r
   {\r
+    // always MB\r
+    isEventTriggered = inputHandler->IsEventSelected() & AliVEvent::kMB;\r
+\r
+    physicsSelection = static_cast<AliPhysicsSelection*> (inputHandler->GetEventSelection());\r
+    if(!physicsSelection) return;\r
+    //SetPhysicsTriggerSelection(physicsSelection);\r
+\r
+    if (isEventTriggered) {\r
+      // set trigger (V0AND)\r
+      triggerAnalysis = physicsSelection->GetTriggerAnalysis();\r
+      if(!triggerAnalysis) return;\r
+      isEventTriggered = triggerAnalysis->IsOfflineTriggerFired(esdEvent, GetTrigger());\r
+    }\r
+\r
+    // calculate LHC background\r
+    if(!IsUseMCInfo()) \r
+    { \r
+      //\r
+      // 0-multiplicity bin for LHC background correction\r
+      //\r
+      if( GetAnalysisMode() == AlidNdPtHelper::kTPCITS || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || \r
+         GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || \r
+         GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt ) \r
+      {\r
+        physicsSelection->SetBin0CallbackViaPointer(&AlidNdPtAnalysis::IsBinZeroTrackSPDvtx);\r
+      } else {\r
+        physicsSelection->SetBin0CallbackViaPointer(&AlidNdPtAnalysis::IsBinZeroSPDvtx);\r
+      }\r
+    }\r
+  }\r
+\r
+\r
+  /*\r
+  if(evtCuts->IsTriggerRequired())  \r
+  {\r
     //\r
     trigSel = GetPhysicsTriggerSelection();\r
     if(!trigSel) {\r
@@ -1147,6 +1194,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
       }\r
     }\r
   }\r
+  */\r
 \r
 \r
   // use MC information\r
@@ -1934,7 +1982,7 @@ Long64_t AlidNdPtAnalysis::Merge(TCollection* const list)
   TObject* obj = 0;\r
 \r
   //\r
-  TList *collPhysSelection = new TList;\r
+  //TList *collPhysSelection = new TList;\r
 \r
   // collection of generated histograms\r
 \r
@@ -1945,7 +1993,7 @@ Long64_t AlidNdPtAnalysis::Merge(TCollection* const list)
 \r
     // physics selection\r
     //printf("entry->GetPhysicsTriggerSelection() %p \n", entry->GetPhysicsTriggerSelection());\r
-    collPhysSelection->Add(entry->GetPhysicsTriggerSelection());\r
+    //collPhysSelection->Add(entry->GetPhysicsTriggerSelection());\r
     \r
     //\r
     fRecEventHist->Add(entry->fRecEventHist);\r
@@ -2031,9 +2079,9 @@ Long64_t AlidNdPtAnalysis::Merge(TCollection* const list)
   count++;\r
   }\r
 \r
-  AliPhysicsSelection *trigSelection = GetPhysicsTriggerSelection();\r
-  trigSelection->Merge(collPhysSelection);\r
-  if(collPhysSelection) delete collPhysSelection;\r
+  //AliPhysicsSelection *trigSelection = GetPhysicsTriggerSelection();\r
+  //trigSelection->Merge(collPhysSelection);\r
+  //if(collPhysSelection) delete collPhysSelection;\r
 \r
 return count;\r
 }\r
@@ -2102,8 +2150,8 @@ void AlidNdPtAnalysis::Analyse()
   //\r
   // LHC backgraund in all and 0-bins\r
   //\r
-  AliPhysicsSelection *trigSel = GetPhysicsTriggerSelection();\r
-  trigSel->SaveHistograms("physics_selection");\r
+  //AliPhysicsSelection *trigSel = GetPhysicsTriggerSelection();\r
+  //trigSel->SaveHistograms("physics_selection");\r
 \r
   //\r
   // Reconstructed event vertex\r
index 4a95c4f..85de4da 100644 (file)
@@ -35,6 +35,8 @@
 
 #include "AliHeader.h"  
 #include "AliGenEventHeader.h"  
+#include "AliInputEventHandler.h"  
+#include "AliAnalysisManager.h"  
 #include "AliStack.h"  
 #include "AliESDEvent.h"  
 #include "AliMCEvent.h"  
@@ -752,25 +754,6 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons
     return;
   }
   
-   // zdc cut not for MC
-   if(!IsUseMCInfo()) {
-     if (!fTriggerAnalysis->ZDCTimeTrigger(esdEvent)) {
-       return; 
-     }
-   }
-
-  // track cuts from Jochen
-  const AliESDVertex* vtxESDTPC = esdEvent->GetPrimaryVertexTPC();
-  if( vtxESDTPC->GetNContributors() < 1 ) {
-    return;
-  }
-
-   // francesco prino cut
-  const AliMultiplicity* multESD = esdEvent->GetMultiplicity();
-  if( vtxESDTPC->GetNContributors() < (-10.+0.25*multESD->GetNumberOfITSClusters(0)) ) {
-    return;
-  } 
-
   // get selection cuts
   AlidNdPtEventCuts *evtCuts = GetEventCuts(); 
   AlidNdPtAcceptanceCuts *accCuts = GetAcceptanceCuts(); 
@@ -785,6 +768,37 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons
 
   // trigger selection
   Bool_t isEventTriggered = kTRUE;
+  AliPhysicsSelection *physicsSelection = NULL;
+  AliTriggerAnalysis* triggerAnalysis = NULL;
+
+  // 
+  AliInputEventHandler* inputHandler = (AliInputEventHandler*) AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler();
+  if (!inputHandler)
+  {
+    Printf("ERROR: Could not receive input handler");
+    return;
+  }
+
+  if(evtCuts->IsTriggerRequired())  
+  {
+    // always MB
+    isEventTriggered = inputHandler->IsEventSelected() & AliVEvent::kMB;
+
+    physicsSelection = static_cast<AliPhysicsSelection*> (inputHandler->GetEventSelection());
+    if(!physicsSelection) return;
+    //SetPhysicsTriggerSelection(physicsSelection);
+
+    if (isEventTriggered) {
+      // set trigger (V0AND)
+      triggerAnalysis = physicsSelection->GetTriggerAnalysis();
+      if(!triggerAnalysis) return;
+      isEventTriggered = triggerAnalysis->IsOfflineTriggerFired(esdEvent, GetTrigger());
+    }
+  }
+
+  /*
+  // trigger selection
+  Bool_t isEventTriggered = kTRUE;
   AliPhysicsSelection *trigSel = NULL;
   AliTriggerAnalysis *trigAna = NULL;
 
@@ -815,7 +829,7 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons
         }//if(GetTrigger() == AliTriggerAnalysis::kV0AND)
      }//if(IsUseMCInfo())
   }//if(evtCuts->IsTriggerRequired())
-
+  */
 
   // centrality determination
   Float_t centralityF = 0;
@@ -1322,7 +1336,7 @@ Long64_t AlidNdPtAnalysisPbPb::Merge(TCollection* const list)
   TObject* obj = 0;
 
   //
-  TList *collPhysSelection = new TList;
+  //TList *collPhysSelection = new TList;
 
   // collection of generated histograms
 
@@ -1333,8 +1347,8 @@ Long64_t AlidNdPtAnalysisPbPb::Merge(TCollection* const list)
 
     // physics selection
     //printf("entry->GetPhysicsTriggerSelection() %p \n", entry->GetPhysicsTriggerSelection());
-    AliPhysicsSelection *physSel = entry->GetPhysicsTriggerSelection();
-    if( physSel ) collPhysSelection->Add(physSel); 
+    //AliPhysicsSelection *physSel = entry->GetPhysicsTriggerSelection();
+    //if( physSel ) collPhysSelection->Add(physSel); 
     
     //
     fTrackPtCorrelationMatrix->Add(entry->fTrackPtCorrelationMatrix);
@@ -1390,9 +1404,9 @@ Long64_t AlidNdPtAnalysisPbPb::Merge(TCollection* const list)
   count++;
   }
 
-  AliPhysicsSelection *trigSelection = GetPhysicsTriggerSelection();
-  if( trigSelection ) trigSelection->Merge(collPhysSelection);
-  if(collPhysSelection) delete collPhysSelection;
+  //AliPhysicsSelection *trigSelection = GetPhysicsTriggerSelection();
+  //if( trigSelection ) trigSelection->Merge(collPhysSelection);
+  //if(collPhysSelection) delete collPhysSelection;
 
 return count;
 }
@@ -1419,8 +1433,8 @@ void AlidNdPtAnalysisPbPb::Analyse()
   //
   // LHC backgraund in all and 0-bins
   //
-  AliPhysicsSelection *trigSel = GetPhysicsTriggerSelection();
-  trigSel->SaveHistograms("physics_selection");
+  //AliPhysicsSelection *trigSel = GetPhysicsTriggerSelection();
+  //trigSel->SaveHistograms("physics_selection");
 
   //
   // Reconstructed event vertex
index c0013aa..4ff2fb9 100644 (file)
@@ -143,6 +143,8 @@ void AlidNdPtTask::UserCreateOutputObjects()
   if(fUseCentrality) {\r
     Printf("Use Centrality - Bin %d", fUseCentralityBin);\r
   }\r
+\r
+  PostData(1, fOutput);\r
 }\r
 \r
 //_____________________________________________________________________________\r
index f9f5d02..dc9cfae 100644 (file)
@@ -543,6 +543,30 @@ AliESDtrackCuts* CreatedNdPtTrackCuts(Int_t cutMode=1, Bool_t fieldOn = kTRUE, B
     TString tag = "TPC-only tracking";
   }
   
+  // TPC-only tight cuts
+  if (cutMode == 230) 
+  {
+    // beta cuts (still under investigation)
+    minNClustersTPC = 70;
+    maxChi2PerClusterTPC = 4.0;
+    maxDCAtoVertexXY = 0.3; // cm
+    maxDCAtoVertexZ  = 0.3; // cm
+
+    esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
+    esdTrackCuts->SetRequireTPCRefit(kFALSE);
+    esdTrackCuts->SetRequireTPCStandAlone(kTRUE);
+    esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
+    esdTrackCuts->SetMinNClustersTPC(minNClustersTPC);
+    esdTrackCuts->SetMaxChi2PerClusterTPC(maxChi2PerClusterTPC);
+    esdTrackCuts->SetRequireITSRefit(kFALSE);
+    esdTrackCuts->SetMaxDCAToVertexXY(maxDCAtoVertexXY);
+    esdTrackCuts->SetMaxDCAToVertexZ(maxDCAtoVertexZ);
+    esdTrackCuts->SetDCAToVertex2D(kTRUE);
+    //esdTrackCuts->SetPtRange(minPt,maxPt);
+    //esdTrackCuts->SetEtaRange(minEta,maxEta);
+
+    TString tag = "TPC-only tracking";
+  }
   
 
   // TPC-only (no pt cut, no eta cut)