[ff9fb2d9] | 1 | #ifndef G__SOLGRIDCOV_H
|
---|
| 2 | #define G__SOLGRIDCOV_H
|
---|
| 3 |
|
---|
| 4 | #include <TVectorD.h>
|
---|
| 5 | #include <TMatrixDSym.h>
|
---|
[170a11d] | 6 | #include "AcceptanceClx.h"
|
---|
[ff9fb2d9] | 7 |
|
---|
| 8 | class SolGeom;
|
---|
| 9 |
|
---|
| 10 | // Class to create geometry for solenoid geometry
|
---|
| 11 |
|
---|
| 12 | class SolGridCov{
|
---|
| 13 | // Class to handle storing and retrieving/interpolation of covariance matrices
|
---|
| 14 | private:
|
---|
| 15 | Int_t fNpt; // Number of pt points in grid
|
---|
| 16 | TVectorD fPta; // Array of pt points in GeV
|
---|
| 17 | Int_t fNang; // Number of angle points in grid
|
---|
| 18 | TVectorD fAnga; // Array of angle points in degrees
|
---|
| 19 | TMatrixDSym *fCov; // Pointers to grid of covariance matrices
|
---|
[170a11d] | 20 | AcceptanceClx *fAcc; // Pointer to acceptance class
|
---|
| 21 | Int_t fNminHits; // Minimum number of hits to accept track
|
---|
[ff9fb2d9] | 22 | // Service routines
|
---|
| 23 | Int_t GetMinIndex(Double_t xval, Int_t N, TVectorD x); // Find bin
|
---|
| 24 | TMatrixDSym MakePosDef(TMatrixDSym NormMat); // Force positive definitness
|
---|
| 25 | public:
|
---|
| 26 | SolGridCov();
|
---|
| 27 | ~SolGridCov();
|
---|
| 28 |
|
---|
| 29 | void Calc(SolGeom *G);
|
---|
| 30 |
|
---|
| 31 | // Covariance interpolation
|
---|
| 32 | Double_t GetMinPt() { return fPta(0); }
|
---|
| 33 | Double_t GetMaxPt() { return fPta(fNpt - 1); }
|
---|
| 34 | Double_t GetMinAng() { return fAnga(0); }
|
---|
| 35 | Double_t GetMaxAng() { return fAnga(fNang - 1); }
|
---|
| 36 | TMatrixDSym GetCov(Double_t pt, Double_t ang);
|
---|
[170a11d] | 37 |
|
---|
| 38 | // Acceptance related methods
|
---|
| 39 | AcceptanceClx* AccPnt() { return fAcc; }; // Return Acceptance class pointer
|
---|
| 40 | void SetMinHits(Int_t MinHits) { fNminHits = MinHits; }; // Set minimum number of hits to accept (default = 6)
|
---|
| 41 | Int_t GetMinHits() { return fNminHits; };
|
---|
| 42 | Bool_t IsAccepted(Double_t pt, Double_t Theta); // From pt (GeV) and theta (degrees)
|
---|
| 43 | Bool_t IsAccepted(Double_t *p); // From momentum components (GeV)
|
---|
| 44 | Bool_t IsAccepted(TVector3 p); // As above in Vector3 format
|
---|
| 45 |
|
---|
[ff9fb2d9] | 46 | };
|
---|
| 47 |
|
---|
| 48 | #endif
|
---|