Fork me on GitHub

Ignore:
Timestamp:
Jan 6, 2020, 10:13:21 PM (5 years ago)
Author:
Kaan Yüksel Oyulmaz <kaanyukseloyulmaz@…>
Branches:
Timing
Children:
7939c6c
Parents:
d4e5b6a
Message:

New Time Smearing Module for Neutral Particles and FCC-hh Detector Card Update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackTimingPileUpSubtractor.cc

    rd4e5b6a r03b9c0f  
    7575
    7676  // read resolution formula in m
    77   fFormula->Compile(GetString("ZVertexResolution", "0.001"));
     77  fZVertexResolution = GetDouble("ZVertexResolution", 3);
     78  fTVertexResolution = GetDouble("TVertexResolution", 3);
    7879
    7980  fPTMin = GetDouble("PTMin", 0.);
     
    128129  Double_t tempPTSquare = 0;
    129130  Double_t pt, eta, phi, e;
    130   Double_t distance = 0;
     131  Double_t distanceCharged, distanceNeutral = 0;
    131132
    132133  // find z position of primary vertex
     
    143144      tvtx = candidate->Position.T();
    144145      tvtx_err = candidate->PositionError.T();
    145       cout << " initial : " << candidate->InitialPosition.T() << " final : " << candidate->Position.T() << endl;
    146146    }
    147147  }
     
    167167      z = particle->Position.Z();
    168168      z_err = particle->PositionError.Z();
    169       t = particle->Position.T();
     169      t = particle->InitialPosition.T();
    170170      t_err = particle->PositionError.T();
    171171
    172       // apply pile-up subtraction
    173       distance = pow((zvtx - z),2)/pow((zvtx_err - z_err),2) + pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
    174       //cout << " t : " << tvtx << "  t(particle)" << t << endl;
    175       // here I calculated distance using Z and T of selected vertex (highest sum Pt square) and particles
    176       // however z_err of vertices is gives 0 because of using CMS trackResolutionCMS.tcl (in that formula, there is limitation on |eta| < 2.5)
    177       // thats why I used TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0
     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);
    178174
    179       if(candidate->Charge != 0 && TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0)
     175      if(candidate->Charge != 0 && distanceCharged < fZVertexResolution)
    180176      {
    181177        candidate->IsRecoPU = 1;
    182178      }
     179      else if(candidate->Charge == 0 && distanceNeutral < fTVertexResolution)
     180      {
     181        candidate->IsRecoPU = 1;
     182      } 
    183183      else
    184184      {
Note: See TracChangeset for help on using the changeset viewer.