|
||||
File indexing completed on 2024-04-06 12:11:16
0001 #ifndef FastSim_ProtonTaggerAcceptanceHelper_H 0002 #define FastSim_ProtonTaggerAcceptanceHelper_H 0003 0004 /// Access to acceptance tables stored in ROOT file 0005 0006 /** 0007 * Helper class to get actual values from acceptance tables stored as TH3F. 0008 * The class can provide acceptance values for a near-beam detector 0009 * or a combination (e.g. 420+220). 0010 * 0011 * A class instance is initialized from a root file with TH3F-type histograms of acceptance: 0012 * for low t: acceptance as function of log10(-t), log10(xi) and phi; 0013 * for high t: acceptance as function of -t, log10(xi) and phi. 0014 * 0015 * The acceptance can be extracted from tables for given t,xi,phi with a dedicated method. 0016 * 0017 * Author: Dmitry Zaborov 0018 */ 0019 0020 // Version: $Id: AcceptanceTableHelper.h,v 1.1 2007/09/28 08:39:53 dzaborov Exp $ 0021 0022 #include "TFile.h" 0023 #include "TH3F.h" 0024 0025 #include <string> 0026 0027 class AcceptanceTableHelper { 0028 public: 0029 /// Default constructor 0030 AcceptanceTableHelper() : h_log10t_log10Xi_Phi(nullptr), h_t_log10Xi_Phi(nullptr) { ; } 0031 0032 /// Delete acceptance histograms 0033 ~AcceptanceTableHelper() { 0034 if (h_log10t_log10Xi_Phi) 0035 delete h_log10t_log10Xi_Phi; 0036 if (h_t_log10Xi_Phi) 0037 delete h_t_log10Xi_Phi; 0038 } 0039 0040 /// Get acceptance tables from root file 0041 void Init(TFile &, const std::string); 0042 0043 /// Acceptance as a function of t, xi and phi 0044 float GetAcceptance(float, float, float); 0045 0046 private: 0047 /// Table for low t: acceptance as a function of log10(t), log10(Xi) and Phi 0048 TH3F *h_log10t_log10Xi_Phi; 0049 0050 /// Table for high t: acceptance as a function of -t, log10(Xi) and Phi 0051 TH3F *h_t_log10Xi_Phi; 0052 }; 0053 0054 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |