Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackTimingPileUpSubtractor.cc

    r7939c6c r9117aaa4  
    7575
    7676  // read resolution formula in m
    77   fChargedMinSignificance = GetDouble("ChargedMinSignificance", 3);
    78   fNeutralMinSignificance = GetDouble("NeutralMinSignificance", 3);
     77  fFormula->Compile(GetString("ZVertexResolution", "0.001"));
    7978
    8079  fPTMin = GetDouble("PTMin", 0.);
     
    129128  Double_t tempPTSquare = 0;
    130129  Double_t pt, eta, phi, e;
    131   Double_t distanceCharged, distanceNeutral = 0;
     130  Double_t distance = 0;
    132131
    133132  // find z position of primary vertex
     
    167166      z = particle->Position.Z();
    168167      z_err = particle->PositionError.Z();
    169       t = particle->InitialPosition.T();
     168      t = particle->Position.T();
    170169      t_err = particle->PositionError.T();
    171170
    172       distanceCharged = pow((zvtx - z),2)/pow((zvtx_err - z_err),2) + pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
    173       distanceNeutral = pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
     171      // apply pile-up subtraction
     172      distance = pow((zvtx - z),2)/pow((zvtx_err - z_err),2) + pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
     173      // here I calculated distance using Z and T of selected vertex (highest sum Pt square) and particles
     174      // however z_err of vertices is gives 0 because of using CMS trackResolutionCMS.tcl (in that formula, there is limitation on |eta| < 2.5)
     175      // thats why I used TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0
    174176
    175       if(candidate->Charge != 0 && distanceCharged < fChargedMinSignificance)
     177      if(candidate->Charge != 0 && TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0)
    176178      {
    177179        candidate->IsRecoPU = 1;
    178180      }
    179       else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance)
    180       {
    181         candidate->IsRecoPU = 1;
    182       } 
    183181      else
    184182      {
Note: See TracChangeset for help on using the changeset viewer.