Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:44

0001 // Fast reconstruction for EIC Barrel DIRC
0002 // original author: r.dzhygadlo at gsi.de
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 // probability - normalized to 1 probability for e,mu,pi,k,p
0016 // sigma - deviation of the determined Cherenkov angle from expected in terms of Cherenkov track
0017 // resolution cangle - Cherenkov angle cctr -  combined Cherenkov track resolution
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   // barid = 0 for 17 mm thickness of the radiator
0032   // barid = 1 for 10 mm thickness of the radiator
0033   DrcPidFast(int barid /*= 0*/, const char *fmap);
0034   ~DrcPidFast() {}
0035 
0036   // read Cherenkov track resolution map from a file
0037   void ReadMap(TString name);
0038 
0039   // pdg - Particle Data Group code of the particle
0040   // mom - 3-momentum of the particle [GeV/c]
0041   // track_err - error assosiated with track direction [mrad]
0042   DrcPidInfo GetInfo(int pdg, TVector3 mom, double track_err = 0);
0043 
0044   // p - momentum of the particle [GeV/c]
0045   // theta - polar angle of the particle [deg]
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