Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/ClusterSequence.cc

    r1d208a2 r10e33bc  
    11//FJSTARTHEADER
    2 // $Id: ClusterSequence.cc 4154 2016-07-20 16:20:48Z soyez $
     2// $Id: ClusterSequence.cc 3809 2015-02-20 13:05:13Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    152152  // set the pointer in the wrapper to this object to NULL to say that
    153153  // we're going out of scope
    154   if (_structure_shared_ptr){
    155     ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr.get());
     154  if (_structure_shared_ptr()){
     155    ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr());
    156156    // normally the csi is purely internal so it really should not be
    157157    // NULL i.e assert should be OK
     
    724724  }
    725725 
    726   //bool code_should_never_reach_here = false;
    727   //assert(code_should_never_reach_here);
    728 
    729   assert(0 && "Code should never reach here");
    730 
     726  bool code_should_never_reach_here = false;
     727  assert(code_should_never_reach_here);
    731728  return N2MHTLazy9;
    732729
     
    778775
    779776
    780 ClusterSequence & ClusterSequence::operator=(const ClusterSequence & cs) {
    781   // self assignment is trivial
    782   if (&cs != this) {
    783     _deletes_self_when_unused = false;
    784     transfer_from_sequence(cs);
    785   }
    786   return *this;
    787 }
    788 
    789777//----------------------------------------------------------------------
    790778// transfer the sequence contained in other_seq into our own;
     
    827815
    828816  // clean up existing structure
    829   if (_structure_shared_ptr) {
     817  if (_structure_shared_ptr()) {
    830818    // If there are jets associated with an old version of the CS and
    831819    // a new one, keeping track of when to delete the CS becomes more
     
    835823    // anything that is currently associated with the cluster sequence
    836824    // should be told that its cluster sequence no longer exists
    837     ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr.get());
     825    ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr());
    838826    assert(csi != NULL);
    839827    csi->set_associated_cs(NULL);
     
    14671455// initialise the history in a standard way
    14681456void ClusterSequence::_add_step_to_history (
    1469                //NO_LONGER_USED: const int step_number,
    1470                const int parent1,
     1457               const int step_number, const int parent1,
    14711458               const int parent2, const int jetp_index,
    14721459               const double dij) {
     
    14821469
    14831470  int local_step = _history.size()-1;
    1484   //#ifndef __NO_ASSERTS__
    1485   //assert(local_step == step_number);
    1486   //#endif
     1471  assert(local_step == step_number);
    14871472
    14881473  // sanity check: make sure the particles have not already been recombined
     
    16841669  int hist_j = _jets[jet_j].cluster_hist_index();
    16851670
    1686   _add_step_to_history(min(hist_i, hist_j), max(hist_i,hist_j),
     1671  _add_step_to_history(newstep_k, min(hist_i, hist_j), max(hist_i,hist_j),
    16871672                       newjet_k, dij);
    1688 
    1689   //  _add_step_to_history(newstep_k, min(hist_i, hist_j), max(hist_i,hist_j),
    1690   //                   newjet_k, dij);
    1691 
    16921673
    16931674}
     
    16991680void ClusterSequence::_do_iB_recombination_step(
    17001681                                  const int jet_i, const double diB) {
     1682  // get history index
     1683  int newstep_k = _history.size();
     1684
    17011685  // recombine the jet with the beam
    1702   _add_step_to_history(_jets[jet_i].cluster_hist_index(),BeamJet,
     1686  _add_step_to_history(newstep_k,_jets[jet_i].cluster_hist_index(),BeamJet,
    17031687                       Invalid, diB);
    1704 
    1705   // // get history index
    1706   // int newstep_k = _history.size();
    1707   //
    1708   // _add_step_to_history(newstep_k,_jets[jet_i].cluster_hist_index(),BeamJet,
    1709   //                   Invalid, diB);
    17101688
    17111689}
Note: See TracChangeset for help on using the changeset viewer.