00001
00002 #ifndef DUMPALLSYSTEMATICS_H
00003 #define DUMPALLSYSTEMATICS_H
00004
00005 #include <vector>
00006 #include <string>
00007
00008
00009 #include "AthenaBaseComps/AthAlgorithm.h"
00010 #include "AsgTools/ToolHandle.h"
00011
00012 #include "TTree.h"
00013
00014
00015 #include "ElectronPhotonFourMomentumCorrection/IEgammaCalibrationAndSmearingTool.h"
00016
00017 class DumpAllSystematics : public AthAlgorithm {
00018
00019 public:
00021 DumpAllSystematics( const std::string& name, ISvcLocator* svcLoc );
00022
00023 virtual StatusCode initialize();
00024 virtual StatusCode execute();
00025 virtual StatusCode finalize();
00026
00027 std::string m_particle_name;
00028 std::string m_reco_container_name;
00029 bool m_keep_one;
00030
00031 private:
00032 enum class ParticleType {ELECTRON, PHOTON};
00033 ParticleType m_particle_type;
00034
00035 TTree* m_tree;
00036
00037 StatusCode do_truth(const xAOD::Egamma& particle);
00038 StatusCode do_egamma(const xAOD::Egamma& particle);
00039 StatusCode do_energy(xAOD::Egamma& particle, int itool);
00040
00041 unsigned long long m_EventNumber;
00042 uint32_t m_RunNumber;
00043 int m_instance_index;
00044 float m_actualIntPerXing;
00045 float m_averageIntPerXing;
00046 float m_truth_pt;
00047 float m_truth_phi;
00048 float m_truth_eta;
00049 float m_truth_E;
00050 int m_truth_pdgId;
00051 int m_truth_parent_pdgId;
00052 bool m_truth_matched;
00053 bool m_truth_isConv;
00054 float m_truth_Rconv;
00055 int m_npv;
00056
00057 float m_cl_phi;
00058 float m_cl_eta;
00059 float m_cl_etaCalo;
00060 float m_cl_rawcl_Es0;
00061 float m_cl_rawcl_Es1;
00062 float m_cl_rawcl_Es2;
00063 float m_cl_rawcl_Es3;
00064 float m_cl_E;
00065 float m_ph_Rconv;
00066 int m_ph_convFlag;
00067 float m_wstot;
00068
00069 std::vector<float> m_nominal_E;
00070 std::vector<float> m_energy_variations_sum_up;
00071 std::vector<float> m_energy_variations_sum_down;
00072 std::vector<std::vector<float> > m_energy_variations;
00073
00074
00075 ToolHandleArray<CP::IEgammaCalibrationAndSmearingTool> m_EgammaCalibrationAndSmearingTools;
00076
00077 };
00078
00079 #endif // DUMPALLSYSTEMATICS_H