CbmRoot
Loading...
Searching...
No Matches
PParticle.h
Go to the documentation of this file.
1/* Copyright (C) 1998-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Marios A. Kagarlis, Florian Uhlig [committer] */
4
5// Author: Marios A. Kagarlis
6// Written: 15.11.98
7// Revised: 20.07.99
8// Revised: 30.08.00 R. Holzmann
9// Revised: 07.09.00 J. Ritman (added parent-,siblings-,daughter- index
10// and decayTime)
11// Revised: 15.12.00 R. Holzmann (creation time added)
12// Revised: 22.03.05 R. Holzmann (get/setParent() added)
13// Revised: 23.07.07 IF (new framework)
14
15// PParticle Class Header
16
17#ifndef _PPARTICLE_H_
18#define _PPARTICLE_H_
19
20#define MAX_DAUGHTERS 7
21
22#include "TLorentzVector.h"
23#include "TMath.h"
24#include "TString.h"
25
26#include "PValues.h"
27
28class PParticle : public TLorentzVector {
29
30public:
31 PParticle(Int_t id = 0, Double_t T = 0., Double_t w = 1.);
32 // id, lab kinetic energy (GeV), weight
33
34 /*
35 PParticle(const char *, Double_t T=0., Double_t w=1.);
36 // name, lab kinetic energy (GeV), weight
37
38 PParticle(Int_t, Double_t, Double_t, Double_t, Double_t m=0., Double_t w=1.);
39 // id, Px, Py, Pz (GeV/c), mass (GeV/c**2) overrides default, weight
40
41 PParticle(const char *, Double_t, Double_t, Double_t,Double_t m=0., Double_t w=1.);
42 // name, Px, Py, Pz (GeV/c), mass (GeV/c**2) overrides default, weight
43
44 PParticle(Int_t, const TVector3 &, Double_t m=0., Double_t w=1.);
45 // id, 3-momentum vector (GeV/c), mass (GeV/c**2) overrides default, weight
46
47 PParticle(Int_t, Double_t *, Double_t w=1.);
48 // id, pointer to 4-dim array (Px, Py, Pz, E) (GeV/c, GeV), weight
49
50 PParticle(Int_t, float *, Double_t w=1.);
51 // id, pointer to 4-dim array (Px, Py, Pz, E) (GeV/c, GeV), weight
52
53 PParticle(const PParticle &);
54 // copy constructor
55
56 PParticle(const PParticle *);
57 // copy constructor
58*/
59
60 virtual ~PParticle()
61 {
62 if (qParticle1) delete qParticle1;
63 if (qParticle2) delete qParticle2;
64 if (values) delete values;
65 }
66
67 Int_t ID() const { return pid; }
68
69 TLorentzVector Vect4() const { return TLorentzVector(Vect(), E()); }
70
71 void SetVertex(Double_t x, Double_t y, Double_t z, Double_t t)
72 {
73 fV.SetXYZ(x, y, z);
74 fT = t;
75 }
76
77 inline Int_t GetParentIndex() const { return parentIndex; }
78 inline Int_t GetDaughterIndex() const { return daughterIndex; }
79
80 inline TVector3& GetVertex() { return fV; }
81 inline TVector3& getVertex() { return fV; }
82
83 inline void SetParentId(Int_t pId) { parentId = pId; }
84 inline void SetSourceId(Int_t sId) { sourceId = sId; }
85 inline void SetDaughterIndex(Int_t dInd) { daughterIndex = dInd; }
86 inline void SetSiblingIndex(Int_t sInd) { siblingIndex = sInd; }
87 inline void SetParentIndex(Int_t pInd) { parentIndex = pInd; }
88 inline void SetSibling(PParticle* p) { sParticle = p; }
89
90 inline void ResetDaughters(void)
91 {
92 for (int i = 0; i < (MAX_DAUGHTERS + 1); i++)
93 daughters[i] = nullptr;
94 };
95
96protected:
97 void defaults(void);
98
99 Int_t pid; // particle code (partially conforms with Geant 3)
100 Int_t sourceId; // Source ID
101 Int_t parentId; // parent ID
102 Int_t parentIndex; // parent index in particle array
103 Int_t decayModeIndex; // decay Mode index (for decayAll option)
104 Int_t destroyDecayModeIndex; // save only for data file
105 Int_t daughterIndex; // daughter index
106 Int_t siblingIndex; // sibling index
107 Int_t spectator;
108
109 Double_t decayTime; // proper time until decay (in mm/c)
110 Double_t wt; // weight
111 Double_t genwt;
112 Double_t invgenwt;
113 Double_t mult;
114
115 TVector3 fV; // creation vertex (in mm)
116 Double_t fT; // creation time (in mm/c)
117 Bool_t active;
118 Int_t index;
124 TString debug;
125
127 Int_t status;
128
130
131 ClassDef(PParticle, 4) // Pluto Particle Class
132};
133#endif // _PPARTICLE_H_
#define MAX_DAUGHTERS
Definition PParticle.h:20
void SetDaughterIndex(Int_t dInd)
Definition PParticle.h:85
void SetParentIndex(Int_t pInd)
Definition PParticle.h:87
TVector3 fV
multiplicity
Definition PParticle.h:115
TVector3 & GetVertex()
Definition PParticle.h:80
Int_t GetParentIndex() const
Definition PParticle.h:77
void ResetDaughters(void)
Definition PParticle.h:90
Int_t index
internal activity flag
Definition PParticle.h:118
Double_t mult
inverted generator weight
Definition PParticle.h:113
Int_t ID() const
Definition PParticle.h:67
PParticle * qParticle2
Definition PParticle.h:121
Int_t parentId
Definition PParticle.h:101
Int_t pid
Definition PParticle.h:99
TVector3 & getVertex()
Definition PParticle.h:81
Bool_t active
Definition PParticle.h:117
PParticle * sParticle
Definition PParticle.h:122
Double_t invgenwt
generator weight
Definition PParticle.h:112
void SetSibling(PParticle *p)
Definition PParticle.h:88
Int_t siblingIndex
Definition PParticle.h:106
Int_t sourceId
Definition PParticle.h:100
Int_t daughterIndex
Definition PParticle.h:105
PParticle * daughters[MAX_DAUGHTERS+1]
pointer to particle object
Definition PParticle.h:123
Int_t GetDaughterIndex() const
Definition PParticle.h:78
virtual ~PParticle()
Definition PParticle.h:60
Double_t fT
Definition PParticle.h:116
PParticle * qParticle1
pointer to particle object
Definition PParticle.h:120
PParticle * pParticle
index in particle array
Definition PParticle.h:119
PParticle(Int_t id=0, Double_t T=0., Double_t w=1.)
Definition PParticle.cxx:54
TString debug
pointer to daughter array
Definition PParticle.h:124
Double_t decayTime
flag that forces particle to be treated as spectator
Definition PParticle.h:109
Bool_t make_new_qParticle
status of parent particle in PChannel::Decay
Definition PParticle.h:129
TLorentzVector Vect4() const
Definition PParticle.h:69
Int_t decayModeIndex
Definition PParticle.h:103
Int_t parentIndex
Definition PParticle.h:102
PValues * values
debug string
Definition PParticle.h:126
Double_t genwt
Definition PParticle.h:111
Int_t destroyDecayModeIndex
Definition PParticle.h:104
void SetSiblingIndex(Int_t sInd)
Definition PParticle.h:86
void SetVertex(Double_t x, Double_t y, Double_t z, Double_t t)
Definition PParticle.h:71
void defaults(void)
Definition PParticle.cxx:26
void SetParentId(Int_t pId)
Definition PParticle.h:83
Double_t wt
Definition PParticle.h:110
void SetSourceId(Int_t sId)
Definition PParticle.h:84
Int_t status
pointer to value container
Definition PParticle.h:127
Int_t spectator
Definition PParticle.h:107