Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:28

0001 #ifndef CondFormats_PPSObjects_PPSDirectSimulationData_h
0002 #define CondFormats_PPSObjects_PPSDirectSimulationData_h
0003 
0004 #include <string>
0005 #include "CondFormats/Serialization/interface/Serializable.h"
0006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0007 #include "TH2F.h"
0008 
0009 class PPSDirectSimulationData {
0010 public:
0011   PPSDirectSimulationData();
0012   ~PPSDirectSimulationData();
0013 
0014   typedef std::pair<std::string, std::string> FileObject;
0015 
0016   // Getters
0017   const std::string& getEmpiricalAperture45() const;
0018   const std::string& getEmpiricalAperture56() const;
0019 
0020   const std::string& getTimeResolutionDiamonds45() const;
0021   const std::string& getTimeResolutionDiamonds56() const;
0022 
0023   std::map<unsigned int, FileObject>& getEfficienciesPerRP();
0024   std::map<unsigned int, FileObject>& getEfficienciesPerPlane();
0025 
0026   // Setters
0027   void setEmpiricalAperture45(std::string s);
0028   void setEmpiricalAperture56(std::string s);
0029 
0030   void setTimeResolutionDiamonds45(std::string s);
0031   void setTimeResolutionDiamonds56(std::string s);
0032 
0033   // utility methods
0034   std::map<unsigned int, std::unique_ptr<TH2F>> loadEffeciencyHistogramsPerRP() const;
0035   std::map<unsigned int, std::unique_ptr<TH2F>> loadEffeciencyHistogramsPerPlane() const;
0036 
0037 private:
0038   std::string empiricalAperture45_;
0039   std::string empiricalAperture56_;
0040 
0041   std::string timeResolutionDiamonds45_;
0042   std::string timeResolutionDiamonds56_;
0043 
0044   std::map<unsigned int, FileObject> efficienciesPerRP_, efficienciesPerPlane_;
0045 
0046   static std::unique_ptr<TH2F> loadObject(const std::string& file, const std::string& object);
0047   static std::string replace(std::string input, const std::string& from, const std::string& to);
0048 
0049   COND_SERIALIZABLE
0050 };
0051 
0052 #endif