00001
00002 #ifndef COPYTRUTHJETPARTICLES_H
00003 #define COPYTRUTHJETPARTICLES_H
00004
00005 #include "ParticleJetTools/CopyTruthParticles.h"
00006 #include "AsgTools/ToolHandle.h"
00007 #include "xAODTruth/TruthParticle.h"
00008 #include "MCTruthClassifier/MCTruthClassifierDefs.h"
00009 #include "MCTruthClassifier/IMCTruthClassifier.h"
00010 #include <vector>
00011 #include <map>
00012
00013 class CopyTruthJetParticles : public CopyTruthParticles {
00014 ASG_TOOL_CLASS2(CopyTruthJetParticles, CopyTruthParticles, IJetExecuteTool)
00015 public:
00016
00018 CopyTruthJetParticles(const std::string& name);
00019
00021 virtual int execute() const;
00022
00024 bool classifyJetInput(const xAOD::TruthParticle* tp, int barcodeOffset,
00025 std::vector<const xAOD::TruthParticle*>& promptLeptons,
00026 std::map<const xAOD::TruthParticle*,MCTruthPartClassifier::ParticleOrigin>& originMap) const;
00027
00028
00030 bool classify(const xAOD::TruthParticle* ) const {return false;}
00031
00032 private:
00033
00034 bool m_includeNu;
00035 bool m_includeMu;
00036 bool m_includePromptLeptons;
00037
00038
00039 bool isPrompt( const xAOD::TruthParticle* tp,
00040 std::map<const xAOD::TruthParticle*,MCTruthPartClassifier::ParticleOrigin>& originMap ) const;
00041
00042
00043
00044
00045 MCTruthPartClassifier::ParticleOrigin getPartOrigin(const xAOD::TruthParticle* tp,
00046 std::map<const xAOD::TruthParticle*,MCTruthPartClassifier::ParticleOrigin>& originMap) const;
00047
00048 float m_maxAbsEta;
00049
00050 int m_barcodeOffset;
00051
00056 int m_barcodeFromMetadata;
00057
00058 float m_photonCone;
00059
00060 mutable ToolHandle<IMCTruthClassifier> m_classif;
00061 };
00062
00063
00064 #endif