enable keyword substitution, remove deprecated LinkDef file
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 May 2012 09:07:57 +0000 (09:07 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 May 2012 09:07:57 +0000 (09:07 +0000)
PWGHF/PWGHFcorrelationHFLinkDef.h [deleted file]
PWGHF/vertexingHF/AliRDHFCuts.cxx
PWGHF/vertexingHF/AliRDHFCuts.h
PWGHF/vertexingHF/charmFlow/AliAnalysisTaskFlowD2H.cxx

diff --git a/PWGHF/PWGHFcorrelationHFLinkDef.h b/PWGHF/PWGHFcorrelationHFLinkDef.h
deleted file mode 100644 (file)
index da44b5f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifdef __CINT__
-
-#pragma link off all globals;
-#pragma link off all classes;
-#pragma link off all functions;
-
-
-#pragma link C++ class AliDxHFEParticleSelection+;
-#pragma link C++ class AliDxHFEParticleSelectionEl+;
-#pragma link C++ class AliDxHFEParticleSelectionD0+;
-#pragma link C++ class AliDxHFECorrelation+;
-#pragma link C++ class AliAnalysisTaskDxHFEParticleSelection+;
-#pragma link C++ class AliAnalysisTaskDxHFECorrelation+;
-
-
-#endif
index 2b92869..0051430 100644 (file)
@@ -90,7 +90,9 @@ fMinPtCand(-1.),
 fMaxPtCand(100000.),
 fKeepSignalMC(kFALSE),
 fIsCandTrackSPDFirst(kFALSE),
-fMaxPtCandTrackSPDFirst(0.)
+fMaxPtCandTrackSPDFirst(0.),
+fApplySPDDeadPbPb2011(kFALSE),
+fRemoveTrackletOutliers(kFALSE)
 {
   //
   // Default Constructor
@@ -140,7 +142,9 @@ AliRDHFCuts::AliRDHFCuts(const AliRDHFCuts &source) :
   fMaxPtCand(source.fMaxPtCand),
   fKeepSignalMC(source.fKeepSignalMC),
   fIsCandTrackSPDFirst(source.fIsCandTrackSPDFirst),
-  fMaxPtCandTrackSPDFirst(source.fMaxPtCandTrackSPDFirst)
+  fMaxPtCandTrackSPDFirst(source.fMaxPtCandTrackSPDFirst),
+  fApplySPDDeadPbPb2011(source.fApplySPDDeadPbPb2011),
+  fRemoveTrackletOutliers(source.fRemoveTrackletOutliers)
 {
   //
   // Copy constructor
@@ -202,6 +206,8 @@ AliRDHFCuts &AliRDHFCuts::operator=(const AliRDHFCuts &source)
   fKeepSignalMC=source.fKeepSignalMC;
   fIsCandTrackSPDFirst=source.fIsCandTrackSPDFirst;
   fMaxPtCandTrackSPDFirst=source.fMaxPtCandTrackSPDFirst;
+  fApplySPDDeadPbPb2011=source.fApplySPDDeadPbPb2011;
+  fRemoveTrackletOutliers=source.fRemoveTrackletOutliers;
 
   if(source.GetTrackCuts()) {delete fTrackCuts; fTrackCuts=new AliESDtrackCuts(*(source.GetTrackCuts()));}
   if(source.fPtBinLimits) SetPtBins(source.fnPtBinLimits,source.fPtBinLimits);
@@ -391,6 +397,17 @@ Bool_t AliRDHFCuts::IsEventSelected(AliVEvent *event) {
     }
   }
 
+  if(fRemoveTrackletOutliers){
+    Double_t v0cent=GetCentrality((AliAODEvent*)event,kCentV0M);
+    Double_t ntracklets=((AliAODEvent*)event)->GetTracklets()->GetNumberOfTracklets();
+    Double_t cutval=60.-0.08*ntracklets+1./50000.*ntracklets*ntracklets;
+    if(v0cent<cutval){
+      if(accept) fWhyRejection=2;      
+      fEvRejectionBits+=1<<kOutsideCentrality;
+      accept=kFALSE;
+    }
+  }
+
   return accept;
 }
 //---------------------------------------------------------------------------
@@ -450,6 +467,94 @@ Bool_t AliRDHFCuts::IsDaughterSelected(AliAODTrack *track,const AliESDVertex *pr
     // we need either to have here the AOD Event, 
     // or to have the pileup vertex object
   }
+
+  if(fApplySPDDeadPbPb2011){
+    Bool_t deadSPDLay1PbPb2011[20][4]={
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE}
+    };
+    Bool_t deadSPDLay2PbPb2011[40][4]={
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kTRUE,kTRUE,kFALSE,kFALSE},
+      {kTRUE,kTRUE,kTRUE,kTRUE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE},
+      {kFALSE,kFALSE,kFALSE,kFALSE}     
+    };
+    Double_t xyz1[3],xyz2[3];
+    esdTrack.GetXYZAt(3.9,0.,xyz1);
+    esdTrack.GetXYZAt(7.6,0.,xyz2);
+    Double_t phi1=TMath::ATan2(xyz1[1],xyz1[0]);
+    if(phi1<0) phi1+=2*TMath::Pi();
+    Int_t lad1=phi1/(2.*TMath::Pi()/20.);
+    Double_t phi2=TMath::ATan2(xyz2[1],xyz2[0]);
+    if(phi2<0) phi2+=2*TMath::Pi();
+    Int_t lad2=phi2/(2.*TMath::Pi()/40.);
+    Int_t mod1=(xyz1[2]+14)/7.;
+    Int_t mod2=(xyz2[2]+14)/7.;
+    Bool_t lay1ok=kFALSE;
+    if(mod1>=0 && mod1<4 && lad1<20){
+      lay1ok=deadSPDLay1PbPb2011[lad1][mod1];
+    }
+    Bool_t lay2ok=kFALSE;
+    if(mod2>=0 && mod2<4 && lad2<40){
+      lay2ok=deadSPDLay2PbPb2011[lad2][mod2];
+    }
+    if(!lay1ok && !lay2ok) retval=kFALSE;
+  }
+
   return retval; 
 }
 //---------------------------------------------------------------------------
index d636c02..123932d 100644 (file)
@@ -100,8 +100,9 @@ class AliRDHFCuts : public AliAnalysisCuts
     fTriggerMask=(AliVEvent::kEMCEJE|AliVEvent::kEMCEGA);
     fUseOnlyOneTrigger=kTRUE;
   }
-
+  void SetRemoveTrackletOutliers(Bool_t opt) {fRemoveTrackletOutliers=opt;}
   void SetTriggerClass(TString trclass) {fTriggerClass=trclass;} 
+  void ApplySPDDeadPbPb2011(){fApplySPDDeadPbPb2011=kTRUE;}
   void SetVarsForOpt(Int_t nVars,Bool_t *forOpt);
   void SetGlobalIndex(){fGlobalIndex=fnVars*fnPtBins;}
   void SetGlobalIndex(Int_t nVars,Int_t nptBins){fnVars=nVars; fnPtBins=nptBins; SetGlobalIndex();}
@@ -293,8 +294,10 @@ class AliRDHFCuts : public AliAnalysisCuts
   Bool_t  fKeepSignalMC; // IsSelected returns always kTRUE for MC signal
   Bool_t fIsCandTrackSPDFirst; // flag to select the track kFirst criteria for pt < ptlimit
   Double_t fMaxPtCandTrackSPDFirst; // maximum pt of the candidate for which to check if the daughters fulfill kFirst criteria
+  Bool_t fApplySPDDeadPbPb2011;  // flag to apply SPD dead module map of PbPb2011
+  Bool_t fRemoveTrackletOutliers; // flag to apply cut on tracklets vs. centrality for 2011 data
 
-  ClassDef(AliRDHFCuts,22);  // base class for cuts on AOD reconstructed heavy-flavour decays
+  ClassDef(AliRDHFCuts,23);  // base class for cuts on AOD reconstructed heavy-flavour decays
 };
 
 #endif
index ab03bdf..c8571a7 100644 (file)
@@ -253,12 +253,18 @@ void AliAnalysisTaskFlowD2H::FillD0toKpi(const AliAODEvent *theAOD)
     if( !fCutsD0toKpi->IsInFiducialAcceptance(d0cand->Pt(),d0cand->Y(421)) )continue;
     Int_t topCut = fCutsD0toKpi->IsSelected( d0cand, AliRDHFCuts::kAll, NULL );
     if(!topCut) continue;
-    Double_t massD0=topCut>1?d0cand->InvMassD0bar():d0cand->InvMassD0();
     // TO HANDLE AUTOCORRELATIONS
     nIDs[0] = ( (AliAODTrack*)d0cand->GetDaughter(0) )->GetID();
     nIDs[1] = ( (AliAODTrack*)d0cand->GetDaughter(1) )->GetID();
-    // ADDING TRACK
-    MakeTrack(massD0, d0cand->Pt(), d0cand->Phi(), d0cand->Eta(), 2, nIDs);
+    if(topCut&1){
+      Double_t massD0=d0cand->InvMassD0();
+      MakeTrack(massD0, d0cand->Pt(), d0cand->Phi(), d0cand->Eta(), 2, nIDs);
+      if(fDebugV2) printf("   á¶«Injecting D0 candidate\n");
+    }
+    if(topCut&2){
+      Double_t massD0=d0cand->InvMassD0bar();
+      MakeTrack(massD0, d0cand->Pt(), d0cand->Phi(), d0cand->Eta(), 2, nIDs);
+    }
     if(fDebugV2) printf("   á¶«Injecting D0 candidate\n");
   }
 }