BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
DecayConfig.C
Go to the documentation of this file.
2{
3
4 // This script uses the external decayer TPythia6Decayer in place of the
5 // concrete Monte Carlo native decay mechanisms only for the
6 // specific types of decays defined below.
7
8 // Access the external decayer singleton and initialize it
9 TPythia6Decayer* decayer = TPythia6Decayer::Instance();
10 // The following just tells pythia6 to not decay particles only to
11 // certain channels.
12
13 decayer->SetForceDecay(TPythia6Decayer::kAll);
14 // example: Force the J/PSI decay channel e+e-
15 // Int_t products[2];
16 // Int_t mult[2];
17 // Int_t npart=2;
18
19 // decay products
20 // products[0]=11;
21 // products[1]=-11;
22 // multiplicity
23 // mult[0]=1;
24 // mult[1]=1;
25 // force the decay channel
26 // decayer->ForceParticleDecay(443,products,mult,npart);
27
28 decayer->Init();
29
30 // Tell the concrete monte carlo to use the external decayer. The
31 // external decayer will be used for:
32 // i)particle decays not defined in concrete monte carlo, or
33 // ii)particles for which the concrete monte carlo is told
34 // to use the external decayer for its type via:
35 // gMC->SetUserDecay(pdgId);
36 // If this is invoked, the external decayer will be used for particles
37 // of type pdgId even if the concrete monte carlo has a decay mode
38 // already defined for that particle type.
39 gMC->SetExternalDecayer(decayer);
40
41 TPythia6& pythia6 = *(TPythia6::Instance());
42
43 // The pythia6 decayer is used in place of the concrete Monte Carlo
44 // decay for the particles type mu+/-,pi+/-, K+/-, K0L in order to preserve
45 // the decay product neutrino flavor, which is otherwise not preserved in
46 // Geant3 decays.
47 const Int_t npartnf = 9;
48 // mu-,mu+,pi+,pi-,K+,K-,K0L, Xi-
49 Int_t pdgnf[npartnf] = {13, -13, 211, -211, 321, -321, 130, 3312, 443};
50 for (Int_t ipartnf = 0; ipartnf < npartnf; ipartnf++) {
51 Int_t ipdg = pdgnf[ipartnf];
52
53 if (TString(gMC->GetName()) == "TGeant3")
54 gMC->SetUserDecay(ipdg); // Force the decay to be done w/external decayer
55
56 pythia6.SetMDCY(pythia6.Pycomp(ipdg), 1, 1); // Activate decay in pythia
57 }
58
59 // The following will print the decay modes
60 pythia6.Pyupda(1, 6);
61
62 // rho0 (113), rho+ (213), rho- (-213) and
63 // D+(411) ,D-(-411),D0(421),D0bar(-421) have decay modes defined in
64 // TGeant3::DefineParticles, but for these particles
65 // those decay modes are overridden to make use of pythia6.
66 const Int_t nparthq = 3;
67 // rho0,rho+,rho-,D+,D-,D0,D0bar
68 // Int_t pdghq[nparthq] = {113,213,-213,411,-411,421,-421};
69 Int_t pdghq[nparthq] = {421, 3122, -3122};
70 for (Int_t iparthq = 0; iparthq < nparthq; iparthq++) {
71 Int_t ipdg = pdghq[iparthq];
72 if (TString(gMC->GetName()) == "TGeant3")
73 gMC->SetUserDecay(ipdg); // Force the decay to be done w/external decayer
74 pythia6.SetMDCY(pythia6.Pycomp(ipdg), 1, 1); // Activate decay in pythia
75 }
76 // Set pi0 to be stable in pythia6 so that Geant3 can handle decay.
77 // In general, TGeant3 is set up through TGeant3gu::gudcay to pass
78 // all pythia6 decay products back to the G3 transport mechanism if they
79 // have a lifetime > 1.E-15 sec for further transport.
80 // Since the pi0 lifetime is less than this, if pi0 is produced as a decay
81 // product in pythia6, e.g. KL0 -> pi0 pi+ pi-, the pi0 will be immediately
82 // decayed by pythia6 to 2 gammas, and the KL0 decay product list passed
83 // back to the transport mechanism will be "gamma gamma pi+ pi-", i.e.
84 // the pi0 will not be visible in the list of secondaries passed back to
85 // the transport mechanism and will not be pushed to the stack for possible
86 // storage to the stdhep output array.
87 // To avoid this, the pi0 is set to stable in pythia6, and its decay
88 // will be handled by Geant3.
89 // pythia6.SetMDCY(pythia6.Pycomp(111),1,0);
90 //}
91}
int Int_t
void DecayConfig()
Definition DecayConfig.C:1