00001
00002
00003 #ifndef JetRecTool_H
00004 #define JetRecTool_H
00005
00045
00046 #include "AsgTools/ToolHandle.h"
00047 #include "AsgTools/AsgTool.h"
00048 #include "JetInterface/IJetBuildTool.h"
00049 #include "JetInterface/IJetExecuteTool.h"
00050 #include "JetInterface/IPseudoJetGetter.h"
00051 #include "JetInterface/IJetFinder.h"
00052 #include "JetInterface/IJetGroomer.h"
00053 #include "JetInterface/IJetModifier.h"
00054 #include "JetInterface/IJetPseudojetRetriever.h"
00055 #include "JetInterface/IJetConsumer.h"
00056 #include "fastjet/PseudoJet.hh"
00057 #include "TStopwatch.h"
00058
00059 class JetRecTool
00060 : public asg::AsgTool,
00061 virtual public IJetBuildTool,
00062 virtual public IJetExecuteTool {
00063 ASG_TOOL_CLASS2(JetRecTool, IJetBuildTool, IJetExecuteTool)
00064
00065 public:
00066
00067 JetRecTool(std::string myname);
00068
00070 StatusCode initialize();
00071
00073 StatusCode finalize();
00074
00077 const xAOD::JetContainer* build() const;
00078
00080 int execute() const;
00081
00083 void print() const;
00084
00089 int inputContainerNames(std::vector<std::string>& connames);
00090
00095 int outputContainerNames(std::vector<std::string>& connames);
00096
00097
00099 void setInputJetContainer(const xAOD::JetContainer* cont) ;
00100
00101 private:
00102
00105 template <typename TAux>
00106 int record(const xAOD::JetContainer* pjets) const;
00107
00108 private:
00109
00110
00111 std::string m_outcoll;
00112 std::string m_incoll;
00113 ToolHandle<IJetExecuteTool> m_intool;
00114 ToolHandle<IJetPseudojetRetriever> m_hpjr;
00115 ToolHandleArray<IPseudoJetGetter> m_pjgetters;
00116 ToolHandle<IJetFinder> m_finder;
00117 ToolHandle<IJetGroomer> m_groomer;
00118 ToolHandleArray<IJetModifier> m_modifiers;
00119 ToolHandleArray<IJetConsumer> m_consumers;
00120 bool m_trigger;
00121 int m_timer;
00122 bool m_shallowCopy;
00123 bool m_warnIfDuplicate;
00124 bool m_overwrite;
00125
00126
00127 int m_initCount;
00128 bool m_find;
00129 bool m_groom;
00130 bool m_copy;
00131 xAOD::JetInput::Type m_inputtype;
00132 IJetFinder::NameList m_ghostlabs;
00133 std::vector<std::string> m_incolls;
00134 std::vector<std::string> m_outcolls;
00135 const IJetPseudojetRetriever* m_ppjr;
00136
00137
00138
00139 const xAOD::JetContainer* m_trigInputJetsForGrooming;
00140
00141
00142 mutable unsigned int m_nevt;
00143 mutable TStopwatch m_totclock;
00144 mutable TStopwatch m_inpclock;
00145 mutable TStopwatch m_actclock;
00146 mutable TStopwatch m_modclock;
00147 mutable TStopwatch m_conclock;
00148 mutable TStopwatch m_pjcclock;
00149 mutable std::vector<TStopwatch> m_getclocks;
00150 mutable std::vector<TStopwatch> m_modclocks;
00151 mutable std::vector<TStopwatch> m_conclocks;
00152 };
00153
00154 #endif