7 : checkCharge_(
false), checkOverlap_(
true), dauCharge_(), overlap_(), name_(
name) {}
10 : checkCharge_(
true), checkOverlap_(
true), dauCharge_(2), overlap_(), name_(
name) {
16 : checkCharge_(
true), checkOverlap_(
true), dauCharge_(3), overlap_(), name_(
name) {
23 : checkCharge_(
true), checkOverlap_(
true), dauCharge_(4), overlap_(), name_(
name) {
33 const vector<int>& dauCharge)
62 size_t srcSize =
src.size();
65 <<
"NamedCandCombiner: trying to combine " << srcSize <<
" collections"
66 <<
" but configured to check against " <<
dauCharge_.size() <<
" charges.";
70 <<
"NamedCandCombiner: need to add 2 names, but size is " <<
names.size();
76 const int n = src1.
size();
77 for (
int i1 = 0;
i1 <
n; ++
i1) {
90 const int n1 = src1.
size(), n2 = src2.size();
91 for (
int i1 = 0;
i1 < n1; ++
i1) {
93 for (
int i2 = 0;
i2 < n2; ++
i2) {
117 <<
"NamedCandCombiner: trying to combine 2 collections"
118 <<
" but configured to check against " <<
dauCharge_.size() <<
" charges.";
120 if (
names.size() < 2)
122 <<
"NamedCandCombiner: need to add 2 names, but size is " <<
names.size();
125 const int n =
src.size();
126 for (
int i1 = 0;
i1 <
n; ++
i1) {
145 vector<CandidatePtrVector>
src;
155 vector<CandidatePtrVector>
src;
167 vector<CandidatePtrVector>
src;
179 vector<CandidatePtrVector>::const_iterator collBegin,
180 vector<CandidatePtrVector>::const_iterator collEnd,
181 unique_ptr<NamedCompositeCandidateCollection>& comps)
const {
182 if (collBegin == collEnd) {
183 static const int undetermined = 0, sameDecay = 1, conjDecay = -1, wrongDecay = 2;
184 int decayType = undetermined;
187 for (
size_t i = 0;
i < qStack.size(); ++
i) {
189 if (decayType == undetermined) {
190 if (
q != 0 && dq != 0) {
192 decayType = sameDecay;
194 decayType = conjDecay;
196 decayType = wrongDecay;
198 }
else if ((decayType == sameDecay &&
q != dq) || (decayType == conjDecay &&
q != -dq)) {
199 decayType = wrongDecay;
201 if (decayType == wrongDecay)
205 if (decayType != wrongDecay) {
208 for (CandStack::const_iterator
i =
stack.begin();
i !=
stack.end(); ++
i, ++
ii) {
217 size_t candBegin = 0, candEnd =
src.size();
218 for (CandStack::const_iterator
i =
stack.begin();
i !=
stack.end(); ++
i)
219 if (
src == *
i->second)
220 candBegin =
i->first.second + 1;
221 for (
size_t candIndex = candBegin; candIndex != candEnd; ++candIndex) {
224 bool noOverlap =
true;
226 for (CandStack::const_iterator
i =
stack.begin();
i !=
stack.end(); ++
i)
232 stack.push_back(make_pair(make_pair(candPtr, candIndex), collBegin));
234 qStack.push_back(
cand.charge());
235 combine(collectionIndex + 1,
stack, qStack,
names, collBegin + 1, collEnd, comps);