]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Remove warining on candidate rapidity + fix in Lc->V0+bachelor efficiency + modificat...
authorfprino <fprino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Mar 2013 12:34:59 +0000 (12:34 +0000)
committerfprino <fprino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Mar 2013 12:34:59 +0000 (12:34 +0000)
PWGHF/vertexingHF/AliCFTaskVertexingHF.cxx
PWGHF/vertexingHF/AliCFTaskVertexingHF.h
PWGHF/vertexingHF/AliCFVertexingHF.cxx
PWGHF/vertexingHF/AliCFVertexingHF.h
PWGHF/vertexingHF/AliRDHFCuts.h

index 08ab0dcfb6c96992f381214d51ea31e7ae8ae866..f1a64250bc4c0a1f50394efca18ad5dc010577f9 100644 (file)
@@ -121,7 +121,8 @@ AliCFTaskVertexingHF::AliCFTaskVertexingHF() :
   fResonantDecay(0),
   fLctoV0bachelorOption(1),
   fGenLctoV0bachelorOption(0),
-  fUseSelectionBit(kTRUE)
+  fUseSelectionBit(kTRUE),
+  fPDGcode(0)
 {
   //
   //Default ctor
@@ -170,7 +171,8 @@ AliCFTaskVertexingHF::AliCFTaskVertexingHF(const Char_t* name, AliRDHFCuts* cuts
   fResonantDecay(0),
   fLctoV0bachelorOption(1),
   fGenLctoV0bachelorOption(0),
-  fUseSelectionBit(kTRUE)
+  fUseSelectionBit(kTRUE),
+  fPDGcode(0)
 {
   //
   // Constructor. Initialization of Inputs and Outputs
@@ -248,7 +250,8 @@ AliCFTaskVertexingHF::AliCFTaskVertexingHF(const AliCFTaskVertexingHF& c) :
   fResonantDecay(c.fResonantDecay),
   fLctoV0bachelorOption(c.fLctoV0bachelorOption),
   fGenLctoV0bachelorOption(c.fGenLctoV0bachelorOption),
-  fUseSelectionBit(c.fUseSelectionBit)
+  fUseSelectionBit(c.fUseSelectionBit),
+  fPDGcode(c.fPDGcode)
 {
   //
   // Copy Constructor
@@ -291,6 +294,7 @@ void AliCFTaskVertexingHF::Init()
 
   switch (fDecayChannel){
   case 2:{
+    fPDGcode = 421;
     copyfCuts = new AliRDHFCutsD0toKpi(*(static_cast<AliRDHFCutsD0toKpi*>(fCuts)));
     switch (fConfiguration) {
     case kSnail:  // slow configuration: all variables in
@@ -305,6 +309,7 @@ void AliCFTaskVertexingHF::Init()
     break;
   }
   case 21:{ 
+    fPDGcode = 413;
     copyfCuts = new AliRDHFCutsDStartoKpipi(*(static_cast<AliRDHFCutsDStartoKpipi*>(fCuts)));
     switch (fConfiguration) {
     case kSnail:  // slow configuration: all variables in
@@ -319,6 +324,7 @@ void AliCFTaskVertexingHF::Init()
     break;
   }
   case 22:{
+    fPDGcode = 4122;
     copyfCuts = new AliRDHFCutsLctoV0(*(static_cast<AliRDHFCutsLctoV0*>(fCuts)));
     switch (fConfiguration) {
     case kSnail:  // slow configuration: all variables in
@@ -333,6 +339,7 @@ void AliCFTaskVertexingHF::Init()
     break;
   }
   case 31:{
+    fPDGcode = 411;
     copyfCuts = new AliRDHFCutsDplustoKpipi(*(static_cast<AliRDHFCutsDplustoKpipi*>(fCuts)));
     switch (fConfiguration) {
     case kSnail:  // slow configuration: all variables in
@@ -347,6 +354,7 @@ void AliCFTaskVertexingHF::Init()
     break;
   }
   case 32:{
+    fPDGcode = 4122;
     copyfCuts = new AliRDHFCutsLctopKpi(*(static_cast<AliRDHFCutsLctopKpi*>(fCuts)));
     switch (fConfiguration) {
     case kSnail:  // slow configuration: all variables in
@@ -361,6 +369,7 @@ void AliCFTaskVertexingHF::Init()
     break;
   }
   case 33:{
+    fPDGcode = 431;
     copyfCuts = new AliRDHFCutsDstoKKpi(*(static_cast<AliRDHFCutsDstoKKpi*>(fCuts)));
     switch (fConfiguration) {
     case kSnail:  // slow configuration: all variables in
@@ -375,6 +384,7 @@ void AliCFTaskVertexingHF::Init()
     break;
   }
   case 4:{
+    fPDGcode = 421;
     copyfCuts = new AliRDHFCutsD0toKpipipi(*(static_cast<AliRDHFCutsD0toKpipipi*>(fCuts)));
     switch (fConfiguration) {
     case kSnail:  // slow configuration: all variables in
@@ -663,6 +673,10 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
       AliError("Failed casting particle from MC array!, Skipping particle");
       continue;
     }
+
+    //counting c quarks
+    cquarks += cfVtxHF->MCcquarkCounting(mcPart);
+
     // check the MC-level cuts, must be the desidered particle
     if (!fCFManager->CheckParticleCuts(0, mcPart)) {
       AliDebug(2,"Check the MC-level cuts - not desidered particle");
@@ -670,8 +684,6 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
     }
     cfVtxHF->SetMCCandidateParam(iPart);
         
-    //counting c quarks
-    cquarks += cfVtxHF->MCcquarkCounting(mcPart);
          
     if (!(cfVtxHF->SetLabelArray())){
       AliDebug(2,Form("Impossible to set the label array (decaychannel = %d)",fDecayChannel));
@@ -867,7 +879,7 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
                                  
          if(fAcceptanceUnf){
            Double_t fill[4]; //fill response matrix
-           Bool_t bUnfolding = cfVtxHF -> FillUnfoldingMatrix(fill);
+           Bool_t bUnfolding = cfVtxHF -> FillUnfoldingMatrix(fPDGcode,fill);
            if (bUnfolding) fCorrelation->Fill(fill);
          }
                                        
@@ -911,8 +923,8 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
                Bool_t keepDs=ProcessDs(recoPidSelection);
                if(keepDs) recoPidSelection=3;                                                    
              } else if (fDecayChannel==22){ // Lc->V0+bachelor case, where more possibilities are considered
-               Bool_t keepLctoV0bachelor=ProcessLctoV0Bachelor(recoAnalysisCuts);
-               if (keepLctoV0bachelor) recoAnalysisCuts=3;
+               Bool_t keepLctoV0bachelor=ProcessLctoV0Bachelor(recoPidSelection);
+               if (keepLctoV0bachelor) recoPidSelection=3;
              }
 
              Bool_t tempPid=(recoPidSelection == 3 || recoPidSelection == isPartOrAntipart);
@@ -924,7 +936,7 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
                AliDebug(3,"Reco PID cuts passed and container filled \n");
                if(!fAcceptanceUnf){
                  Double_t fill[4]; //fill response matrix
-                 Bool_t bUnfolding = cfVtxHF -> FillUnfoldingMatrix(fill);
+                 Bool_t bUnfolding = cfVtxHF -> FillUnfoldingMatrix(fPDGcode,fill);
                  if (bUnfolding) fCorrelation->Fill(fill);
                }
              }
index 3f43649a4220746545bfe66142f789c6b7d7afc8..9e213b561f57fb5553f7a39fe24bd4f70cca2f74 100644 (file)
@@ -218,8 +218,9 @@ protected:
        Int_t fLctoV0bachelorOption; // Lc->V0+bachelor decay option (selection level)
        Int_t fGenLctoV0bachelorOption; // Lc->V0+bachelor decay option (generation level)
        Bool_t fUseSelectionBit;     // flag to use selection bit
+       UInt_t fPDGcode; // PDG code
 
-       ClassDef(AliCFTaskVertexingHF,14); // class for HF corrections as a function of many variables
+       ClassDef(AliCFTaskVertexingHF,15); // class for HF corrections as a function of many variables
 };
 
 #endif
index 5bcc8dfe29b16215e2f758a26b3878454e5c7232..86a4e03beebd18cbf78e05b52af034bde5ed7232 100644 (file)
@@ -377,7 +377,7 @@ Bool_t AliCFVertexingHF::CheckMCDaughters()const
        Int_t label0 = fmcPartCandidate->GetDaughter(0);
        Int_t label1 = fmcPartCandidate->GetDaughter(1);
        AliDebug(3,Form("label0 = %d, label1 = %d",label0,label1));
-       if (label1==0 || label0 == 0){
+       if (label1<=0 || label0 <= 0){
                AliDebug(2, Form("The MC particle doesn't have correct daughters, skipping!!"));
                return checkDaughters;  
        }
@@ -477,7 +477,7 @@ Bool_t AliCFVertexingHF::MCAcceptanceStep() const
        AliAODMCParticle *mcPartDaughter;
        Int_t label0 = fmcPartCandidate->GetDaughter(0);
        Int_t label1 = fmcPartCandidate->GetDaughter(1);
-       if (label1==0 || label0 == 0){
+       if (label1<=0 || label0 <= 0){
                AliDebug(2, Form("The MC particle doesn't have correct daughters, skipping!!"));
                return bMCAccStep;  
        }
@@ -517,7 +517,7 @@ Bool_t AliCFVertexingHF::MCRefitStep(AliAODEvent *aodEvent, AliESDtrackCuts **tr
        Int_t label0 = fmcPartCandidate->GetDaughter(0);
        Int_t label1 = fmcPartCandidate->GetDaughter(1);
        
-       if (label1==0 || label0 == 0){
+       if (label1<=0 || label0 <= 0){
                AliDebug(2, Form("The MC particle doesn't have correct daughters, skipping!!"));
                return bRefitStep;  
        }
@@ -692,7 +692,7 @@ Bool_t AliCFVertexingHF::RecoAcceptStep(AliESDtrackCuts **trackCuts) const
 }
 //___________________________________________________________
 
-Bool_t AliCFVertexingHF::FillUnfoldingMatrix(Double_t fill[4]) const
+Bool_t AliCFVertexingHF::FillUnfoldingMatrix(UInt_t pdg, Double_t fill[4]) const
 {
        //
        // filling the unfolding matrix
@@ -701,7 +701,7 @@ Bool_t AliCFVertexingHF::FillUnfoldingMatrix(Double_t fill[4]) const
        if(fmcPartCandidate){
                
                fill[0] = GetPtCand();
-               fill[1] = GetYCand();
+               fill[1] = GetYCand(pdg);
                
                fill[2] =  fmcPartCandidate->Pt(); 
                fill[3] =  fmcPartCandidate->Y(); 
@@ -766,7 +766,7 @@ Bool_t AliCFVertexingHF::SetLabelArray()
        Int_t label0 = fmcPartCandidate->GetDaughter(0);
        Int_t label1 = fmcPartCandidate->GetDaughter(1);
        AliDebug(2,Form("label0 = %d, label1 = %d",label0,label1));
-       if (label1==0 || label0 == 0){
+       if (label1<=0 || label0 <= 0){
                AliDebug(2, Form("The MC particle doesn't have correct daughters, skipping!!"));
                delete [] fLabelArray; 
                fLabelArray = 0x0;  
index 0490d8c3f080767b6a902ef9776d7e495c47fed5..a727d4be5b597965070aa256cad4b6be299d7bd2 100644 (file)
@@ -86,18 +86,18 @@ class AliCFVertexingHF : public TObject {
        virtual Double_t GetPtProng(Int_t iProng) const;
 
        Double_t GetPtCand() const {return fRecoCandidate->Pt();}
-       Double_t GetYCand() const {return fRecoCandidate->Y();}
+       Double_t GetYCand(UInt_t pdg) const {return fRecoCandidate->Y(pdg);}
 
        Bool_t RecoAcceptStep(AliESDtrackCuts **trackCuts) const;
        
-       Bool_t FillUnfoldingMatrix(Double_t fill[4]) const;
+       Bool_t FillUnfoldingMatrix(UInt_t pdg, Double_t fill[4]) const;
        
        void SetNProngs(Int_t nProngs){fProngs = nProngs;}
        Int_t GetNProngs() const {return fProngs;}
        void SetDselection(UShort_t originDselection); 
        UShort_t GetDselection() {return fOriginDselection;}; 
        Int_t CheckReflexion(Char_t isSign);
-       Bool_t SetLabelArray();
+       virtual Bool_t SetLabelArray();
 
        void SetCentralityValue(Float_t centValue) {fCentValue = centValue;}
 
index 6aa9fcb8f74df6197d1969d4986dc79ad3a6a7ae..ffbdbead64028e7121b8ccf6b22f77c2e99b0911 100644 (file)
@@ -206,7 +206,7 @@ class AliRDHFCuts : public AliAnalysisCuts
   virtual Int_t IsSelected(TObject* obj,Int_t selectionLevel,AliAODEvent* /*aod*/)
                 {return IsSelected(obj,selectionLevel);}
   Int_t PtBin(Double_t pt) const;
-  void PrintAll()const;
+  virtual void PrintAll()const;
   void PrintTrigger() const;
 
   virtual Bool_t IsInFiducialAcceptance(Double_t /*pt*/,Double_t /*y*/) const {return kTRUE;}