Fork me on GitHub

Ignore:
Timestamp:
Nov 20, 2015, 2:36:11 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
fdfe022
Parents:
554a3b3 (diff), 7312b4d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/delphes/delphes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackPileUpSubtractor.cc

    r554a3b3 r9f38d6a  
    6767void TrackPileUpSubtractor::Init()
    6868{
    69 // import input array
     69  // import input array
    7070
    7171  fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices"));
    7272  fItVertexInputArray = fVertexInputArray->MakeIterator();
    73  
     73
    7474  fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
    7575
    7676  fPTMin = GetDouble("PTMin", 0.);
     77
    7778  // import arrays with output from other modules
    78    
     79
    7980  ExRootConfParam param = GetParam("InputArray");
    8081  Long_t i, size;
     
    119120  Double_t z, zvtx=0;
    120121
    121  
     122
    122123  // find z position of primary vertex
    123  
     124
    124125  fItVertexInputArray->Reset();
    125126  while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next())))
     
    127128    if(!candidate->IsPU)
    128129    {
    129     zvtx = candidate->Position.Z();
    130     // break;
     130      zvtx = candidate->Position.Z();
     131      // break;
    131132    }
    132133  }
     
    144145      particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    145146      z = particle->Position.Z();
    146      
     147
    147148      // apply pile-up subtraction
    148149      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    149      
    150       if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1;
    151       else
     150
     151      if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution)
    152152      {
    153          candidate->IsRecoPU = 0;
    154          if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
     153        candidate->IsRecoPU = 1;
     154      }
     155      else
     156      {
     157        candidate->IsRecoPU = 0;
     158        if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
    155159      }
    156160    }
Note: See TracChangeset for help on using the changeset viewer.