/*
$Log$
+Revision 1.5 2001/03/09 13:04:06 morsch
+Decay_t moved to AliDecayer.h
+
Revision 1.4 2001/01/30 09:23:11 hristov
Streamers removed (R.Brun)
extern "C" void type_of_call
py1ent(Int_t&, Int_t&, Double_t&, Double_t&, Double_t&);
+Bool_t AliDecayerPythia::fgInit = kFALSE;
+
AliDecayerPythia::AliDecayerPythia()
{
// Default Constructor
fPythia=AliPythia::Instance();
- for (Int_t i=0; i< 501; i++) fBraPart[i]=1;
+ for (Int_t i=0; i< 501; i++) fBraPart[i]= 1.;
}
void AliDecayerPythia::Init()
{
// Initialisation
//
+ if (!fgInit) {
+ fgInit = kTRUE;
+ fPythia->SetDecayTable();
+ }
+
// Switch on heavy flavor decays
+
Int_t kc, i, j;
Int_t heavy[8] = {411, 421, 431, 4122, 511, 521, 531, 5122};
-
+ fPythia->ResetDecayTable();
for (j=0; j < 8; j++) {
kc=fPythia->Pycomp(heavy[j]);
fPythia->SetMDCY(kc,1,1);
- for (i=fPythia->GetMDCY(kc,2);i<fPythia->GetMDCY(kc,2)+fPythia->GetMDCY(kc,3); i++) {
+ for (i=fPythia->GetMDCY(kc,2);
+ i<fPythia->GetMDCY(kc,2)+fPythia->GetMDCY(kc,3);
+ i++) {
fPythia->SetMDME(i,1,1);
}
}
+
ForceDecay();
}
// Force a particle decay mode
Decay_t decay=fDecay;
-//
-// Make clean
-// AllowAllDecays();
//
// select mode
}
}
-
-void AliDecayerPythia::AllowAllDecays()
-{
-// Reset decay flags
- Int_t i;
- for (i=1; i<= 2000; i++) {
- fPythia->SetMDME(i,1,1);
- }
-//
- for (i=0; i<501; i++){
- fBraPart[i]=1;
- }
-}
-
-
void AliDecayerPythia::DefineParticles()
{
//
Int_t CountProducts(Int_t channel, Int_t particle);
void ForceParticleDecay(Int_t particle, Int_t product, Int_t mult);
void ForceHadronicD();
- void AllowAllDecays();
Float_t GetBraPart(Int_t kf);
AliDecayerPythia(const AliDecayerPythia &decayer) {;}
private:
AliPythia* fPythia; // ! Pointer to AliPythia
Decay_t fDecay; // Forced decay mode
- Float_t fBraPart[501]; // Branching ratios
-
+ Float_t fBraPart[501]; // ! Branching ratios
+ static Bool_t fgInit; // ! initialization flag
+
ClassDef(AliDecayerPythia,1) // AliDecayer implementation using Pythia
};
#endif