CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
dchain::FillDecayList< DecayClass, CandidateClass > Class Template Reference

Classes

class  ChildList
 

Static Public Member Functions

static void fill (CombinatoricLoop< CandidateClass > &iLoop, const typename _combinatoricloop_vector_::iterator &aBegin, const typename _combinatoricloop_vector_::iterator &aEnd, const conjugation::Label aLabel, dchain::LabeledParticleList< DecayClass, CandidateClass > &aDecayList)
 
static void doIt (const typename _combinatoricloop_vector_::iterator &aBegin, const typename _combinatoricloop_vector_::iterator &aEnd, ChildList &iList, const conjugation::Label aLabel, dchain::LabeledParticleList< DecayClass, CandidateClass > &aDecayList)
 

Detailed Description

template<class DecayClass, class CandidateClass>
class dchain::FillDecayList< DecayClass, CandidateClass >

Definition at line 135 of file CombinatoricList.cc.

Member Function Documentation

◆ doIt()

template<class DecayClass , class CandidateClass >
static void dchain::FillDecayList< DecayClass, CandidateClass >::doIt ( const typename _combinatoricloop_vector_::iterator &  aBegin,
const typename _combinatoricloop_vector_::iterator &  aEnd,
ChildList iList,
const conjugation::Label  aLabel,
dchain::LabeledParticleList< DecayClass, CandidateClass > &  aDecayList 
)
inlinestatic

Definition at line 215 of file CombinatoricList.cc.

220 {
221 if ( aBegin == aEnd ) {
222 //
223 // if all ConjuagetLists have been used add Decay to the final list
224 //
225 DecayClass* ptr = iList.makeDecay();
226 ReferenceHolder<DecayClass> pHolder(ptr);
228 ptr,
229 aLabel ) ) ;
230 }
231 else {
232 //
233 // make iterator for next ConjugateList loop
234 //
235 const typename _combinatoricloop_vector_::iterator newBegin( aBegin + 1 ) ;
236 //
237 // loop over each entry in the current ConjugateList
238 //
239 typename dchain::CandidateList< CandidateClass >::const_partial_iterator finished( (*(*aBegin)).partial_end() ) ;
240 for ( typename dchain::CandidateList< CandidateClass >::const_partial_iterator entry( (*(*aBegin)).partial_begin() ) ;
241 entry != finished ;
242 ++entry ) {
243 if ( !( iList.overlap( (*entry)() ) ) ) {
244 //
245 // If baseDecay does not overlap current element in the this ConjugateList,
246 // record the current element of this Loop
247 //
248 (*(*aBegin)).setCurrentIterator( entry ) ;
249 //
250 // build new baseDecay with old baseDecay plus the current element
251 //
252 iList.push_back( & (*entry).labeledClass() );
253 //
254 // do all successive ConjugateList loops
255 //
256 doIt( newBegin ,
257 aEnd ,
258 iList ,
259 aLabel ,
260 aDecayList ) ;
261
262 iList.pop_back();
263
264 }
265 }
266 }
267 }
static void doIt(const typename _combinatoricloop_vector_::iterator &aBegin, const typename _combinatoricloop_vector_::iterator &aEnd, ChildList &iList, const conjugation::Label aLabel, dchain::LabeledParticleList< DecayClass, CandidateClass > &aDecayList)
void push_back(const LabeledParticle< ParticleClass > &aEntry)

Referenced by dchain::FillDecayList< DecayClass, CandidateClass >::doIt(), and dchain::FillDecayList< DecayClass, CandidateClass >::fill().

◆ fill()

template<class DecayClass , class CandidateClass >
static void dchain::FillDecayList< DecayClass, CandidateClass >::fill ( CombinatoricLoop< CandidateClass > &  iLoop,
const typename _combinatoricloop_vector_::iterator &  aBegin,
const typename _combinatoricloop_vector_::iterator &  aEnd,
const conjugation::Label  aLabel,
dchain::LabeledParticleList< DecayClass, CandidateClass > &  aDecayList 
)
inlinestatic

Definition at line 185 of file CombinatoricList.cc.

190 {
191 ChildList childList;
192
193 typename dchain::CandidateList<CandidateClass >::const_partial_iterator itEnd = iLoop.partial_end();
194 for( typename dchain::CandidateList<CandidateClass >::const_partial_iterator entry = iLoop.partial_begin();
195 entry != itEnd;
196 ++entry ) {
197
198 iLoop.setCurrentIterator( entry ) ;
199
200 childList.push_back( & (*entry).labeledClass() );
201
202 //
203 // Note: need to cast way `const' to make sure a non-const LabeledParticleList
204 // is returned
205 //
206 doIt( aBegin,
207 aEnd,
208 childList ,
209 aLabel,
210 aDecayList );
211 childList.eraseAll();
212 }
213 }

The documentation for this class was generated from the following file: