Changeset 3f8df25 in git for modules/VertexFinder4D.cc
- Timestamp:
- Jun 4, 2016, 8:07:59 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 3c46e17
- Parents:
- 50edcdbf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/VertexFinder4D.cc
r50edcdbf r3f8df25 3 3 * Cluster vertices from tracks using deterministic annealing and timing information 4 4 * 5 * \authors M. Selvaggi, L. Gr ey5 * \authors M. Selvaggi, L. Gray 6 6 * 7 7 */ … … 36 36 37 37 namespace { 38 constexpr double dtCutOff = 4.0;39 40 38 bool recTrackLessZ1(const VertexFinder4D::track_t & tk1, 41 39 const VertexFinder4D::track_t & tk2) … … 49 47 50 48 VertexFinder4D::VertexFinder4D() : 51 fSigma(0), fMinPT(0), fMaxEta(0), fSeedMinPT(0), fMinNDF(0), fGrowSeeds(0) 49 fVerbose(0), fMinPT(0), fVertexSpaceSize(0), fVertexTimeSize(0), 50 fUseTc(0), fBetaMax(0), fBetaStop(0), fCoolingFactor(0), 51 fMaxIterations(0), fDzCutOff(0), fD0CutOff(0), fDtCutOff(0) 52 52 { 53 53 } … … 65 65 66 66 fVerbose = GetBool("Verbose", 1); 67 fSigma = GetDouble("Sigma", 3.0);68 67 fMinPT = GetDouble("MinPT", 0.1); 69 fMaxEta = GetDouble("MaxEta", 10.0); 70 fSeedMinPT = GetDouble("SeedMinPT", 5.0); 71 fMinNDF = GetInt("MinNDF", 4); 72 fGrowSeeds = GetInt("GrowSeeds", 1); 73 74 // setting everything in cm to be able to compare easily with Lindsey code 75 useTc_=true; 76 betamax_=0.1; 77 betastop_ =1.0; 78 coolingFactor_=0.8; 79 maxIterations_=100; 80 vertexSize_=0.05; // 0.5 mm 81 dzCutOff_=4.0; // Adaptive Fitter uses 3.0 but that appears to be a bit tight here sometimes 82 d0CutOff_=3.0; 83 68 fVertexSpaceSize = GetDouble("VertexSpaceSize", 0.5); //in mm 69 fVertexTimeSize = GetDouble("VertexTimeSize", 10E-12); //in s 70 fUseTc = GetBool("UseTc", 1); 71 fBetaMax = GetDouble("BetaMax ", 0.1); 72 fBetaStop = GetDouble("BetaStop", 1.0); 73 fCoolingFactor = GetDouble("CoolingFactor", 0.8); 74 fMaxIterations = GetInt("MaxIterations", 100); 75 fDzCutOff = GetDouble("DzCutOff", 40); // Adaptive Fitter uses 30 mm but that appears to be a bit tight here sometimes 76 fD0CutOff = GetDouble("D0CutOff", 30); 77 fDtCutOff = GetDouble("DtCutOff", 100E-12); // dummy 78 79 // convert stuff in cm, ns 80 fVertexSpaceSize /= 10.0; 81 fVertexTimeSize *= 1E9; 82 fDzCutOff /= 10.0; // Adaptive Fitter uses 3.0 but that appears to be a bit tight here sometimes 83 fD0CutOff /= 10.0; 84 84 85 fInputArray = ImportArray(GetString("InputArray", "TrackSmearing/tracks")); 85 86 fItInputArray = fInputArray->MakeIterator(); … … 105 106 TIterator *ItClusterArray; 106 107 Int_t ivtx = 0; 107 108 109 fInputArray->Sort(); 110 111 TLorentzVector pos, mom; 112 if (fVerbose) 113 { 114 cout<<" start processing vertices ..."<<endl; 115 cout<<" Found "<<fInputArray->GetEntriesFast()<<" input tracks"<<endl; 116 //loop over input tracks 117 fItInputArray->Reset(); 118 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 119 { 120 pos = candidate->InitialPosition; 121 mom = candidate->Momentum; 122 123 cout<<"pt: "<<mom.Pt()<<", eta: "<<mom.Eta()<<", phi: "<<mom.Phi()<<", z: "<<candidate->DZ/10<<endl; 124 } 125 } 126 108 127 // clusterize tracks in Z 109 128 clusterize(*fInputArray, *ClusterArray); 110 129 111 130 if (fVerbose){std::cout << " clustering returned "<< ClusterArray->GetEntriesFast() << " clusters from " << fInputArray->GetEntriesFast() << " selected tracks" <<std::endl;} 112 113 131 114 132 //loop over vertex candidates 115 133 ItClusterArray = ClusterArray->MakeIterator(); … … 117 135 while((candidate = static_cast<Candidate*>(ItClusterArray->Next()))) 118 136 { 137 119 138 double meantime = 0.; 120 139 double expv_x2 = 0.; … … 131 150 int itr = 0; 132 151 152 if(fVerbose)cout<<"this vertex has: "<<candidate->GetCandidates()->GetEntriesFast()<<" tracks"<<endl; 153 133 154 // loop over tracks belonging to this vertex 134 155 TIter it1(candidate->GetCandidates()); 135 156 it1.Reset(); 157 136 158 while((track = static_cast<Candidate*>(it1.Next()))) 137 159 { … … 139 161 itr++; 140 162 // TBC: the time is in ns for now TBC 141 double t = track->Position.T()/c_light; 142 double l = track->L/c_light; 163 double t = track->InitialPosition.T()/c_light; 143 164 double dt = track->ErrorT/c_light; 144 145 const double time = t-l; 165 const double time = t; 146 166 const double inverr = 1.0/dt; 147 167 meantime += time*inverr; … … 151 171 // compute error position TBC 152 172 const double pt = track->Momentum.Pt(); 153 const double z = track->DZ ;173 const double z = track->DZ/10.0; 154 174 const double err_pt = track->ErrorPT; 155 175 const double err_z = track->ErrorDZ; … … 163 183 164 184 // while we are here store cluster index in tracks 165 track->ClusterIndex = ivtx; 166 185 track->ClusterIndex = ivtx; 167 186 } 168 169 187 170 188 meantime = meantime/normw; … … 182 200 candidate->ClusterIndex = ivtx; 183 201 202 fVertexOutputArray->Add(candidate); 203 184 204 ivtx++; 185 205 … … 189 209 std::cout << "=" << candidate->Position.X()/10.0 <<" " << candidate->Position.Y()/10.0 << " " << candidate->Position.Z()/10.0; 190 210 std::cout << " " << candidate->Position.T()/c_light; 211 191 212 std::cout << std::endl; 213 std::cout << "sumpt2 " << candidate->SumPT2<<endl; 192 214 } 193 215 }// end of cluster loop … … 195 217 196 218 if(fVerbose){ 197 std::cout << "PrimaryVertexProducerAlgorithm::vertices 219 std::cout << "PrimaryVertexProducerAlgorithm::vertices candidates =" << ClusterArray->GetEntriesFast() << std::endl; 198 220 } 199 221 … … 219 241 cout << "###################################################" << endl; 220 242 } 221 222 Candidate *candidate; 223 224 vector< Candidate > pv=vertices(tracks); 225 226 cout<<"test"<<endl; 243 244 vector< Candidate* > pv = vertices(); 245 227 246 if(fVerbose){ cout << "# VertexFinder4D::clusterize pv.size="<<pv.size() << endl; } 228 247 if (pv.size()==0){ return; } … … 231 250 //TObjArray *ClusterArray = pv.begin()->GetCandidates(); 232 251 //Candidate *aCluster = static_cast<Candidate*>(&(pv.at(0))); 233 Candidate *aCluster = &(pv.at(0));252 Candidate *aCluster = pv.at(0); 234 253 235 254 // fill into clusters and merge … … 238 257 if( fVerbose ) { 239 258 std::cout << '\t' << 0; 240 std::cout << ' ' << pv.begin()->Position.Z()/10.0 << ' ' << pv.begin()->Position.T()/c_light << std::endl;241 } 242 243 for(vector<Candidate >::iterator k=pv.begin()+1; k!=pv.end(); k++){259 std::cout << ' ' << (*pv.begin())->Position.Z()/10.0 << ' ' << (*pv.begin())->Position.T()/c_light << std::endl; 260 } 261 262 for(vector<Candidate*>::iterator k=pv.begin()+1; k!=pv.end(); k++){ 244 263 if( fVerbose ) { 245 264 std::cout << '\t' << std::distance(pv.begin(),k); 246 std::cout << ' ' << k->Position.Z() << ' ' << k->Position.T() << std::endl;265 std::cout << ' ' << (*k)->Position.Z() << ' ' << (*k)->Position.T() << std::endl; 247 266 } 248 267 249 268 250 269 // TBC - check units here 251 if ( std::abs( k->Position.Z() - (k-1)->Position.Z())/10.0 > (2*vertexSize_) ||252 std::abs( k->Position.T() - (k-1)->Position.Z())/c_light > 2*0.010 ) {270 if ( std::abs((*k)->Position.Z() - (*(k-1))->Position.Z())/10.0 > (2*fVertexSpaceSize) || 271 std::abs((*k)->Position.T() - (*(k-1))->Position.Z())/c_light > 2*0.010 ) { 253 272 // close a cluster 254 273 clusters.Add(aCluster); … … 256 275 } 257 276 //for(unsigned int i=0; i<k->GetCandidates().GetEntriesFast(); i++){ 258 aCluster = &*k;277 aCluster = *k; 259 278 //} 260 279 … … 269 288 //------------------------------------------------------------------------------ 270 289 271 vector< Candidate > 272 VertexFinder4D::vertices(const TObjArray & tracks, const int verbosity) 290 vector< Candidate* > VertexFinder4D::vertices() 273 291 { 274 292 Candidate *candidate; 275 293 UInt_t clusterIndex = 0; 276 vector< Candidate > clusters; 277 278 vector<track_t> tks=fill(tracks); 294 vector< Candidate* > clusters; 295 296 vector<track_t> tks = fill(); 297 298 //print out input tracks 299 300 if(fVerbose) 301 { 302 std::cout<<" start processing vertices ..."<<std::endl; 303 std::cout<<" Found "<<tks.size()<<" input tracks"<<std::endl; 304 //loop over input tracks 305 306 307 for(std::vector<track_t>::const_iterator it=tks.begin(); it!=tks.end(); it++){ 308 double z = it->z; 309 double pt=it->pt; 310 double eta=it->eta; 311 double phi=it->phi; 312 double t = it->t; 313 314 std::cout<<"pt: "<<pt<<", eta: "<<eta<<", phi: "<<phi<<", z: "<<z<<", t: "<<t<<std::endl; 315 } 316 } 279 317 280 318 unsigned int nt=tks.size(); … … 294 332 295 333 // estimate first critical temperature 296 double beta=beta0( betamax_, tks, y);297 niter=0; while((update(beta, tks,y)>1.e-6) && (niter++ < maxIterations_)){ }334 double beta=beta0(fBetaMax, tks, y); 335 niter=0; while((update(beta, tks,y)>1.e-6) && (niter++ < fMaxIterations)){ } 298 336 299 337 // annealing loop, stop when T<Tmin (i.e. beta>1/Tmin) 300 while(beta< betamax_){301 302 if( useTc_){338 while(beta<fBetaMax){ 339 340 if(fUseTc){ 303 341 update(beta, tks,y); 304 342 while(merge(y,beta)){update(beta, tks,y);} 305 split(beta, tks,y , 1.);306 beta=beta/ coolingFactor_;343 split(beta, tks,y); 344 beta=beta/fCoolingFactor; 307 345 }else{ 308 beta=beta/ coolingFactor_;346 beta=beta/fCoolingFactor; 309 347 splitAll(y); 310 348 } 311 349 312 313 350 // make sure we are not too far from equilibrium before cooling further 314 niter=0; while((update(beta, tks,y)>1.e-6) && (niter++ < maxIterations_)){ }315 316 } 317 318 if( useTc_){351 niter=0; while((update(beta, tks,y)>1.e-6) && (niter++ < fMaxIterations)){ } 352 353 } 354 355 if(fUseTc){ 319 356 // last round of splitting, make sure no critical clusters are left 320 357 update(beta, tks,y); 321 358 while(merge(y,beta)){update(beta, tks,y);} 322 359 unsigned int ntry=0; 323 while( split(beta, tks,y ,1.) && (ntry++<10) ){360 while( split(beta, tks,y) && (ntry++<10) ){ 324 361 niter=0; 325 while((update(beta, tks,y)>1.e-6) && (niter++ < maxIterations_)){}362 while((update(beta, tks,y)>1.e-6) && (niter++ < fMaxIterations)){} 326 363 merge(y,beta); 327 364 update(beta, tks,y); … … 330 367 // merge collapsed clusters 331 368 while(merge(y,beta)){update(beta, tks,y);} 332 if(fVerbose ){ cout << "dump after 1st merging " << endl; dump(beta,y,tks ,2);}369 if(fVerbose ){ cout << "dump after 1st merging " << endl; dump(beta,y,tks);} 333 370 } 334 371 335 372 // switch on outlier rejection 336 373 rho0=1./nt; for(vector<vertex_t>::iterator k=y.begin(); k!=y.end(); k++){ k->pk =1.; } // democratic 337 niter=0; while((update(beta, tks,y,rho0) > 1.e-8) && (niter++ < maxIterations_)){ }338 if(fVerbose ){ cout << "rho0=" << rho0 << " niter=" << niter << endl; dump(beta,y,tks ,2);}374 niter=0; while((update(beta, tks,y,rho0) > 1.e-8) && (niter++ < fMaxIterations)){ } 375 if(fVerbose ){ cout << "rho0=" << rho0 << " niter=" << niter << endl; dump(beta,y,tks);} 339 376 340 377 341 378 // merge again (some cluster split by outliers collapse here) 342 while(merge(y ,tks.size())){}343 if(fVerbose ){ cout << "dump after 2nd merging " << endl; dump(beta,y,tks ,2);}379 while(merge(y)){} 380 if(fVerbose ){ cout << "dump after 2nd merging " << endl; dump(beta,y,tks);} 344 381 345 382 346 383 // continue from freeze-out to Tstop (=1) without splitting, eliminate insignificant vertices 347 while(beta<= betastop_){384 while(beta<=fBetaStop){ 348 385 while(purge(y,tks,rho0, beta)){ 349 niter=0; while((update(beta, tks, y, rho0) > 1.e-6) && (niter++ < maxIterations_)){ }386 niter=0; while((update(beta, tks, y, rho0) > 1.e-6) && (niter++ < fMaxIterations)){ } 350 387 } 351 beta/= coolingFactor_;352 niter=0; while((update(beta, tks, y, rho0) > 1.e-6) && (niter++ < maxIterations_)){ }388 beta/=fCoolingFactor; 389 niter=0; while((update(beta, tks, y, rho0) > 1.e-6) && (niter++ < fMaxIterations)){ } 353 390 } 354 391 … … 356 393 // // new, one last round of cleaning at T=Tstop 357 394 // while(purge(y,tks,rho0, beta)){ 358 // niter=0; while((update(beta, tks,y,rho0) > 1.e-6) && (niter++ < maxIterations_)){ }395 // niter=0; while((update(beta, tks,y,rho0) > 1.e-6) && (niter++ < fMaxIterations)){ } 359 396 // } 360 397 … … 362 399 if(fVerbose){ 363 400 cout << "Final result, rho0=" << rho0 << endl; 364 dump(beta,y,tks ,2);401 dump(beta,y,tks); 365 402 } 366 403 … … 371 408 // ensure correct normalization of probabilities, should make double assginment reasonably impossible 372 409 for(unsigned int i=0; i<nt; i++){ 373 tks[i].Z=rho0*exp(-beta*( dzCutOff_*dzCutOff_));410 tks[i].Z=rho0*exp(-beta*( fDzCutOff*fDzCutOff)); 374 411 for(vector<vertex_t>::iterator k=y.begin(); k!=y.end(); k++){ 375 412 tks[i].Z += k->pk * exp(-beta*Eik(tks[i],*k)); … … 420 457 421 458 candidate->ClusterIndex = clusterIndex++;; 422 //candidate->ClusterNDF = 5;423 //candidate->ClusterSigma = fSigma;424 //candidate->SumPT2 = cluster->second;425 426 // TBC units - set everything back in mm427 428 //cout<<z<<","<<time<<endl;429 430 459 candidate->Position.SetXYZT(0.0, 0.0, z*10.0 , time*c_light); 431 460 … … 433 462 candidate->PositionError.SetXYZT(0.0, 0.0, 0.0 , crappy_error_guess*c_light); 434 463 435 //fVertexOutputArray->Add(candidate);436 437 464 clusterIndex++; 438 clusters.push_back( *candidate);465 clusters.push_back(candidate); 439 466 } 440 467 … … 447 474 448 475 vector<VertexFinder4D::track_t> 449 VertexFinder4D::fill( const TObjArray & tracks)const{476 VertexFinder4D::fill()const{ 450 477 451 478 Candidate *candidate; … … 453 480 Double_t z, dz, t, l, dt, d0, d0error; 454 481 455 456 482 // prepare track data for clustering 457 483 vector< track_t > tks; … … 459 485 // loop over input tracks 460 486 fItInputArray->Reset(); 461 cout<<"new fill"<<endl;462 487 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 463 488 { 464 cout<<"new track"<<endl;465 489 //TBC everything in cm 466 490 z = candidate->DZ/10; … … 470 494 // TBC: beamspot size induced error, take 0 for now. 471 495 // + (std::pow(beamspot.BeamWidthX()*cos(phi),2.)+std::pow(beamspot.BeamWidthY()*sin(phi),2.))/std::pow(tantheta,2.) // beam-width induced 472 + vertexSize_*vertexSize_; // intrinsic vertex size, safer for outliers and short lived decays 473 474 // TBC: the time is in ns for now TBC 475 t = candidate->Position.T()/c_light; 496 + fVertexSpaceSize*fVertexSpaceSize; // intrinsic vertex size, safer for outliers and short lived decays 497 498 // TBC: the time is in ns for now TBC 499 //t = candidate->Position.T()/c_light; 500 t = candidate->InitialPosition.T()/c_light; 476 501 l = candidate->L/c_light; 477 502 478 tr.t = (t-l); // 503 double pt = candidate->Momentum.Pt(); 504 double eta = candidate->Momentum.Eta(); 505 double phi = candidate->Momentum.Phi(); 506 507 tr.pt = pt; 508 tr.eta = eta; 509 tr.phi = phi; 510 tr.t = t; // 479 511 tr.dtz = 0.; 480 512 dt = candidate->ErrorT/c_light; 481 tr.dt2 = dt*dt + 0.010*0.010; // the ~injected~ timing error, need to add a small minimum vertex size in time 482 //cout<<"t error: "<<dt<<endl; 483 if (d0CutOff_>0){ 484 485 d0 = TMath::Abs(candidate->D0)/10.0; 486 d0error = candidate->ErrorD0/10.0; 513 tr.dt2 = dt*dt + fVertexTimeSize*fVertexTimeSize; // the ~injected~ timing error plus a small minimum vertex size in time 514 if (fD0CutOff>0){ 515 516 d0 = TMath::Abs(candidate->D0)/10.0; 517 d0error = candidate->ErrorD0/10.0; 487 518 488 tr.pi=1./(1.+exp((d0*d0)/(d0error*d0error) - d0CutOff_*d0CutOff_)); // reduce weight for high ip tracks 489 // cout<<"IP: "<<d0<<endl; 490 // cout<<"IP error: "<<d0error<<endl; 491 492 }else{ 519 tr.pi=1./(1.+exp((d0*d0)/(d0error*d0error) - fD0CutOff*fD0CutOff)); // reduce weight for high ip tracks 520 521 } 522 else{ 493 523 tr.pi=1.; 494 524 } 495 525 tr.tt=&(*candidate); 496 526 tr.Z=1.; 497 if( tr.pi > 1e-3 ) { 527 528 // TBC now putting track selection here (> fPTMin) 529 if( tr.pi > 1e-3 && tr.pt > fMinPT) { 498 530 tks.push_back(tr); 499 531 } 500 501 cout<<"dz2: "<<tr.dz2<<endl;502 cout<<"t: "<<tr.t<<endl;503 cout<<"z: "<<tr.z<<endl;504 cout<<"dt2: "<<tr.dt2<<endl;505 cout<<"pi: "<<tr.pi<<endl;506 507 508 532 509 533 } … … 523 547 //-------------------------------------------------------------------------------- 524 548 525 void VertexFinder4D::dump(const double beta, const vector<vertex_t> & y, const vector<track_t> & tks0 , int verbosity)const{549 void VertexFinder4D::dump(const double beta, const vector<vertex_t> & y, const vector<track_t> & tks0)const{ 526 550 527 551 // copy and sort for nicer printout … … 531 555 532 556 cout << "-----DAClusterizerInZT::dump ----" << endl; 533 cout << " beta=" << beta << " betamax= " << betamax_<< endl;557 cout << " beta=" << beta << " betamax= " << fBetaMax << endl; 534 558 cout << " z= "; 535 559 cout.precision(4); … … 554 578 cout << endl; 555 579 556 if( verbosity>0){580 if(fVerbose){ 557 581 double E=0, F=0; 558 582 cout << endl; … … 566 590 << setw(8) << fixed << setprecision(4) << tt << " +/-" << setw(6) << std::sqrt(tks[i].dt2) ; 567 591 568 569 // TBC - see later if we want to keep these print outs570 /*571 if(tks[i].tt->track().quality(reco::TrackBase::highPurity)){ cout << " *";}else{cout <<" ";}572 if(tks[i].tt->track().hitPattern().hasValidHitInFirstPixelBarrel()){cout <<"+";}else{cout << "-";}573 574 cout << setw(1) << tks[i].tt->track().hitPattern().pixelBarrelLayersWithMeasurement(); // see DataFormats/TrackReco/interface/HitPattern.h575 cout << setw(1) << tks[i].tt->track().hitPattern().pixelEndcapLayersWithMeasurement();576 cout << setw(1) << hex << tks[i].tt->track().hitPattern().trackerLayersWithMeasurement()-tks[i].tt->track().hitPattern().pixelLayersWithMeasurement() <<dec;577 cout << "=" << setw(1)<<hex <<tks[i].tt->track().trackerExpectedHitsOuter().numberOfHits() << dec;578 579 Measurement1D IP=tks[i].tt->stateAtBeamLine().transverseImpactParameter();580 cout << setw (8) << IP.value() << "+/-" << setw (6) << IP.error();581 cout << " " << setw(6) << setprecision(2) << tks[i].tt->track().pt()*tks[i].tt->track().charge();582 cout << " " << setw(5) << setprecision(2) << tks[i].tt->track().phi()583 << " " << setw(5) << setprecision(2) << tks[i].tt->track().eta() ;584 */585 592 double sump=0.; 586 593 for(vector<vertex_t>::const_iterator k=y.begin(); k!=y.end(); k++){ … … 704 711 705 712 // update pik and Zi and Ti 706 double Zi = rho0*std::exp(-beta*( dzCutOff_*dzCutOff_));// cut-off (eventually add finite size in time)707 //double Ti = 0.; // dt0*std::exp(-beta* dtCutOff_);713 double Zi = rho0*std::exp(-beta*(fDzCutOff*fDzCutOff));// cut-off (eventually add finite size in time) 714 //double Ti = 0.; // dt0*std::exp(-beta*fDtCutOff); 708 715 for(vector<vertex_t>::iterator k=y.begin(); k!=y.end(); k++){ 709 716 k->ei = std::exp(-beta*Eik(tks[i],*k));// cache exponential for one track at a time … … 725 732 } 726 733 727 728 734 } // end of track loop 729 730 735 731 736 // now update z … … 752 757 //------------------------------------------------------------------------------ 753 758 754 bool VertexFinder4D::merge(vector<vertex_t> & y , int nt)const{759 bool VertexFinder4D::merge(vector<vertex_t> & y)const{ 755 760 // merge clusters that collapsed or never separated, return true if vertices were merged, false otherwise 756 761 … … 827 832 int nUnique=0; 828 833 double sump=0; 829 double pmax=k->pk/(k->pk+rho0*exp(-beta* dzCutOff_*dzCutOff_));834 double pmax=k->pk/(k->pk+rho0*exp(-beta*fDzCutOff*fDzCutOff)); 830 835 for(unsigned int i=0; i<nt; i++){ 831 836 if(tks[i].Z > 0){ … … 892 897 893 898 if (T0>1./betamax){ 894 return betamax/pow( coolingFactor_, int(std::log(T0*betamax)/std::log(coolingFactor_))-1 );899 return betamax/pow(fCoolingFactor, int(std::log(T0*betamax)/std::log(fCoolingFactor))-1 ); 895 900 }else{ 896 901 // ensure at least one annealing step 897 return betamax/ coolingFactor_;902 return betamax/fCoolingFactor; 898 903 } 899 904 } … … 903 908 bool VertexFinder4D::split( double beta, 904 909 vector<track_t> & tks, 905 vector<vertex_t> & y, 906 double threshold ) const { 910 vector<vertex_t> & y) const { 907 911 // split only critical vertices (Tc >~ T=1/beta <==> beta*Tc>~1) 908 912 // an update must have been made just before doing this (same beta, no merging)
Note:
See TracChangeset
for help on using the changeset viewer.