Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/RunPUPPI.cc

    rd6ce231 r659c7b6  
    166166  Candidate *pv = static_cast<Candidate*>(fPVItInputArray->Next());
    167167  if (pv) PVZ = pv->Position.Z();
     168
    168169  // Fill input particles for puppi
    169170  std::vector<RecoObj> puppiInputVector;
     
    178179      curRecoObj.phi = momentum.Phi();
    179180      curRecoObj.m   = momentum.M(); 
    180       particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));//if(fApplyNoLep && TMath::Abs(candidate->PID) == 11) continue; //Dumb cut to minimize the nolepton on electron
     181      particle = static_cast<Candidate*>(candidate->GetCandidates()->Last());
     182      //if(fApplyNoLep && TMath::Abs(candidate->PID) == 11) continue; //Dumb cut to minimize the nolepton on electron
    181183      //if(fApplyNoLep && TMath::Abs(candidate->PID) == 13) continue;
    182184      if (candidate->IsRecoPU and candidate->Charge !=0) { // if it comes fromPU vertexes after the resolution smearing and the dZ matching within resolution
     
    190192        curRecoObj.dZ = particle->Position.Z()-PVZ;
    191193      }
    192       else if(!candidate->IsRecoPU && candidate->Charge !=0) {
     194      else if(!candidate->IsRecoPU and candidate->Charge !=0) {
    193195        curRecoObj.id    = 1;  // charge from LV
    194196        curRecoObj.vtxId = 1; // from PV
     
    217219      curRecoObj.m   = momentum.M();
    218220      curRecoObj.charge = 0;
    219       particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
     221      particle = static_cast<Candidate*>(candidate->GetCandidates()->Last());
     222
    220223      if(candidate->Charge == 0){
    221224        curRecoObj.id    = 0; // neutrals have id==0
Note: See TracChangeset for help on using the changeset viewer.