Fork me on GitHub

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
  • external/TrackCovariance/SolGridCov.cc

    reee976c2 r3e4e196  
    33#include <TMath.h>
    44#include <TVectorD.h>
     5#include <TVector3.h>
    56#include <TMatrixDSym.h>
    67#include <TDecompChol.h>
     
    3637{
    3738  delete[] fCov;
     39  delete fAcc;
    3840}
    3941
     
    5860    }
    5961  }
    60 }
     62
     63// Now make acceptance
     64fAcc = new AcceptanceClx(G);
     65}
     66
     67
     68//
     69Bool_t SolGridCov::IsAccepted(Double_t pt, Double_t Theta)
     70{
     71        //
     72        // pt in GeV, Theta in degrees
     73        //
     74        Bool_t Accept = kFALSE;
     75        if (fAcc->HitNumber(pt, Theta) >= fNminHits)Accept = kTRUE;
     76        //
     77        return Accept;
     78}
     79//
     80Bool_t SolGridCov::IsAccepted(Double_t *p)
     81{
     82        //
     83        // pt in GeV, Theta in degrees
     84        //
     85        Bool_t Accept = kFALSE;
     86        Double_t pt = TMath::Sqrt(p[0] * p[0] + p[1] * p[1]);
     87        Double_t th = 180. * TMath::ATan2(pt, p[2])/TMath::Pi();
     88        if (fAcc->HitNumber(pt,th) >= fNminHits)Accept = kTRUE;
     89        //
     90        return Accept;
     91}
     92//
     93Bool_t SolGridCov::IsAccepted(TVector3 p)
     94{
     95        //
     96        // pt in GeV, Theta in degrees
     97        //
     98        Bool_t Accept = kFALSE;
     99        Double_t pt = p.Pt();
     100        Double_t th = 180.*TMath::ACos(p.CosTheta())/TMath::Pi();
     101        if (fAcc->HitNumber(pt,th) >= fNminHits)Accept = kTRUE;
     102        //
     103        return Accept;
     104}
     105
     106
    61107// Find bin in grid
    62108Int_t SolGridCov::GetMinIndex(Double_t xval, Int_t N, TVectorD x)
Note: See TracChangeset for help on using the changeset viewer.