#include "AliESDUtils.h"
#include "AliAODHFUtil.h"
+#include "AliInputEventHandler.h"
+#include "AliPIDResponse.h"
ClassImp(AliAnalysisTaskSEVertexingHF)
if (aodhandler) aodhandler->SetFillExtension(kTRUE);
}
+ AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+ AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
+ AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
+ fVHF->SetPidResponse(pidResp);
+
// heavy flavor vertexing
fVHF->FindCandidates(event,
fVerticesHFTClArr,
#include "AliESDtrack.h"
#include "AliESDtrackCuts.h"
#include "AliAODEvent.h"
+#include "AliPIDResponse.h"
#include "AliAODRecoDecay.h"
#include "AliAODRecoDecayHF.h"
#include "AliAODRecoDecayHF2Prong.h"
fLikeSign(kFALSE),
fLikeSign3prong(kFALSE),
fMixEvent(kFALSE),
+fPidResponse(0x0),
+fUseKaonPIDfor3Prong(kFALSE),
+fnSigmaTOFKaonLow(5.),
+fnSigmaTOFKaonHi(5.),
fMaxCentPercentileForTightCuts(-9999),
fTrackFilter(0x0),
fTrackFilter2prongCentral(0x0),
fLikeSign(source.fLikeSign),
fLikeSign3prong(source.fLikeSign3prong),
fMixEvent(source.fMixEvent),
+fPidResponse(source.fPidResponse),
+fUseKaonPIDfor3Prong(source.fUseKaonPIDfor3Prong),
+fnSigmaTOFKaonLow(source.fnSigmaTOFKaonLow),
+fnSigmaTOFKaonHi(source.fnSigmaTOFKaonHi),
fMaxCentPercentileForTightCuts(source.fMaxCentPercentileForTightCuts),
fTrackFilter(source.fTrackFilter),
fTrackFilter2prongCentral(source.fTrackFilter2prongCentral),
fLikeSign = source.fLikeSign;
fLikeSign3prong = source.fLikeSign3prong;
fMixEvent = source.fMixEvent;
+ fPidResponse = source.fPidResponse;
+ fUseKaonPIDfor3Prong = source.fUseKaonPIDfor3Prong;
+ fnSigmaTOFKaonLow = source.fnSigmaTOFKaonLow;
+ fnSigmaTOFKaonHi = source.fnSigmaTOFKaonHi;
fMaxCentPercentileForTightCuts = source.fMaxCentPercentileForTightCuts;
fTrackFilter = source.fTrackFilter;
fTrackFilter2prongCentral = source.fTrackFilter2prongCentral;
return;
}
- // event selection
+ // event selection + PID configuration
if(!fCutsD0toKpi->IsEventSelected(event)) return;
+ if(fCutsJpsitoee) fCutsJpsitoee->SetupPID(event);
+ if(fCutsDplustoKpipi) fCutsDplustoKpipi->SetupPID(event);
+ if(fCutsDstoKKpi) fCutsDstoKKpi->SetupPID(event);
+ if(fCutsLctopKpi) fCutsLctopKpi->SetupPID(event);
+ if(fCutsLctoV0) fCutsLctoV0->SetupPID(event);
+ if(fCutsD0toKpipipi) fCutsD0toKpipipi->SetupPID(event);
+ if(fCutsDStartoKpipi) fCutsDStartoKpipi->SetupPID(event);
// call function that applies sigle-track selection,
// for displaced tracks and soft pions (both charges) for D*,
}
}
+ if(fUseKaonPIDfor3Prong){
+ Double_t nsigmatofK= fPidResponse->NumberOfSigmasTOF(negtrack1,AliPID::kKaon);
+ if(nsigmatofK>-990. && (nsigmatofK<-fnSigmaTOFKaonLow || nsigmatofK>fnSigmaTOFKaonHi)) continue;
+ }
// back to primary vertex
// postrack1->PropagateToDCA(fV1,fBzkG,kVeryBig);
// postrack2->PropagateToDCA(fV1,fBzkG,kVeryBig);
isLikeSign3Prong=kFALSE;
}
+ if(fUseKaonPIDfor3Prong){
+ Double_t nsigmatofK= fPidResponse->NumberOfSigmasTOF(postrack1,AliPID::kKaon);
+ if(nsigmatofK>-990. && (nsigmatofK<-fnSigmaTOFKaonLow || nsigmatofK>fnSigmaTOFKaonHi)) continue;
+ }
+
// back to primary vertex
// postrack1->PropagateToDCA(fV1,fBzkG,kVeryBig);
// negtrack1->PropagateToDCA(fV1,fBzkG,kVeryBig);
#include "AliAnalysisFilter.h"
#include "AliESDtrackCuts.h"
+class AliPIDResponse;
class AliESDVertex;
class AliAODRecoDecay;
class AliAODRecoDecayHF;
void SetMassCutBeforeVertexing(Bool_t flag) { fMassCutBeforeVertexing=flag; }
void SetMasses();
+ void SetUseKaonPIDfor3Prong(Bool_t opt=kTRUE){fUseKaonPIDfor3Prong=opt;}
+ void SetnSigmaTOFforKaonSel(Double_t nsl, Double_t nsh){
+ fnSigmaTOFKaonLow=nsl; fnSigmaTOFKaonHi=nsh;}
+ void SetPidResponse(AliPIDResponse* p){fPidResponse=p;}
//
private:
Bool_t fLikeSign3prong; // Like-sign triplets
Bool_t fMixEvent; // event mixing
+ AliPIDResponse* fPidResponse; // PID response
+ Bool_t fUseKaonPIDfor3Prong; // Kaon PID usage flag
+ Double_t fnSigmaTOFKaonLow; //Low cut value on number of sigmas for TOF PID
+ Double_t fnSigmaTOFKaonHi; //High cut value on number of sigmas for TOF PID
+
Float_t fMaxCentPercentileForTightCuts; //max. centrality percentile for using tight cuts
// single-track cuts
TObjArray *twoTrackArrayV0);
//
- ClassDef(AliAnalysisVertexingHF,20); // Reconstruction of HF decay candidates
+ ClassDef(AliAnalysisVertexingHF,21); // Reconstruction of HF decay candidates
};
}
//---------------------------------------------------------------------------
-Bool_t AliRDHFCuts::IsEventSelected(AliVEvent *event) {
- //
- // Event selection
- //
- //if(fTriggerMask && event->GetTriggerMask()!=fTriggerMask) return kFALSE;
-
-
+void AliRDHFCuts::SetupPID(AliVEvent *event) {
+ // Set the PID response object in the AliAODPidHF
+ // in case of old PID sets the TPC dE/dx BB parameterization
- fWhyRejection=0;
- fEvRejectionBits=0;
- Bool_t accept=kTRUE;
-
- if(fRecomputePrimVertex){
- Bool_t vertOK= RecomputePrimaryVertex((AliAODEvent*)event);
- if(!vertOK){
- fWhyRejection=6;
- return kFALSE;
- }
- }
-
- // check if it's MC
- Bool_t isMC=kFALSE;
- TClonesArray *mcArray = (TClonesArray*)((AliAODEvent*)event)->GetList()->FindObject(AliAODMCParticle::StdBranchName());
- if(mcArray) {isMC=kTRUE;fUseAOD049=kFALSE;}
-
- // settings for the TPC dE/dx BB parameterization
if(fPidHF){
if(fPidHF->GetPidResponse()==0x0){
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
fPidHF->SetPidResponse(pidResp);
}
- if(fPidHF->GetUseCombined()) fPidHF->SetUpCombinedPID();
+ if(fPidHF->GetUseCombined()) fPidHF->SetUpCombinedPID();
if(fPidHF->GetOldPid()) {
+
+ Bool_t isMC=kFALSE;
+ TClonesArray *mcArray = (TClonesArray*)((AliAODEvent*)event)->GetList()->FindObject(AliAODMCParticle::StdBranchName());
+ if(mcArray) {isMC=kTRUE;fUseAOD049=kFALSE;}
+
// pp, from LHC10d onwards
if((event->GetRunNumber()>121693 && event->GetRunNumber()<136851) ||
event->GetRunNumber()>139517) fPidHF->SetOnePad(kTRUE);
if(fPidHF->GetPidResponse()==0x0) AliFatal("AliPIDResponse object not set");
}
}
+}
+//---------------------------------------------------------------------------
+Bool_t AliRDHFCuts::IsEventSelected(AliVEvent *event) {
+ //
+ // Event selection
+ //
+ //if(fTriggerMask && event->GetTriggerMask()!=fTriggerMask) return kFALSE;
+
+
+
+ fWhyRejection=0;
+ fEvRejectionBits=0;
+ Bool_t accept=kTRUE;
+
+ if(fRecomputePrimVertex){
+ Bool_t vertOK= RecomputePrimaryVertex((AliAODEvent*)event);
+ if(!vertOK){
+ fWhyRejection=6;
+ return kFALSE;
+ }
+ }
+
+ // check if it's MC
+ Bool_t isMC=kFALSE;
+ TClonesArray *mcArray = (TClonesArray*)((AliAODEvent*)event)->GetList()->FindObject(AliAODMCParticle::StdBranchName());
+ if(mcArray) {isMC=kTRUE;fUseAOD049=kFALSE;}
+
+ SetupPID(event);
// trigger class
TString firedTriggerClasses=((AliAODEvent*)event)->GetFiredTriggerClasses();
Bool_t AreDaughtersSelected(AliAODRecoDecayHF *rd) const;
Bool_t IsDaughterSelected(AliAODTrack *track,const AliESDVertex *primary,AliESDtrackCuts *cuts) const;
virtual Int_t IsSelectedPID(AliAODRecoDecayHF * /*rd*/) {return 1;}
+ void SetupPID(AliVEvent *event);
virtual Int_t IsSelected(TObject* obj,Int_t selectionLevel) = 0;
virtual Int_t IsSelected(TObject* obj,Int_t selectionLevel,AliAODEvent* /*aod*/)