28 else if(
daughters.at(0)->getMothers().size()==1)
79 vector<PhotosParticle *> ret =
mothers;
88 if(
mothers.size()>0)
return mothers.at(0)->checkMomentumConservation();
94 Log::Debug(700)<<
"PhotosBranch::createBranches - filtering started"<<endl;
95 list<PhotosParticle *> list(particles.begin(),particles.end());
96 vector<PhotosBranch *> branches;
101 std::list<PhotosParticle *>::iterator it;
102 for(it=list.begin();it!=list.end();it++)
108 Log::Debug(701)<<
" Forced: "<<(*it)->getPdgID()<<
" (barcode: "<<(*it)->getBarcode()<<
") with forcing status= "<<forcing<<endl;
109 branches.push_back(branch);
121 std::list<PhotosParticle *>::iterator it2;
122 for(it2=list.begin();it2!=list.end();it2++)
124 for(
int i=0;
i<(int)tree.size();
i++)
126 if(tree.at(
i)->getBarcode()==(*it2)->getBarcode())
129 branches.push_back(b);
132 it2 = list.erase(it2);
150 if(!particle)
continue;
154 if(!suppression) branches.push_back(branch);
157 Log::Debug(702)<<
" Suppressed: "<<particle->
getPdgID()<<
" (barcode: "<<particle->
getBarcode()<<
") with suppression status= "<<suppression<<endl;
167 std::list<PhotosParticle *>::iterator it;
168 for(it=list.begin();it!=list.end();it++)
170 for(
int i=0;
i<(int)tree.size();
i++)
172 if(tree.at(
i)->getBarcode()==(*it)->getBarcode())
189 for(
int i=0;
i<(int)mothers.size();
i++)
193 std::list<PhotosParticle *>::iterator it;
194 for(it=list.begin();it!=list.end();it++)
216 if(
mothers.size()==0)
return 0;
217 motherID =
mothers.at(0)->getPdgID();
224 vector< vector<int> *> &patternList = *list;
227 for(
int j=0; j<(int)patternList.size();j++)
230 if(motherID!=(*patternList[j])[0])
continue;
233 vector<int> &pattern = *patternList[j];
235 for(
int k = 1; k<(int)pattern.size()-1; k++)
238 for(
int l=0;l<(int)dID.size(); l++)
239 if(pattern[k]==dID[l]) { oneMatch=
true;
break; }
240 if(!oneMatch) { fullMatch=
false;
break; }
250 if(pattern.size()<=2 || fullMatch)
251 return (pattern.back()==1) ? 2 : 1;
int checkSuppressionLevel()
static vector< PhotosBranch * > createBranches(vector< PhotosParticle * > particles)
bool checkMomentumConservation()
int getSuppressionStatus()
vector< PhotosParticle * > getMothers()
static vector< vector< int > * > * forceBremList
PhotosParticle * getDecayingParticle()
static vector< vector< int > * > * supBremList
std::vector< PhotosParticle * > findProductionMothers()
virtual int getBarcode()=0
static ostream & Debug(unsigned short int code=0, bool count=true)
vector< PhotosParticle * > daughters
void photos_make_c_(int *id)
std::vector< PhotosParticle * > getDecayTree()
PhotosParticle * particle
vector< PhotosParticle * > mothers
vector< PhotosParticle * > getParticles()
PhotosBranch(PhotosParticle *p)
static ostream & Warning(bool count=true)
virtual bool checkMomentumConservation()=0
int checkList(bool forceOrSuppress)
static int set(PhotosBranch *branch)
virtual std::vector< PhotosParticle * > getDaughters()=0