Fork me on GitHub

Changeset 3e4e196 in git for modules/TrackCovariance.cc


Ignore:
Timestamp:
Jan 22, 2021, 4:35:07 PM (4 years ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
8d7319c
Parents:
eee976c2 (diff), 90975be (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Aleksander Filip Żarnecki <zarnecki@…> (01/22/21 16:35:07)
git-committer:
GitHub <noreply@…> (01/22/21 16:35:07)
Message:

Merge pull request #4 from delphes/master

Fork update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackCovariance.cc

    reee976c2 r3e4e196  
    2121 *  Smears track parameters according to appropriate covariance matrix.
    2222 *
    23  *  \authors P. Demin - UCLouvain, Louvain-la-Neuve
     23 *  \authors F. Bedeschi - INFN Pisa
     24*            P. Demin - UCLouvain, Louvain-la-Neuve
    2425 *           M. Selvaggi - CERN
     26 *
    2527 *
    2628 */
     
    5052
    5153TrackCovariance::TrackCovariance() :
    52   fGeometry(0), fCovariance(0), fItInputArray(0)
     54  fGeometry(0), fCovariance(0), fAcx(0), fItInputArray(0)
    5355{
    5456  fGeometry = new SolGeom();
     
    7072  fBz = GetDouble("Bz", 0.0);
    7173  fGeometry->Read(GetString("DetectorGeometry", ""));
     74  fNMinHits = GetInt("NMinHits", 6);
    7275
     76  // load geometry
    7377  fCovariance->Calc(fGeometry);
     78  fCovariance->SetMinHits(fNMinHits);
     79  // load geometry
     80  fAcx = fCovariance->AccPnt();
    7481
    7582  // import input array
    76 
    7783  fInputArray = ImportArray(GetString("InputArray", "TrackMerger/tracks"));
    7884  fItInputArray = fInputArray->MakeIterator();
     
    97103  Double_t mass, p, pt, q, ct;
    98104  Double_t dd0, ddz, dphi, dct, dp, dpt, dC;
    99  
     105
    100106
    101107  fItInputArray->Reset();
     
    107113    const TLorentzVector &candidateMomentum = candidate->Momentum;
    108114
     115    if ( !fCovariance->IsAccepted(candidateMomentum.Vect()) ) continue;
     116
    109117    mass = candidateMomentum.M();
    110118
     
    112120
    113121    mother    = candidate;
    114     candidate = static_cast<Candidate *>(candidate->Clone());
     122    candidate = static_cast<Candidate*>(candidate->Clone());
    115123
    116124    candidate->Momentum.SetVectM(track.GetObsP(), mass);
    117    
     125
    118126    // converting back to mm
    119127    candidate->InitialPosition.SetXYZT(track.GetObsX().X()*1e03,track.GetObsX().Y()*1e03,track.GetObsX().Z()*1e03,candidatePosition.T()*1e03);
     
    130138    candidate->Yd = track.GetObsX().Y()*1e03;
    131139    candidate->Zd = track.GetObsX().Z()*1e03;
    132    
     140
    133141    candidate->D0       = track.GetObsPar()[0]*1e03;
    134142    candidate->Phi      = track.GetObsPar()[1];
     
    142150    candidate->Charge   = q;
    143151
    144     dd0       = TMath::Sqrt(track.GetCov()(0, 0))*1e03; 
    145     ddz       = TMath::Sqrt(track.GetCov()(3, 3))*1e03; 
    146     dphi      = TMath::Sqrt(track.GetCov()(1, 1)); 
    147     dct       = TMath::Sqrt(track.GetCov()(4, 4)); 
     152    dd0       = TMath::Sqrt(track.GetCov()(0, 0))*1e03;
     153    ddz       = TMath::Sqrt(track.GetCov()(3, 3))*1e03;
     154    dphi      = TMath::Sqrt(track.GetCov()(1, 1));
     155    dct       = TMath::Sqrt(track.GetCov()(4, 4));
    148156    dpt       = 2 * TMath::Sqrt( track.GetCov()(2, 2))*pt*pt / (0.2998*fBz);
    149157    dp        = TMath::Sqrt((1.+ct*ct)*dpt*dpt + 4*pt*pt*ct*ct*dct*dct/(1.+ct*ct)/(1.+ct*ct));
     
    160168    candidate->TrackResolution = dp / p;
    161169
    162 
    163170    candidate->AddCandidate(mother);
    164171
Note: See TracChangeset for help on using the changeset viewer.