]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG3/vertexingHF/AliAODRecoDecayHF.h
Added check of daughters clustermap in ITS
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAODRecoDecayHF.h
index c93254a9cf20393dd5145f84204144952fb3180d..e5a06c435f65f5ecf6b22de9b84152c7ac340199 100644 (file)
 //***********************************************************
 
 #include <TRef.h>
+#include <TList.h>
+#include "AliAODTrack.h"
 #include "AliAODRecoDecay.h"
 
+class AliRDHFCuts;
 class AliKFParticle;
 
 class AliAODRecoDecayHF : public AliAODRecoDecay {
@@ -80,9 +83,16 @@ class AliAODRecoDecayHF : public AliAODRecoDecay {
   UShort_t GetProngID(Int_t ip) const 
     {if(fProngID) {return fProngID[ip];} else {return 9999;}}
 
+  // ITS clustermap for daughters
+  Bool_t DaughterHasPointOnITSLayer(Int_t dg,Int_t l) const;
+
   // check if it is like-sign
   Bool_t IsLikeSign() const;
 
+  // list of cuts
+  void SetListOfCutsRef(TObject *obj) {fListOfCuts=obj;}
+  TList *GetListOfCuts() const {return (TList*)(fListOfCuts.GetObject());}
+  AliRDHFCuts *GetCuts(const char* name) const;
 
   // vertexing KF:
   AliKFParticle *ApplyVertexingKF(Int_t *iprongs,Int_t nprongs,Int_t *pdgs,
@@ -93,11 +103,11 @@ class AliAODRecoDecayHF : public AliAODRecoDecay {
 
   AliAODVertex *fOwnPrimaryVtx; // primary vertex for this candidate
   TRef          fEventPrimaryVtx; // ref to primary vertex of the event
+  TRef          fListOfCuts;  // ref to the list of analysis cuts
   Double_t     *fd0err;  //[fNProngs] error on prongs rphi impact param [cm]
   UShort_t     *fProngID;  //[fNProngs] track ID of daughters
 
-  ClassDef(AliAODRecoDecayHF,3)  // base class for AOD reconstructed 
-                                 // heavy-flavour decays
+  ClassDef(AliAODRecoDecayHF,4)  // base class for AOD reconstructed heavy-flavour decays
 };
 
 inline void AliAODRecoDecayHF::SetProngIDs(Int_t nIDs,UShort_t *id) 
@@ -131,5 +141,30 @@ inline Bool_t AliAODRecoDecayHF::IsLikeSign() const
   return kTRUE;
 }
 
+inline AliRDHFCuts *AliAODRecoDecayHF::GetCuts(const char* name) const
+{ 
+  // returns the analysis cuts
+
+  TList *list = GetListOfCuts();
+  if(!list) return 0;
+
+
+  return (AliRDHFCuts*)list->FindObject(name);
+}
+
+inline Bool_t AliAODRecoDecayHF::DaughterHasPointOnITSLayer(Int_t dg,Int_t l) const
+{
+  // ITS clustermap for daughters
+
+  if(l<0 || l>5) {
+    printf("ERROR: layer has to be in the range 0-5\n");
+    return kFALSE;
+  }
+  AliAODTrack *t = (AliAODTrack*)GetDaughter(dg);
+  if(!t) return kFALSE;
+
+  return TESTBIT(t->GetITSClusterMap(),l);
+}
+
 #endif