00001 #ifndef DCHAIN_DCNEUTRALNCVISIBLELIST_CC
00002 #define DCHAIN_DCNEUTRALNCVISIBLELIST_CC
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 #include <stdlib.h>
00090
00091
00092 #include "DecayChain/Function/DCSelectionFunction.h"
00093 #include "DecayChain/Function/DCAnalysisFunction.h"
00094 #include "DecayChain/Element/conjugation.h"
00095 #include "DecayChain/Element/LabeledParticle.h"
00096 #include "DecayChain/Iterator/MuteWholeItr.h"
00097 #include "DecayChain/Iterator/WholeItr.h"
00098 #include "DecayChain/List/LabeledParticleList.h"
00099 #include "DecayChain/List/ChosenConjugateList.h"
00100
00101 #include "DecayChain/List/DCNeutralNCVisibleList.h"
00102
00103
00104
00105
00106
00107
00108
00109
00110 static const dchain::conjugation::Label kIsntBar = dchain::conjugation::kHeads ;
00111 static const dchain::conjugation::Label kIsBar = dchain::conjugation::kTails ;
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 template < class NeutralNC , class CandidateClass >
00122 DCNeutralNCVisibleList< NeutralNC , CandidateClass >::
00123 DCNeutralNCVisibleList( bool ( * pFunction )( NeutralNC& ) ) :
00124 m_function( pFunction ) ,
00125 m_functionalObject( 0 )
00126 {
00127 }
00128
00129 template < class NeutralNC , class CandidateClass >
00130 DCNeutralNCVisibleList< NeutralNC , CandidateClass >::
00131 DCNeutralNCVisibleList(const DCNeutralNCVisibleList<NeutralNC, CandidateClass>&
00132 aOtherList ,
00133 bool ( * pFunction )( NeutralNC& ) ) :
00134 dchain::NeutralNCVisibleList<NeutralNC,CandidateClass>(aOtherList,pFunction),
00135 m_function( pFunction ) ,
00136 m_functionalObject( 0 )
00137 {
00138 }
00139
00140 template < class NeutralNC , class CandidateClass >
00141 DCNeutralNCVisibleList< NeutralNC , CandidateClass >::
00142 DCNeutralNCVisibleList( DCSelectionFunction< NeutralNC >& aFunctionalObject ) :
00143 m_function( 0 ) ,
00144 m_functionalObject( &aFunctionalObject )
00145 {
00146 }
00147
00148 template < class NeutralNC , class CandidateClass >
00149 DCNeutralNCVisibleList< NeutralNC , CandidateClass >::
00150 DCNeutralNCVisibleList(const DCNeutralNCVisibleList<NeutralNC, CandidateClass>&
00151 aOtherList ,
00152 DCSelectionFunction< NeutralNC >& aFunctionalObject ) :
00153 dchain::NeutralNCVisibleList<NeutralNC,CandidateClass>(aOtherList, aFunctionalObject),
00154 m_function( 0 ) ,
00155 m_functionalObject( &aFunctionalObject )
00156 {
00157 }
00158
00159 template < class NeutralNC , class CandidateClass >
00160 DCNeutralNCVisibleList< NeutralNC , CandidateClass >::~DCNeutralNCVisibleList()
00161 {
00162 }
00163
00164
00165
00166
00167
00168 template < class NeutralNC , class CandidateClass >
00169 const DCNeutralNCVisibleList< NeutralNC , CandidateClass >& DCNeutralNCVisibleList< NeutralNC , CandidateClass >::operator=( const DCNeutralNCVisibleList< NeutralNC , CandidateClass >& aOtherList )
00170 {
00171 this->eraseContents() ;
00172 fill( aOtherList.labeledCandidateList() ) ;
00173 return ( *this ) ;
00174 }
00175
00176
00177
00178
00179
00180 template < class NeutralNC , class CandidateClass >
00181 void DCNeutralNCVisibleList< NeutralNC , CandidateClass >::fill(
00182 const dchain::LabeledParticleList< NeutralNC , CandidateClass >& aList )
00183 {
00184 if ( 0 != m_function ) {
00185 fill(aList, dchain::NewMaker<NeutralNC>(), m_function);
00186 } else if (m_functionalObject) {
00187 fill(aList,dchain::NewMaker<NeutralNC>(), m_functionalObject);
00188 } else {
00189 fill(aList, dchain::NewMaker<NeutralNC>(), dchain::SelectAll<NeutralNC>());
00190 }
00191 }
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203 #endif