//***********************************************************
#include <TRef.h>
+#include <TList.h>
+#include "AliAODTrack.h"
#include "AliAODRecoDecay.h"
+class AliRDHFCuts;
+class AliKFParticle;
+
class AliAODRecoDecayHF : public AliAODRecoDecay {
public:
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,
+ Bool_t topoCostraint,Double_t bzkG,
+ Double_t *mass) const;
+
protected:
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)
return;
}
+inline Bool_t AliAODRecoDecayHF::IsLikeSign() const
+{
+ // check if it is like-sign
+
+ Int_t ndg=GetNDaughters();
+ if(!ndg) {
+ printf("Daughters not available\n");
+ return kFALSE;
+ }
+ Int_t chargeDg0 = ((AliAODTrack*)GetDaughter(0))->Charge();
+
+ for(Int_t i=1; i<ndg; i++) {
+ if(chargeDg0!=((AliAODTrack*)GetDaughter(i))->Charge()) return kFALSE;
+ }
+
+ 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
+