BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
MpdDecayerPyt8.cxx
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- MpdDecayerPyt8 header file -----
3// ----- Created 23/07/2020 -----
4// ----- A. Zinchenko -----
5// ----- External decayer for MPD using Pythia8 -----
6// ----- (adapted from TPythia8Decayer) -----
7// -------------------------------------------------------------------------
8
9#include "MpdDecayerPyt8.h"
10
11#include <Pythia8/Pythia.h>
12#include <TClonesArray.h>
13#include <TDatabasePDG.h>
14#include <TF1.h>
15#include <TLorentzVector.h>
16#include <TObjString.h>
17#include <TParticle.h>
18#include <TPythia8.h>
19#include <TString.h>
20#include <TSystem.h>
21#include <TVirtualMC.h>
22
23using namespace Pythia8;
24
26{
27 double flat() { return gRandom->Rndm(); }
28};
29
31
32////////////////////////////////////////////////////////////////////////////////
33/// Get the singleton object.
34
41
42////////////////////////////////////////////////////////////////////////////////
43/// constructor
44
46 : fPythia8(new TPythia8())
47 , fDebug(0)
48 , fGlobalPolar(0)
49 , fLambda(NULL)
50 , fRandom(NULL)
51{
52
53 fPythia8->Pythia8()->readString("SoftQCD:elastic = on");
54
55 // Disable cascade decays in one go
56 fPythia8->Pythia8()->readString("ParticleDecays:limitRadius = on");
57 fPythia8->Pythia8()->readString("ParticleDecays:rMax = 0.");
58
59 fPythia8->Pythia8()->particleData.readString("59:m0 = 100.1396"); //??? - to avoid crash with Geant4
60
61 fPythia8->Pythia8()->particleData.list(223);
62
63 // Modify branching ratios
65
66// Random number generator
67#if PYTHIA_VERSION_INTEGER < 8310
68 RndmEngine* rndm = new MyRandomClass();
69#else
70 auto rndm = make_shared<MyRandomClass>();
71#endif
72 fPythia8->Pythia8()->setRndmEnginePtr(rndm);
73
74 fPythia8->Pythia8()->init();
75
76 Init();
77}
78
79////////////////////////////////////////////////////////////////////////////////
80/// Initialize the decayer
81
83{
84
85 static Bool_t init = kFALSE;
86 if (init)
87 return;
88 init = kTRUE;
89 // ForceDecay();
90 fParticles = new TClonesArray("TParticle");
91
92 // Lambda branching to p+\pi-
93 fPythia8->Pythia8()->particleData.list(3122);
94 // ParticleDataEntry* part = fPythia8->Pythia8()->particleData.particleDataEntryPtr(3122); // Lambda
95 fLambda = fPythia8->Pythia8()->particleData.particleDataEntryPtr(3122); // Lambda
96 DecayChannel& channel = fLambda->channel(0);
97 fBranch = channel.bRatio();
98
99 // Random number generator
100 fRandom = new TRandom(0); // time-dependent seed
101 // fRandom = gRandom;
102
103 // fPythia8->Pythia8()->particleData.isResonance(113,kTRUE);
104 fPythia8->Pythia8()->particleData.list(113);
105}
106
107////////////////////////////////////////////////////////////////////////////////
108/// Decay a single particle
109
111{
112
113 //{ cout << " !!! Out !!! " << endl; exit(0); }
114 // Reset internal particle container
115 fParticles->Delete();
117 fMother.SetXYZT(0, 0, 0, 0);
118
119 if (!p)
120 return;
121
122 TRandom* saveRandom = gRandom;
124
125 TParticle* part = gMC->GetStack()->GetCurrentTrack();
126
127 if (fMothersPdg.find(pdg) == fMothersPdg.end()) {
128 // Particle is not defined
129 new ((*fParticles)[0]) TParticle(*part); // store mother particle
131 return;
132 }
133
134 TVector3 polar;
135 part->GetPolarisation(polar);
136 Bool_t polarFlag = kFALSE;
137
138 if (TMath::Abs(polar.X()) > 0.0001 || TMath::Abs(polar.Z()) > 0.0001) {
139 // Polarized lambda - simulate anysotropic decay only to p + \pi-
140 polarFlag = kTRUE;
141 if (gRandom->Rndm() < fBranch) {
142 // Anysotropic decay
143 // cout << " ----------------- " << fBranch << endl;
144 new ((*fParticles)[0]) TParticle(*part); // store mother particle
145 Gdecay(pdg, p);
146 gRandom = saveRandom;
147 return;
148 } else {
149 // cout << " ++++++++++ " << fBranch << endl;
150 // Force the other channels
151 DecayChannel& channel = fLambda->channel(0);
152 channel.bRatio(0.0);
153 }
154 }
155
156 ClearEvent();
157 AppendParticle(pdg, p);
158 Int_t idPart = fPythia8->Pythia8()->event[0].id();
159 fPythia8->Pythia8()->particleData.mayDecay(idPart, kTRUE);
160 fPythia8->Pythia8()->moreDecays();
161 if (fDebug > 0)
162 fPythia8->EventListing();
163 if (polarFlag) {
164 DecayChannel& channel = fLambda->channel(0);
165 channel.bRatio(fBranch);
166 }
167
168 gRandom = saveRandom;
169}
170
171////////////////////////////////////////////////////////////////////////////////
172/// import the decay products into particles array
173
175{
176
177 Int_t npart = 0;
178
179 if (fSourceFlag == kPythia) {
180 fParticles->Delete();
181 npart = fPythia8->ImportParticles(fParticles, "All");
182 TLorentzVector lvDaugh;
183
184 for (Int_t j = 0; j < npart; ++j) {
185 TParticle* part = (TParticle*)fParticles->UncheckedAt(j);
186 part->ProductionVertex(lvDaugh);
187 lvDaugh += fMother;
188 part->SetProductionVertex(lvDaugh);
189 new ((*particles)[j]) TParticle(*part);
190 }
191 } else {
192 npart = fParticles->GetEntriesFast();
193 for (Int_t j = 0; j < npart; ++j)
194 new ((*particles)[j]) TParticle(*((TParticle*)fParticles->UncheckedAt(j)));
195 }
196
197 // return (fPythia8->ImportParticles(particles, "All"));
198 return npart;
199}
200
201////////////////////////////////////////////////////////////////////////////////
202/// Set forced decay mode
203
205{
206 printf("SetForceDecay not yet implemented !\n");
207}
208////////////////////////////////////////////////////////////////////////////////
209/// ForceDecay not yet implemented
210
212{
213 // printf("ForceDecay not yet implemented !\n");
214}
215////////////////////////////////////////////////////////////////////////////////
216
218{
219 return 0.0;
220}
221////////////////////////////////////////////////////////////////////////////////
222/// return lifetime in seconds of teh particle with PDG number pdg
223
225{
226 return (fPythia8->Pythia8()->particleData.tau0(pdg) * 3.3333e-12);
227}
228
229////////////////////////////////////////////////////////////////////////////////
230/// to read a decay table (not yet implemented)
231
233
234////////////////////////////////////////////////////////////////////////////////
235/// Append a particle to the stack
236
238{
239 fPythia8->Pythia8()->event.append(pdg, 11, 0, 0, p->Px(), p->Py(), p->Pz(), p->E(), p->M());
240}
241
242////////////////////////////////////////////////////////////////////////////////
243/// Clear the event stack
244
246{
247 fPythia8->Pythia8()->event.clear();
248}
249
250////////////////////////////////////////////////////////////////////////////////
251/// Simulate two-body decay process of Lambda-hyperon to p+\pi-
252
254{
255
256 Double_t pcm[2][4] = {{0}, {0}};
257 Double_t xm0 = p->M(), xm1 = TDatabasePDG::Instance()->GetParticle(2212)->Mass();
259
260 Gdeca2(xm0, xm1, xm2, pcm);
261
262 // First, second decay products.
263
264 TLorentzVector daughter1, daughter2;
265 daughter1.SetPxPyPzE(pcm[0][0], pcm[0][1], pcm[0][2], pcm[0][3]);
266 daughter2.SetPxPyPzE(pcm[1][0], pcm[1][1], pcm[1][2], pcm[1][3]);
267
268 // Boost to lab frame
269 // TVector3 boost = p->BoostVector(); //AZ - this is wrong !!!!
270 TVector3 boost(0, 0, p->P() / p->E());
271 daughter1.Boost(boost);
272 daughter2.Boost(boost);
273 daughter1.Transform(fRotation);
274 daughter2.Transform(fRotation);
275
276 TLorentzVector pos;
277 gMC->TrackPosition(pos);
278 // pos.Print();
279
280 Int_t npart = fParticles->GetEntriesFast();
281 new ((*fParticles)[npart++]) TParticle(2212, 1, 1, -1, 0, 0, daughter1, pos);
282 new ((*fParticles)[npart]) TParticle(-211, 1, 1, -1, 0, 0, daughter2, pos);
283
285
286 // Modify mother particle parameters
287 TParticle* mother = (TParticle*)fParticles->UncheckedAt(0);
288 mother->SetFirstMother(1);
289 mother->SetLastMother(-1);
290 mother->SetFirstDaughter(2);
291 mother->SetLastDaughter(3);
292 mother->SetStatusCode(11);
293}
294
295////////////////////////////////////////////////////////////////////////////////
296/// Simulate two-body decay process with anisotropic angular distribution in CMS.
297
299{
300
301 Double_t random[2], pvert[3], costh = 0.0, sinth = 0.0, phi = 0.0;
302
303 Double_t e1 = (xm0 * xm0 + xm1 * xm1 - xm2 * xm2) / (2. * xm0);
304 Double_t p1 = TMath::Sqrt(TMath::Abs((e1 - xm1) * (e1 + xm1)));
305
306 static TRandom* myRandom = NULL;
307 if (!myRandom) {
308 myRandom = new TRandom();
309 myRandom->SetSeed(0);
310 }
311 TRandom* oldRandom = gRandom;
312 gRandom = myRandom;
313
314 gRandom->RndmArray(2, random);
315
316 // Sanity check - should not happen (legacy code)
317 TParticle* part = gMC->GetStack()->GetCurrentTrack();
318 if (part->GetPdgCode() != 3122) {
319 cout << " ??? Not Lambda - exit " << part->GetPdgCode() << endl;
320 exit(0);
321 }
322
323 TLorentzVector lorV;
324 part->Momentum(lorV);
325 lorV.Vect().GetXYZ(pvert);
326
327 TVector3 polar;
328 part->GetPolarisation(polar);
329 if (fGlobalPolar)
330 polar.SetMag(part->GetWeight()); // particle polarization value is passed as its weight
331
332 if (TMath::Abs(polar.X()) < 0.0001 && TMath::Abs(polar.Z()) < 0.0001 && TMath::Abs(polar.Y()) < 0.0001) {
333 costh = 2. * random[0] - 1.0;
334 phi = TMath::TwoPi() * random[1];
335 } else {
336 // Anisotropic decay angular distribution (0.5*(1+alpha*P*cos)).
337 // Anisotropy (pvert, random, polar.X(), phi, costh);
338 Anisotropy(pvert, random, polar, phi, costh);
339 }
340
341 if (TMath::Abs(costh) >= 1.0)
342 costh = TMath::Sign(1.0, costh);
343 else
344 sinth = TMath::Sqrt((1. - costh) * (1. + costh));
345
346 // Polar co-ordinates to momentum components.
347
348 pcm[0][0] = p1 * sinth * TMath::Cos(phi);
349 pcm[0][1] = p1 * sinth * TMath::Sin(phi);
350 pcm[0][2] = p1 * costh;
351 pcm[0][3] = e1;
352
353 // Generate second decay product.
354
355 pcm[1][0] = -pcm[0][0];
356 pcm[1][1] = -pcm[0][1];
357 pcm[1][2] = -pcm[0][2];
358 pcm[1][3] = TMath::Sqrt(pcm[1][0] * pcm[1][0] + pcm[1][1] * pcm[1][1] + pcm[1][2] * pcm[1][2] + xm2 * xm2);
359
360 gRandom = oldRandom;
361}
362
363////////////////////////////////////////////////////////////////////////////////
364/// Simulate anisotropic (due to polarization) decay of lambda
365
366// void MpdDecayerPyt8::Anisotropy (Double_t *pvert, Double_t *rndm, Double_t polar, Double_t &phi, Double_t &costh)
367void MpdDecayerPyt8::Anisotropy(Double_t* pvert, Double_t* rndm, TVector3& polar3, Double_t& phi, Double_t& costh)
368{
369 // Simulate anisotropic (due to polarization) decay of lambda
370
371 // exit(0);
372 // std::ofstream outfile ("costh.txt");
373 // freopen ("costh.txt", "w", stdout);
374
375 Double_t polar = 0.0;
376 if (fGlobalPolar)
377 polar = polar3.Mag(); // global polarization - CHECK THIS
378 else
379 polar = polar3.X(); // transverse polar.
380
381 // const Double_t alpha = 0.642;
382 // static TF1 f("f","1+0.642*[0]*x",-1,1);
383 static TF1 f("f", "1+0.732*[0]*x", -1, 1); // AZ 10.06.21 - new value
384 f.SetParameter(0, polar);
385 f.SetNpx(1000);
386
387 Double_t costhe = f.GetRandom();
388
389 Double_t sinth = 0.0;
390 if (TMath::Abs(costhe) >= 1.0)
391 costhe = TMath::Sign(1.0, costhe);
392 else
393 sinth = TMath::Sqrt(1.0 - costhe * costhe);
394 phi = TMath::TwoPi() * rndm[1];
395 // std::cout << " Cos: " << costhe << " " << phi << " " << pvert[0] << " " << pvert[1] << " " << pvert[2] <<
396 // std::endl;
397
398 // Compute normal vector
399 TVector3 beam(0.0, 0.0, 1.0);
400 TVector3 lambda(pvert[0], pvert[1], pvert[2]);
401 TVector3 norm;
402 if (fGlobalPolar)
403 norm = polar3.Unit(); // global polarization
404 else
405 norm = beam.Cross(lambda).Unit(); // transverse polarization
406
407 // Unit vector with theta and phi w.r.t. normal
408 TVector3 unit(sinth * TMath::Cos(phi), sinth * TMath::Sin(phi), costhe);
409
410 // Coordinate system transformation
411 // (from lambda to lab)
412 TVector3 lambU = lambda.Unit(), lambZ(0, 0, 1), lambX(1, 0, 0), lambY(0, 1, 0);
413 lambZ.RotateUz(lambU);
414 lambX.RotateUz(lambU);
415 lambY.RotateUz(lambU);
416 TRotation rotL;
417 rotL.RotateAxes(lambX, lambY, lambZ); // transformation to lab. system
418 fRotation = rotL;
419 rotL.Invert(); // from lab. to lambda
420 unit.RotateUz(norm); // to lab. system
421 unit.Transform(rotL); // to lambda system
422 /*
423 TVector3 normZ(0,0,1), normX(1,0,0), normY(0,1,0);
424 normZ.RotateUz(norm);
425 normX.RotateUz(norm);
426 normY.RotateUz(norm);
427 TRotation rotN;
428 rotN.RotateAxes(normX,normY,normZ); // transformation to lab. system
429 unit.Transform(rotN); // to lab. system
430 unit.Transform(rotL); // to lambda system
431 */
432 costh = TMath::Cos(unit.Theta());
433 phi = unit.Phi();
434 // std::cout << costh << " " << phi << std::endl;
435 // outfile << i << " " << costh << endl;
436 // outfile.close();
437}
438
439///////////////////////////////////////////////////////////////////////////////
440/// Add PDG of particle to be decayed by this package
441
443{
444
445 if (fMothersPdg.find(pdg) != fMothersPdg.end())
446 return;
447 fMothersPdg.insert(pdg);
448 gMC->SetUserDecay(pdg);
449}
450
451////////////////////////////////////////////////////////////////////////////////
452/// Decay a TParticle
453
455{
456 // Decay function
457
458 //{ cout << " !!! Out !!! " << endl; exit(0); }
459 // Reset internal particle container
460 fParticles->Delete();
462
463 /*
464 if (!p) return;
465 p->ProductionVertex(fMother);
466 TPythia6 *pythia = TPythia6::Instance();
467
468 pythia->Py1ent(0, p->GetPdgCode(), p->Energy(), p->Theta(), p->Phi());
469 pythia->GetPrimaries();
470 */
471 if (!part)
472 return;
473 // part->Print();
474
475 TRandom* saveRandom = gRandom;
477
479
480 Int_t pdg = part->GetPdgCode();
482 part->Momentum(p);
483
484 if (part->GetFirstMother() < 0) {
485 // Primary particle - select mass
486 Double_t mass = fPythia8->Pythia8()->particleData.mSel(pdg);
487 // cout << "mmm " << mass << " " << part->GetFirstMother() << endl;
488 p.SetE(TMath::Sqrt(p.P() * p.P() + mass * mass));
489 }
490 // p.Print();
491
492 ClearEvent();
493 AppendParticle(pdg, &p);
494 Int_t idPart = fPythia8->Pythia8()->event[0].id();
495 fPythia8->Pythia8()->particleData.mayDecay(idPart, kTRUE);
496 fPythia8->Pythia8()->moreDecays();
497 if (fDebug > 0)
498 fPythia8->EventListing();
499
500 gRandom = saveRandom;
501}
502
503//__________________________________________________________________________
504
506{
507 // Change branching ratios of some decay channels
508 // (using description file)
509
510 TString path = gSystem->ExpandPathName("$VMCWORKDIR");
511 path += "/gconfig/MpdDecayConfig.txt";
512 ifstream fin(path.Data());
513
514 TString chline;
515 TObjArray* tokens = NULL;
516
517 while (1) {
518 chline.ReadLine(fin);
519 if (fin.eof())
520 break;
521 cout << chline << endl;
522 if (chline.Contains("#"))
523 continue; // comment
524 // Tokenize line
525 // AZ-161123 tokens = chline.Tokenize(";"); // ";" - channel terminator / separator
526 tokens = chline.Tokenize(" "); // " " - channel separator
527 // if (tokens) cout << " aaa " << tokens->GetEntriesFast() << endl;
528 Bool_t exclusive = kTRUE;
529 if (chline.Contains("*"))
530 exclusive = kFALSE;
531 ChangeParticleBr(tokens, exclusive);
532 if (tokens) {
533 tokens->Delete();
534 delete tokens;
535 tokens = NULL;
536 }
537 }
538}
539
540//__________________________________________________________________________
541
543{
544 // Change branching ratios of selected channels for single particle
545
546 Int_t nchan = channels->GetEntriesFast(); // number of channels to be changed
547 TString last = ((TObjString*)channels->Last())->String(); // AZ-121123 - safety
548 if (!last.Contains(":"))
549 --nchan; // AZ-121123 - safety
550
551 Int_t pdg = ((TObjString*)channels->UncheckedAt(0))->String().Atoi();
552 // cout << pdg << endl;
553 ParticleDataEntryPtr part = fPythia8->Pythia8()->particleData.particleDataEntryPtr(pdg); // mother particle
554 Int_t ndecays = part->sizeChannels();
555
556 TObjArray* tokens = NULL;
557 Double_t changedBrs = 0.0, unchangedBrs = 1.0;
558 vector<Int_t> decayInds;
559 vector<Double_t> bRatios;
560 set<int> activeChan; // AZ-211123
561
562 for (Int_t ich = 0; ich < nchan; ++ich) {
563 TString chline = ((TObjString*)channels->UncheckedAt(ich))->String();
564 cout << chline << endl;
565 if (chline.Contains("*"))
566 continue; // flag for inclusive decays
567 // Tokenize channel
568 tokens = chline.Tokenize(":");
569
570 // Get daughters' PDGs
571 Int_t nprongs = tokens->GetEntriesFast() - 2;
572 vector<Int_t> pdgs;
573 for (Int_t id = 0; id < nprongs; ++id) {
574 pdgs.push_back(((TObjString*)tokens->UncheckedAt(1 + id))->String().Atoi());
575 }
576 TString scale = ((TObjString*)tokens->Last())->String();
577 scale.Remove(0, 1);
578 Double_t scaleBr = scale.Atof();
579
580 // Pick channel requested
581 for (Int_t idecay = 0; idecay < ndecays; ++idecay) {
582 DecayChannel& channel = part->channel(idecay);
583 if (channel.multiplicity() != nprongs)
584 continue;
585 // Check daughters
586 Int_t ok = 0;
587 for (Int_t id = 0; id < nprongs; ++id) {
588 if (channel.product(id) != pdgs[id])
589 break;
590 ++ok;
591 }
592 if (ok != nprongs)
593 continue;
594 changedBrs += channel.bRatio() * scaleBr;
595 unchangedBrs -= channel.bRatio();
596 decayInds.push_back(idecay);
597 bRatios.push_back(channel.bRatio() * scaleBr);
598 activeChan.insert(idecay); // AZ-211123
599 // cout << channel.bRatio() << endl;
600 }
601 // cout << changedBrs << endl;
602
603 if (tokens) {
604 tokens->Delete();
605 delete tokens;
606 tokens = NULL;
607 }
608 } // for (Int_t ich = 0; ich < nchan;
609
610 part->rescaleBR((1.0 - changedBrs) / unchangedBrs);
611 if (!exclusive)
612 --nchan;
613
614 for (Int_t ich = 0; ich < nchan; ++ich) {
615 DecayChannel& channel = part->channel(decayInds[ich]);
616 channel.bRatio(bRatios[ich]);
617 }
618
619 if (exclusive) {
620 // Disable inactive decay channels
621
622 for (Int_t idecay = 0; idecay < ndecays; ++idecay) {
623 if (activeChan.find(idecay) == activeChan.end()) {
624 DecayChannel& channel = part->channel(idecay);
625 channel.bRatio(0.0);
626 }
627 }
628 }
629
630 // Check
631 Double_t totalBr = 0;
632 for (Int_t idecay = 0; idecay < ndecays; ++idecay) {
633 DecayChannel& channel = part->channel(idecay);
634 totalBr += channel.bRatio();
635 }
636 cout << " Total branching after rescaling: " << totalBr << endl;
637}
bool Bool_t
int Int_t
float Float_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
R__EXTERN TRandom * gRandom
R__EXTERN TSystem * gSystem
void ClearEvent()
Clear the event stack.
void AppendParticle(Int_t pdg, TLorentzVector *p)
Append a particle to the stack.
ParticleDataEntryPtr fLambda
SourceFlag fSourceFlag
static MpdDecayerPyt8 * Instance()
Get the singleton object.
virtual void SetForceDecay(Int_t type)
Set forced decay mode.
TLorentzVector fMother
virtual Float_t GetPartialBranchingRatio(Int_t ipart)
virtual void Init()
Initialize the decayer.
void Gdecay(Int_t idpart, TLorentzVector *p)
Simulate two-body decay process of Lambda-hyperon to p+\pi-.
TClonesArray * fParticles
static MpdDecayerPyt8 * fgInstance
void ChangeParticleBr(TObjArray *tokens, Bool_t exclusive)
MpdDecayerPyt8()
constructor
TRotation fRotation
virtual void ReadDecayTable()
to read a decay table (not yet implemented)
std::set< Int_t > fMothersPdg
virtual Float_t GetLifetime(Int_t kf)
return lifetime in seconds of teh particle with PDG number pdg
void Anisotropy(Double_t *pvert, Double_t *rndm, TVector3 &polar, Double_t &phi, Double_t &costh)
Simulate anisotropic (due to polarization) decay of lambda.
virtual void ForceDecay()
ForceDecay not yet implemented.
virtual Int_t ImportParticles(TClonesArray *particles)
import the decay products into particles array
virtual void Decay(Int_t pdg, TLorentzVector *p)
Decay a single particle.
void Gdeca2(Double_t xm0, Double_t xm1, Double_t xm2, Double_t pcm[2][4])
Simulate two-body decay process with anisotropic angular distribution in CMS.
TPythia8 * fPythia8
TRandom * fRandom
void AddMotherPdg(Int_t pdg)
Add PDG of particle to be decayed by this package.
static TDatabasePDG * Instance()
TParticlePDG * GetParticle(const char *name) const
TVector3 Vect() const
Double_t Px() const
Double_t M() const
void SetE(Double_t a)
Double_t Pz() const
Double_t Py() const
Double_t P() const
void Boost(const TVector3 &)
TLorentzVector & Transform(const TLorentzRotation &)
void SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t e)
Double_t E() const
Int_t GetEntriesFast() const
TObject * Last() const override
void Delete(Option_t *option="") override
TObject * UncheckedAt(Int_t i) const
friend friend class TClonesArray
Double_t Mass() const
void ProductionVertex(TLorentzVector &v) const
Int_t GetPdgCode() const
Float_t GetWeight() const
void SetLastDaughter(int code)
void SetProductionVertex(const TLorentzVector &v)
Int_t GetFirstMother() const
void SetFirstDaughter(int code)
void SetStatusCode(int status)
void SetLastMother(int code)
void GetPolarisation(Double_t &theta, Double_t &phi) const
void SetFirstMother(int code)
void Momentum(TLorentzVector &v) const
virtual void SetSeed(ULong_t seed=0)
TRotation & Invert()
TRotation & RotateAxes(const TVector3 &newX, const TVector3 &newY, const TVector3 &newZ)
Double_t Atof() const
TObjArray * Tokenize(const TString &delim) const
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
std::istream & ReadLine(std::istream &str, Bool_t skipWhite=kTRUE)
Double_t Z() const
Double_t Phi() const
Double_t Y() const
Double_t X() const
TVector3 Unit() const
void GetXYZ(Double_t *carray) const
Double_t Mag() const
Double_t Theta() const
void SetMag(Double_t)
TVector3 & Transform(const TRotation &)
TVector3 Cross(const TVector3 &) const
void RotateUz(const TVector3 &)
Pythia8::ParticleDataEntry * ParticleDataEntryPtr
Double_t Sign(Double_t a, Double_t b)
Double_t Sqrt(Double_t x)
Double_t Cos(Double_t)
Double_t Abs(Double_t d)
Double_t Sin(Double_t)
constexpr Double_t TwoPi()