Fork me on GitHub

Ignore:
Timestamp:
Feb 22, 2022, 2:56:43 PM (3 years ago)
Author:
Franco BEDESCHI <bed@…>
Branches:
master
Children:
56fb0be
Parents:
5c03893
Message:

First hit calculation added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/TrackCovariance/ObsTrk.cc

    r5c03893 r00b14d5  
    134134        Double_t ZinNeg = fG->GetZminNeg();
    135135        Bool_t inside = TrkUtil::IsInside(fGenX, Rin, ZinNeg, ZinPos); // Check if in inner box
     136        SolTrack* trk = new SolTrack(fGenX, fGenP, fG);
     137        Double_t Xfirst, Yfirst, Zfirst;
     138        Int_t iLay = trk->FirstHit(Xfirst, Yfirst, Zfirst);
     139        TVector3 fXfirst(Xfirst, Yfirst, Zfirst);
    136140        if (inside)
    137141        {
     
    147151                //std::cout<<"ObsTrk:: outside: x= "<<fGenX(0)<<", y= "<<fGenX(1)
    148152                //                         <<", z= "<<fGenX(2)<<std::endl;
    149                 SolTrack* trk = new SolTrack(fGenX, fGenP, fG);
    150153                Bool_t Res = kTRUE; Bool_t MS = kTRUE;
    151154                trk->CovCalc(Res, MS);                                  // Calculate covariance matrix
    152                 Cov = trk->Cov();                                       // Track covariance
    153                 delete trk;
    154         }
     155                Cov = trk->Cov();
     156        }                                       // Track covariance
     157        delete trk;
    155158        //
    156159        fCov = Cov;
Note: See TracChangeset for help on using the changeset viewer.