BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/DecayChain/include/DecayChain/Element/LabeledParticle.h
Go to the documentation of this file.
1#ifndef DCHAIN_LABELEDPARTICLE_H
2#define DCHAIN_LABELEDPARTICLE_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: LabeledParticle
7//
8// Description: pairing of subclass of Decay<> and Conjugation::Label
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Wed Sep 18 14:47:30 EDT 1996
15// $Id: LabeledParticle.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: LabeledParticle.h,v $
20// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
21// first import of DecayChain
22//
23// Revision 1.1 2006/01/11 20:28:08 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.1.1.1 2000/12/18 22:16:49 cdj
27// imported DChain
28//
29// Revision 1.9 1998/08/19 20:56:00 sjp
30// Added include of definitions
31//
32// Revision 1.8 1997/08/28 06:59:19 sjp
33// Modified files to handle complete templating
34//
35// Revision 1.7 1997/08/26 04:12:58 sjp
36// Made Candidate handling objects into `CandidateClass' Templates
37//
38// Revision 1.6 1997/08/19 23:01:43 sjp
39// Restructured package to be independent of Rock
40//
41// Revision 1.5 1997/08/15 21:32:20 sjp
42// Updated to use <package>/<file>.h include structure.
43// Updated to use bug flags specified in Experiement.h
44//
45// Revision 1.4 1997/01/22 16:27:18 sjp
46// Fixed error in pre-processor labels
47//
48// Revision 1.3 1997/01/21 20:33:48 sjp
49// Changed CPP flags and include because of library reorganization
50//
51// Revision 1.2 1996/12/20 21:19:09 sjp
52// Extended pathnames for Include files
53//
54// Revision 1.1 1996/11/04 19:35:57 sjp
55// New file for new `List' module
56//
57
58// system include files
59
60// user include files
61#include "DecayChain/Element/LabeledCandidate.h" // superclass
62#include "DecayChain/Element/conjugation.h" // enumerator
63
64// forward declarations
65namespace dchain {
66
67 template <class T> struct ParticleTraits {
68 typedef typename T::CandidateClass CandidateType;
69 };
70
71 template <class T>
72 class LabeledParticle : public LabeledCandidate<typename ParticleTraits<T>::CandidateType> {
73 // friend classses and functions
74
75 public:
76 // constants, enums and typedefs
77
78 // Constructors and destructor
80 LabeledParticle( const LabeledParticle<T>& aOtherLabeled )
81 : LabeledCandidate<typename ParticleTraits<T>::CandidateType>( aOtherLabeled ) {}
82
83 template <class THolder>
84 LabeledParticle( THolder aT, const typename conjugation::Label aLabel )
85 : LabeledCandidate<typename ParticleTraits<T>::CandidateType>( aT, aLabel ) {}
86
87 // assignment operator(s)
88 // const LabeledParticle< T >& operator=( const LabeledParticle< T >& aOtherLabeled ) ;
89
90 // member functions
91
92 // const member functions
93 // note: The following function can NOT be virtual as its return type changes
94 // for Tes
95 const T& operator()() const { return *static_cast<const T*>( this->pointer() ); }
96 //
97 const T& particle() const { return *static_cast<const T*>( this->pointer() ); }
98
99 // static member functions
100
101 protected:
102 // protected member functions
103
104 // protected const member functions
105
106 private:
107 // Constructors and destructor
108
109 // private member functions
110
111 // private const member functions
112
113 // data members
114
115 // static data members
116 };
117
118} // namespace dchain
119#endif /* DCHAIN_LABELEDPARTICLE_H */
LabeledParticle(THolder aT, const typename conjugation::Label aLabel)