Fork me on GitHub

Changeset ebf40fd in git for modules/TrackCovariance.cc


Ignore:
Timestamp:
Nov 29, 2021, 3:18:22 PM (3 years ago)
Author:
Franco BEDESCHI <bed@…>
Branches:
master
Children:
bd376e3
Parents:
9a7ea36
Message:

Major update to handle highly displaced tracks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackCovariance.cc

    r9a7ea36 rebf40fd  
    103103  Double_t mass, p, pt, q, ct;
    104104  Double_t dd0, ddz, dphi, dct, dp, dpt, dC;
     105  //
     106  // Get cylindrical box for fast track simulation
     107  //
     108  Double_t Rin = fGeometry->GetRmin();
     109  Double_t ZinPos = fGeometry->GetZminPos();
     110  Double_t ZinNeg = fGeometry->GetZminNeg();
    105111
    106112  fItInputArray->Reset();
     
    115121    const TLorentzVector &candidateMomentum = particle->Momentum;
    116122
    117     if ( !fCovariance->IsAccepted(candidateMomentum.Vect()) ) continue;
     123    Bool_t inside = TrkUtil::IsInside(candidatePosition.Vect(), Rin, ZinNeg, ZinPos); // Check if in inner box
     124    Bool_t Accept = kTRUE;
     125    if(inside) Accept = fCovariance->IsAccepted(candidateMomentum.Vect());
     126    else       Accept = fCovariance->IsAccepted(candidatePosition.Vect(),candidateMomentum.Vect(), fGeometry);
     127    if(!Accept) continue;
    118128
    119129    mass = candidateMomentum.M();
    120130
    121     ObsTrk track(candidatePosition.Vect(), candidateMomentum.Vect(), candidate->Charge, fBz, fCovariance);
     131    ObsTrk track(candidatePosition.Vect(), candidateMomentum.Vect(), candidate->Charge, fCovariance, fGeometry);
    122132
    123133    mother    = candidate;
Note: See TracChangeset for help on using the changeset viewer.