Fork me on GitHub

Changeset 321 in svn for trunk/Delphes.cpp


Ignore:
Timestamp:
Mar 11, 2009, 12:53:50 PM (16 years ago)
Author:
Xavier Rouby
Message:

Isolation updated. ptiso implemented. etrat prepared but not finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r319 r321  
    571571          // sorts the vector and smears duplicates
    572572      list_of_towers_with_photon.mergeDuplicates();
    573      
    574       for(unsigned int i=0; i<list_of_towers_with_photon.size(); i++)
    575         {
     573      for(unsigned int i=0; i<list_of_towers_with_photon.size(); i++) {
    576574          float eta = list_of_towers_with_photon[i].getEta();
    577575          float phi = list_of_towers_with_photon[i].getPhi();
     
    588586      // 2.2.1 ********************* sorting collections by decreasing pt
    589587      DET->SortedVector(electron);
    590       float iPhiEl=0,iEtaEl=0;
     588      float iPhiEl=0,iEtaEl=0,ptisoEl=0;
    591589      for(unsigned int i=0; i < electron.size(); i++)
    592590        {
     
    596594          elementElec->PhiCalo = electron[i].PhiCalo();
    597595          elementElec->Charge = sign(electron[i].PID());
    598           elementElec->IsolFlag = DET->Isolation(electron[i].Phi(),electron[i].Eta(),TrackCentral,DET->ISOL_PT,DET->ISOL_Cone);     
     596          elementElec->IsolFlag = DET->Isolation(electron[i],TrackCentral,DET->ISOL_PT,DET->ISOL_Cone,ptisoEl);
     597          elementElec->IsolPt = ptisoEl;
    599598          DET->BinEtaPhi(elementElec->PhiCalo,elementElec->EtaCalo,iPhiEl,iEtaEl);
    600599          D_CaloTower calElec(list_of_active_towers.getElement(iEtaEl,iPhiEl));
     
    603602     
    604603      DET->SortedVector(muon);
    605       float iPhiMu=0,iEtaMu=0;
     604      float iPhiMu=0,iEtaMu=0,ptisoMu=0;
    606605      for(unsigned int i=0; i < muon.size(); i++)
    607606        {
     
    611610          elementMu->EtaCalo = muon[i].EtaCalo();
    612611          elementMu->PhiCalo = muon[i].PhiCalo();
    613           elementMu->IsolFlag = DET->Isolation(muon[i].Phi(),muon[i].Eta(),TrackCentral,DET->ISOL_PT,DET->ISOL_Cone);
    614           DET->BinEtaPhi(elementMu->PhiCalo,elementMu->EtaCalo,iPhiMu,iEtaMu);
     612          elementMu->IsolFlag = DET->Isolation(muon[i],TrackCentral,DET->ISOL_PT,DET->ISOL_Cone,ptisoMu);
     613          elementMu->IsolPt = ptisoMu;
     614          DET->BinEtaPhi(elementMu->PhiCalo,elementMu->EtaCalo,iPhiMu,iEtaMu);
    615615          D_CaloTower calMuon(list_of_active_towers.getElement(iEtaMu,iPhiMu));
    616           elementMu->EHoverEE = calMuon.getEhad()/calMuon.getEem();
     616          if( calMuon.getEem() !=0 ) elementMu->EHoverEE = calMuon.getEhad()/calMuon.getEem();
     617          else elementMu->EHoverEE = UNDEFINED;
     618          elementMu->EtRatio = DET->CaloIsolation(muon[i], list_of_active_towers);
    617619        }
    618620
Note: See TracChangeset for help on using the changeset viewer.