CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Pythia6Decays Class Reference

#include <Pythia6Decays.h>

Public Member Functions

const DaughterParticleListparticleDaughters (ParticlePropagator &particle)
 
 Pythia6Decays ()
 
 ~Pythia6Decays ()
 

Private Attributes

Pythia6jetspyjets
 
gen::Pythia6Servicepyservice
 
DaughterParticleList theList
 

Detailed Description

Definition at line 15 of file Pythia6Decays.h.

Constructor & Destructor Documentation

Pythia6Decays::Pythia6Decays ( )

Definition at line 18 of file Pythia6Decays.cc.

References pyjets, and pyservice.

19 {
20  // Create a new Pythia6jets
21  pyjets = new Pythia6jets();
22  // Create a new Pythia6Service helper
24  // The PYTHIA decay tables will be initialized later
25 }
gen::Pythia6Service * pyservice
Definition: Pythia6Decays.h:26
Pythia6jets * pyjets
Definition: Pythia6Decays.h:27
Pythia6Decays::~Pythia6Decays ( )

Definition at line 27 of file Pythia6Decays.cc.

References pyjets, and pyservice.

27  {
28  delete pyjets;
29  delete pyservice;
30 }
gen::Pythia6Service * pyservice
Definition: Pythia6Decays.h:26
Pythia6jets * pyjets
Definition: Pythia6Decays.h:27

Member Function Documentation

const DaughterParticleList & Pythia6Decays::particleDaughters ( ParticlePropagator particle)

Definition at line 33 of file Pythia6Decays.cc.

References i, Pythia6jets::k(), RawParticle::mass(), max(), Pythia6jets::n(), Pythia6jets::p(), RawParticle::pid(), pyjets, pyservice, PYTHIA6PYDECY, RawParticle::T(), theList, Pythia6jets::v(), RawParticle::X(), RawParticle::Y(), and RawParticle::Z().

Referenced by TrajectoryManager::updateWithDaughters().

34 {
35  gen::Pythia6Service::InstanceWrapper guard(pyservice); // grab Py6 context
36 
37  // Pythia6jets pyjets;
38  int ip;
39 
40  pyjets->k(1,1) = 1;
41  pyjets->k(1,2) = particle.pid();
42  pyjets->p(1,1) = particle.Px();
43  pyjets->p(1,2) = particle.Py();
44  pyjets->p(1,3) = particle.Pz();
45  pyjets->p(1,4) = std::max(particle.mass(),particle.e());
46  pyjets->p(1,5) = particle.mass();
47  pyjets->v(1,1) = particle.X();
48  pyjets->v(1,2) = particle.Y();
49  pyjets->v(1,3) = particle.Z();
50  pyjets->v(1,4) = particle.T();
51  pyjets->n() = 1;
52 
53  ip = 1;
54  PYTHIA6PYDECY(&ip);
55 
56  // Fill the list of daughters
57  theList.clear();
58  if ( pyjets->n()==1 ) return theList;
59 
60  theList.resize(pyjets->n()-1,RawParticle());
61 
62  for (int i=2;i<=pyjets->n();++i) {
63 
64  theList[i-2].SetXYZT(pyjets->p(i,1),pyjets->p(i,2),
65  pyjets->p(i,3),pyjets->p(i,4));
66  theList[i-2].setVertex(pyjets->v(i,1),pyjets->v(i,2),
67  pyjets->v(i,3),pyjets->v(i,4));
68  theList[i-2].setID(pyjets->k(i,2));
69  theList[i-2].setMass(pyjets->p(i,5));
70 
71  }
72 
73  return theList;
74 
75 }
int i
Definition: DBlmapReader.cc:9
int & n(void)
Definition: Pythia6jets.cc:37
int pid() const
get the HEP particle ID number
Definition: RawParticle.h:264
double mass() const
get the MEASURED mass
Definition: RawParticle.h:282
double & v(int i, int j)
Definition: Pythia6jets.cc:73
const T & max(const T &a, const T &b)
double Y() const
y of vertex
Definition: RawParticle.h:274
double Z() const
z of vertex
Definition: RawParticle.h:275
DaughterParticleList theList
Definition: Pythia6Decays.h:28
int & k(int i, int j)
Definition: Pythia6jets.cc:49
gen::Pythia6Service * pyservice
Definition: Pythia6Decays.h:26
double X() const
x of vertex
Definition: RawParticle.h:273
Pythia6jets * pyjets
Definition: Pythia6Decays.h:27
double T() const
vertex time
Definition: RawParticle.h:276
#define PYTHIA6PYDECY
double & p(int i, int j)
Definition: Pythia6jets.cc:61

Member Data Documentation

Pythia6jets* Pythia6Decays::pyjets
private

Definition at line 27 of file Pythia6Decays.h.

Referenced by particleDaughters(), Pythia6Decays(), and ~Pythia6Decays().

gen::Pythia6Service* Pythia6Decays::pyservice
private

Definition at line 26 of file Pythia6Decays.h.

Referenced by particleDaughters(), Pythia6Decays(), and ~Pythia6Decays().

DaughterParticleList Pythia6Decays::theList
private

Definition at line 28 of file Pythia6Decays.h.

Referenced by particleDaughters().