From 7986e54e92d75b3a040113b3708dc8edbbf63198 Mon Sep 17 00:00:00 2001 From: raverbec Date: Fri, 30 Aug 2013 13:33:17 +0000 Subject: [PATCH] change in handling of V0 tagged tracks --- PWGHF/hfe/AliAnalysisTaskHFE.cxx | 19 +- PWGHF/hfe/AliAnalysisTaskHFE.h | 4 + PWGHF/hfe/AliHFEV0taginfo.cxx | 229 ++++++++ PWGHF/hfe/AliHFEV0taginfo.h | 73 +++ PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C | 506 +++++++++--------- .../hfe/macros/configs/pPb/ConfigHFEnpepPb.C | 2 +- PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C | 2 +- .../hfe/macros/configs/pPb/ConfigHFEpPbTRD.C | 2 +- 8 files changed, 576 insertions(+), 261 deletions(-) create mode 100644 PWGHF/hfe/AliHFEV0taginfo.cxx create mode 100644 PWGHF/hfe/AliHFEV0taginfo.h diff --git a/PWGHF/hfe/AliAnalysisTaskHFE.cxx b/PWGHF/hfe/AliAnalysisTaskHFE.cxx index 68400a05c14..eec61b896cf 100644 --- a/PWGHF/hfe/AliAnalysisTaskHFE.cxx +++ b/PWGHF/hfe/AliAnalysisTaskHFE.cxx @@ -83,6 +83,7 @@ #include "AliHFEsignalCuts.h" #include "AliHFEtaggedTrackAnalysis.h" #include "AliHFEtools.h" +#include "AliHFEV0taginfo.h" #include "AliHFEvarManager.h" #include "AliAnalysisTaskHFE.h" #include "AliAODMCHeader.h" @@ -141,6 +142,7 @@ AliAnalysisTaskSE("PID efficiency Analysis") , fBackgroundSubtraction(NULL) , fTRDTrigger(kFALSE) , fWhichTRDTrigger(0) + , fV0Tagger(NULL) , fQA(NULL) , fOutput(NULL) , fHistMCQA(NULL) @@ -211,6 +213,7 @@ AliAnalysisTaskHFE::AliAnalysisTaskHFE(const char * name): , fBackgroundSubtraction(NULL) , fTRDTrigger(kFALSE) , fWhichTRDTrigger(0) + , fV0Tagger(NULL) , fQA(NULL) , fOutput(NULL) , fHistMCQA(NULL) @@ -224,6 +227,7 @@ AliAnalysisTaskHFE::AliAnalysisTaskHFE(const char * name): DefineOutput(1, TList::Class()); DefineOutput(2, TList::Class()); + fV0Tagger = new AliHFEV0taginfo("Tagger"); fPID = new AliHFEpid("hfePid"); fPIDqa = new AliHFEpidQAmanager; fVarManager = new AliHFEvarManager("hfeVarManager"); @@ -290,6 +294,7 @@ AliAnalysisTaskHFE::AliAnalysisTaskHFE(const AliAnalysisTaskHFE &ref): , fBackgroundSubtraction(NULL) , fTRDTrigger(ref.fTRDTrigger) , fWhichTRDTrigger(ref.fWhichTRDTrigger) + , fV0Tagger(NULL) , fQA(NULL) , fOutput(NULL) , fHistMCQA(NULL) @@ -367,6 +372,7 @@ void AliAnalysisTaskHFE::Copy(TObject &o) const { target.fBackgroundSubtraction = fBackgroundSubtraction; target.fTRDTrigger = fTRDTrigger; target.fWhichTRDTrigger = fWhichTRDTrigger; + target.fV0Tagger = fV0Tagger; target.fQA = fQA; target.fOutput = fOutput; target.fHistMCQA = fHistMCQA; @@ -393,6 +399,7 @@ AliAnalysisTaskHFE::~AliAnalysisTaskHFE(){ if(fBackgroundSubtraction) delete fBackgroundSubtraction; if(fSpecialTrigger) delete fSpecialTrigger; if(fAnalysisUtils) delete fAnalysisUtils; + if(fV0Tagger) delete fV0Tagger; // Delete output objects only if we are not running in PROOF mode because otherwise this produces a crash during merging AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); if(mgr && mgr->GetAnalysisType() != AliAnalysisManager::kProofAnalysis){ @@ -857,6 +864,11 @@ void AliAnalysisTaskHFE::ProcessESD(){ return; } + // Tag all v0s in current event + if(fV0Tagger){ + fV0Tagger->Reset(); + fV0Tagger->TagV0Tracks(fESD); + } // Set magnetic field if V0 task on if(fTaggedTrackAnalysis) { fTaggedTrackAnalysis->SetMagneticField(fESD->GetMagneticField()); @@ -974,12 +986,9 @@ void AliAnalysisTaskHFE::ProcessESD(){ track->SetESDEvent(fESD); // fill counts of v0-identified particles - Int_t v0pid = -1; - if(track->TestBit(BIT(14))) v0pid = AliPID::kElectron; - else if(track->TestBit(BIT(15))) v0pid = AliPID::kPion; - else if(track->TestBit(BIT(16))) v0pid = AliPID::kProton; + AliPID::EParticleType v0pid = fV0Tagger->GetV0Info(track->GetID()); // here the tagged track analysis will run - if(fTaggedTrackAnalysis && v0pid > -1){ + if(fTaggedTrackAnalysis && v0pid != AliPID::kUnknown){ AliDebug(1, Form("Track identified as %s", AliPID::ParticleName(v0pid))); fTaggedTrackAnalysis->ProcessTrack(track, v0pid); AliDebug(1, "V0 PID done"); diff --git a/PWGHF/hfe/AliAnalysisTaskHFE.h b/PWGHF/hfe/AliAnalysisTaskHFE.h index 01461f3709b..697ff3e947e 100644 --- a/PWGHF/hfe/AliAnalysisTaskHFE.h +++ b/PWGHF/hfe/AliAnalysisTaskHFE.h @@ -47,6 +47,7 @@ class AliHFEsecVtx; class AliHFEsignalCuts; class AliHFEvarManager; class AliHFEtaggedTrackAnalysis; +class AliHFEV0taginfo; class AliCFManager; class AliMCEvent; class AliOADBContainer; @@ -255,6 +256,9 @@ class AliAnalysisTaskHFE : public AliAnalysisTaskSE{ AliHFENonPhotonicElectron *fBackgroundSubtraction; // Background subtraction Bool_t fTRDTrigger; // Check if event is TRD triggered event Int_t fWhichTRDTrigger; // Select type of TRD trigger + + AliHFEV0taginfo *fV0Tagger; // Tags v0 tracks per Event + //-----------QA and output--------------- TList *fQA; //! QA histos for the cuts TList *fOutput; //! Container for Task Output diff --git a/PWGHF/hfe/AliHFEV0taginfo.cxx b/PWGHF/hfe/AliHFEV0taginfo.cxx new file mode 100644 index 00000000000..d631e4c61f9 --- /dev/null +++ b/PWGHF/hfe/AliHFEV0taginfo.cxx @@ -0,0 +1,229 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ +// +// Class AliHFEV0taginfo +// Creates list of tracks with V0 information +// +// Author: +// Jan Wagner +// + + + + +#include +#include +#include +#include + + +#include "AliLog.h" +#include "AliESDEvent.h" +#include "AliESDv0.h" + +#include "AliHFEV0taginfo.h" + + +ClassImp(AliHFEV0taginfo) +ClassImp(AliHFEV0taginfo::AliHFEV0tag) + +//___________________________________________________________________ +AliHFEV0taginfo::AliHFEV0taginfo(): + TNamed(), + fTaggedTracks(NULL), + fV0finder(NULL) +{ + // + // default constructor + // +} +//___________________________________________________________________ +AliHFEV0taginfo::AliHFEV0taginfo(const char* name): + TNamed(name, ""), + fTaggedTracks(NULL), + fV0finder(NULL) +{ + // + // constructor + // + + fTaggedTracks = new TList(); + if(fTaggedTracks){ + fTaggedTracks->SetOwner(); + } + fV0finder = new AliESDv0KineCuts(); +} +//___________________________________________________________________ +AliHFEV0taginfo::~AliHFEV0taginfo(){ + + // + // Destructor + // + delete fTaggedTracks; + delete fV0finder; + AliDebug(6, "DESTRUCTOR"); +} + +//________________________________________________________________________________ +// loops over V0s in event and fills fTaggedTracks with V0 tracks +void AliHFEV0taginfo::TagV0Tracks(AliESDEvent *fEvent){ + + if (!fEvent) return; + + const Int_t nTracks = fEvent->GetNumberOfTracks(); + if(nTracks < 2) return; + + const Int_t nV0s = fEvent->GetNumberOfV0s(); + if(nV0s < 1) return; + AliDebug(3,Form("%d V0s found!",nV0s)); + + fV0finder->SetEvent(fEvent); + + for(Int_t i=0; iGetV0(i); + if(!fV0) continue; + if(fV0finder->ProcessV0(fV0,pdgP,pdgN)){ + AliDebug(5,Form("V0 has: pos pdg: %d, neg pdg: %d",pdgP,pdgN)); + AddTrack(fV0->GetPindex(),pdgP); + AddTrack(fV0->GetNindex(),pdgN); + } + } +} + +//________________________________________________________________________________ +//Translates the pdg code to AliPID enum and adds track to tagged list +void AliHFEV0taginfo::AddTrack(Int_t TrackID, Int_t pdgCode){ + + if(TrackID<0) return; + AliPID::EParticleType Pinfo; + switch (TMath::Abs(pdgCode)){ + case 11: + Pinfo = AliPID::kElectron; + break; + case 211: + Pinfo = AliPID::kPion; + break; + case 2212: + Pinfo = AliPID::kProton; + break; + default: + return; + } + fTaggedTracks->Add(new AliHFEV0tag(TrackID, Pinfo)); + AliDebug(4,Form("Added new Track ID: %d with PID: %d, #entry: %d",TrackID, Pinfo, fTaggedTracks->GetEntries())); +} + + +//________________________________________________________________________________ +//check for V0 information from track ID +//returns AliPID::kUnknown if track ID not found +AliPID::EParticleType AliHFEV0taginfo::GetV0Info(Int_t trackID){ + + AliHFEV0tag test(trackID, AliPID::kUnknown); + AliHFEV0tag *result = dynamic_cast(fTaggedTracks->FindObject(&test)); + if(!result){ + AliDebug(6, Form("Could not find track ID %d", trackID)); + return AliPID::kUnknown; + } + return result->GetPinfo(); +} + +//________________________________________________________________________________ +//resets the fTaggedTracks TList +void AliHFEV0taginfo::Reset(){ + fTaggedTracks->Delete(); +} + + +//___________________________________________________________________ +AliHFEV0taginfo::AliHFEV0tag::AliHFEV0tag(): + TObject(), + fTrackID(0), + fPinfo(AliPID::kUnknown) +{ + // default constructor +} +//___________________________________________________________________ +AliHFEV0taginfo::AliHFEV0tag::AliHFEV0tag(Int_t TrackID, AliPID::EParticleType Pinfo): + TObject(), + fTrackID(TrackID), + fPinfo(Pinfo) +{ +} + +//____________________________________________________________ +AliHFEV0taginfo::AliHFEV0tag::AliHFEV0tag(const AliHFEV0tag &ref): + TObject(ref), + fTrackID(ref.fTrackID), + fPinfo(ref.fPinfo) +{ + // Copy constructor +} + +//____________________________________________________________ +AliHFEV0taginfo::AliHFEV0tag &AliHFEV0taginfo::AliHFEV0tag::operator=(const AliHFEV0tag &ref){ + // Assignment operator + if(this != &ref){ + TObject::operator=(ref); + + fTrackID = ref.fTrackID; + fPinfo = ref.fPinfo; + } + return *this; +} + +//___________________________________________________________________ +AliHFEV0taginfo::AliHFEV0tag::~AliHFEV0tag(){ + // + // Destructor + // + AliDebug(6, "DESTRUCTOR"); +} + +//Set track ID and particle info +//___________________________________________________________________ +void AliHFEV0taginfo::AliHFEV0tag::SetTrack(const Int_t trackID, const AliPID::EParticleType Pinfo){ + fTrackID = trackID; + fPinfo = Pinfo; +} +//____________________________________________________________ +Bool_t AliHFEV0taginfo::AliHFEV0tag::IsEqual(const TObject *ref) const { + // + // Check for equality of track ID + // + const AliHFEV0tag *refObj = dynamic_cast(ref); + if(!refObj) return kFALSE; + return (fTrackID == refObj->GetTrackID()); +} +//____________________________________________________________ +Int_t AliHFEV0taginfo::AliHFEV0tag::Compare(const TObject *ref) const{ + // + // Compares two objects + // Order: + // First compare track ID then particle info + // + const AliHFEV0tag *refObj = dynamic_cast(ref); + if(fTrackID < refObj->GetTrackID()) return -1; + else if(fTrackID > refObj->GetTrackID()) return 1; + else{ + if(fPinfo < refObj->GetPinfo()) return -1; + else if(fPinfo > refObj->GetPinfo()) return 1; + else return 0; + } +} + + diff --git a/PWGHF/hfe/AliHFEV0taginfo.h b/PWGHF/hfe/AliHFEV0taginfo.h new file mode 100644 index 00000000000..eb2b7c388d6 --- /dev/null +++ b/PWGHF/hfe/AliHFEV0taginfo.h @@ -0,0 +1,73 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ +// +#ifndef ALIHFEV0TAGINFO_H +#define ALIHFEV0TAGINFO_H + +#ifndef ROOT_TNamed +#include +#endif + + +#include "AliPID.h" +#include "AliESDv0KineCuts.h" + +class AliHFEV0taginfo: public TNamed{ + + public: + + AliHFEV0taginfo(); + AliHFEV0taginfo(const char* name); + virtual ~AliHFEV0taginfo(); + + void Reset(); //resets the fTaggedTracks TList + void TagV0Tracks(AliESDEvent *event); // loops over V0s in event and fills fTaggedTracks with V0 tracks + AliPID::EParticleType GetV0Info(Int_t trackID); //check for V0 information from track ID + void SetIsAODana() { fIsAODana = kTRUE; } // Setter AOD analysis + void AddTrack(Int_t TrackID, Int_t pdgCode); //Translates the pdg code to AliPID enum and adds track to tagged list (currently only e, pion and proton tracks) + + class AliHFEV0tag: public TObject{ + public: + AliHFEV0tag(); + AliHFEV0tag(Int_t TrackID, AliPID::EParticleType Pinfo); + AliHFEV0tag(const AliHFEV0tag &ref); + AliHFEV0tag &operator=(const AliHFEV0tag &ref); + virtual ~AliHFEV0tag(); + + + //TObject virtual functions + virtual Bool_t IsSortable() const { return kTRUE; }; + virtual Bool_t IsEqual(const TObject *ref) const; + virtual Int_t Compare(const TObject *ref) const; + + //Setter + void SetTrack(const Int_t trackID, const AliPID::EParticleType Pinfo); //Set track ID + //Getter + Int_t GetTrackID() const { return fTrackID; }; + AliPID::EParticleType GetPinfo() const { return fPinfo; }; + private: + Int_t fTrackID; + AliPID::EParticleType fPinfo; + + ClassDef(AliHFEV0taginfo::AliHFEV0tag,1); + }; + private: + TList *fTaggedTracks; + Bool_t fIsAODana; + AliESDv0KineCuts *fV0finder; + + ClassDef(AliHFEV0taginfo,1) +}; +#endif diff --git a/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C b/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C index fba31732171..1467bfb9641 100644 --- a/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C +++ b/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C @@ -1,254 +1,254 @@ -AliAnalysisTaskHFE* ConfigHFEmbpPb(Bool_t useMC, Bool_t isAOD, UChar_t TPCcl=70, UChar_t TPCclPID = 80, UChar_t ITScl=3, - Double_t DCAxy=1000., Double_t DCAz=1000., - Double_t TPCs=0., Double_t TPCu=3.09, Double_t TOFs=3., Int_t TOFmis=0, - Double_t IpSig=3., Bool_t prodcut = kFALSE, - Bool_t ipOpp = kTRUE, Bool_t mcstr = kFALSE, Int_t itshitpixel = 0, - Bool_t withetacorrection = kTRUE, Int_t ptbin=0, Int_t TRDtrigger = 0){ - // - // HFE task configuration PID2 (TOF-TPC only!) - // - - Bool_t kAnalyseTaggedTracks = isAOD ? kFALSE : kTRUE; - - Int_t iDCAxy = (Int_t)(DCAxy*10.); - Int_t iDCAz = (Int_t)(DCAz*10.); - Int_t iTPCs = (Int_t)(TPCs*1000.); - Int_t iTOFs = (Int_t)(TOFs*10.); - Int_t iIpSig= (Int_t)(IpSig*10.); - Int_t iIpOpp= 0; - Int_t iProdCut = 1; - Int_t iMCStr = 0; - Int_t iPixelAny = itshitpixel; - Int_t iEtaCorr = 0; - if(ipOpp)iIpOpp = 1; - if(prodcut) iProdCut = 0; - if(mcstr) iMCStr = 1; - if(withetacorrection) iEtaCorr = 1; - - printf("\n hfeCutsPID2t%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%d \n",TPCcl,ITScl,iDCAxy,iDCAz,iTPCs,iTOFs,TOFmis,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin); - - AliHFEcuts *hfecuts = new AliHFEcuts(Form("hfeCutsPID2tc%dtp%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,iTOFs,TOFmis,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin),"HFE cuts TOF TPC"); - //hfecuts->SetQAOn(); - hfecuts->CreateStandardCuts(); - hfecuts->SetMinNClustersTPC(TPCcl); - hfecuts->SetMinNClustersTPCPID(TPCclPID); - hfecuts->SetMinNClustersITS(ITScl); - hfecuts->SetMinRatioTPCclusters(0.6); - hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable); - hfecuts->SetCutITSpixel(itshitpixel); - hfecuts->SetCheckITSLayerStatus(kFALSE); - if(isAOD) hfecuts->SetAODFilterBit(4); - Bool_t ipCharge = kFALSE; - if(IpSig<0)ipCharge = kTRUE; - - hfecuts->SetIPcutParam(0,0,0,IpSig,kTRUE,ipCharge,ipOpp); - if(TMath::Abs(IpSig)>100&&TMath::Abs(IpSig)<220){ - hfecuts->SetIPcutParam(0.0064,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>220&&TMath::Abs(IpSig)<250){ - hfecuts->SetIPcutParam(0.0064,0.072,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>250&&TMath::Abs(IpSig)<270){ - hfecuts->SetIPcutParam(0.0064,0.083,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>270&&TMath::Abs(IpSig)<300){ - hfecuts->SetIPcutParam(0.0064,0.088,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>300&&TMath::Abs(IpSig)<320){ - hfecuts->SetIPcutParam(0.0064,0.098,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>320&&TMath::Abs(IpSig)<350){ - hfecuts->SetIPcutParam(0.0064,0.108,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>350&&TMath::Abs(IpSig)<410){ - hfecuts->SetIPcutParam(0.0064,0.058,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>410&&TMath::Abs(IpSig)<450){ - hfecuts->SetIPcutParam(0.0064,0.053,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>450&&TMath::Abs(IpSig)<470){ - hfecuts->SetIPcutParam(0.0064,0.068,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>470&&TMath::Abs(IpSig)<500){ - hfecuts->SetIPcutParam(0.0064,0.048,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>500&&TMath::Abs(IpSig)<520){ - hfecuts->SetIPcutParam(0.0044,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>520&&TMath::Abs(IpSig)<550){ - hfecuts->SetIPcutParam(0.0054,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>550&&TMath::Abs(IpSig)<600){ - hfecuts->SetIPcutParam(0.011,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>600&&TMath::Abs(IpSig)<700){ - hfecuts->SetIPcutParam(0.012,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - else if(TMath::Abs(IpSig)>700&&TMath::Abs(IpSig)<900){ - hfecuts->SetIPcutParam(0.013,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) - } - - - if(prodcut) hfecuts->SetProductionVertex(0,100,0,100); - else { - if((iPixelAny==AliHFEextraCuts::kAny) || (iPixelAny==AliHFEextraCuts::kSecond)) hfecuts->SetProductionVertex(0,7,0,7); - } - //if(trdsec) hfecuts->SetAdditionalStatusRequirement(AliVTrack::kTRDout); - - //hfecuts->SetSigmaToVertex(DCAsi); - hfecuts->SetMaxImpactParam(DCAxy,DCAz); - //hfecuts->SetQAOn(); - hfecuts->SetUseMixedVertex(kTRUE); - hfecuts->SetVertexRange(10.); - // New pPb cuts (February 2013) - hfecuts->SetUseCorrelationVertex(); - hfecuts->SetSPDVtxResolutionCut(); - - // TOF settings: - Int_t usetof=0; - Bool_t kTOFmis=kFALSE; - if (TOFs>0.){ - usetof = 1; - printf("CONFIGURATION FILE: TOF is used \n"); - hfecuts->SetTOFPIDStep(kTRUE); - printf("CONFIGURATION FILE: TOF PID step is requested !!!! \n"); - if (TOFmis>0){ - kTOFmis = kTRUE; - printf("CONFIGURATION FILE: TOF mismatch rejection is set ON \n"); - } - } - - AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(Form("HFEanalysisPID2tc%dtp%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%dtrdtrg%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,TOFs,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin,TRDtrigger)); - printf("task %p\n", task); - task->SetHFECuts(hfecuts); - task->GetPIDQAManager()->SetHighResolutionHistos(); - - if(!isAOD) task->SetRemoveFirstEventInChunk(); // Remove first event in chunk in case of ESD analysis - task->SetRemovePileUp(kFALSE); - //task->SetApplypAVertexCut(); - - Bool_t activateTRDTrigger=kFALSE; - if(TRDtrigger>0) activateTRDTrigger=kTRUE; - task->SetTRDTrigger(activateTRDTrigger,TRDtrigger); - - // Define Variables - if(ptbin==1){ - Double_t ptbinning[19] = {0., 0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 2., 2.5, 3., 4., 5., 6., 8., 12., 16., 20.}; - } - else{ -// Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.}; +AliAnalysisTaskHFE* ConfigHFEmbpPb(Bool_t useMC, Bool_t isAOD, UChar_t TPCcl=70, UChar_t TPCclPID = 80, UChar_t ITScl=3, + Double_t DCAxy=1000., Double_t DCAz=1000., + Double_t TPCs=0., Double_t TPCu=3.09, Double_t TOFs=3., Int_t TOFmis=0, + Double_t IpSig=3., Bool_t prodcut = kFALSE, + Bool_t ipOpp = kTRUE, Bool_t mcstr = kFALSE, Int_t itshitpixel = 0, + Bool_t withetacorrection = kTRUE, Int_t ptbin=0, Int_t TRDtrigger = 0){ + // + // HFE task configuration PID2 (TOF-TPC only!) + // + + Bool_t kAnalyseTaggedTracks = isAOD ? kFALSE : kTRUE; + + Int_t iDCAxy = (Int_t)(DCAxy*10.); + Int_t iDCAz = (Int_t)(DCAz*10.); + Int_t iTPCs = (Int_t)(TPCs*1000.); + Int_t iTOFs = (Int_t)(TOFs*10.); + Int_t iIpSig= (Int_t)(IpSig*10.); + Int_t iIpOpp= 0; + Int_t iProdCut = 1; + Int_t iMCStr = 0; + Int_t iPixelAny = itshitpixel; + Int_t iEtaCorr = 0; + if(ipOpp)iIpOpp = 1; + if(prodcut) iProdCut = 0; + if(mcstr) iMCStr = 1; + if(withetacorrection) iEtaCorr = 1; + + printf("\n hfeCutsPID2t%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%d \n",TPCcl,ITScl,iDCAxy,iDCAz,iTPCs,iTOFs,TOFmis,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin); + + AliHFEcuts *hfecuts = new AliHFEcuts(Form("hfeCutsPID2tc%dtp%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,iTOFs,TOFmis,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin),"HFE cuts TOF TPC"); + //hfecuts->SetQAOn(); + hfecuts->CreateStandardCuts(); + hfecuts->SetMinNClustersTPC(TPCcl); + hfecuts->SetMinNClustersTPCPID(TPCclPID); + hfecuts->SetMinNClustersITS(ITScl); + hfecuts->SetMinRatioTPCclusters(0.6); + hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable); + hfecuts->SetCutITSpixel(itshitpixel); + hfecuts->SetCheckITSLayerStatus(kFALSE); + if(isAOD) hfecuts->SetAODFilterBit(4); + Bool_t ipCharge = kFALSE; + if(IpSig<0)ipCharge = kTRUE; + + hfecuts->SetIPcutParam(0,0,0,IpSig,kTRUE,ipCharge,ipOpp); + if(TMath::Abs(IpSig)>100&&TMath::Abs(IpSig)<220){ + hfecuts->SetIPcutParam(0.0064,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>220&&TMath::Abs(IpSig)<250){ + hfecuts->SetIPcutParam(0.0064,0.072,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>250&&TMath::Abs(IpSig)<270){ + hfecuts->SetIPcutParam(0.0064,0.083,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>270&&TMath::Abs(IpSig)<300){ + hfecuts->SetIPcutParam(0.0064,0.088,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>300&&TMath::Abs(IpSig)<320){ + hfecuts->SetIPcutParam(0.0064,0.098,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>320&&TMath::Abs(IpSig)<350){ + hfecuts->SetIPcutParam(0.0064,0.108,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>350&&TMath::Abs(IpSig)<410){ + hfecuts->SetIPcutParam(0.0064,0.058,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>410&&TMath::Abs(IpSig)<450){ + hfecuts->SetIPcutParam(0.0064,0.053,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>450&&TMath::Abs(IpSig)<470){ + hfecuts->SetIPcutParam(0.0064,0.068,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>470&&TMath::Abs(IpSig)<500){ + hfecuts->SetIPcutParam(0.0064,0.048,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>500&&TMath::Abs(IpSig)<520){ + hfecuts->SetIPcutParam(0.0044,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>520&&TMath::Abs(IpSig)<550){ + hfecuts->SetIPcutParam(0.0054,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>550&&TMath::Abs(IpSig)<600){ + hfecuts->SetIPcutParam(0.011,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>600&&TMath::Abs(IpSig)<700){ + hfecuts->SetIPcutParam(0.012,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + else if(TMath::Abs(IpSig)>700&&TMath::Abs(IpSig)<900){ + hfecuts->SetIPcutParam(0.013,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) + } + + + if(prodcut) hfecuts->SetProductionVertex(0,100,0,100); + else { + if((iPixelAny==AliHFEextraCuts::kAny) || (iPixelAny==AliHFEextraCuts::kSecond)) hfecuts->SetProductionVertex(0,7,0,7); + } + //if(trdsec) hfecuts->SetAdditionalStatusRequirement(AliVTrack::kTRDout); + + //hfecuts->SetSigmaToVertex(DCAsi); + hfecuts->SetMaxImpactParam(DCAxy,DCAz); + //hfecuts->SetQAOn(); + hfecuts->SetUseMixedVertex(kTRUE); + hfecuts->SetVertexRange(10.); + // New pPb cuts (February 2013) + hfecuts->SetUseCorrelationVertex(); + hfecuts->SetSPDVtxResolutionCut(); + + // TOF settings: + Int_t usetof=0; + Bool_t kTOFmis=kFALSE; + if (TOFs>0.){ + usetof = 1; + printf("CONFIGURATION FILE: TOF is used \n"); + hfecuts->SetTOFPIDStep(kTRUE); + printf("CONFIGURATION FILE: TOF PID step is requested !!!! \n"); + if (TOFmis>0){ + kTOFmis = kTRUE; + printf("CONFIGURATION FILE: TOF mismatch rejection is set ON \n"); + } + } + + AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(Form("HFEanalysisPID2tc%dtp%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%dtrdtrg%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,TOFs,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin,TRDtrigger)); + printf("task %p\n", task); + task->SetHFECuts(hfecuts); + task->GetPIDQAManager()->SetHighResolutionHistos(); + + if(!isAOD) task->SetRemoveFirstEventInChunk(); // Remove first event in chunk in case of ESD analysis + task->SetRemovePileUp(kFALSE); + //task->SetApplypAVertexCut(); + + Bool_t activateTRDTrigger=kFALSE; + if(TRDtrigger>0) activateTRDTrigger=kTRUE; + task->SetTRDTrigger(activateTRDTrigger,TRDtrigger); + + // Define Variables + if(ptbin==1){ + Double_t ptbinning[19] = {0., 0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 2., 2.5, 3., 4., 5., 6., 8., 12., 16., 20.}; + } + else{ +// Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.}; Double_t ptbinning[41] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30.}; - } - //Double_t etabinning[33] = {-0.8, -0.75, -0.7, -0.65, -0.6, -0.55, -0.5, -0.45, -0.4, -0.35, -0.3, -0.25, -0.2, -0.15, -0.1, 0.05, 0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8}; - //Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8}; - Double_t etabinning[9] = {-0.8, -0.6, -0.4, -0.2, 0., 0.2, 0.4, 0.6, 0.8}; - - Int_t sizept=(sizeof(ptbinning)/sizeof(double))-1; - Int_t sizeeta=(sizeof(etabinning)/sizeof(double))-1; - - AliHFEvarManager *vm = task->GetVarManager(); - vm->AddVariable("pt", sizept, ptbinning); - vm->AddVariable("eta", sizeeta, -0.8,0.8); - vm->AddVariable("phi",21, -0, 2*TMath::Pi()); - vm->AddVariable("charge"); - vm->AddVariable("source"); - //vm->AddVariable("centrality"); - - if(!useMC){ - // New background model (LHC10d pass2) - //TF1 *hBackground = new TF1("hadronicBackgroundFunction", "TMath::Exp(([0]/(x**1.5))+[1])", 0., 20.); - TF1 *hBackground = new TF1("hadronicBackgroundFunction", "TMath::Exp([0]+TMath::Sqrt([1]*x))", 0., 20.); - // These settings assume that the default is a cut on .ge.120 TPC clusters (Sep 27, 2011) - hBackground->SetParameter(0, -15.86); - hBackground->SetParameter(1, 33.63); - if (TPCcl == 100){ - hBackground->SetParameter(0, -14.36); - hBackground->SetParameter(1, 27.16); - } elseif (TPCcl == 110){ - hBackground->SetParameter(0, -14.88); - hBackground->SetParameter(1, 29.28); - } - - task->SetBackGroundFactorsFunction(hBackground); - } - - // Define PID - AliHFEpid *pid = task->GetPID(); - if(useMC) pid->SetHasMCData(kTRUE); - - if (usetof){ - pid->AddDetector("TOF", 0); - pid->AddDetector("TPC", 1); - } else { - pid->AddDetector("TPC", 0); - } - - // HERE PUT THE STRAIGHT CUT - Double_t params[4]; - char *cutmodel; - if(useMC){ - // Monte-Carlo needs modelling of the falling mean with momentum at low momentum - // for high momentum it is consistent with a flat -0.94 - cutmodel = "expo(0)+pol1(2)";//[0]*TMath::Exp([1]*x) + [2] + [3]*x"; - Double_t paramsMC[4] = {-1.00625e-01, -2.09446e+00, -4.71247e-01, 1.80301e-02}; - for(int ipar = 0; ipar < 4; ipar++) params[ipar] = paramsMC[ipar]; - } else { - // Data is consistent with a flat constant: (Sep 27, 2011) - // 100 clusters: mean = -0.076, width = 1.035 - // 120 clusters: mean = -0.113, width = 1.03 - // 140 clusters: mean = -0.093, width = 1.004 - cutmodel = "pol0(0)"; - params[0] = TPCs; - } - pid->ConfigureTPCdefaultCut(cutmodel, params, TPCu); - - if (usetof){ - pid->ConfigureTOF(TOFs); - AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid); - if (kTOFmis){ - tofpid->SetRejectTOFmismatch(); - } - } - - - // To make different upper TOF cut to see contamination effect - // The below two lines should be removed after this check - //AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid); - //if(TOFs<3.) tofpid->SetTOFnSigmaBand(-3,TOFs); //only to check the assymmetric tof cut - - if(kAnalyseTaggedTracks){ - AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis"); - v0trackCuts->CreateStandardCuts(); - v0trackCuts->SetMinNClustersTPC(TPCcl); - v0trackCuts->SetMinNClustersTPCPID(TPCclPID); - v0trackCuts->SetMinRatioTPCclusters(0.6); - v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable); - v0trackCuts->SetMinNClustersITS(1); - v0trackCuts->SetCutITSpixel(AliHFEextraCuts::kFirst); - v0trackCuts->SetCheckITSLayerStatus(kFALSE); - v0trackCuts->UnsetVertexRequirement(); - //hfecuts->SetSigmaToVertex(10); - if(usetof) v0trackCuts->SetTOFPIDStep(kTRUE); - v0trackCuts->SetQAOn(); - - task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis); - task->SetTaggedTrackCuts(v0trackCuts); - task->SetCleanTaggedTrack(kTRUE); - } - - // QA - printf("task %p\n", task); - task->SetQAOn(AliAnalysisTaskHFE::kPIDqa); - task->SetQAOn(AliAnalysisTaskHFE::kMCqa); - //task->SwitchOnPlugin(AliAnalysisTaskHFE::kIsElecBackGround); - //task->SwitchOnPlugin(AliAnalysisTaskHFE::kSecVtx); - task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep); - if(useMC && mcstr) task->SetDebugStreaming(); - - printf("*************************************\n"); - printf("Configuring standard Task:\n"); - task->PrintStatus(); - pid->PrintStatus(); - printf("*************************************\n"); - return task; -} + } + //Double_t etabinning[33] = {-0.8, -0.75, -0.7, -0.65, -0.6, -0.55, -0.5, -0.45, -0.4, -0.35, -0.3, -0.25, -0.2, -0.15, -0.1, 0.05, 0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8}; + //Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8}; + Double_t etabinning[9] = {-0.8, -0.6, -0.4, -0.2, 0., 0.2, 0.4, 0.6, 0.8}; + + Int_t sizept=(sizeof(ptbinning)/sizeof(double))-1; + Int_t sizeeta=(sizeof(etabinning)/sizeof(double))-1; + + AliHFEvarManager *vm = task->GetVarManager(); + vm->AddVariable("pt", sizept, ptbinning); + vm->AddVariable("eta", sizeeta, -0.8,0.8); + vm->AddVariable("phi",21, -0, 2*TMath::Pi()); + vm->AddVariable("charge"); + vm->AddVariable("source"); + //vm->AddVariable("centrality"); + + if(!useMC){ + // New background model (LHC10d pass2) + //TF1 *hBackground = new TF1("hadronicBackgroundFunction", "TMath::Exp(([0]/(x**1.5))+[1])", 0., 20.); + TF1 *hBackground = new TF1("hadronicBackgroundFunction", "TMath::Exp([0]+TMath::Sqrt([1]*x))", 0., 20.); + // These settings assume that the default is a cut on .ge.120 TPC clusters (Sep 27, 2011) + hBackground->SetParameter(0, -15.86); + hBackground->SetParameter(1, 33.63); + if (TPCcl == 100){ + hBackground->SetParameter(0, -14.36); + hBackground->SetParameter(1, 27.16); + } elseif (TPCcl == 110){ + hBackground->SetParameter(0, -14.88); + hBackground->SetParameter(1, 29.28); + } + + task->SetBackGroundFactorsFunction(hBackground); + } + + // Define PID + AliHFEpid *pid = task->GetPID(); + if(useMC) pid->SetHasMCData(kTRUE); + + if (usetof){ + pid->AddDetector("TOF", 0); + pid->AddDetector("TPC", 1); + } else { + pid->AddDetector("TPC", 0); + } + + // HERE PUT THE STRAIGHT CUT + Double_t params[4]; + char *cutmodel; + if(useMC){ + // Monte-Carlo needs modelling of the falling mean with momentum at low momentum + // for high momentum it is consistent with a flat -0.94 + cutmodel = "expo(0)+pol1(2)";//[0]*TMath::Exp([1]*x) + [2] + [3]*x"; + Double_t paramsMC[4] = {-1.00625e-01, -2.09446e+00, -4.71247e-01, 1.80301e-02}; + for(int ipar = 0; ipar < 4; ipar++) params[ipar] = paramsMC[ipar]; + } else { + // Data is consistent with a flat constant: (Sep 27, 2011) + // 100 clusters: mean = -0.076, width = 1.035 + // 120 clusters: mean = -0.113, width = 1.03 + // 140 clusters: mean = -0.093, width = 1.004 + cutmodel = "pol0(0)"; + params[0] = TPCs; + } + pid->ConfigureTPCdefaultCut(cutmodel, params, TPCu); + + if (usetof){ + pid->ConfigureTOF(TOFs); + AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid); + if (kTOFmis){ + tofpid->SetRejectTOFmismatch(); + } + } + + + // To make different upper TOF cut to see contamination effect + // The below two lines should be removed after this check + //AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid); + //if(TOFs<3.) tofpid->SetTOFnSigmaBand(-3,TOFs); //only to check the assymmetric tof cut + + if(kAnalyseTaggedTracks){ + AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis"); + v0trackCuts->CreateStandardCuts(); + v0trackCuts->SetMinNClustersTPC(TPCcl); + v0trackCuts->SetMinNClustersTPCPID(TPCclPID); + v0trackCuts->SetMinRatioTPCclusters(0.6); + v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable); + v0trackCuts->SetMinNClustersITS(1); + v0trackCuts->SetCutITSpixel(AliHFEextraCuts::kFirst); + v0trackCuts->SetCheckITSLayerStatus(kFALSE); + v0trackCuts->UnsetVertexRequirement(); + //hfecuts->SetSigmaToVertex(10); + if(usetof) v0trackCuts->SetTOFPIDStep(kTRUE); + v0trackCuts->SetQAOn(); + + task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis); + task->SetTaggedTrackCuts(v0trackCuts); + task->SetCleanTaggedTrack(kTRUE); + } + + // QA + printf("task %p\n", task); + task->SetQAOn(AliAnalysisTaskHFE::kPIDqa); + task->SetQAOn(AliAnalysisTaskHFE::kMCqa); + //task->SwitchOnPlugin(AliAnalysisTaskHFE::kIsElecBackGround); + //task->SwitchOnPlugin(AliAnalysisTaskHFE::kSecVtx); + task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep); + if(useMC && mcstr) task->SetDebugStreaming(); + + printf("*************************************\n"); + printf("Configuring standard Task:\n"); + task->PrintStatus(); + pid->PrintStatus(); + printf("*************************************\n"); + return task; +} diff --git a/PWGHF/hfe/macros/configs/pPb/ConfigHFEnpepPb.C b/PWGHF/hfe/macros/configs/pPb/ConfigHFEnpepPb.C index d1d76692ea6..6ea1cf9d2fd 100644 --- a/PWGHF/hfe/macros/configs/pPb/ConfigHFEnpepPb.C +++ b/PWGHF/hfe/macros/configs/pPb/ConfigHFEnpepPb.C @@ -30,7 +30,7 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix Double_t *assTPCSminus=NULL, Double_t *assTPCSplus=NULL, Bool_t useCat1Tracks = kTRUE, Bool_t useCat2Tracks = kTRUE) { - Bool_t kAnalyseTaggedTracks = kFALSE; + Bool_t kAnalyseTaggedTracks = isAOD ? kFALSE : kTRUE; //***************************************// // Setting up the HFE cuts // diff --git a/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C b/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C index 814c076a4ec..a9af1f61b62 100644 --- a/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C +++ b/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C @@ -24,7 +24,7 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix, Int_t itshitpixel = 0, Int_t icent=1, Double_t etami=-0.8, Double_t etama=0.8){ - Bool_t kAnalyseTaggedTracks = kFALSE; + Bool_t kAnalyseTaggedTracks = isAOD ? kFALSE : kTRUE; //***************************************// // Setting up the HFE cuts // diff --git a/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C b/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C index 551a50ef60e..89498dfabe4 100644 --- a/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C +++ b/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C @@ -31,7 +31,7 @@ AliAnalysisTaskHFE* ConfigHFEpPbTRD(Bool_t useMC, Bool_t isAOD, TString appendix Int_t TRDtrigger=1, Int_t TRDtl=6, Int_t TRDeff=4, TString detector){ - Bool_t kAnalyseTaggedTracks = kFALSE; + Bool_t kAnalyseTaggedTracks = isAOD ? kFALSE : kTRUE; // TRD settings Float_t eeff[6] = {0.7, 0.75, 0.8, 0.85, 0.9, 0.95}; -- 2.43.5