00001 #ifndef FORIA_REWEIGHT_MULTIPLICITY 00002 #define FORIA_REWEIGHT_MULTIPLICITY 00003 00004 #include "ForIA/AnalysisTools/TruthSelection.hh" 00005 00006 #include <vector> 00007 00008 namespace ForIA{ 00009 00010 using std::vector; 00011 00012 class Event; 00013 00018 class MultiplicityFunction{ 00019 00020 public: 00025 virtual double fn(size_t mult)const{return 1.;} 00026 00027 virtual ~MultiplicityFunction(){} 00028 00029 }; 00030 00034 class ReWeightMultiplicity{ 00035 00036 public: 00037 00038 ReWeightMultiplicity(); 00039 00040 void initialise(); 00041 00042 void initialise(const MultiplicityFunction *fn); 00043 00044 double weight(const Event &evt); 00045 00046 double weight(size_t nTracks); 00047 00048 private: 00049 00050 // The weight for a given (offset) multiplicity 00051 vector<double> m_weights; 00052 00053 // the offset multiplicity - the multiplicity of the first bin in the 00054 // vector/histogram of multiplicity 00055 size_t m_startMultiplicity; 00056 00057 // the highest multiplicity for which we have a weight 00058 size_t m_endMultiplicity; 00059 00060 // selects the truth particles from the event 00061 TruthSelection m_truthSelection; 00062 00063 00064 }; 00065 } 00066 00067 00068 #endif