Fork me on GitHub

Changeset d6ce231 in git


Ignore:
Timestamp:
Jan 25, 2017, 1:11:05 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
4de073b
Parents:
84733ae
Message:

fix impact parameter dZ in RunPUPPI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/RunPUPPI.cc

    r84733ae rd6ce231  
    166166  Candidate *pv = static_cast<Candidate*>(fPVItInputArray->Next());
    167167  if (pv) PVZ = pv->Position.Z();
    168 
    169168  // Fill input particles for puppi
    170169  std::vector<RecoObj> puppiInputVector;
     
    179178      curRecoObj.phi = momentum.Phi();
    180179      curRecoObj.m   = momentum.M(); 
    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
     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
    183181      //if(fApplyNoLep && TMath::Abs(candidate->PID) == 13) continue;
    184182      if (candidate->IsRecoPU and candidate->Charge !=0) { // if it comes fromPU vertexes after the resolution smearing and the dZ matching within resolution
     
    192190        curRecoObj.dZ = particle->Position.Z()-PVZ;
    193191      }
    194       else if(!candidate->IsRecoPU and candidate->Charge !=0) {
     192      else if(!candidate->IsRecoPU && candidate->Charge !=0) {
    195193        curRecoObj.id    = 1;  // charge from LV
    196194        curRecoObj.vtxId = 1; // from PV
     
    219217      curRecoObj.m   = momentum.M();
    220218      curRecoObj.charge = 0;
    221       particle = static_cast<Candidate*>(candidate->GetCandidates()->Last());
    222 
     219      particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    223220      if(candidate->Charge == 0){
    224221        curRecoObj.id    = 0; // neutrals have id==0
Note: See TracChangeset for help on using the changeset viewer.