+ const Int_t kNHadrons = 5;
+ Int_t channel;
+ Int_t hadron[kNHadrons] = {411, 421, 431, 4112, 4122};
+
+ // for D+ -> K0* (-> K- pi+) pi+
+ Int_t iKstar0 = 313;
+ Int_t iKstarbar0 = -313;
+ Int_t products[2] = {kKPlus, kPiMinus}, mult[2] = {1, 1};
+ ForceParticleDecay(iKstar0, products, mult, 2);
+ // for Ds -> Phi pi+
+ Int_t iPhi=333;
+ ForceParticleDecay(iPhi,kKPlus,2); // Phi->K+K-
+ // for D0 -> rho0 pi+ k-
+ Int_t iRho0=113;
+ ForceParticleDecay(iRho0,kPiPlus,2); // Rho0->pi+pi-
+ // for Lambda_c -> Delta++ K-
+ Int_t iDeltaPP = 2224;
+ Int_t productsD[2] = {kProton, kPiPlus}, multD[2] = {1, 1};
+ ForceParticleDecay(iDeltaPP, productsD, multD, 2);
+ // for Lambda_c -> Lambda(1520) pi+ -> p K- pi+
+ Int_t iLambda1520 = 3124;
+ Int_t productsL[2] = {kProton, kKMinus}, multL[2] = {1, 1};
+ ForceParticleDecay(iLambda1520, productsL, multL, 2);
+ // for Lambda_c -> Lambda pi+
+ Int_t iLambda=3122;
+ //for Lambda_c -> antiK0 p
+ Int_t iK0bar=-311;
+
+
+ Int_t decayP1[kNHadrons][4] =
+ {
+ {kKMinus, kPiPlus, kPiPlus, 0},
+ {kKMinus, kPiPlus, 0 , 0},
+ {kKPlus , iKstarbar0, 0 , 0},
+ {-1 , -1 , -1 , -1},
+ {kProton, iKstarbar0, 0 , 0}
+ };
+ Int_t decayP2[kNHadrons][4] =
+ {
+ {iKstarbar0, kPiPlus, 0 , 0},
+ {kKMinus , kPiPlus, kPiPlus, kPiMinus},
+ {iPhi , kPiPlus, 0 , 0},
+ {-1 , -1 , -1 , -1},
+ {iDeltaPP , kKMinus, 0 , 0}
+ };
+ Int_t decayP3[kNHadrons][4] =
+ {
+ {kPiPlus , iPhi , 0 , 0},
+ {kKMinus , kPiPlus, iRho0 , 0 },
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {kProton , kKMinus, kPiPlus , 0}
+ };
+ // for Lambda_c -> Lambda_1520 pi+ -> p K- pi+, D0-> K*0 pi+ pi- -> K3pi
+ Int_t decayP4[kNHadrons][4] =
+ {
+ {iKstarbar0 , kKPlus , 0 , 0},
+ {iKstarbar0 , kPiPlus , kPiMinus, 0},
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {iLambda1520 , kPiPlus , 0 , 0}
+ };
+ // for Lambda_c -> Lambda pi+
+ Int_t decayP5[kNHadrons][4] =
+ {
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {iLambda , kPiPlus, 0 , 0}
+ };
+
+ // for Lambda_c -> K0bar p
+ Int_t decayP6[kNHadrons][4] =
+ {
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {-1 , -1 , -1 , -1},
+ {kProton , iK0bar, 0 , 0}
+ };
+
+ if(optUse4Bodies==0){
+ for(Int_t iDau=0;iDau<4;iDau++){
+ decayP2[1][iDau]=-1;
+ decayP3[1][iDau]=-1;
+ decayP4[1][iDau]=-1;
+ }
+ }
+
+ for (Int_t ihadron = 0; ihadron < kNHadrons; ihadron++)