From 17f2bf95a8f0bcfdd7be731926c3e58dedfee8f4 Mon Sep 17 00:00:00 2001 From: jotwinow Date: Wed, 13 Apr 2011 11:42:40 +0000 Subject: [PATCH] -- trigger selecion changed 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 | 66 +++++++++++++++++++--- PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx | 70 ++++++++++++++---------- PWG0/dNdPt/AlidNdPtTask.cxx | 2 + PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C | 24 ++++++++ 4 files changed, 125 insertions(+), 37 deletions(-) diff --git a/PWG0/dNdPt/AlidNdPtAnalysis.cxx b/PWG0/dNdPt/AlidNdPtAnalysis.cxx index f8f290ae083..c9536c6bab1 100644 --- a/PWG0/dNdPt/AlidNdPtAnalysis.cxx +++ b/PWG0/dNdPt/AlidNdPtAnalysis.cxx @@ -34,6 +34,8 @@ #include "THnSparse.h" #include "AliHeader.h" +#include "AliInputEventHandler.h" +#include "AliAnalysisManager.h" #include "AliGenEventHeader.h" #include "AliStack.h" #include "AliESDEvent.h" @@ -1023,9 +1025,54 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc // trigger selection Bool_t isEventTriggered = kTRUE; - AliPhysicsSelection *trigSel = NULL; - AliTriggerAnalysis *trigAna = NULL; + 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 (inputHandler->GetEventSelection()); + if(!physicsSelection) return; + //SetPhysicsTriggerSelection(physicsSelection); + + if (isEventTriggered) { + // set trigger (V0AND) + triggerAnalysis = physicsSelection->GetTriggerAnalysis(); + if(!triggerAnalysis) return; + isEventTriggered = triggerAnalysis->IsOfflineTriggerFired(esdEvent, GetTrigger()); + } + + // calculate LHC background + if(!IsUseMCInfo()) + { + // + // 0-multiplicity bin for LHC background correction + // + if( GetAnalysisMode() == AlidNdPtHelper::kTPCITS || + GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || + GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || + GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || + GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt ) + { + physicsSelection->SetBin0CallbackViaPointer(&AlidNdPtAnalysis::IsBinZeroTrackSPDvtx); + } else { + physicsSelection->SetBin0CallbackViaPointer(&AlidNdPtAnalysis::IsBinZeroSPDvtx); + } + } + } + + + /* if(evtCuts->IsTriggerRequired()) { // @@ -1147,6 +1194,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc } } } + */ // use MC information @@ -1934,7 +1982,7 @@ Long64_t AlidNdPtAnalysis::Merge(TCollection* const list) TObject* obj = 0; // - TList *collPhysSelection = new TList; + //TList *collPhysSelection = new TList; // collection of generated histograms @@ -1945,7 +1993,7 @@ Long64_t AlidNdPtAnalysis::Merge(TCollection* const list) // physics selection //printf("entry->GetPhysicsTriggerSelection() %p \n", entry->GetPhysicsTriggerSelection()); - collPhysSelection->Add(entry->GetPhysicsTriggerSelection()); + //collPhysSelection->Add(entry->GetPhysicsTriggerSelection()); // fRecEventHist->Add(entry->fRecEventHist); @@ -2031,9 +2079,9 @@ Long64_t AlidNdPtAnalysis::Merge(TCollection* const list) count++; } - AliPhysicsSelection *trigSelection = GetPhysicsTriggerSelection(); - trigSelection->Merge(collPhysSelection); - if(collPhysSelection) delete collPhysSelection; + //AliPhysicsSelection *trigSelection = GetPhysicsTriggerSelection(); + //trigSelection->Merge(collPhysSelection); + //if(collPhysSelection) delete collPhysSelection; return count; } @@ -2102,8 +2150,8 @@ void AlidNdPtAnalysis::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 diff --git a/PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx b/PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx index 4a95c4fca20..85de4da65fc 100644 --- a/PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx +++ b/PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx @@ -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(); @@ -783,6 +766,37 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons } if (0 == recCuts) { recCuts = accCuts;} + // 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 (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; @@ -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 diff --git a/PWG0/dNdPt/AlidNdPtTask.cxx b/PWG0/dNdPt/AlidNdPtTask.cxx index c0013aab41d..4ff2fb90e40 100644 --- a/PWG0/dNdPt/AlidNdPtTask.cxx +++ b/PWG0/dNdPt/AlidNdPtTask.cxx @@ -143,6 +143,8 @@ void AlidNdPtTask::UserCreateOutputObjects() if(fUseCentrality) { Printf("Use Centrality - Bin %d", fUseCentralityBin); } + + PostData(1, fOutput); } //_____________________________________________________________________________ diff --git a/PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C b/PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C index f9f5d026da0..dc9cfae004d 100644 --- a/PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C +++ b/PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C @@ -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) -- 2.43.0