File indexing completed on 2024-09-27 07:03:44
0001
0002
0003
0004 #ifndef DrcPidFast_h
0005 #define DrcPidFast_h 1
0006
0007 #include <TFile.h>
0008 #include <TH2F.h>
0009 #include <TVector3.h>
0010 #include <TRandom.h>
0011 #include <TF1.h>
0012
0013 #include <iostream>
0014
0015
0016
0017
0018 struct DrcPidInfo {
0019 double probability[4];
0020 double sigma[4];
0021 double cangle;
0022 double cctr;
0023
0024 double true_cangle;
0025 };
0026
0027 class DrcPidFast {
0028
0029 public:
0030
0031
0032
0033 DrcPidFast(int barid , const char *fmap);
0034 ~DrcPidFast() {}
0035
0036
0037 void ReadMap(TString name);
0038
0039
0040
0041
0042 DrcPidInfo GetInfo(int pdg, TVector3 mom, double track_err = 0);
0043
0044
0045
0046 DrcPidInfo GetInfo(int pdg, double p, double theta, double track_err = 0);
0047 TH2F *GetTrrMap() { return fTrrMap; }
0048
0049 int get_pid(int pdg);
0050
0051 private:
0052 TH2F *fTrrMap;
0053 double fMass[4];
0054 TF1 *fMs_mom, *fMs_thickness;
0055 double fMs_thickness_max;
0056 };
0057
0058 #endif