Skip to content

Commit 95f7857

Browse files
committed
Add missing files
1 parent c1faff5 commit 95f7857

File tree

4 files changed

+1494
-0
lines changed

4 files changed

+1494
-0
lines changed

GeneratorParam/TMCParticle.cxx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// @(#)root/pythia6:$Id$
2+
// Author: Piotr Golonka 17/09/97
3+
4+
/** \class TMCParticle
5+
\ingroup pythia6
6+
7+
This class serves as a data storage for description of one particle.
8+
9+
It is especially convenient to store information taken from LUJETS common,
10+
which is done by interface class TPythia.
11+
12+
Author: Piotr Golonka 17/09/97
13+
*/
14+
15+
#include "TMCParticle.h"
16+
#include "TPrimary.h"
17+
18+
#ifndef WIN32
19+
# define pyname pyname_
20+
extern "C" void pyname(const Int_t &kf, const char *name, const Int_t len);
21+
#else
22+
# define pyname PYNAME
23+
extern "C" void pyname(const Int_t &kf, const char *name, const Int_t len);
24+
#endif
25+
26+
ClassImp(TMCParticle);
27+
28+
////////////////////////////////////////////////////////////////////////////////
29+
30+
void TMCParticle::ls(Option_t *) const
31+
{
32+
printf("(%2i,%4i) <-%3i, =>[%3i,%3i]",fKS,fKF,fParent,
33+
fFirstChild,fLastChild);
34+
printf(": p=(%7.3f,%7.3f,%9.3f) ;",fPx,fPy,fPz);
35+
36+
printf(" E=%8.3f ; m=%7.3f ; V=(%g,%g,%g); t=%g, tau=%g\n",
37+
fEnergy,fMass,fVx,fVy,fVz,fTime,fLifetime);
38+
}
39+
40+
////////////////////////////////////////////////////////////////////////////////
41+
/// Return name of this particle via Pythia
42+
43+
const char *TMCParticle::GetName() const
44+
{
45+
static char name[20];
46+
pyname(fKF,name,16); name[15] = 0;
47+
for (Int_t i=14;i>0;i--) {
48+
if (name[i] != ' ') break;
49+
name[i] = 0;
50+
}
51+
return name;
52+
}

GeneratorParam/TMCParticle.h

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
// @(#)root/pythia6:$Id$
2+
// Author: Piotr Golonka 17/09/97
3+
4+
/*************************************************************************
5+
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6+
* All rights reserved. *
7+
* *
8+
* For the licensing terms see $ROOTSYS/LICENSE. *
9+
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10+
*************************************************************************/
11+
12+
#ifndef ROOT_TMCParticle
13+
#define ROOT_TMCParticle
14+
15+
#include "TObject.h"
16+
#include "TAttLine.h"
17+
#include "TPrimary.h"
18+
19+
20+
class TMCParticle : public TObject, public TAttLine {
21+
22+
private:
23+
24+
Int_t fKS; // status of particle ( LUJETS K[1] )
25+
Int_t fKF; // KF flavour code ( LUJETS K[2] )
26+
Int_t fParent; // parrent's id ( LUJETS K[3] )
27+
Int_t fFirstChild; // id of first child ( LUJETS K[4] )
28+
Int_t fLastChild; // id of last child ( LUJETS K[5] )
29+
30+
Float_t fPx; // X momenta [GeV/c] ( LUJETS P[1] )
31+
Float_t fPy; // Y momenta [GeV/c] ( LUJETS P[2] )
32+
Float_t fPz; // Z momenta [GeV/c] ( LUJETS P[3] )
33+
Float_t fEnergy; // Energy [GeV] ( LUJETS P[4] )
34+
Float_t fMass; // Mass [Gev/c^2] ( LUJETS P[5] )
35+
36+
Float_t fVx; // X vertex [mm] ( LUJETS V[1] )
37+
Float_t fVy; // Y vertex [mm] ( LUJETS V[2] )
38+
Float_t fVz; // Z vertex [mm] ( LUJETS V[3] )
39+
Float_t fTime; // time of procuction [mm/c]( LUJETS V[4] )
40+
Float_t fLifetime; // proper lifetime [mm/c] ( LUJETS V[5] )
41+
42+
43+
public:
44+
TMCParticle() : fKS(0), fKF(0), fParent(0), fFirstChild(0),
45+
fLastChild(0), fPx(0), fPy(0), fPz(0), fEnergy(0), fMass(0),
46+
fVx(0), fVy(0), fVz(0), fTime(0), fLifetime(0) {}
47+
48+
TMCParticle(Int_t kS, Int_t kF, Int_t parent,
49+
Int_t firstchild, Int_t lastchild,
50+
Float_t px, Float_t py, Float_t pz,
51+
Float_t energy, Float_t mass,
52+
Float_t vx, Float_t vy, Float_t vz,
53+
Float_t time, Float_t lifetime) :
54+
55+
fKS(kS),
56+
fKF(kF),
57+
fParent(parent),
58+
fFirstChild(firstchild),
59+
fLastChild(lastchild),
60+
fPx(px),
61+
fPy(py),
62+
fPz(pz),
63+
fEnergy(energy),
64+
fMass(mass),
65+
fVx(vx),
66+
fVy(vy),
67+
fVz(vz),
68+
fTime(time),
69+
fLifetime(lifetime) { }
70+
71+
72+
~TMCParticle() override { }
73+
74+
Int_t GetKS() const {return fKS;}
75+
Int_t GetKF() const {return fKF;}
76+
Int_t GetParent() const {return fParent;}
77+
Int_t GetFirstChild() const {return fFirstChild;}
78+
Int_t GetLastChild() const {return fLastChild;}
79+
80+
Float_t GetPx() const {return fPx;}
81+
Float_t GetPy() const {return fPy;}
82+
Float_t GetPz() const {return fPz;}
83+
Float_t GetEnergy() const {return fEnergy;}
84+
Float_t GetMass() const {return fMass;}
85+
86+
Float_t GetVx() const {return fVx;}
87+
Float_t GetVy() const {return fVy;}
88+
Float_t GetVz() const {return fVz;}
89+
Float_t GetTime() const {return fTime;}
90+
Float_t GetLifetime() const {return fLifetime;}
91+
const char *GetName() const override;
92+
93+
virtual void SetKS(Int_t kS) {fKS=kS;}
94+
virtual void SetKF(Int_t kF) {fKF=kF;}
95+
virtual void SetParent(Int_t parent) {fParent=parent;}
96+
virtual void SetFirstChild(Int_t first) {fFirstChild=first;}
97+
virtual void SetLastChild(Int_t last) {fLastChild=last;}
98+
99+
virtual void SetPx(Float_t px) {fPx=px;}
100+
virtual void SetPy(Float_t py) {fPy=py;}
101+
virtual void SetPz(Float_t pz) {fPz=pz;}
102+
virtual void SetEnergy(Float_t energy) {fEnergy=energy;}
103+
virtual void SetMass(Float_t mass) {fMass=mass;}
104+
105+
virtual void SetVx(Float_t vx) {fVx=vx;}
106+
virtual void SetVy(Float_t vy) {fVy=vy;}
107+
virtual void SetVz(Float_t vz) {fVz=vz;}
108+
virtual void SetTime(Float_t time) {fTime=time;}
109+
virtual void SetLifetime(Float_t lifetime) {fLifetime=lifetime;}
110+
111+
112+
void ls(Option_t* option) const override;
113+
114+
ClassDefOverride(TMCParticle,1) // LUJETS particles data record.
115+
};
116+
117+
#endif

0 commit comments

Comments
 (0)