Switches for SPD vertex and filter bit cut
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Jul 2012 21:57:40 +0000 (21:57 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Jul 2012 21:57:40 +0000 (21:57 +0000)
PWGHF/vertexingHF/AliRDHFCuts.cxx
PWGHF/vertexingHF/AliRDHFCuts.h
PWGHF/vertexingHF/AliRDHFCutsD0toKpi.cxx
PWGHF/vertexingHF/AliRDHFCutsD0toKpipipi.cxx
PWGHF/vertexingHF/AliRDHFCutsDStartoKpipi.cxx
PWGHF/vertexingHF/AliRDHFCutsDplustoKpipi.cxx
PWGHF/vertexingHF/AliRDHFCutsDstoKKpi.cxx
PWGHF/vertexingHF/AliRDHFCutsJpsitoee.cxx
PWGHF/vertexingHF/AliRDHFCutsLctopKpi.cxx

index a83ef80..43d9584 100644 (file)
@@ -96,7 +96,9 @@ fMaxPtCandTrackSPDFirst(0.),
 fApplySPDDeadPbPb2011(kFALSE),
 fRemoveTrackletOutliers(kFALSE),
 fCutOnzVertexSPD(0),
-fKinkReject(kFALSE)
+fKinkReject(kFALSE),
+fUseTrackSelectionWithFilterBits(kTRUE),
+fUseEventsWithOnlySPDVertex(kFALSE)
 {
   //
   // Default Constructor
@@ -151,7 +153,9 @@ AliRDHFCuts::AliRDHFCuts(const AliRDHFCuts &source) :
   fApplySPDDeadPbPb2011(source.fApplySPDDeadPbPb2011),
   fRemoveTrackletOutliers(source.fRemoveTrackletOutliers),
   fCutOnzVertexSPD(source.fCutOnzVertexSPD),
-  fKinkReject(source.fKinkReject)
+  fKinkReject(source.fKinkReject),
+  fUseTrackSelectionWithFilterBits(source.fUseTrackSelectionWithFilterBits),
+  fUseEventsWithOnlySPDVertex(source.fUseEventsWithOnlySPDVertex)
 {
   //
   // Copy constructor
@@ -220,6 +224,8 @@ AliRDHFCuts &AliRDHFCuts::operator=(const AliRDHFCuts &source)
   fRemoveTrackletOutliers=source.fRemoveTrackletOutliers;
   fCutOnzVertexSPD=source.fCutOnzVertexSPD;
   fKinkReject=source.fKinkReject;
+  fUseTrackSelectionWithFilterBits=source.fUseTrackSelectionWithFilterBits;
+  fUseEventsWithOnlySPDVertex=source.fUseEventsWithOnlySPDVertex;
 
   if(source.GetTrackCuts()) {delete fTrackCuts; fTrackCuts=new AliESDtrackCuts(*(source.GetTrackCuts()));}
   if(source.fPtBinLimits) SetPtBins(source.fnPtBinLimits,source.fPtBinLimits);
@@ -381,13 +387,15 @@ Bool_t AliRDHFCuts::IsEventSelected(AliVEvent *event) {
     fEvRejectionBits+=1<<kNoVertex;
   }else{
     TString title=vertex->GetTitle();
-    if(title.Contains("Z") && fMinVtxType>1){
-      accept=kFALSE;
-      fEvRejectionBits+=1<<kNoVertex;
-    }
-    else if(title.Contains("3D") && fMinVtxType>2){
-      accept=kFALSE;
-      fEvRejectionBits+=1<<kNoVertex;
+    if(!fUseEventsWithOnlySPDVertex){
+      if(title.Contains("Z") && fMinVtxType>1){
+       accept=kFALSE;
+       fEvRejectionBits+=1<<kNoVertex;
+      }
+      else if(title.Contains("3D") && fMinVtxType>2){
+       accept=kFALSE;
+       fEvRejectionBits+=1<<kNoVertex;
+      }
     }
     if(vertex->GetNContributors()<fMinVtxContr){
       accept=kFALSE;
index 821da04..f597047 100644 (file)
@@ -119,6 +119,10 @@ class AliRDHFCuts : public AliAnalysisCuts
   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 SetUseEventsWithOnlySPDVertex(Bool_t flag=kTRUE){ 
+    fUseEventsWithOnlySPDVertex=flag; return;}
+  void SetUseTrackSelectionWithFilterBits(Bool_t flag=kTRUE){ 
+    fUseTrackSelectionWithFilterBits=flag; return;}
   void SetUseCentrality(Int_t flag=1);    // see enum below
   void SetPidHF(AliAODPidHF* pidObj) {
     if(fPidHF) delete fPidHF;
@@ -163,6 +167,8 @@ class AliRDHFCuts : public AliAnalysisCuts
   Bool_t  GetIsUsePID() const {return fUsePID;}
   Bool_t  GetUseAOD049() const {return fUseAOD049;}
   Bool_t  GetUseKinkRejection() const {return fKinkReject;}
+  Bool_t  GetUseEventsWithOnlySPDVertex() const{return fUseEventsWithOnlySPDVertex;}
+  Bool_t  GetUseTrackSelectionWithFilterBits() const{return fUseTrackSelectionWithFilterBits;}
   Bool_t  GetIsPrimaryWithoutDaughters() const {return fRemoveDaughtersFromPrimary;}
   Bool_t GetOptPileUp() const {return fOptPileup;}
   Int_t GetUseCentrality() const {return fUseCentrality;}
@@ -305,8 +311,10 @@ class AliRDHFCuts : public AliAnalysisCuts
   Bool_t fRemoveTrackletOutliers; // flag to apply cut on tracklets vs. centrality for 2011 data
   Int_t fCutOnzVertexSPD; // cut on zSPD vertex to remove outliers in centrality vs. tracklets (0=no cut, 1= cut at 12 cm, 2= cut on difference to z of vtx tracks
   Bool_t fKinkReject; // flag to reject kink daughters
+  Bool_t fUseTrackSelectionWithFilterBits; // flag to enable/disable the check on filter bits
+  Bool_t fUseEventsWithOnlySPDVertex; // flag to enable/disable the usage of events with only SPD vertex
 
-  ClassDef(AliRDHFCuts,25);  // base class for cuts on AOD reconstructed heavy-flavour decays
+  ClassDef(AliRDHFCuts,26);  // base class for cuts on AOD reconstructed heavy-flavour decays
 };
 
 #endif
index 3458a2d..552ab97 100644 (file)
@@ -262,7 +262,7 @@ Int_t AliRDHFCutsD0toKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEve
   if(ptD<fMinPtCand) return 0;
   if(ptD>fMaxPtCand) return 0;
 
-  if(d->HasBadDaughters()) return 0;
+  if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
 
   // returnvalue: 0 not sel, 1 only D0, 2 only D0bar, 3 both
   Int_t returnvaluePID=3;
index 1692704..dd6db6a 100644 (file)
@@ -207,7 +207,7 @@ Int_t AliRDHFCutsD0toKpipipi::IsSelected(TObject* obj,Int_t selectionLevel) {
   if(ptD<fMinPtCand) return 0;
   if(ptD>fMaxPtCand) return 0;
 
-  if(d->HasBadDaughters()) return 0;  
+  if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;  
 
   // selection on daughter tracks 
   if(selectionLevel==AliRDHFCuts::kAll || 
index 8dfe889..12588c6 100644 (file)
@@ -283,7 +283,7 @@ Int_t AliRDHFCutsDStartoKpipi::IsSelected(TObject* obj,Int_t selectionLevel) {
     return 0;
   }
 
-  if(dd->HasBadDaughters()) return 0;
+  if(fUseTrackSelectionWithFilterBits && dd->HasBadDaughters()) return 0;
 
   AliAODTrack *b = (AliAODTrack*)d->GetBachelor();
   if(fTrackCutsSoftPi && fTrackCutsSoftPi->GetRequireTPCRefit()){
index 585c37d..4bf0a5b 100644 (file)
@@ -402,7 +402,7 @@ Int_t AliRDHFCutsDplustoKpipi::IsSelected(TObject* obj,Int_t selectionLevel, Ali
   if(pt<fMinPtCand) return 0;
   if(pt>fMaxPtCand) return 0;
 
-  if(d->HasBadDaughters()) return 0;
+  if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
   
   // selection on candidate
   if(selectionLevel==AliRDHFCuts::kAll || 
index dd86c11..0bc3364 100644 (file)
@@ -473,7 +473,7 @@ Int_t AliRDHFCutsDstoKKpi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODE
   if(ptD<fMinPtCand) return 0;
   if(ptD>fMaxPtCand) return 0;
 
-  if(d->HasBadDaughters()) return 0;
+  if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
   
 
   // selection on daughter tracks 
index 58c213b..5673bdd 100644 (file)
@@ -170,7 +170,7 @@ Int_t AliRDHFCutsJpsitoee::IsSelected(TObject* obj,Int_t selectionLevel) {
     return 0;
   }
 
-  if(d->HasBadDaughters()) return 0;
+  if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
 
 
   // selection on daughter tracks 
index a244d8d..8c74afc 100644 (file)
@@ -273,7 +273,7 @@ Int_t AliRDHFCutsLctopKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEv
   if(d->Pt()<fMinPtCand) return 0;
   if(d->Pt()>fMaxPtCand) return 0;
 
-  if(d->HasBadDaughters()) return 0;
+  if(fUseTrackSelectionWithFilterBits && d->HasBadDaughters()) return 0;
 
   if(selectionLevel==AliRDHFCuts::kAll ||
      selectionLevel==AliRDHFCuts::kCandidate||