Ticket #39: partonic-decay-vertex-position.patch
File partonic-decay-vertex-position.patch, 3.3 KB (added by , 16 years ago) |
---|
-
SHERPA/Single_Events/Hadron_Decays.C
314 314 315 315 return true; 316 316 } 317 DEBUG_INFO("did not find exclusive decay channel, continue."); 317 else { 318 DEBUG_INFO("did not find exclusive decay channel, continue."); 319 Vec4D vertex_position=decayblob->Position(); 320 showerblob->SetPosition(vertex_position); 321 fragmentationblob->SetPosition(vertex_position); 322 } 318 323 } 319 324 } 320 325 } … … 344 349 void Hadron_Decays::SetPosition(ATOOLS::Blob* blob) 345 350 { 346 351 Particle* inpart = blob->InParticle(0); 347 if(inpart->Flav().Kfcode()==kf_K) return; 352 if(inpart->Flav().Kfcode()==kf_K) { 353 blob->SetPosition(inpart->XProd()); 354 return; 355 } 348 356 349 357 // boost lifetime into lab 350 358 double gamma = 1./rpa.gen.Accu(); -
SHERPA/SoftPhysics/Fragmentation_Handler.C
116 116 { 117 117 Particle * part(NULL); 118 118 Blob * blob(NULL); 119 Part_List * plist = new Part_List; 119 std::vector<Part_List*> plists; 120 plists.push_back(new Part_List); 120 121 for (Blob_List::iterator blit=bloblist->begin();blit!=bloblist->end();++blit) { 121 122 if ((*blit)->Has(blob_status::needs_hadronization)) { 123 // If not coming from hadron decays, fill default plists[0]. 124 // If from hadron decays, create separate plist for each blob 125 // such that there is a one-to-one correspondence between 126 // fragmentation outcome and hadron decay. This is needed for setting 127 // the correct vertex position, and to reject exclusive final states 128 Part_List* plist(plists[0]); 129 Blob* upstream_blob=(*blit)->UpstreamBlob(); 130 if (upstream_blob && upstream_blob->Type()==btp::Hadron_Decay) { 131 plist=new Part_List; 132 plists.push_back(plist); 133 } 134 122 135 std::vector<Particle*> taus; 123 136 for (int i=0;i<(*blit)->NOutP();i++) { 124 137 part = (*blit)->OutParticle(i); … … 149 162 (*blit)->UnsetStatus(blob_status::needs_hadronization); 150 163 } 151 164 } 152 if (plist ->empty()) {165 if (plists[0]->empty() && plists.size()<2) { 153 166 msg_Debugging()<<"WARNING in Lund_Interface::PrepareFragmentationBlob:"<<endl 154 167 <<" No coloured particle found leaving shower blobs."<<endl; 155 delete plist ;168 delete plists[0]; 156 169 return Return_Value::Nothing; 157 170 } 158 171 159 172 173 Return_Value::code ret(Return_Value::Success); 174 for (size_t i=0; i<plists.size(); ++i) { 175 if (plists[i]->empty()) continue; 176 Part_List* plist=plists[i]; 160 177 int col1, col2; 161 178 bool hit1, hit2; 162 179 Part_List * pli(NULL); … … 233 250 delete partlists[i]; 234 251 } 235 252 delete plist; 236 return Return_Value::Success; 253 ret=Return_Value::Success; 254 } 255 else { 256 for(size_t i=0;i<partlists.size();i++) { 257 delete partlists[i]; 258 } 259 delete plist; 260 ret=Return_Value::Error; 261 break; 237 262 } 238 for(size_t i=0;i<partlists.size();i++) {239 delete partlists[i];240 263 } 241 delete plist; 242 return Return_Value::Error; 264 return ret; 243 265 } 244 266