BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcRecoUtil/include/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/PdtGeant.h"
27#include "MdcRecoUtil/PdtLund.h"
28#include "MdcRecoUtil/PdtPdg.h"
29#include "MdcRecoUtil/PdtPid.h"
30#include <vector>
31using std::vector;
32
33#include <iosfwd>
34class DecayMode;
35
36class PdtEntry {
37public:
38 // in the constructor, spin is in units of hbar, charge in unit of e.
39 // mass and width are in GeV.
40 PdtEntry( const char* name, PdtLund::LundType code, float spin, float charge, float mass,
41 float width = 0, float massCut = 0 );
42 PdtEntry( const char* name, PdtGeant::GeantType code, float spin, float charge, float mass,
43 float width = 0, float massCut = 0 );
44 PdtEntry( const char* name, PdtPdg::PdgType code, float spin, float charge, float mass,
45 float width = 0, float massCut = 0 );
46
47 virtual ~PdtEntry();
48
49 void printOn( std::ostream& str ) const;
50 void printBFOn( std::ostream& str ) const;
51
52 const char* name() const { return _name; }
53 float charge() const { return _charge; }
54 float mass() const { return _mass; }
55 float width() const { return _width; }
56 float widthCut() const { return _widthCut; }
57 float lifetime() const { return _lifetime; }
58 float spin() const { return _spin; }
59 float sumBR() const { return _sumBR; }
60 const vector<DecayMode*>* decayList() const { return _decayList; }
61 void addDecay( float bf, vector<PdtEntry*>* kids );
62 PdtLund::LundType lundId() const { return _lundId; };
63 PdtPdg::PdgType pdgId() const { return _pdgId; }
65 PdtPid::PidType pidId() const { return _pidId; };
67 bool operator==( const PdtEntry& ) const;
68 bool operator<( const PdtEntry& ) const;
69
70 // new functionality (GHM 05/99) : get the conjugate PdtEntry
71 const PdtEntry* conjugate() const;
72
73protected:
74 char* _name; // name
75 float _mass; // nominal mass (GeV)
76 float _width; // width (0 if stable) (GeV)
77 float _lifetime; // c*tau, in standard length units (cm)
78 float _spin; // spin, in units of hbar
79 float _charge; // charge, in units of e
80 float _widthCut; // used to limit range of B-W
81 float _sumBR; // total branching ratio (should be 1.)
82 vector<DecayMode*>* _decayList; // pointer to linked list of decayers
88 /*mutable*/ const PdtEntry* _conjugate; // this particle conjugate
89};
90
91#endif
const PdtEntry * conjugate() const
virtual ~PdtEntry()
PdtEntry(const char *name, PdtGeant::GeantType code, float spin, float charge, float mass, float width=0, float massCut=0)
bool operator<(const PdtEntry &) const
PdtEntry(const char *name, PdtPdg::PdgType code, float spin, float charge, float mass, float width=0, float massCut=0)
void addDecay(float bf, vector< PdtEntry * > *kids)
bool operator==(const PdtEntry &) const
PdtEntry(const char *name, PdtLund::LundType code, float spin, float charge, float mass, float width=0, float massCut=0)
void printOn(std::ostream &str) const
void printBFOn(std::ostream &str) const