]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
First set of changes to adapt the CF classes to treat correctly the D* (Chiara Z)
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Feb 2011 10:29:14 +0000 (10:29 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Feb 2011 10:29:14 +0000 (10:29 +0000)
PWG3/vertexingHF/AliAnalysisTaskSED0Mass.cxx
PWG3/vertexingHF/AliAnalysisTaskSEDplus.cxx
PWG3/vertexingHF/AliCFTaskVertexingHF.cxx
PWG3/vertexingHF/AliCFVertexingHF.cxx
PWG3/vertexingHF/AliCFVertexingHF.h
PWG3/vertexingHF/AliCFVertexingHF2Prong.cxx
PWG3/vertexingHF/AliCFVertexingHF3Prong.cxx
PWG3/vertexingHF/AliCFVertexingHFCascade.cxx
PWG3/vertexingHF/AliCFVertexingHFCascade.h
PWG3/vertexingHF/AliRDHFCuts.h
PWG3/vertexingHF/AliRDHFCutsDStartoKpipi.h

index 0bab0e8580cd2db84ede249223062d7e12cfa220..d58f4f31f3a7c505513678e18b89ff91fe660cce 100644 (file)
@@ -1181,20 +1181,6 @@ void AliAnalysisTaskSED0Mass::FillMassHists(AliAODRecoDecayHF2Prong *part, TClon
   //printf("SELECTED\n");
   Int_t ptbin=cuts->PtBin(part->Pt());
 
-  AliAODTrack *prong=(AliAODTrack*)fDaughterTracks.UncheckedAt(0);
-  if(!prong) {
-    AliDebug(2,"No daughter found");
-    return;
-  }
-  else{
-    // if(prong->Charge()==1) {
-    //   ((TH1F*)fDistr->FindObject("hpospair"))->Fill(fCuts->GetNPtBins()+ptbin);
-    //   //fTotPosPairs[ptbin]++;
-    // } else {
-    //   ((TH1F*)fDistr->FindObject("hnegpair"))->Fill(fCuts->GetNPtBins()+ptbin);
-    //   //fTotNegPairs[ptbin]++;
-    // }
-  }
  
   // for(Int_t it=0;it<2;it++){
  
index e7219e88a1057f6ebb4271eec3333b3d88d767ff..74a287f3fdf7ba563fee0d62ceeb196b57883339 100644 (file)
@@ -847,7 +847,7 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/)
   }
   
   Int_t n3Prong = array3Prong->GetEntriesFast();
-  if(fDebug>1) printf("Number of D+->Kpipi: %d\n",n3Prong);
+  printf("Number of D+->Kpipi: %d and of tracks: %d\n",n3Prong,aod->GetNumberOfTracks());
   
   
   Int_t nOS=0;
@@ -868,6 +868,7 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/)
 
     if(fRDCutsProduction->IsSelected(d,AliRDHFCuts::kCandidate,aod)) {
 
+
       
 
       Int_t iPtBin = -1;
@@ -879,7 +880,7 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/)
       
       Int_t passTightCuts=fRDCutsAnalysis->IsSelected(d,AliRDHFCuts::kCandidate,aod);
      
-     
+      
       Int_t labDp=-1;
       Float_t deltaPx=0.;
       Float_t deltaPy=0.;
@@ -1069,8 +1070,11 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/)
              }
            }   
          }
-       }
-      }  
+      
+         }
+    
+    }
+      
     }
     if(unsetvtx) d->UnsetOwnPrimaryVtx();
   }
index b7e64048a3395baeffeaeb55692d65f94aed316d..bf3933fa84649998ace1d88302ba318b60e25b25 100644 (file)
@@ -13,8 +13,6 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
-
 //-----------------------------------------------------------------------
 // Class for HF corrections as a function of many variables
 // 6 Steps introduced: MC, MC Acc, Reco, Reco Acc, Reco Acc + ITS Cl, 
@@ -299,8 +297,6 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
        PostData(3,fCorrelation) ;
        
 
-       AliESDtrackCuts* trackCuts = fCuts->GetTrackCuts();
-       
        if (fFillFromGenerated){
                AliWarning("Flag to fill container with generated value ON ---> dca, d0pi, d0K, d0xd0, cosPointingAngle will be set as dummy!");
        }
@@ -451,6 +447,20 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
        Double_t zPrimVertex = aodVtx ->GetZ();
        Double_t zMCVertex = mcHeader->GetVtxZ();
        
+       AliESDtrackCuts** trackCuts = new AliESDtrackCuts*[cfVtxHF->GetNProngs()];
+       if (fDecayChannel == 21){
+               // for the D*, setting the third element of the array of the track cuts to those for the soft pion
+               for (Int_t iProng = 0; iProng<cfVtxHF->GetNProngs()-1; iProng++){
+                       trackCuts[iProng]=fCuts->GetTrackCuts();
+               }
+               trackCuts[3] = fCuts->GetTrackCutsSoftPi();
+       }
+       else {
+               for (Int_t iProng = 0; iProng<cfVtxHF->GetNProngs(); iProng++){
+                       trackCuts[iProng]=fCuts->GetTrackCuts();
+               }
+       }
+
        //General settings: vertex, feed down and fill reco container with generated values.                    
        cfVtxHF->SetRecoPrimVertex(zPrimVertex);
        cfVtxHF->SetMCPrimaryVertex(zMCVertex);
@@ -482,7 +492,7 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
            AliDebug(2,Form("Impossible to set the label array (decaychannel = %d)",fDecayChannel));
            continue;
          }                
-         
+
          //check the candiate family at MC level
          if (!(cfVtxHF->CheckMCPartFamily(mcPart, mcArray))) {
            AliDebug(2,Form("Check on the family wrong!!! (decaychannel = %d)",fDecayChannel));
@@ -525,7 +535,7 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
                                        icountVertex++;
                                        
                                        //mc Refit requirement  
-                                       Bool_t mcRefitStep = cfVtxHF->MCRefitStep(aodEvent, trackCuts);
+                                       Bool_t mcRefitStep = cfVtxHF->MCRefitStep(aodEvent, &trackCuts[0]);
                                        if (mcRefitStep){
                                                fCFManager->GetParticleContainer()->Fill(containerInputMC,kStepRefit, fWeight);
                                                AliDebug(3,"MC Refit cut passed and container filled\n");
@@ -625,7 +635,7 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
                                AliDebug(3,"Reco step  passed and container filled\n");
                                                  
                                //Reco in the acceptance -- take care of UNFOLDING!!!!
-                               Bool_t recoAcceptanceStep = cfVtxHF->RecoAcceptStep(trackCuts);
+                               Bool_t recoAcceptanceStep = cfVtxHF->RecoAcceptStep(&trackCuts[0]);
                                if (recoAcceptanceStep) {
                                        fCFManager->GetParticleContainer()->Fill(containerInput,kStepRecoAcceptance, fWeight) ;
                                        icountRecoAcc++; 
@@ -717,7 +727,12 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
        delete[] containerInput;
        delete[] containerInputMC;
        delete cfVtxHF;
-
+               if (trackCuts){
+       //      for (Int_t i=0; i<cfVtxHF->GetNProngs(); i++){
+       //              delete [] trackCuts[i];
+       //      }
+               delete [] trackCuts;
+       }
 }
 
 //___________________________________________________________________________
index 7fe10a7d51595fe6eb89fa5bb32cd7318c9f0863..6627fed1c1bcb505f4c76f7b8c7e1cfe18cbc0d4 100644 (file)
@@ -13,8 +13,6 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
-
 //-----------------------------------------------------------------------
 // Class for HF corrections as a function of many variables and step 
 // Author : C. Zampolli, CERN
@@ -53,7 +51,9 @@ AliCFVertexingHF::AliCFVertexingHF() :
        fmcLabel(0),
        fProngs(-1),
        fLabelArray(0x0), 
-       fCentValue(0.)
+       fCentValue(0.),
+       fPtAccCut(0x0),
+       fEtaAccCut(0x0)
 {
        //
        // constructor
@@ -81,7 +81,9 @@ AliCFVertexingHF::AliCFVertexingHF(TClonesArray *mcArray, UShort_t originDselect
        fmcLabel(0),
        fProngs(-1),
        fLabelArray(0x0),
-       fCentValue(0.)
+       fCentValue(0.),
+       fPtAccCut(0x0),
+       fEtaAccCut(0x0)
 {
        //
        // constructor with mcArray
@@ -105,6 +107,14 @@ AliCFVertexingHF::~AliCFVertexingHF()
                delete [] fLabelArray;
                fLabelArray = 0x0;
        }       
+       if (fPtAccCut){
+               delete [] fPtAccCut;
+               fPtAccCut = 0x0;
+       }       
+       if (fEtaAccCut){
+               delete [] fEtaAccCut;
+               fEtaAccCut = 0x0;
+       }       
 }
 
 //_____________________________________________________
@@ -132,7 +142,11 @@ AliCFVertexingHF& AliCFVertexingHF::operator=(const AliCFVertexingHF& c)
                fCentValue=c.fCentValue;
                if (fProngs > 0){
                        fLabelArray = new Int_t[fProngs];
-                       for(Int_t iP=0; iP<fProngs; iP++)fLabelArray[iP]=c.fLabelArray[iP];
+                       for(Int_t iP=0; iP<fProngs; iP++){
+                               fLabelArray[iP]=c.fLabelArray[iP];
+                               fPtAccCut[iP]=c.fPtAccCut[iP];
+                               fEtaAccCut[iP]=c.fEtaAccCut[iP];
+                       }
                }
        }
        
@@ -156,7 +170,9 @@ AliCFVertexingHF::AliCFVertexingHF(const AliCFVertexingHF &c) :
        fmcLabel(c.fmcLabel),
        fProngs(c.fProngs),
        fLabelArray(0x0),
-       fCentValue(c.fCentValue)
+       fCentValue(c.fCentValue),
+       fPtAccCut(0x0),
+       fEtaAccCut(0x0)
 {  
        //
        //copy constructor
@@ -164,6 +180,8 @@ AliCFVertexingHF::AliCFVertexingHF(const AliCFVertexingHF &c) :
        if (fProngs > 0){
                fLabelArray = new Int_t[fProngs];
                if (c.fLabelArray) memcpy(fLabelArray,c.fLabelArray,fProngs*sizeof(Int_t));
+               if (c.fPtAccCut) memcpy(fPtAccCut,c.fPtAccCut,fProngs*sizeof(Int_t));
+               if (c.fEtaAccCut) memcpy(fEtaAccCut,c.fEtaAccCut,fProngs*sizeof(Int_t));
        }
 }
 
@@ -432,8 +450,9 @@ Bool_t AliCFVertexingHF::MCAcceptanceStep() const
                Double_t pt = mcPartDaughter->Pt();
                
                //set values of eta and pt in the constructor.
-               if (TMath::Abs(eta) > 0.9 || pt < 0.1){
-                       AliDebug(3,"At least one daughter has eta>0.9 or pt < 0.1 \n"); 
+               //              if (TMath::Abs(eta) > 0.9 || pt < 0.1){
+               if (TMath::Abs(eta) > fEtaAccCut[iProng] || pt < fPtAccCut[iProng]){
+                       AliDebug(3,Form("At least one daughter has eta or pt outside the required range (|eta| = %f, pt = %f, should be |eta| < %f, pt > %f \n", TMath::Abs(eta), pt, fEtaAccCut[iProng], fPtAccCut[iProng])); 
                        return bMCAccStep;
                }
        }  
@@ -442,7 +461,7 @@ Bool_t AliCFVertexingHF::MCAcceptanceStep() const
        
 }
  //_____________________________________________________
-Bool_t AliCFVertexingHF::MCRefitStep(AliAODEvent *aodEvent, AliESDtrackCuts *trackCuts) const
+Bool_t AliCFVertexingHF::MCRefitStep(AliAODEvent *aodEvent, AliESDtrackCuts **trackCuts) const
 {              
        //
        // check on the kTPCrefit and kITSrefit conditions of the daughters
@@ -467,52 +486,54 @@ Bool_t AliCFVertexingHF::MCRefitStep(AliAODEvent *aodEvent, AliESDtrackCuts *tra
                temp[ilabel] = fLabelArray[ilabel];
        }
 
-       if (trackCuts->GetRequireTPCRefit() || trackCuts->GetRequireITSRefit()){
+       //      if (trackCuts->GetRequireTPCRefit() || trackCuts->GetRequireITSRefit()){
                
-               for(Int_t iaod =0; iaod<aodEvent->GetNumberOfTracks(); iaod++){
-                       AliAODTrack *track = (AliAODTrack*)aodEvent->GetTrack(iaod);
-                       if(track->GetStatus()&AliESDtrack::kITSpureSA) continue;
-                       Bool_t foundTrack = kFALSE;
-                       for (Int_t ilabel = 0; ilabel<fProngs; ilabel++){
-                         AliDebug(3,Form("fLabelArray[%d] = %d, track->GetLabel() = %d",ilabel,fLabelArray[ilabel],TMath::Abs(track->GetLabel())));
-                         if (TMath::Abs(track->GetLabel()) == temp[ilabel]) {
-                           foundTrack = kTRUE;
-                           temp[ilabel] = 0;
-                           break;
-                         }
+       for(Int_t iaod =0; iaod<aodEvent->GetNumberOfTracks(); iaod++){
+               AliAODTrack *track = (AliAODTrack*)aodEvent->GetTrack(iaod);
+               if(track->GetStatus()&AliESDtrack::kITSpureSA) continue;
+               Bool_t foundTrack = kFALSE;
+               Int_t prongindex;
+               for (Int_t ilabel = 0; ilabel<fProngs; ilabel++){
+                       AliDebug(3,Form("fLabelArray[%d] = %d, track->GetLabel() = %d",ilabel,fLabelArray[ilabel],TMath::Abs(track->GetLabel())));
+                       if (TMath::Abs(track->GetLabel()) == temp[ilabel]) {
+                               foundTrack = kTRUE;
+                               temp[ilabel] = 0;
+                               prongindex=ilabel;
+                               break;
                        }
-                       if (foundTrack){
-                         foundDaughters++;
-                         AliDebug(4,Form("daughter %d \n",foundDaughters));
-                         if(trackCuts->GetRequireTPCRefit()){
-                           if(track->GetStatus()&AliESDtrack::kTPCrefit) {
-                             bRefitStep = kTRUE;
-                           }
-                                       else {
-                                               AliDebug(3, "Refit cut not passed , missing TPC refit\n");
-                                               delete [] temp;
-                                               temp = 0x0;
-                                               return kFALSE;
-                                       }
+               }
+               if (foundTrack){
+                       foundDaughters++;
+                       AliDebug(4,Form("daughter %d \n",foundDaughters));
+                       if(trackCuts[prongindex]->GetRequireTPCRefit()){
+                               if(track->GetStatus()&AliESDtrack::kTPCrefit) {
+                                       bRefitStep = kTRUE;
                                }
-                               
-                               if (trackCuts->GetRequireITSRefit()) {
-                                       if(track->GetStatus()&AliESDtrack::kITSrefit){
-                                               bRefitStep = kTRUE;
-                                       }
-                                       else {
-                                               AliDebug(3, "Refit cut not passed , missing ITS refit\n");
-                                               delete [] temp;
-                                               temp = 0x0;
-                                               return kFALSE;
-                                       }
+                               else {
+                                       AliDebug(3, "Refit cut not passed , missing TPC refit\n");
+                                       delete [] temp;
+                                       temp = 0x0;
+                                       return kFALSE;
                                }
-                       }       
-                       if (foundDaughters == fProngs){                         
-                               break;
-                       }                       
-               }    
-       }                                               
+                       }
+                       
+                       if (trackCuts[prongindex]->GetRequireITSRefit()) {
+                               if(track->GetStatus()&AliESDtrack::kITSrefit){
+                                       bRefitStep = kTRUE;
+                               }
+                               else {
+                                       AliDebug(3, "Refit cut not passed , missing ITS refit\n");
+                                       delete [] temp;
+                                       temp = 0x0;
+                                       return kFALSE;
+                               }
+                       }
+               }       
+               if (foundDaughters == fProngs){                         
+                       break;
+               }                       
+       }    
+       //}                                             
        delete [] temp;
        temp = 0x0;
        if (foundDaughters== fProngs)  return bRefitStep;
@@ -587,7 +608,7 @@ Double_t AliCFVertexingHF::GetPtProng(Int_t iProng) const
 
 //____________________________________________________________________
 
-Bool_t AliCFVertexingHF::RecoAcceptStep(AliESDtrackCuts *trackCuts) const
+Bool_t AliCFVertexingHF::RecoAcceptStep(AliESDtrackCuts **trackCuts) const
 {
        //
        // reco Acceptance step
@@ -596,13 +617,13 @@ Bool_t AliCFVertexingHF::RecoAcceptStep(AliESDtrackCuts *trackCuts) const
        Bool_t bRecoAccStep = kFALSE;
        
        Float_t etaCutMin, ptCutMin, etaCutMax, ptCutMax;
-       trackCuts->GetEtaRange(etaCutMin, etaCutMax);
-       trackCuts->GetPtRange(ptCutMin, ptCutMax);
        
        Float_t etaProng=0., ptProng=0.; 
        
        for (Int_t iProng =0; iProng<fProngs; iProng++){
                
+               trackCuts[iProng]->GetEtaRange(etaCutMin, etaCutMax);
+               trackCuts[iProng]->GetPtRange(ptCutMin, ptCutMax);
                etaProng = GetEtaProng(iProng);
                ptProng = GetPtProng(iProng);
                
@@ -707,8 +728,8 @@ Bool_t AliCFVertexingHF::SetLabelArray()
                        }
                        else{
                                AliError("Failed casting the daughter particle, returning a NULL label array");
-                               //delete [] fLabelArray; 
-                               //fLabelArray = 0x0;  
+                               delete [] fLabelArray; 
+                               fLabelArray = 0x0;  
                                return bLabelArray;
                        }
                }
@@ -729,8 +750,8 @@ Bool_t AliCFVertexingHF::SetLabelArray()
                                }
                                else{
                                        AliError("Error while casting particle! returning a NULL array");
-                                       //delete [] fLabelArray; 
-                                       //fLabelArray = 0x0;  
+                                       delete [] fLabelArray; 
+                                       fLabelArray = 0x0;  
                                        return bLabelArray;
                                }
                        }
@@ -751,8 +772,8 @@ Bool_t AliCFVertexingHF::SetLabelArray()
                                        }
                                        else{
                                                AliError("Error while casting resonant daughter! returning a NULL array");
-                                               //delete [] fLabelArray; 
-                                               //fLabelArray = 0x0;  
+                                               delete [] fLabelArray; 
+                                               fLabelArray = 0x0;  
                                                return bLabelArray;
                                        }
                                }
@@ -770,6 +791,74 @@ Bool_t AliCFVertexingHF::SetLabelArray()
                fLabelArray = 0x0;  
                return bLabelArray;
        }
+       SetAccCut();   // setting the pt and eta acceptance cuts
        bLabelArray = kTRUE;
        return bLabelArray;
 }
+
+//___________________________________________________________
+
+void AliCFVertexingHF::SetPtAccCut(Float_t* ptAccCut)
+{
+       //
+       // setting the pt cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs; iP++){
+                       fPtAccCut[iP]=ptAccCut[iP];
+               }
+       }
+       return;
+}              
+
+
+
+//___________________________________________________________
+
+void AliCFVertexingHF::SetEtaAccCut(Float_t* etaAccCut)
+{
+       //
+       // setting the eta cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs; iP++){
+                       fEtaAccCut[iP]=etaAccCut[iP];
+               }
+       }
+       return;
+}      
+//___________________________________________________________
+
+void AliCFVertexingHF::SetAccCut(Float_t* ptAccCut, Float_t* etaAccCut)
+{
+       //
+       // setting the pt and eta cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs; iP++){
+                       fPtAccCut[iP]=ptAccCut[iP];
+                       fEtaAccCut[iP]=etaAccCut[iP];
+               }
+       }
+       return;
+}              
+
+//___________________________________________________________
+
+void AliCFVertexingHF::SetAccCut()
+{
+       //
+       // setting the pt and eta cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs; iP++){
+                       fPtAccCut[iP]=0.1;
+                       fEtaAccCut[iP]=0.9;
+               }
+       }
+       return;
+}              
index ea223153329bdca897c6a12676df7b60680c9c9b..d96f60cafdddb7c17726570efac2a6fe65f1adf1 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef ALICFVERTEXINGHF_H
 #define ALICFVERTEXINGHF_H
 
+
 /**************************************************************************
  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -16,8 +17,6 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */ 
-
 //-----------------------------------------------------------------------
 // Class for HF corrections as a function of many variables and step 
 // Author : C. Zampolli, CERN
@@ -80,7 +79,7 @@ class AliCFVertexingHF : public TObject {
        Bool_t FillMCContainer(Double_t *containerInputMC); 
        Bool_t FillRecoContainer(Double_t *containerInput); 
        Bool_t MCAcceptanceStep() const;
-       Bool_t MCRefitStep(AliAODEvent *aodEvent, AliESDtrackCuts *trackCuts) const;
+       Bool_t MCRefitStep(AliAODEvent *aodEvent, AliESDtrackCuts **trackCuts) const;
        Bool_t RecoStep();
 
        Double_t GetEtaProng(Int_t iProng) const;
@@ -89,11 +88,12 @@ class AliCFVertexingHF : public TObject {
        Double_t GetPtCand() const {return fRecoCandidate->Pt();}
        Double_t GetYCand() const {return fRecoCandidate->Y();}
 
-       Bool_t RecoAcceptStep(AliESDtrackCuts *trackCuts) const;
+       Bool_t RecoAcceptStep(AliESDtrackCuts **trackCuts) const;
        
        Bool_t FillUnfoldingMatrix(Double_t fill[4]) const;
        
        void SetNProngs(Int_t nProngs){fProngs = nProngs;}
+       const Int_t GetNProngs() const {return fProngs;}
        void SetDselection(UShort_t originDselection); 
        UShort_t GetDselection() {return fOriginDselection;}; 
        Int_t CheckReflexion(Char_t isSign);
@@ -101,6 +101,11 @@ class AliCFVertexingHF : public TObject {
 
        void SetCentralityValue(Float_t centValue) {fCentValue = centValue;}
 
+       virtual void SetPtAccCut(Float_t* ptAccCut);
+       virtual void SetEtaAccCut(Float_t* etaAccCut);
+       virtual void SetAccCut(Float_t* ptAccCut, Float_t* etaAccCut);
+       virtual void SetAccCut();
+
        protected:
        
        TClonesArray      *fmcArray;               //mcArray candidate
@@ -121,8 +126,10 @@ class AliCFVertexingHF : public TObject {
        Int_t* fLabelArray;          //[fProngs]  array of labels
 
        Float_t fCentValue;         // centrality value
+       Float_t* fPtAccCut;         //[fProngs] array of pt cut values for the Acceptance (MC+Rec) steps 
+       Float_t* fEtaAccCut;          //[fProngs] array of eta (absolute value) cut values for the Acceptance (MC+Rec) steps 
 
-       ClassDef(AliCFVertexingHF, 3);
+       ClassDef(AliCFVertexingHF, 4);
        
 };
 
index ca883ff41972b82663fb2a8dd9b9d317760f07f7..a0068bcf05c64a5246c8e3209f386ec39b48b8a2 100644 (file)
@@ -13,8 +13,6 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
-
 //-----------------------------------------------------------------------
 // Class for HF corrections as a function of many variables and step 
 // Author : C. Zampolli, CERN
@@ -45,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;
+       }
+
 }
 
 
index 2444195bb64097f94aa9d9689a5bd8519ae67afa..10097d13a94adfdc7ea1313b0332cfb7cfbed428 100644 (file)
@@ -45,6 +45,14 @@ AliCFVertexingHF(),
  {
   // 
   SetNProngs(3);
+
+  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;
+  }
+
 }
 //_________________________________________
 AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t originDselection, Int_t decay):
@@ -54,6 +62,12 @@ AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t o
 {
   //
   SetNProngs(3);
+  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;
+  }
 }
 
 
@@ -455,4 +469,3 @@ Bool_t AliCFVertexingHF3Prong::CheckMCChannelDecay() const
   return checkCD;
   
 }
-
index 4b574022ec52f5dca6cd1bdaa0ae012731631f6b..6c9e16c4e892d3aca11a482192a49afe68bbfa87 100644 (file)
@@ -13,8 +13,6 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
-
 //-----------------------------------------------------------------------
 // Class for HF corrections as a function of many variables and steps
 // For D* and other cascades
@@ -43,6 +41,16 @@ ClassImp(AliCFVertexingHFCascade)
   // standard constructor
 
   SetNProngs(3);
+  fPtAccCut=new Float_t[fProngs];
+  fEtaAccCut=new Float_t[fProngs];
+  // element 0 in the cut arrays corresponds to the soft pion!!!!!!!! Careful when setting the values...
+  fPtAccCut[0]=0.;
+  fEtaAccCut[0]=0.;
+  for(Int_t iP=1; iP<fProngs; iP++){
+         fPtAccCut[iP]=0.1;
+         fEtaAccCut[iP]=0.9;
+  }
+
 }
 
 
@@ -387,6 +395,81 @@ Bool_t AliCFVertexingHFCascade::EvaluateIfD0toKpi(AliAODMCParticle* neutralDaugh
 
 }
 
+//___________________________________________________________
+
+void AliCFVertexingHFCascade::SetPtAccCut(Float_t* ptAccCut)
+{
+       //
+       // setting the pt cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       AliInfo("The 3rd element of the pt cut array will correspond to the cut applied to the soft pion - please check that it is correct");
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs; iP++){
+                       fPtAccCut[iP]=ptAccCut[iP];
+               }
+       }
+       return;
+}              
+
+
+
+//___________________________________________________________
+
+void AliCFVertexingHFCascade::SetEtaAccCut(Float_t* etaAccCut)
+{
+       //
+       // setting the eta cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       AliInfo("The 3rd element of the eta cut array will correspond to the cut applied to the soft pion - please check that it is correct");
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs; iP++){
+                       fEtaAccCut[iP]=etaAccCut[iP];
+               }
+       }
+       return;
+}      
+//___________________________________________________________
+
+void AliCFVertexingHFCascade::SetAccCut(Float_t* ptAccCut, Float_t* etaAccCut)
+{
+       //
+       // setting the pt and eta cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       AliInfo("The 3rd element of the pt and cut array will correspond to the cut applied to the soft pion - please check that they are correct");
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs; iP++){
+                       fPtAccCut[iP]=ptAccCut[iP];
+                       fEtaAccCut[iP]=etaAccCut[iP];
+               }
+       }
+       return;
+}              
+
+//___________________________________________________________
+
+void AliCFVertexingHFCascade::SetAccCut()
+{
+       //
+       // setting the pt and eta cut to be used in the Acceptance steps (MC+Reco)
+       //
+
+       AliAODMCParticle* mcPartDaughter = dynamic_cast<AliAODMCParticle*>(fmcArray->At(2)); // should be the soft pion...  
+       if (TMath::Abs(fLabelArray[0]-fLabelArray[1] != 1) || TMath::Abs(fLabelArray[1]-fLabelArray[2] == 1) || TMath::Abs(fLabelArray[0]-fLabelArray[2] == 1) || TMath::Abs(mcPartDaughter->GetPdgCode())){
+               AliFatal("Apparently the soft pion is not in the third position, causing a crash!!");
+       }
+       if (fProngs>0){
+               for (Int_t iP=0; iP<fProngs-1; iP++){
+                       fPtAccCut[iP]=0.1;
+                       fEtaAccCut[iP]=0.9;
+               }
+               fPtAccCut[3]=0.;  // soft pion
+               fEtaAccCut[3]=0.9;  // soft pion
+       }
+       return;
+}              
 
 
 
index f31cf2619215417fa7dd6436b5237b5962644a0f..aad50d9e3fc29e752e9c88892f891af2fca0a80d 100644 (file)
@@ -16,8 +16,6 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */ 
-
 //-----------------------------------------------------------------------
 // Class for HF corrections as a function of many variables and steps
 // For D* and other cascades
@@ -53,6 +51,11 @@ class AliCFVertexingHFCascade : public AliCFVertexingHF{
   Bool_t SetRecoCandidateParam(AliAODRecoDecayHF *recoCand);
   Bool_t EvaluateIfD0toKpi(AliAODMCParticle* neutralDaugh, Double_t* VectorD0)const;
 
+  void SetPtAccCut(Float_t* ptAccCut);
+  void SetEtaAccCut(Float_t* etaAccCut);
+  void SetAccCut(Float_t* ptAccCut, Float_t* etaAccCut);
+  void SetAccCut();
+
  protected:
   
   
index e89d22245a098eca4c56ea4f9883af2516deee5b..5a7cbf436bf567e61d0a0b5eefc825531f0ccc1e 100644 (file)
@@ -3,8 +3,6 @@
 /* Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id$ */ 
-
 //***********************************************************
 // Class AliRDHFCuts
 // base class for cuts on AOD reconstructed heavy-flavour decays
@@ -91,6 +89,7 @@ class AliRDHFCuts : public AliAnalysisCuts
   Float_t GetCentrality(AliAODEvent* aodEvent, AliRDHFCuts::ECentrality estimator) const;
   Bool_t  *GetIsUpperCut() const {return fIsUpperCut;}
   AliESDtrackCuts *GetTrackCuts() const {return fTrackCuts;}
+  virtual AliESDtrackCuts *GetTrackCutsSoftPi() const {return 0;}
   virtual void GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) = 0;
   Int_t   GetGlobalIndex(Int_t iVar,Int_t iPtBin) const;
   void    GetVarPtIndex(Int_t iGlob, Int_t& iVar, Int_t& iPtBin) const;
index d861c2517952bd530b371bbe9a591a0b1ffecd42..430d45061ae3e8871272b697cfc811b15d106f23 100644 (file)
@@ -3,8 +3,6 @@
 /* Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id$ */ 
-
 //***********************************************************
 // Class AliRDHFCutsDStartoKpipi
 // class for cuts on AOD reconstructed DStar->Kpipi
@@ -44,7 +42,7 @@ class AliRDHFCutsDStartoKpipi : public AliRDHFCuts
 
   void AddTrackCutsSoftPi(const AliESDtrackCuts *cuts) 
      {fTrackCutsSoftPi=new AliESDtrackCuts(*cuts); return;}
-  AliESDtrackCuts *GetTrackCutsSoftPi() const {return fTrackCutsSoftPi;}
+  virtual AliESDtrackCuts *GetTrackCutsSoftPi() const {return fTrackCutsSoftPi;}
 
  protected: