From 57a222bdc4819219e5b8f1b5a2e49427c84a1fa0 Mon Sep 17 00:00:00 2001 From: Vincenzo Battista <vincenzo.battista@cern.ch> Date: Tue, 31 Jan 2017 10:23:34 +0100 Subject: [PATCH] Enable tagging for non-B hadrons --- Phys/DecayTreeTuple/src/TupleToolTagging.cpp | 15 +++++++++++---- Phys/DecayTreeTuple/src/TupleToolTagging.h | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Phys/DecayTreeTuple/src/TupleToolTagging.cpp b/Phys/DecayTreeTuple/src/TupleToolTagging.cpp index cc5e215b5..6701c8c97 100755 --- a/Phys/DecayTreeTuple/src/TupleToolTagging.cpp +++ b/Phys/DecayTreeTuple/src/TupleToolTagging.cpp @@ -93,6 +93,7 @@ TupleToolTagging::TupleToolTagging( const std::string& type, declareProperty("ActiveTaggers", m_activeTaggers ); declareProperty("useFTonDST", m_useFTonDST = false ); + declareProperty("TagBeautyOnly", m_tagBeautyOnly = true); }//============================================================================= @@ -124,6 +125,9 @@ StatusCode TupleToolTagging::initialize() { return Error("Unable to retrieve the IBTaggingTool tool",StatusCode::FAILURE); } + if( m_tagBeautyOnly ) debug() << "Running Flavour Tagging only on b-hadron particles" << endmsg; + else debug() << "Running Flavour Tagging on all particles (not only b-hadrons)" << endmsg; + return StatusCode::SUCCESS; } @@ -200,11 +204,14 @@ StatusCode TupleToolTagging::fill( const Particle* mother std::string loc = objectLocation( P->parent() ); - // nothing to tag on something which is not a B - if( !P->particleID().hasBottom() ) return StatusCode::SUCCESS; - + // nothing to tag on something which is not a B (unless explicitly required) + if( m_tagBeautyOnly ) + { + if( !P->particleID().hasBottom()) return StatusCode::SUCCESS; + } + if( msgLevel( MSG::DEBUG ) ){ - debug() << " Going to Save Tagging information for B candidate " + debug() << " Going to Save Tagging information for candidate " << endmsg; } diff --git a/Phys/DecayTreeTuple/src/TupleToolTagging.h b/Phys/DecayTreeTuple/src/TupleToolTagging.h index 1d98929e1..0ac6545a2 100755 --- a/Phys/DecayTreeTuple/src/TupleToolTagging.h +++ b/Phys/DecayTreeTuple/src/TupleToolTagging.h @@ -100,7 +100,7 @@ private: std::map<std::string, int> m_tagger_rmap;///<reverse, map of string to enum std::vector<std::string> m_activeTaggers; ///<List of active taggers - bool m_extendedTagging, m_useFTonDST; + bool m_extendedTagging, m_useFTonDST, m_tagBeautyOnly; VerboseData getVerboseData(const LHCb::Particle *p, const LHCb::Particle *B); }; -- GitLab