CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/PhysicsTools/Utilities/interface/LumiReWeighting.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_Utilities_interface_LumiReWeighting_h
00002 #define PhysicsTools_Utilities_interface_LumiReWeighting_h
00003 
00004 
00018 #include "TH1.h"
00019 #include "TFile.h"
00020 #include <string>
00021 #include <boost/shared_ptr.hpp>
00022 #include <vector>
00023 
00024 namespace edm {
00025   class EventBase;
00026   class LumiReWeighting {
00027   public:
00028     LumiReWeighting( std::string generatedFile,
00029                      std::string dataFile,
00030                      std::string GenHistName,
00031                      std::string DataHistName);
00032     
00033     LumiReWeighting( std::vector< float > MC_distr, std::vector< float > Lumi_distr);
00034 
00035     LumiReWeighting ( ) { } ;
00036 
00037     double weight( int npv ) ;
00038 
00039     double weight( const edm::EventBase &e ) ;
00040 
00041     double weightOOT( const edm::EventBase &e ) ;
00042 
00043     void weightOOT_init(); 
00044 
00045   protected:
00046 
00047     std::string generatedFileName_;
00048     std::string dataFileName_;
00049     std::string GenHistName_;
00050     std::string DataHistName_;
00051     boost::shared_ptr<TFile>     generatedFile_;
00052     boost::shared_ptr<TFile>     dataFile_;
00053     boost::shared_ptr<TH1F>      weights_;
00054 
00055     double WeightOOTPU_[25][25];
00056 
00057     int  OldLumiSection_;
00058     bool Reweight_4_2_2p2_;
00059     bool FirstWarning_;
00060 
00061   };
00062 }
00063 
00064 
00065 
00066 #endif