Fork me on GitHub

Changeset fb4337d in git


Ignore:
Timestamp:
Jul 24, 2015, 4:21:46 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
7aea88d
Parents:
29f8a06
Message:

use pointers for InputParticles in RunPUPPI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/RunPUPPI.cc

    r29f8a06 rfb4337d  
    131131  fPVItInputArray->Reset();
    132132
    133   std::vector<Candidate> InputParticles;
     133  std::vector<Candidate *> InputParticles;
    134134  InputParticles.clear();
    135135
     
    141141  // Fill input particles for puppi
    142142  std::vector<RecoObj> puppiInputVector;
     143  puppiInputVector.clear();
    143144
    144145  // Loop on charge track candidate
     
    177178
    178179      puppiInputVector.push_back(curRecoObj);
    179       InputParticles.push_back(*candidate);
     180      InputParticles.push_back(candidate);
    180181  }
    181182
     
    207208      }
    208209      puppiInputVector.push_back(curRecoObj);
    209       InputParticles.push_back(*candidate);
     210      InputParticles.push_back(candidate);
    210211  }
    211212
     
    247248  for (std::vector<fastjet::PseudoJet>::iterator it = puppiParticles.begin() ; it != puppiParticles.end() ; it++) {
    248249    if(it->user_index() <= int(InputParticles.size())){     
    249       candidate = factory->NewCandidate();
    250       candidate = dynamic_cast<Candidate*>(InputParticles.at(it->user_index()).Clone());
    251       candidate->Momentum.SetXYZT(it->px(),it->py(),it->pz(),it->e());
     250      candidate = static_cast<Candidate *>(InputParticles.at(it->user_index())->Clone());
     251      candidate->Momentum.SetPxPyPzE(it->px(),it->py(),it->pz(),it->e());
    252252      fOutputArray->Add(candidate);
    253253      if( puppiInputVector.at(it->user_index()).id == 1 or puppiInputVector.at(it->user_index()).id == 2) fOutputTrackArray->Add(candidate);
Note: See TracChangeset for help on using the changeset viewer.