]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
possibility to cut on the pt of candidate (Rossella)
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Feb 2011 17:51:39 +0000 (17:51 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Feb 2011 17:51:39 +0000 (17:51 +0000)
PWG3/vertexingHF/AliRDHFCuts.cxx
PWG3/vertexingHF/AliRDHFCuts.h
PWG3/vertexingHF/AliRDHFCutsD0toKpi.cxx
PWG3/vertexingHF/AliRDHFCutsLctopKpi.cxx
PWG3/vertexingHF/macros/AddTaskLambdac.C
PWG3/vertexingHF/macros/makeTFile4CutsLctopKpi.C

index 2fc2a82a32c79f91a0cf779a24964ee2c16fe54e..45065988e8b718503940383e3ad02c67f95cd7cd 100644 (file)
@@ -70,7 +70,9 @@ fMinCentrality(0.),
 fMaxCentrality(100.),
 fFixRefs(kFALSE),
 fIsSelectedCuts(0),
-fIsSelectedPID(0)
+fIsSelectedPID(0),
+fMinPtCand(-1.),
+fMaxPtCand(100000.)
 {
   //
   // Default Constructor
@@ -108,7 +110,9 @@ AliRDHFCuts::AliRDHFCuts(const AliRDHFCuts &source) :
   fMaxCentrality(source.fMaxCentrality),
   fFixRefs(source.fFixRefs),
   fIsSelectedCuts(source.fIsSelectedCuts),
-  fIsSelectedPID(source.fIsSelectedPID)
+  fIsSelectedPID(source.fIsSelectedPID),
+  fMinPtCand(source.fMinPtCand),
+  fMaxPtCand(source.fMaxPtCand)
 {
   //
   // Copy constructor
@@ -156,6 +160,8 @@ AliRDHFCuts &AliRDHFCuts::operator=(const AliRDHFCuts &source)
   fFixRefs=source.fFixRefs;
   fIsSelectedCuts=source.fIsSelectedCuts;
   fIsSelectedPID=source.fIsSelectedPID;
+  fMinPtCand=source.fMinPtCand;
+  fMaxPtCand=source.fMaxPtCand;
 
   if(source.GetTrackCuts()) AddTrackCuts(source.GetTrackCuts());
   if(source.fPtBinLimits) SetPtBins(source.fnPtBinLimits,source.fPtBinLimits);
index 0cb9fa5686c2ef96d93c774daa8c37905d47e860..037093de3f0883335ca3acba18ec563bb9bf10fc 100644 (file)
@@ -62,6 +62,8 @@ class AliRDHFCuts : public AliAnalysisCuts
     fPidHF=new AliAODPidHF(*pidObj);
   }
   void SetRemoveDaughtersFromPrim(Bool_t removeDaughtersPrim) {fRemoveDaughtersFromPrimary=removeDaughtersPrim;}
+  void SetMinPtCandidate(Double_t ptCand=-1.) {fMinPtCand=ptCand; return;}
+  void SetMaxPtCandidate(Double_t ptCand=1000.) {fMaxPtCand=ptCand; return;}
   void SetOptPileup(Int_t opt=0){
     // see enum below
     fOptPileup=opt;
@@ -95,6 +97,8 @@ class AliRDHFCuts : public AliAnalysisCuts
   Int_t GetUseCentrality() const {return fUseCentrality;}
   Float_t GetMinCentrality() const {return fMinCentrality;}
   Float_t GetMaxCentrality() const {return fMaxCentrality;}
+  Double_t GetMinPtCandidate() const {return fMinPtCand;}
+  Double_t GetMaxPtCandidate() const {return fMaxPtCand;}
   Bool_t IsSelected(TObject *obj) {return IsSelected(obj,AliRDHFCuts::kAll);}
   Bool_t IsSelected(TList *list) {if(!list) return kTRUE; return kFALSE;}
   Int_t  IsEventSelectedInCentrality(AliVEvent *event);
@@ -167,8 +171,10 @@ class AliRDHFCuts : public AliAnalysisCuts
   Bool_t  fFixRefs;       // fix the daughter track references 
   Int_t  fIsSelectedCuts; // outcome of cuts selection
   Int_t  fIsSelectedPID;  // outcome of PID selection
+  Double_t fMinPtCand; // minimum pt of the candidate
+  Double_t fMaxPtCand; // minimum pt of the candidate
 
-  ClassDef(AliRDHFCuts,10);  // base class for cuts on AOD reconstructed heavy-flavour decays
+  ClassDef(AliRDHFCuts,11);  // base class for cuts on AOD reconstructed heavy-flavour decays
 };
 
 #endif
index 9f720b4f4cbd19fa12bc0db03cd41e5145908448..35f1e482b0a1b3e9906df830e7e9ad271bae39fa 100644 (file)
@@ -197,7 +197,8 @@ Int_t AliRDHFCutsD0toKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEve
   //
   // Apply selection
   //
-  
+
   fIsSelectedCuts=0;
   fIsSelectedPID=0;
 
@@ -213,6 +214,9 @@ Int_t AliRDHFCutsD0toKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEve
     return 0;
   }
 
+  Double_t ptD=d->Pt();
+  if(ptD<fMinPtCand) return 0;
+  if(ptD>fMaxPtCand) return 0;
  
   // returnvalue: 0 not sel, 1 only D0, 2 only D0bar, 3 both
   Int_t returnvaluePID=3;
index 52700e084c601ec54537695b3d365d45427cfb1a..55b0355147787cb8b94f3621247830d3df2f80c0 100644 (file)
@@ -237,6 +237,8 @@ Int_t AliRDHFCutsLctopKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEv
   Int_t returnvalue=3;
   Int_t returnvaluePID=3;
 
+  if(d->Pt()<fMinPtCand) return 0;
+  if(d->Pt()>fMaxPtCand) return 0;
 
   // selection on candidate
   if(selectionLevel==AliRDHFCuts::kAll || 
@@ -353,6 +355,7 @@ Int_t AliRDHFCutsLctopKpi::IsSelectedPID(AliAODRecoDecayHF* obj) {
        iskaon1=kTRUE;
       if(fPidHF->MakeRawPid(track,2)>=1) iskaon1=kFALSE;
       }
+      if(!iskaon1) return 0;
      
      }else{
      //pion or proton
@@ -373,6 +376,7 @@ Int_t AliRDHFCutsLctopKpi::IsSelectedPID(AliAODRecoDecayHF* obj) {
       if(isProton>=1) isproton0=kTRUE;
 
      }
+      if(!ispion0 && !isproton0) return 0;
      if(i==2) {
       if(isPion<0) ispion2=kFALSE;
       if(isProton>=1) isproton2=kTRUE;
index a147361e787cd81f00c5882e7560a61520352cb8..e1e5618d8c141b7ffe0b2b0749ca650c11d9d30d 100644 (file)
@@ -18,11 +18,15 @@ AliAnalysisTaskSELambdac *AddTaskLambdac(TString *finname,Bool_t storeNtuple,Boo
   if(stdcuts) prodcuts->SetStandardCutsPP2010();
   else   prodcuts = (AliRDHFCutsLctopKpi*)filecuts->Get("LctopKpiProdCuts");
   prodcuts->SetName("LctopKpiProdCuts");
+  prodcuts->SetMinPtCandidate(-1.);
+  prodcuts->SetMaxPtCandidate(10000.);
 
   AliRDHFCutsLctopKpi *analysiscuts = new AliRDHFCutsLctopKpi();
   if(stdcuts) analysiscuts->SetStandardCutsPP2010();
   else analysiscuts = (AliRDHFCutsLctopKpi*)filecuts->Get("LctopKpiAnalysisCuts");
   analysiscuts->SetName("LctopKpiAnalysisCuts");
+  analysiscuts->SetMinPtCandidate(-1.);
+  analysiscuts->SetMaxPtCandidate(10000.);
 
   // Aanalysis task                                                                                                                     
   AliAnalysisTaskSELambdac *lambdacTask = new AliAnalysisTaskSELambdac("LambdacAnalysis",storeNtuple,analysiscuts,prodcuts);
index 1866480e2e9ebe4642e1f2dfef8407dd01fad790..59fc24a8e0547c83cee09920543021891208ec9c 100644 (file)
@@ -166,6 +166,10 @@ void makeInputAliAnalysisTaskSELctopKpi(){
   if(pidflag) cout<<"PID is used"<<endl;
   else cout<<"PID is not used"<<endl;
 
+  RDHFLctopKpiProd->SetMinPtCandidate(-1.);
+  RDHFLctopKpiAn->SetMinPtCandidate(-1.);
+  RDHFLctopKpiProd->SetMaxPtCandidate(10000.);
+  RDHFLctopKpiAn->SetMaxPtCandidate(10000.);
   cout<<"This is the object I'm going to save:"<<endl;
   RDHFLctopKpiProd->PrintAll();
   RDHFLctopKpiAn->PrintAll();