Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/TrackCovariance/SolGridCov.cc

    rff9fb2d9 r170a11d  
    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.