]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG3/vertexingHF/AliCFVertexingHF2Prong.cxx
Update (Francesco, Gian Michele)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliCFVertexingHF2Prong.cxx
index b43338a49e89981db0a6079b23c9fe5fab3e58af..afdc999f6a7bd45dd5d153f805d2e2a4cd1f5a6a 100644 (file)
@@ -43,6 +43,13 @@ ClassImp(AliCFVertexingHF2Prong)
        //
 
        SetNProngs(2);
+       fPtAccCut=new Float_t[fProngs];
+       fEtaAccCut=new Float_t[fProngs];
+       for(Int_t iP=0; iP<fProngs; iP++){
+               fPtAccCut[iP]=0.1;
+               fEtaAccCut[iP]=0.9;
+       }
+
 }
 
 
@@ -84,6 +91,16 @@ Bool_t AliCFVertexingHF2Prong::SetRecoCandidateParam(AliAODRecoDecayHF *recoCand
  
        Int_t mcLabel = fRecoCandidate->MatchToMC(pdgCand,fmcArray,2,pdgDgD0toKpi);
        if (mcLabel == -1) return bSignAssoc;
+
+       if (fRecoCandidate->NumberOfFakeDaughters()>0){
+               fFake = 0;    // fake candidate
+               if (fFakeSelection==1) return bSignAssoc;
+       }
+       if (fRecoCandidate->NumberOfFakeDaughters()==0){
+               fFake = 2;    // non-fake candidate
+               if (fFakeSelection==2) return bSignAssoc;
+       }
+
        SetMCLabel(mcLabel);
        fmcPartCandidate = dynamic_cast<AliAODMCParticle*>(fmcArray->At(fmcLabel));
        if (!fmcPartCandidate){
@@ -190,6 +207,9 @@ Bool_t AliCFVertexingHF2Prong::GetGeneratedValuesFromMCParticle(Double_t* vector
        vectorMC[10] = 1.01;    // dummy value, meaningless in MC
        vectorMC[11] = fmcPartCandidate->Phi(); 
        vectorMC[12] = fzMCVertex;    // z of reconstructed of primary vertex
+       vectorMC[13] = fCentValue;   //reconstructed centrality 
+       vectorMC[14] = 1.;           // always filling with 1 at MC level 
+
        delete decay;
        bGenValues = kTRUE;
        return bGenValues;
@@ -254,6 +274,9 @@ Bool_t AliCFVertexingHF2Prong::GetRecoValuesFromCandidate(Double_t *vectorReco)
        vectorReco[10] = cosPointingAngle;  // in micron
        vectorReco[11] = phi;  
        vectorReco[12] = fzPrimVertex;    // z of reconstructed of primary vertex
+       vectorReco[13] = fCentValue; //reconstructed centrality 
+       vectorReco[14] = fFake;      // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2) 
+
        bFillRecoValues = kTRUE;
 
        return bFillRecoValues;