#include <TClonesArray.h>
#include <TObjArray.h>
#include <TPDGCode.h>
+#include <TMCProcess.h>
#include <TParticle.h>
#include <TParticlePDG.h>
#include <TDatabasePDG.h>
// by physics analysis. Decision is put here.
//
Bool_t keep = kFALSE;
+
+ Int_t parent = part->GetFirstMother();
+ if (parent >= 0 && parent <= fHgwmk) {
+ TParticle* father = GetParticleMapEntry(parent);
//
// Keep first-generation daughter from primaries with heavy flavor
//
- Int_t parent = part->GetFirstMother();
- if (parent >= 0 && parent <= fHgwmk) {
- TParticle* father = GetParticleMapEntry(parent);
Int_t kf = father->GetPdgCode();
kf = TMath::Abs(kf);
Int_t kfl = kf;
// meson ?
if (kfl > 10) kfl/=100;
// baryon
- if (kfl > 10) kfl/=10;
- if (kfl > 10) kfl/=10;
+ if (kfl > 10) kfl/=10;
+ if (kfl > 10) kfl/=10;
if (kfl >= 4) {
keep = kTRUE;
}
+ //
+ // e+e- from pair production of primary gammas
+ //
+ if ((part->GetUniqueID()) == kPPair) keep = kTRUE;
+ }
+ //
+ // Decay(cascade) from primaries
+ //
+ if ((part->GetUniqueID() == kPDecay) && (parent >= 0)) {
+ // Particles from decay
+ TParticle* father = GetParticleMapEntry(parent);
+ Int_t imo = parent;
+ while((imo > fHgwmk) && (father->GetUniqueID() == kPDecay)) {
+ imo = father->GetFirstMother();
+ father = GetParticleMapEntry(imo);
+ }
+ if ((imo <= fHgwmk)) keep = kTRUE;
}
return keep;
}
TBranch *branch=fTreeK->GetBranch("Particles");
if(branch == 0x0)
{
- branch = fTreeK->Branch("Particles", "TParticle", &fParticleBuffer, 4000);
+ branch = fTreeK->Branch("Particles", &fParticleBuffer, 4000);
AliDebug(2, "Creating Branch in Tree");
}
else
// Nuclear code is 10LZZZAAAI
if(pdg>1000000000)return kTRUE;
- const Int_t kNstable = 16;
+ const Int_t kNstable = 18;
Int_t i;
Int_t pdgStable[kNstable] = {
kLambda0, // Lambda_0
kSigmaMinus, // Sigma Minus
kSigmaPlus, // Sigma Plus
- kSigma0, // Sigma 0
3312, // Xsi Minus
3322, // Xsi
3334, // Omega
+ kNuE, // Electron Neutrino
+ kNuMu, // Muon Neutrino
+ kNuTau // Tau Neutrino
};
Bool_t isStable = kFALSE;
Int_t imo = p->GetFirstMother();
TParticle* pm = Particle(imo);
Int_t mpdg = TMath::Abs(pm->GetPdgCode());
+// Check for Sigma0
+ if ((mpdg == 3212) && (imo < GetNprimary())) return kTRUE;
+//
// Check if it comes from a pi0 decay
//
-// What about the pi0 Dalitz ??
-// if ((mpdg == kPi0) && (imo < GetNprimary())) return kTRUE;
+ if ((mpdg == kPi0) && (imo < GetNprimary())) return kTRUE;
// Check if this is a heavy flavor decay product
Int_t mfl = Int_t (mpdg / TMath::Power(10, Int_t(TMath::Log10(mpdg))));