00001
00002
00004
00005
00007
00014 #ifndef PARTICLEJETTOOLS_JETQUARKLABEL_H
00015 #define PARTICLEJETTOOLS_JETQUARKLABEL_H
00016
00017 #include "AsgTools/AsgTool.h"
00018 #include "ParticleJetTools/IJetTruthMatching.h"
00019 #include "EventPrimitives/EventPrimitives.h"
00020 #include <string>
00021 #include <map>
00022 #include "xAODJet/Jet.h"
00023 #include "xAODTruth/TruthEventContainer.h"
00024 #include "xAODTruth/TruthParticleContainer.h"
00025 #include "xAODTruth/TruthParticle.h"
00026
00027
00028 class Jet;
00029
00030 namespace Analysis
00031 {
00032
00033 class JetQuarkLabel : public asg::AsgTool, virtual public IJetTruthMatching {
00034 ASG_TOOL_CLASS(JetQuarkLabel, IJetTruthMatching)
00035 public:
00036 JetQuarkLabel(const std::string& name);
00037 virtual ~JetQuarkLabel();
00038 StatusCode initialize();
00039 StatusCode finalize();
00040
00041
00042
00043
00044
00045
00046
00047 virtual bool matchJet(const xAOD::Jet& myJet);
00048
00049 virtual void m_printParameterSettings();
00050
00054 int barcode() const;
00055
00057 int pdgCode() const;
00058
00060 inline const int& jetLabel() const { return m_jetLabel; }
00061
00063 double deltaRMinTo(const std::string&) const;
00064 inline const std::map<std::string, double>& distanceToQuarks() const { return m_distanceToQuarks; }
00065
00067 inline const Eigen::Vector3d& BDecVtx() const { return m_BDecVtx; }
00068 int Bpdg() const { return m_Bpdg; }
00069
00071 inline int NEventInCollection() const { return m_NEventInCollection; }
00072 inline void EventSelection(short s) { m_inTime = s; }
00073 inline short EventSelection() const { return m_inTime; }
00074
00075 private:
00076 std::string m_mcEventCollection;
00077 double m_deltaRCut;
00078 double m_ptCut;
00079 bool m_noDoc;
00080 short m_inTime;
00081 bool m_testJet(const xAOD::Jet&, const xAOD::TruthEventContainer*);
00082 int m_jetLabel;
00083 std::map<std::string, double> m_distanceToQuarks;
00084 Eigen::Vector3d m_BDecVtx;
00085 int m_pdg;
00086 int m_barcode;
00087 int m_Bpdg;
00088 int m_NEventInCollection;
00089 };
00090
00092 inline int JetQuarkLabel::barcode() const { return m_barcode; }
00093
00095 inline int JetQuarkLabel::pdgCode() const { return m_pdg; }
00096
00097 }
00098 #endif // TRUTHMATCHTOOLS_JETQUARKLABEL_H
00099