Fork me on GitHub

Changeset 1217 in svn


Ignore:
Timestamp:
Jul 12, 2013, 12:22:27 AM (11 years ago)
Author:
Pavel Demin
Message:

check tau's daughter index

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/TauTagging.cc

    r1216 r1217  
    211211    while((tau = static_cast<Candidate *>(itTauArray.Next())))
    212212    {
     213      if(tau->D1 < 0) continue;
     214
     215      if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
     216         tau->D2 >= fParticleInputArray->GetEntriesFast())
     217      {
     218        throw runtime_error("tau's daughter index is greater than the ParticleInputArray size");
     219      }
     220
    213221      tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
     222
    214223      for(i = tau->D1; i <= tau->D2; ++i)
    215224      {
     
    218227        tauMomentum += daughter->Momentum;
    219228      }
     229
    220230      if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR)
    221231      {
Note: See TracChangeset for help on using the changeset viewer.