two methods added
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Sep 2012 08:47:35 +0000 (08:47 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 Sep 2012 08:47:35 +0000 (08:47 +0000)
STEER/STEERBase/AliMCEvent.cxx
STEER/STEERBase/AliMCEvent.h

index e77ef87..8d7ad47 100644 (file)
@@ -651,6 +651,33 @@ Bool_t AliMCEvent::IsPhysicalPrimary(Int_t i) const
     }
 }
 
+Bool_t AliMCEvent::IsSecondaryFromWeakDecay(Int_t i)
+{
+//
+// Delegate to subevent if necesarry 
+    if (!fSubsidiaryEvents) {
+       return fStack->IsSecondaryFromWeakDecay(i);
+    } else {
+       AliMCEvent* evt = 0;
+       Int_t idx = FindIndexAndEvent(i, evt);
+       return (evt->IsSecondaryFromWeakDecay(idx));
+    }
+}
+
+Bool_t AliMCEvent::IsSecondaryFromMaterial(Int_t i)
+{
+//
+// Delegate to subevent if necesarry 
+    if (!fSubsidiaryEvents) {
+       return fStack->IsSecondaryFromMaterial(i);
+    } else {
+       AliMCEvent* evt = 0;
+       Int_t idx = FindIndexAndEvent(i, evt);
+       return (evt->IsSecondaryFromMaterial(idx));
+    }
+}
+
+
 void AliMCEvent::InitEvent()
 {
 //
index be083ba..26ca291 100644 (file)
@@ -123,10 +123,12 @@ public:
     virtual void      SetPrimaryOffset(Int_t ioff)    {fPrimaryOffset = ioff;}
     virtual void      SetSecondaryOffset(Int_t ioff)  {fSecondaryOffset = ioff;}    
     virtual Bool_t    IsPhysicalPrimary(Int_t i) const;
+
     virtual Int_t     BgLabelToIndex(Int_t label);
     static  Int_t     BgLabelOffset() {return fgkBgLabelOffset;}
     virtual Bool_t    IsFromBGEvent(Int_t index);
-    
+    virtual Bool_t    IsSecondaryFromWeakDecay(Int_t index);
+    virtual Bool_t    IsSecondaryFromMaterial(Int_t index);
     // External particle array
     virtual void      SetParticleArray(TClonesArray* mcParticles) 
        {fMCParticles = mcParticles; fNparticles = fMCParticles->GetEntries(); fExternal = kTRUE;}