+Bool_t AliMuonForwardTrack::IsFromDirectCharm() {
+
+ if (!IsMuon()) return kFALSE;
+
+ for (Int_t i=GetFirstMotherID(); i>=0; i--) if (!IsPDGCharm(GetParentPDGCode(i))) return kFALSE; // the decay chain finds a non-charmed particle
+
+ return kTRUE;
+
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMuonForwardTrack::IsFromChainCharm() {
+
+ if (!IsMuon()) return kFALSE;
+
+ if (GetFirstMotherID() == 0) return kFALSE; // it is not a chain
+
+ if (!IsPDGCharm(GetParentPDGCode(GetFirstMotherID()))) return kFALSE; // primordial is not a charmed hadron
+
+ for (Int_t i=GetFirstMotherID()-1; i>=0; i--) if (!IsPDGCharm(GetParentPDGCode(i))) return kTRUE; // the decay chain finds a non-charmed particle
+
+ return kFALSE;
+
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMuonForwardTrack::IsFromDirectBeauty() {
+
+ if (!IsMuon()) return kFALSE;
+
+ for (Int_t i=GetFirstMotherID(); i>=0; i--) if (!IsPDGBeauty(GetParentPDGCode(i))) return kFALSE; // the decay chain finds a non-beauty particle
+
+ return kTRUE;
+
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMuonForwardTrack::IsFromChainBeauty() {
+
+ if (!IsMuon()) return kFALSE;
+
+ if (GetFirstMotherID() == 0) return kFALSE; // it is not a chain
+
+ if (!IsPDGBeauty(GetParentPDGCode(GetFirstMotherID()))) return kFALSE; // primordial is not a beauty hadron
+
+ for (Int_t i=GetFirstMotherID()-1; i>=0; i--) if (!IsPDGBeauty(GetParentPDGCode(i))) return kTRUE; // the decay chain finds a non-beauty particle
+
+ return kFALSE;
+
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMuonForwardTrack::IsMuon() {
+
+ if (IsFake()) return kFALSE;
+
+ if (TMath::Abs(fMCTrackRef->GetPdgCode())==13) return kTRUE;
+
+ return kFALSE;
+
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMuonForwardTrack::IsFake() {
+
+ if (!fMCTrackRef) return kTRUE;
+
+ return kFALSE;
+
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMuonForwardTrack::IsPDGResonance(Int_t pdg) {
+
+ // if (pdg<10) return kFALSE;
+ // Int_t id = pdg%100000;
+ // return (!((id-id%10)%110));