BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcRecoUtil/MdcRecoUtil/PdtEntry.h
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2//
3// PdtEntry.h - data class for a particle
4//
5// Copyright (C) 1993 The Board of Trustees of The Leland Stanford
6//
7// History:
8// Migration for BESIII MDC
9// Junior University. All Rights Reserved.
10//
11// $Id: PdtEntry.h,v 1.2 2009/12/23 02:59:56 zhangy Exp $
12//
13// A PdtEntry is an almost pure data class. It holds the data for a particle,
14// ie. mass, width, lifetime, decay modes, etc. The sign of quantities is
15// defined to be that of the particle (not antiparticle).
16//
17// Modified:
18// Luca Lista 04 oct 96 lookup by different types, not by integer
19//
20// See Also
21// AntiPData, PData, Pdt, DecayMode
22
23#ifndef _PDTENTRY_HH_
24#define _PDTENTRY_HH_
25
26#include "MdcRecoUtil/PdtLund.h"
27#include "MdcRecoUtil/PdtPdg.h"
28#include "MdcRecoUtil/PdtGeant.h"
29#include "MdcRecoUtil/PdtPid.h"
30#include <vector>
31using std::vector;
32
33#include <iosfwd>
34class DecayMode;
35
37{
38public:
39 // in the constructor, spin is in units of hbar, charge in unit of e.
40 // mass and width are in GeV.
41 PdtEntry(const char *name, PdtLund::LundType code, float spin,
42 float charge, float mass, float width=0, float massCut=0);
43 PdtEntry(const char *name, PdtGeant::GeantType code, float spin,
44 float charge, float mass, float width=0, float massCut=0);
45 PdtEntry(const char *name, PdtPdg::PdgType code, float spin,
46 float charge, float mass, float width=0, float massCut=0);
47
48 virtual ~PdtEntry();
49
50 void printOn(std::ostream& str) const;
51 void printBFOn(std::ostream& str) const;
52
53 const char *name() const {return _name;}
54 float charge() const {return _charge;}
55 float mass() const {return _mass;}
56 float width() const {return _width;}
57 float widthCut() const {return _widthCut;}
58 float lifetime() const {return _lifetime;}
59 float spin() const {return _spin;}
60 float sumBR() const {return _sumBR;}
61 const vector<DecayMode*> *decayList() const { return _decayList; }
62 void addDecay(float bf, vector<PdtEntry*> *kids );
63 PdtLund::LundType lundId() const { return _lundId;};
64 PdtPdg::PdgType pdgId() const { return _pdgId; }
66 PdtPid::PidType pidId() const { return _pidId; };
68 bool operator==(const PdtEntry &) const;
69 bool operator<(const PdtEntry &) const;
70
71 // new functionality (GHM 05/99) : get the conjugate PdtEntry
72 const PdtEntry* conjugate() const;
73
74protected:
75 char *_name; // name
76 float _mass; // nominal mass (GeV)
77 float _width; // width (0 if stable) (GeV)
78 float _lifetime; // c*tau, in standard length units (cm)
79 float _spin; // spin, in units of hbar
80 float _charge; // charge, in units of e
81 float _widthCut; // used to limit range of B-W
82 float _sumBR; // total branching ratio (should be 1.)
83 vector<DecayMode*>* _decayList; // pointer to linked list of decayers
89 /*mutable*/ const PdtEntry* _conjugate; // this particle conjugate
90};
91
92#endif
PdtPid::PidNeutralType pidNeutId() const
virtual ~PdtEntry()
Definition: PdtEntry.cxx:164
const PdtEntry * conjugate() const
Definition: PdtEntry.cxx:174
bool operator<(const PdtEntry &) const
Definition: PdtEntry.cxx:188
void addDecay(float bf, vector< PdtEntry * > *kids)
Definition: PdtEntry.cxx:105
bool operator==(const PdtEntry &) const
Definition: PdtEntry.cxx:183
void printOn(std::ostream &str) const
const vector< DecayMode * > * decayList() const
void printBFOn(std::ostream &str) const