fConfiguration(kCheetah), // by default, setting the fast configuration
fFuncWeight(0x0),
fHistoMeasNch(0x0),
- fHistoMCNch(0x0)
+ fHistoMCNch(0x0),
+ fResonantDecay(0)
{
//
//Default ctor
fConfiguration(kCheetah), // by default, setting the fast configuration
fFuncWeight(func),
fHistoMeasNch(0x0),
- fHistoMCNch(0x0)
+ fHistoMCNch(0x0),
+ fResonantDecay(0)
{
//
// Constructor. Initialization of Inputs and Outputs
fConfiguration(c.fConfiguration),
fFuncWeight(c.fFuncWeight),
fHistoMeasNch(c.fHistoMeasNch),
- fHistoMCNch(c.fHistoMCNch)
+ fHistoMCNch(c.fHistoMCNch),
+ fResonantDecay(c.fResonantDecay)
{
//
// Copy Constructor
break;
}
case 31:
- case 32:
+// case 32:
case 33:{
cfVtxHF = new AliCFVertexingHF3Prong(mcArray, fOriginDselection, fDecayChannel);
if(fDecayChannel==33){
- cfVtxHF->SetGeneratedDsOption(fGenDsOption);
+ ((AliCFVertexingHF3Prong*)cfVtxHF)->SetGeneratedDsOption(fGenDsOption);
}
break;
}
+ case 32:{
+ cfVtxHF = new AliCFVertexingHF3Prong(mcArray, fOriginDselection, fDecayChannel,fResonantDecay);
+ }
case 4:{
//cfVtxHF = new AliCFVertexingHF4Prong(mcArray, originDselection); // not there yet
break;
fCuts->SetUsePID(iscutsusingpid); //restoring usage of the PID from the cuts object
- if (recoAnalysisCuts == 3 || recoAnalysisCuts == isPartOrAntipart){
+ Bool_t tempAn=(recoAnalysisCuts == 3 || recoAnalysisCuts == isPartOrAntipart);
+ if (fDecayChannel == 32) tempAn=(recoAnalysisCuts >0 || recoAnalysisCuts == isPartOrAntipart);
+
+ if (tempAn){
fCFManager->GetParticleContainer()->Fill(containerInput, kStepRecoPPR, fWeight);
icountRecoPPR++;
AliDebug(3,"Reco Analysis cuts passed and container filled \n");
Bool_t keepDs=ProcessDs(recoPidSelection);
if(keepDs) recoPidSelection=3;
}
+ Bool_t tempPid=(recoPidSelection == 3 || recoPidSelection == isPartOrAntipart);
+ if (fDecayChannel == 32) tempPid=(recoPidSelection >0 || recoPidSelection == isPartOrAntipart);
- if (recoPidSelection == 3 || recoPidSelection == isPartOrAntipart){
+ if (tempPid){
fCFManager->GetParticleContainer()->Fill(containerInput, kStepRecoPID, fWeight);
icountRecoPID++;
AliDebug(3,"Reco PID cuts passed and container filled \n");
kSnail = 0, // slow configuration, all variables
kCheetah = 1 // fast configuration, only a subset of variables
};
+
+ enum {
+ kAll = 0, // all decays (resonant + non-resonant)
+ kNonResonant = 1, // only non resonant
+ kL1520 = 2, // Lc --> L(1520) + p
+ kKstar = 3, // Lc --> K* + pi
+ kDelta = 4 // Lc --> Delta + K
+ };
AliCFTaskVertexingHF();
AliCFTaskVertexingHF(const Char_t* name, AliRDHFCuts* cuts, TF1* func = 0x0);
void SetWeightFunction(TF1* func) {fFuncWeight = func;}
TF1* GetWeightFunction() const {return fFuncWeight;}
+
+ void SetResonantDecay(UInt_t resonantDecay) {fResonantDecay = resonantDecay;}
+ UInt_t GetResonantDecay() const {return fResonantDecay;}
protected:
AliCFManager *fCFManager; // pointer to the CF manager
TF1* fFuncWeight; // user-defined function to be used to calculate weights
TH1F* fHistoMeasNch; // histogram with measured Nch distribution (pp 7 TeV)
TH1F* fHistoMCNch; // histogram with Nch distribution from MC production
+ UInt_t fResonantDecay; // resonant deacy channel to be used if the CF should be run on resonant channels only
ClassDef(AliCFTaskVertexingHF,12); // class for HF corrections as a function of many variables
};
//_________________________________________
-AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(Int_t decay):
+AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(Int_t decay, UInt_t resonantDecay):
AliCFVertexingHF(),
fDecay(decay),
- fGenDsOption(kCountResonant)
+ fGenDsOption(kCountResonant),
+ fResonantDecay(resonantDecay)
{
//
SetNProngs(3);
}
//_________________________________________
-AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t originDselection, Int_t decay):
+AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t originDselection, Int_t decay, UInt_t resonantDecay):
AliCFVertexingHF(mcArray, originDselection),
fDecay(decay),
- fGenDsOption(kCountResonant)
+ fGenDsOption(kCountResonant),
+ fResonantDecay(resonantDecay)
{
//
SetNProngs(3);
}
}
+ if (fDecay==kLctopKpi && fResonantDecay != AliCFTaskVertexingHF::kAll) {
+ if (!CheckLc3Prong()) return bSignAssoc;
+ }
+
bSignAssoc = kTRUE;
return bSignAssoc;
}
Int_t daughter[3];
Int_t nDau=fmcPartCandidate->GetNDaughters();
- Int_t labelFirstDau = fmcPartCandidate->GetDaughter(0);
+ Int_t labelFirstDau = fmcPartCandidate->GetDaughter(0);
+
+ if(fDecay==kLctopKpi && fResonantDecay!=AliCFTaskVertexingHF::kAll){if(!CheckLc3Prong()) return checkCD;}
+
if(nDau==3){
if(fDecay==kDstoKKpi && !(fGenDsOption==kCountAllDsKKpi || fGenDsOption==kCountNonResonant)){
AliDebug(3,"Decay channel in direct KKpi, should be skipped");
return checkCD;
}
+//---------------------------------
+Bool_t AliCFVertexingHF3Prong::CheckLc3Prong() const
+{
+ Int_t numberOfLambdac=0;
+ if(TMath::Abs(fmcPartCandidate->GetPdgCode())!=4122) return kFALSE;
+ Int_t nDaugh = (Int_t)fmcPartCandidate->GetNDaughters();
+ if(nDaugh<2) return kFALSE;
+ if(nDaugh>3) return kFALSE;
+ AliAODMCParticle* pdaugh1 = (AliAODMCParticle*)fmcArray->At(fmcPartCandidate->GetDaughter(0));
+ if(!pdaugh1) {return kFALSE;}
+ Int_t number1 = TMath::Abs(pdaugh1->GetPdgCode());
+ AliAODMCParticle* pdaugh2 = (AliAODMCParticle*)fmcArray->At(fmcPartCandidate->GetDaughter(1));
+ if(!pdaugh2) {return kFALSE;}
+ Int_t number2 = TMath::Abs(pdaugh2->GetPdgCode());
+ if(nDaugh==3){
+ if(fResonantDecay!=AliCFTaskVertexingHF::kNonResonant && fResonantDecay!=AliCFTaskVertexingHF::kAll)return kFALSE;
+ Int_t thirdDaugh=fmcPartCandidate->GetDaughter(1)-1;
+ AliAODMCParticle* pdaugh3 = (AliAODMCParticle*)fmcArray->At(thirdDaugh);
+ if(!pdaugh3) return kFALSE;
+ Int_t number3 = TMath::Abs(pdaugh3->GetPdgCode());
+ if((number1==321 && number2==211 && number3==2212) || (number1==211 && number2==321 && number3==2212) || (number1==211 && number2==2212 && number3==321) || (number1==321 && number2==2212 && number3==211) || (number1==2212 && number2==321 && number3==211) || (number1==2212 && number2==211 && number3==321)) numberOfLambdac++;
+ }
+ if(nDaugh==2){
+ if(fResonantDecay==AliCFTaskVertexingHF::kNonResonant)return kFALSE;
+ Int_t nfiglieK=0;
+ if((number1==2212 && number2==313)){
+ if(fResonantDecay!=AliCFTaskVertexingHF::kKstar && fResonantDecay!=AliCFTaskVertexingHF::kAll)return kFALSE;
+ nfiglieK=pdaugh2->GetNDaughters();
+ if(nfiglieK!=2) return kFALSE;
+ AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)fmcArray->At(pdaugh2->GetDaughter(0));
+ AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)fmcArray->At(pdaugh2->GetDaughter(1));
+ if(!pdaughK1) return kFALSE;
+ if(!pdaughK2) return kFALSE;
+ if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) numberOfLambdac++;
+ }
+ if((number1==313 && number2==2212)){
+ if(fResonantDecay!=AliCFTaskVertexingHF::kKstar && fResonantDecay!=AliCFTaskVertexingHF::kAll)return kFALSE;
+ nfiglieK=pdaugh1->GetNDaughters();
+ if(nfiglieK!=2) return kFALSE;
+ AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)fmcArray->At(pdaugh1->GetDaughter(0));
+ AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)fmcArray->At(pdaugh1->GetDaughter(1));
+ if(!pdaughK1) return kFALSE;
+ if(!pdaughK2) return kFALSE;
+ if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) numberOfLambdac++;
+ }
+ Int_t nfiglieDelta=0;
+ if(number1==321 && number2==2224){
+ if(fResonantDecay!=AliCFTaskVertexingHF::kDelta && fResonantDecay!=AliCFTaskVertexingHF::kAll)return kFALSE;
+ nfiglieDelta=pdaugh2->GetNDaughters();
+ if(nfiglieDelta!=2) return kFALSE;
+ AliAODMCParticle *pdaughD1=(AliAODMCParticle*)fmcArray->At(pdaugh2->GetDaughter(0));
+ AliAODMCParticle *pdaughD2=(AliAODMCParticle*)fmcArray->At(pdaugh2->GetDaughter(1));
+ if(!pdaughD1) return kFALSE;
+ if(!pdaughD2) return kFALSE;
+ if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) numberOfLambdac++;
+ }
+ if(number1==2224 && number2==321){
+ if(fResonantDecay!=AliCFTaskVertexingHF::kDelta && fResonantDecay!=AliCFTaskVertexingHF::kAll)return kFALSE;
+ nfiglieDelta=pdaugh1->GetNDaughters();
+ if(nfiglieDelta!=2) return kFALSE;
+ AliAODMCParticle* pdaughD1 = (AliAODMCParticle*)fmcArray->At(pdaugh1->GetDaughter(0));
+ AliAODMCParticle* pdaughD2 = (AliAODMCParticle*)fmcArray->At(pdaugh1->GetDaughter(1));
+ if(!pdaughD1) return kFALSE;
+ if(!pdaughD2) return kFALSE;
+ if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) numberOfLambdac++;
+ }
+
+ Int_t nfiglieLa=0;
+ if(number1==3124 && number2==211){
+ if(fResonantDecay!=AliCFTaskVertexingHF::kL1520 && fResonantDecay!=AliCFTaskVertexingHF::kAll)return kFALSE;
+ nfiglieLa=pdaugh1->GetNDaughters();
+ if(nfiglieLa!=2) return kFALSE;
+ AliAODMCParticle *pdaughL1=(AliAODMCParticle*)fmcArray->At(pdaugh1->GetDaughter(0));
+ AliAODMCParticle *pdaughL2=(AliAODMCParticle*)fmcArray->At(pdaugh1->GetDaughter(1));
+ if(!pdaughL1) return kFALSE;
+ if(!pdaughL2) return kFALSE;
+ if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) numberOfLambdac++;
+ }
+ if(number1==211 && number2==3124){
+ if(fResonantDecay!=AliCFTaskVertexingHF::kL1520 && fResonantDecay!=AliCFTaskVertexingHF::kAll)return kFALSE;
+ nfiglieLa=pdaugh2->GetNDaughters();
+ if(nfiglieLa!=2) return kFALSE;
+ AliAODMCParticle *pdaughL1=(AliAODMCParticle*)fmcArray->At(pdaugh2->GetDaughter(0));
+ AliAODMCParticle *pdaughL2=(AliAODMCParticle*)fmcArray->At(pdaugh2->GetDaughter(1));
+ if(!pdaughL1) return kFALSE;
+ if(!pdaughL2) return kFALSE;
+ if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) numberOfLambdac++;
+
+ }
+ }
+ if(numberOfLambdac>0) return kTRUE;
+ return kFALSE;
+}
class AliCFVertexingHF3Prong : public AliCFVertexingHF{\r
public:\r
\r
+ AliCFVertexingHF3Prong(Int_t decay,UInt_t resonantDecay);\r
AliCFVertexingHF3Prong(Int_t decay);\r
AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t originDselection, Int_t decay); \r
+ AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t originDselection, Int_t decay,UInt_t resonantDecay); \r
virtual ~AliCFVertexingHF3Prong(){};\r
\r
\r
\r
Bool_t SetRecoCandidateParam(AliAODRecoDecayHF *recoCand);\r
virtual void SetDecay3Prong(Int_t decay){fDecay=decay;}\r
+ Bool_t CheckLc3Prong() const;\r
+ void SetResonantDecay(UInt_t resonantDecay) {fResonantDecay = resonantDecay;}\r
+ UInt_t GetResonantDecay() const {return fResonantDecay;}\r
\r
void SetGeneratedDsOption(Int_t opt) {fGenDsOption=opt;}\r
Int_t GetGeneratedDsOption() const {return fGenDsOption;}\r
\r
Int_t fDecay; // decay mode id\r
Int_t fGenDsOption; // option for selection Ds (see enum)\r
+ UInt_t fResonantDecay; // resonant decay for which to run the CF\r
\r
- ClassDef(AliCFVertexingHF3Prong, 2);\r
+ ClassDef(AliCFVertexingHF3Prong, 3);\r
\r
};\r
\r
fIsCandTrackSPDFirst(kFALSE),
fMaxPtCandTrackSPDFirst(0.),
fApplySPDDeadPbPb2011(kFALSE),
-fRemoveTrackletOutliers(kFALSE)
+fRemoveTrackletOutliers(kFALSE),
+fKinkReject(kFALSE)
{
//
// Default Constructor
fIsCandTrackSPDFirst(source.fIsCandTrackSPDFirst),
fMaxPtCandTrackSPDFirst(source.fMaxPtCandTrackSPDFirst),
fApplySPDDeadPbPb2011(source.fApplySPDDeadPbPb2011),
- fRemoveTrackletOutliers(source.fRemoveTrackletOutliers)
+ fRemoveTrackletOutliers(source.fRemoveTrackletOutliers),
+ fKinkReject(source.fKinkReject)
{
//
// Copy constructor
fMaxPtCandTrackSPDFirst=source.fMaxPtCandTrackSPDFirst;
fApplySPDDeadPbPb2011=source.fApplySPDDeadPbPb2011;
fRemoveTrackletOutliers=source.fRemoveTrackletOutliers;
+ fKinkReject=source.fKinkReject;
if(source.GetTrackCuts()) {delete fTrackCuts; fTrackCuts=new AliESDtrackCuts(*(source.GetTrackCuts()));}
if(source.fPtBinLimits) SetPtBins(source.fnPtBinLimits,source.fPtBinLimits);
esdTrack.RelateToVertex(primary,0.,3.);
if(!cuts->IsSelected(&esdTrack)) retval = kFALSE;
+
+
+ if(fKinkReject){
+ AliAODVertex *maybeKink=track->GetProdVertex();
+ if(maybeKink->GetType()==AliAODVertex::kKink) retval=kFALSE;
+ }
if(fOptPileup==kRejectTracksFromPileupVertex){
// to be implemented
{delete fTrackCuts; fTrackCuts=new AliESDtrackCuts(*cuts); return;}
void SetUsePID(Bool_t flag=kTRUE) {fUsePID=flag; return;}
void SetUseAOD049(Bool_t flag=kTRUE) {fUseAOD049=flag; return;}
+ void SetKinkRejection(Bool_t flag=kTRUE) {fKinkReject=flag; return;}
void SetUseCentrality(Int_t flag=1); // see enum below
void SetPidHF(AliAODPidHF* pidObj) {
if(fPidHF) delete fPidHF;
void GetVarPtIndex(Int_t iGlob, Int_t& iVar, Int_t& iPtBin) const;
Bool_t GetIsUsePID() const {return fUsePID;}
Bool_t GetUseAOD049() const {return fUseAOD049;}
+ Bool_t GetUseKinkRejection() const {return fKinkReject;}
Bool_t GetIsPrimaryWithoutDaughters() const {return fRemoveDaughtersFromPrimary;}
Bool_t GetOptPileUp() const {return fOptPileup;}
Int_t GetUseCentrality() const {return fUseCentrality;}
Double_t fMaxPtCandTrackSPDFirst; // maximum pt of the candidate for which to check if the daughters fulfill kFirst criteria
Bool_t fApplySPDDeadPbPb2011; // flag to apply SPD dead module map of PbPb2011
Bool_t fRemoveTrackletOutliers; // flag to apply cut on tracklets vs. centrality for 2011 data
+ Bool_t fKinkReject; // flag to reject kink daughters
- ClassDef(AliRDHFCuts,23); // base class for cuts on AOD reconstructed heavy-flavour decays
+ ClassDef(AliRDHFCuts,24); // base class for cuts on AOD reconstructed heavy-flavour decays
};
#endif