Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:34

0001 #ifndef RecoLuminosity_LumiProducer_LumiCorrectionParam_h
0002 #define RecoLuminosity_LumiProducer_LumiCorrectionParam_h
0003 #include <iosfwd>
0004 #include <map>
0005 #include <string>
0006 #include "RecoLuminosity/LumiProducer/interface/LumiCorrectionParamRcd.h"
0007 #include "FWCore/Framework/interface/data_default_record_trait.h"
0008 class LumiCorrectionParam {
0009 public:
0010   enum LumiType { HF, PIXEL };
0011   /// default constructor
0012   LumiCorrectionParam();
0013   explicit LumiCorrectionParam(LumiType lumitype);
0014   /// destructor
0015   ~LumiCorrectionParam() {}
0016 
0017   /*
0018     getters are used by users
0019     standard user just needs to apply the final correction
0020     other methods are for inspection or advanced correction customisation
0021   */
0022   ///get the final correction factor
0023   float getCorrection(float luminonorm) const;
0024   ///get ncollidingbunches
0025   unsigned int ncollidingbunches() const;
0026   ///get current normtag
0027   std::string normtag() const;
0028   ///get correction function name
0029   std::string corrFunc() const;
0030   ///get correction coefficients
0031   const std::map<std::string, float>& nonlinearCoeff() const;
0032   ///get afterglow threshold/value
0033   const std::map<unsigned int, float>& afterglows() const;
0034   ///on which amodetag this correction definition should be applied for
0035   ///information only
0036   std::string amodetag() const;
0037   ///on which single beam egev this correction definition should be applied for
0038   ///information only
0039   unsigned int beamegev() const;
0040   ///lumi integrated up to that run. Needed for 2011B correction, otherwise 0.
0041   float intglumi() const;
0042   /*
0043     setters 
0044   */
0045   ///set ncollidingbunches
0046   void setNBX(unsigned int nbx);
0047   ///set current normtag
0048   void setNormtag(const std::string& normtag);
0049   ///set correction function
0050   void setcorrFunc(const std::string& corrfunc);
0051   ///set nonlinear constants
0052   void setnonlinearCoeff(std::map<std::string, float>& coeffmap);
0053   ///set afterglow thresholds
0054   void setafterglows(std::map<unsigned int, float>& afterglows);
0055   ///set description
0056   void setdescription(const std::string& amodetag, unsigned int beamegev);
0057   ///set intglumi
0058   void setintglumi(float intglumi);
0059 
0060 private:
0061   LumiType m_lumitype;
0062   unsigned int m_ncollidingbx;
0063   std::string m_normtag;
0064   std::string m_corrfunc;
0065   std::map<std::string, float> m_coeffmap;
0066   std::map<unsigned int, float> m_afterglows;
0067   std::string m_amodetag;
0068   float m_beamegev;
0069   float m_intglumi;
0070 };
0071 
0072 std::ostream& operator<<(std::ostream& s, const LumiCorrectionParam& lumicorr);
0073 
0074 EVENTSETUP_DATA_DEFAULT_RECORD(LumiCorrectionParam, LumiCorrectionParamRcd)
0075 
0076 #endif  // RecoLuminosity_LuminosityProducer_LumiCorrectionParam_h