00001
00002
00003
00004
00005
00006
00007
00008
00010
00011 #ifndef REWEIGHTUTILS_SUMOFWEIGHTSTOOL_H
00012 #define REWEIGHTUTILS_SUMOFWEIGHTSTOOL_H
00013
00014
00015 #include "AthAnalysisBaseComps/AthAnalysisAlgorithm.h"
00016 #include "GaudiKernel/ToolHandle.h"
00017
00018 #include <vector>
00019
00020
00021
00022 #include "xAODCutFlow/CutBookkeeper.h"
00023 #include "xAODCutFlow/CutBookkeeperContainer.h"
00024 #include "xAODCutFlow/CutBookkeeperAuxContainer.h"
00025
00026
00027 class IWeightTool;
00028
00029 class SumOfWeightsTool : public AthAnalysisAlgorithm {
00030
00031 public:
00032
00034 SumOfWeightsTool(const std::string& name, ISvcLocator* pSvcLocator);
00035
00037 ~SumOfWeightsTool();
00038
00040 StatusCode initialize();
00041 StatusCode execute();
00042 StatusCode endRun();
00043
00044 private:
00045
00047 SumOfWeightsTool();
00048
00049 StatusCode dumpIntoTxtFile();
00050
00052 ToolHandleArray<IWeightTool> m_weightTools;
00053
00054 std::string m_ofname;
00055
00056 bool m_dumpTxtFile;
00057 unsigned int m_maxMuBins;
00058
00059 std::string m_CBKcontainerName;
00060 std::string m_CBKnamePrefix;
00061
00062 std::vector<float> m_TotalSumOfWeights;
00063 std::vector<float> m_TotalSumOfSquaredWeights;
00064 std::vector< std::vector<float> > m_SumOfWeightsPerMu;
00065 std::vector< std::vector<float> > m_SumOfSquaredWeightsPerMu;
00066
00067 std::vector<xAOD::CutBookkeeper*> m_ebcList;
00068 std::vector< std::vector<xAOD::CutBookkeeper*> > m_ebcListPerMu;
00069
00070 };
00071
00072 #endif //> !REWEIGHTUTILS_SUMOFWEIGHTSTOOL_H