Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackPileUpSubtractor.cc

    r715ab7c rb62c2da  
    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 
    7877  // import arrays with output from other modules
    79 
     78   
    8079  ExRootConfParam param = GetParam("InputArray");
    8180  Long_t i, size;
     
    120119  Double_t z, zvtx=0;
    121120
    122 
     121 
    123122  // find z position of primary vertex
    124 
     123 
    125124  fItVertexInputArray->Reset();
    126125  while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next())))
     
    128127    if(!candidate->IsPU)
    129128    {
    130       zvtx = candidate->Position.Z();
    131       // break;
     129    zvtx = candidate->Position.Z();
     130    // break;
    132131    }
    133132  }
     
    145144      particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    146145      z = particle->Position.Z();
    147 
     146     
    148147      // apply pile-up subtraction
    149148      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    150 
    151       if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution)
     149     
     150      if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1;
     151      else
    152152      {
    153         candidate->IsRecoPU = 1;
    154       }
    155       else
    156       {
    157         candidate->IsRecoPU = 0;
    158         if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
     153         candidate->IsRecoPU = 0;
     154         if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
    159155      }
    160156    }
Note: See TracChangeset for help on using the changeset viewer.