Fork me on GitHub

Changeset 839deb7 in git for modules/PileUpJetID.cc


Ignore:
Timestamp:
Jun 29, 2015, 10:27:47 PM (9 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
c1ce3fe
Parents:
5d2481f
Message:

fix variable names and formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/PileUpJetID.cc

    r5d2481f r839deb7  
    154154    float sumT40 = 0.;
    155155    float sumWeightsForT = 0.;
    156     candidate->Ntimes = 0;
     156    candidate->NTimeHits = 0;
    157157
    158158    float sumpt = 0.;
     
    197197        float tow_sumT = 0;
    198198        float tow_sumW = 0;
    199         for (int i = 0 ; i < constituent->Ecal_E_t.size() ; i++) {
    200           float w = TMath::Sqrt(constituent->Ecal_E_t[i].first);
     199        for (int i = 0 ; i < constituent->ECalEnergyTimePairs.size() ; i++) {
     200          float w = TMath::Sqrt(constituent->ECalEnergyTimePairs[i].first);
    201201          if (fAverageEachTower) {
    202             tow_sumT += w*constituent->Ecal_E_t[i].second;
     202            tow_sumT += w*constituent->ECalEnergyTimePairs[i].second;
    203203            tow_sumW += w;
    204204          } else {
    205             sumT0 += w*constituent->Ecal_E_t[i].second;
    206             sumT1 += w*gRandom->Gaus(constituent->Ecal_E_t[i].second,0.001);
    207             sumT10 += w*gRandom->Gaus(constituent->Ecal_E_t[i].second,0.010);
    208             sumT20 += w*gRandom->Gaus(constituent->Ecal_E_t[i].second,0.020);
    209             sumT30 += w*gRandom->Gaus(constituent->Ecal_E_t[i].second,0.030);
    210             sumT40 += w*gRandom->Gaus(constituent->Ecal_E_t[i].second,0.040);
     205            sumT0 += w*constituent->ECalEnergyTimePairs[i].second;
     206            sumT1 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.001);
     207            sumT10 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.010);
     208            sumT20 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.020);
     209            sumT30 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.030);
     210            sumT40 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.040);
    211211            sumWeightsForT += w;
    212             candidate->Ntimes++;
     212            candidate->NTimeHits++;
    213213          }
    214214        }
     
    221221          sumT40 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0040);
    222222          sumWeightsForT += tow_sumW;
    223           candidate->Ntimes++;
     223          candidate->NTimeHits++;
    224224        }
    225225      }
Note: See TracChangeset for help on using the changeset viewer.