Fork me on GitHub

Ignore:
Timestamp:
Oct 30, 2017, 12:56:01 AM (7 years ago)
Author:
Kevin Pedro <kpedro88@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
9458496b
Parents:
cde9f31
Message:

add 3D IP significance option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackCountingBTagging.cc

    rcde9f31 re40b9cf  
    7272  fNtracks = GetInt("Ntracks", 3);
    7373
     74  fUse3D = GetBool("Use3D", false);
     75
    7476  // import input array(s)
    7577
     
    9597  Candidate *jet, *track;
    9698
    97   Double_t jpx, jpy;
     99  Double_t jpx, jpy, jpz;
    98100  Double_t dr, tpt;
    99   Double_t xd, yd, d0, dd0, ip, sip;
     101  Double_t xd, yd, zd, d0, dd0, dz, ddz, sip;
    100102
    101103  Int_t sign;
     
    110112    jpx = jetMomentum.Px();
    111113    jpy = jetMomentum.Py();
     114    jpz = jetMomentum.Pz();
    112115
    113116    // loop over all input tracks
     
    122125      xd = track->Xd;
    123126      yd = track->Yd;
     127      zd = track->Zd;
    124128      d0 = TMath::Abs(track->D0);
    125       dd0 = track->ErrorD0;
     129      dd0 = TMath::Abs(track->ErrorD0);
     130      dz = TMath::Abs(track->DZ);
     131      ddz = TMath::Abs(track->ErrorDZ);
    126132
    127133      if(tpt < fPtMin) continue;
     
    129135      if(d0 > fIPmax) continue;
    130136
    131       sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
    132 
    133       ip = sign*d0;
    134       sip = ip / TMath::Abs(dd0);
     137      if(fUse3D){
     138        sign = (jpx*xd + jpy*yd + jpz*zd > 0.0) ? 1 : -1;
     139        //add transvers and longitudinal significances in quadrature
     140        sip = sign * TMath::Sqrt( TMath::Power(d0 / dd0, 2) + TMath::Power(dz / ddz, 2) );
     141      }
     142      else {
     143        sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
     144        sip = sign * d0 / TMath::Abs(dd0);
     145      }
    135146
    136147      if(sip > fSigMin) count++;
Note: See TracChangeset for help on using the changeset viewer.