Commit 0705fa86 authored by Frank Krauss's avatar Frank Krauss

bugs fixed because I'm Mr Cool. Harhar.

parent 64508dfc
......@@ -20,6 +20,7 @@ void Cluster_Decayer::Init() { m_splitter.Init(); }
void Cluster_Decayer::Reset() {}
bool Cluster_Decayer::operator()() {
//if (!p_cluster_list->empty()) msg_Out()<<METHOD<<"\n"<<(*p_cluster_list)<<"\n\n";
while (!p_cluster_list->empty()) {
if (!Treat(p_cluster_list->front())) {
return false;
......@@ -38,6 +39,7 @@ bool Cluster_Decayer::Treat(Cluster * cluster) {
switch (p_softclusters->Treat(cluster,true)) {
case -1:
// cluster cannot decay into anything - return false (triggers new event)
msg_Error()<<METHOD<<"("<<mustdecay<<") throws error for:\n"<<(*cluster)<<"\n";
cluster->Clear();
delete cluster;
return false;
......
......@@ -33,6 +33,8 @@ bool Cluster_Splitter::MakeLongitudinalMomenta() {
m_z2 = m_zselector(m_z2min,m_z2max);
m_R12 = m_z1*(1.-m_z2)*m_Q2-m_kt2;
m_R21 = (1.-m_z1)*m_z2*m_Q2-m_kt2;
//msg_Out()<<METHOD<<"("<<p_part1->Flavour()<<"/"<<m_newflav1<<", "<<m_R12<<", "<<m_minQ_1<<") "
// <<"("<<m_newflav2<<"/"<<p_part2->Flavour()<<", "<<m_R21<<", "<<m_minQ_2<<")\n";
return CheckIfAllowed();
}
......
......@@ -159,5 +159,6 @@ Cluster * Gluon_Splitter::MakeCluster() {
// Make new particle
Proto_Particle * newp12 = new Proto_Particle(m_newflav1,newmom12,'l');
// Take care of sequence in cluster = triplet + anti-triplet
return (m_barrd?new Cluster(newp12,p_part1):new Cluster(p_part1,newp12));
Cluster * cluster(m_barrd?new Cluster(newp12,p_part1):new Cluster(p_part1,newp12));
return cluster;
}
......@@ -85,7 +85,11 @@ bool Singlet_Checker::operator()() {
}
// more than two partons - fusing partons may help in retry.
// if fusing does not work we will re-try the event
else if (!FusePartonsInLowMassSinglet()) return false;
else if (!FusePartonsInLowMassSinglet()) {
msg_Error()<<METHOD<<" throws error - fusing didn't work out.\n"
<<(*p_singlet)<<"\n";
return false;
}
}
// everything is fine -- the singlet can go on as normal.
else lsit++;
......@@ -93,7 +97,7 @@ bool Singlet_Checker::operator()() {
// invoking the rescue system, if neccessary.
if (m_badones.size()>0) {
if (!DealWithProblematicSinglets()) {
msg_Error()<<METHOD<<" throw error - no rescue possible.\n";
msg_Error()<<METHOD<<" throws error - no rescue possible.\n";
return false;
}
}
......@@ -123,7 +127,8 @@ bool Singlet_Checker::CheckSinglet() {
plit1++;
}
// is gluon "ring" must also check for pair made of first and last particle
if (m_isring) {
if (p_singlet->front()->Flavour().IsGluon() &&
p_singlet->back()->Flavour().IsGluon()) {
p_part1 = (*plit1);
p_part2 = p_singlet->front();
if (!CheckMass(p_part1,p_part2)) return false;
......
......@@ -53,6 +53,8 @@ bool Singlet::Combine(Proto_Particle * part1,Proto_Particle * part2) {
Erase(part1);
return true;
}
msg_Debugging()<<METHOD<<" tries to combine two partons:\n"
<<(*part1)<<"\n"<<(*part2)<<".\n";
return false;
}
......
......@@ -116,21 +116,27 @@ void Splitter_Base::PopFlavours() {
void Splitter_Base::DetermineMinimalMasses() {
if (!m_flavs1.first.IsGluon() && !m_flavs1.second.IsGluon()) {
m_minQ_1 = Min(Max(0.,p_singletransitions->GetLightestMass(m_flavs1)),
p_doubletransitions->GetLightestMass(m_flavs1));
m_minQ_1 = p_doubletransitions->GetLightestMass(m_flavs1);
if (!m_flavs1.first.IsDiQuark() && !m_flavs1.second.IsDiQuark())
m_minQ_1 = Min(m_minQ_1,
Max(0.,p_singletransitions->GetLightestMass(m_flavs1)));
}
else {
m_minQ_1 = (p_constituents->Mass(m_flavs1.first)+
p_constituents->Mass(m_flavs1.second));
}
if (!m_flavs2.first.IsGluon() && !m_flavs2.second.IsGluon()) {
m_minQ_2 = Min(Max(0.,p_singletransitions->GetLightestMass(m_flavs2)),
p_doubletransitions->GetLightestMass(m_flavs2));
m_minQ_2 = p_doubletransitions->GetLightestMass(m_flavs2);
if (!m_flavs2.first.IsDiQuark() && !m_flavs2.second.IsDiQuark())
m_minQ_2 = Min(m_minQ_2,
Max(0.,p_singletransitions->GetLightestMass(m_flavs2)));
}
else {
m_minQ_2 = (p_constituents->Mass(m_flavs2.first)+
p_constituents->Mass(m_flavs2.second));
}
//msg_Out()<<METHOD<<"("<<m_flavs1.first<<"+"<<m_flavs1.second<<" --> "<<m_minQ_1<<", "
// <<m_flavs2.first<<"+"<<m_flavs2.second<<" --> "<<m_minQ_2<<").\n";
m_minQ_12 = sqr(m_minQ_1);
m_minQ_22 = sqr(m_minQ_2);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment