diff --git a/Phys/JetAccessories/CMakeLists.txt b/Phys/JetAccessories/CMakeLists.txt index 3519ab446c29d078bd422abba636d83d7376e8cf..2b8ad0fdc05abd01fc30d16e5d3e24227c91e1f4 100644 --- a/Phys/JetAccessories/CMakeLists.txt +++ b/Phys/JetAccessories/CMakeLists.txt @@ -29,6 +29,7 @@ gaudi_add_module(JetAccessories src/HighPtIsoLeptonAndTagPV.cpp src/HltJetBuilder.cpp src/HltParticleFlow.cpp + src/HltSoftDrop.cpp src/PFJetMakerAlg.cpp src/PFParticle.cpp src/PFlowProtoFilter.cpp @@ -40,6 +41,8 @@ gaudi_add_module(JetAccessories LINK AIDA::aida Boost::headers + FastJet::FastJet + FJContrib::RecursiveTools Gaudi::GaudiAlgLib Gaudi::GaudiKernel Gaudi::GaudiUtilsLib diff --git a/Phys/JetAccessories/src/HltSoftDrop.cpp b/Phys/JetAccessories/src/HltSoftDrop.cpp new file mode 100644 index 0000000000000000000000000000000000000000..623b9b1c20faeb8141bb4ad7102efca74bd60eef --- /dev/null +++ b/Phys/JetAccessories/src/HltSoftDrop.cpp @@ -0,0 +1,128 @@ +/*****************************************************************************\ +* (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration * +* * +* This software is distributed under the terms of the GNU General Public * +* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\*****************************************************************************/ + +// ============================================================================ +// Includes +// ---------------------------------------------------------------------------- +// Local +// ---------------------------------------------------------------------------- +#include "HltSoftDrop.h" +// ============================================================================ + +// ---------------------------------------------------------------------------- +/** Constructor */ +HltSoftDrop::HltSoftDrop( const std::string& name, ISvcLocator* svc ) : DaVinciAlgorithm( name, svc ) { + + declareProperty( "Beta", m_beta = 0, "SoftDrop beta parameter" ); + declareProperty( "SymmetryCut", m_symmetryCut = 0.1, "SoftDrop symmetry cut parameter" ); + declareProperty( "SymmetryMeasure", m_symmetryMeasure = 0, + "See fastjet::contrib::RecursiveSymmetryCutBase::SymmetryMeasure" ); + declareProperty( "JetR", m_r = 1.0, "Jet radius for reclustering" ); + declareProperty( "RecursionChoice", m_recursionChoice = 0, + "See fastjet::contrib::RecursiveSymmetryCutBase::recursion_choice" ); +} + +// ---------------------------------------------------------------------------- +/** Initialize the algorithm */ +StatusCode HltSoftDrop::initialize() { + + // Initialize the parent algorithm + DaVinciAlgorithm::initialize().ignore(); + + // Initialize the jet definition + m_jd = fastjet::JetDefinition( fastjet::cambridge_aachen_algorithm, 1000. ); + + return StatusCode::SUCCESS; +} + +// ---------------------------------------------------------------------------- +/** Excecute the algorithm */ +StatusCode HltSoftDrop::execute() { + + // Grab the input jets + Prt::Range inputs = particles(); + + // Container for the subjets + LHCb::Particles* sjs = new LHCb::Particles(); + put( sjs, outputLocation() + "/Subjets" ); + + // Loop over the input jets + for ( unsigned int ip = 0; ip < inputs.size(); ip++ ) { + + // Recluster the input constituents because an in-scope cluster sequence + // is needed for fastjet::SoftDrop + Prt::ConstVector dtrs = inputs[ip]->daughtersVector(); + std::vector<Jet> fjInputs; + for ( unsigned int i = 0; i < dtrs.size(); i++ ) { fjInputs.push_back( makeJet( dtrs[i], i ) ); } + fastjet::ClusterSequence cs( fjInputs, m_jd ); + Jet inJet = cs.inclusive_jets()[0]; + + // Perform the Soft Drop algorithm + fastjet::contrib::SoftDrop softDrop( + m_beta, m_symmetryCut, + static_cast<fastjet::contrib::RecursiveSymmetryCutBase::SymmetryMeasure>( m_symmetryMeasure ), m_r, + std::numeric_limits<double>::infinity(), + static_cast<fastjet::contrib::RecursiveSymmetryCutBase::RecursionChoice>( m_recursionChoice ) ); + Jet outJet = softDrop( inJet ); + if ( !outJet.has_constituents() || !outJet.has_pieces() ) continue; + + // Output jet and subjets + Prt *pJet = new Prt(), *pSubjet0 = new Prt(), *pSubjet1 = new Prt(); + + // Loop over the subjets + for ( int iSubjet = 0; iSubjet < 2; iSubjet++ ) { + + // Grab the appropriate subjet + Jet subjet = outJet.pieces()[iSubjet]; + Prt* pSubjet = ( iSubjet ) ? pSubjet1 : pSubjet0; + + // Loop over the constituents + for ( Jet j : subjet.constituents() ) { + // Grab the particle + pSubjet->addToDaughters( dtrs[j.user_index()] ); + } + + // Create the output subjet + pSubjet->setMomentum( Gaudi::LorentzVector( subjet.px(), subjet.py(), subjet.pz(), subjet.e() ) ); + pSubjet->setEndVertex( inputs[ip]->endVertex() ); + sjs->insert( pSubjet ); + pJet->addToDaughters( pSubjet ); + } + + // Create the output jet + pJet->setMomentum( Gaudi::LorentzVector( outJet.px(), outJet.py(), outJet.pz(), outJet.e() ) ); + pJet->setEndVertex( inputs[ip]->endVertex() ); + markParticle( pJet ); + } + + setFilterPassed( true ); + return StatusCode::SUCCESS; +} + +// ---------------------------------------------------------------------------- +/** Finalize */ +StatusCode HltSoftDrop::finalize() { return StatusCode::SUCCESS; } + +// ---------------------------------------------------------------------------- +/** Convert an LHCb:Particle to a fastjet:Pseudojet */ +fastjet::PseudoJet HltSoftDrop::makeJet( const Prt* p, const int& index ) { + + if ( !p ) return Jet(); + const Gaudi::LorentzVector& v = p->momentum(); + Jet jet( v.Px(), v.Py(), v.Pz(), v.E() ); + jet.set_user_index( index ); + return jet; +} + +// ============================================================================ +// Declare the algorithm factory +DECLARE_COMPONENT( HltSoftDrop ) +// ============================================================================ \ No newline at end of file diff --git a/Phys/JetAccessories/src/HltSoftDrop.h b/Phys/JetAccessories/src/HltSoftDrop.h new file mode 100644 index 0000000000000000000000000000000000000000..763dd15f008890fbd9680a245e84b288abaa38da --- /dev/null +++ b/Phys/JetAccessories/src/HltSoftDrop.h @@ -0,0 +1,140 @@ +/*****************************************************************************\ +* (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration * +* * +* This software is distributed under the terms of the GNU General Public * +* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\*****************************************************************************/ + +#ifndef HLTSOFTDROP_H +#define HLTSOFTDROP_H 1 + +// ============================================================================ +// Includes +// ---------------------------------------------------------------------------- +// Gaudi +// ---------------------------------------------------------------------------- +#include "GaudiAlg/GaudiTool.h" +// ---------------------------------------------------------------------------- +// DaVinci +// ---------------------------------------------------------------------------- +#include "Kernel/DaVinciAlgorithm.h" +// ---------------------------------------------------------------------------- +// Event +// ---------------------------------------------------------------------------- +#include "Event/Particle.h" +#include "LoKi/Geometry.h" +#include "LoKi/Kinematics.h" +// ---------------------------------------------------------------------------- +// FastJet +// ---------------------------------------------------------------------------- +#include "fastjet/ClusterSequence.hh" +#include "fastjet/JetDefinition.hh" +#include "fastjet/contrib/RecursiveSymmetryCutBase.hh" +#include "fastjet/contrib/SoftDrop.hh" +// ============================================================================ + +/** + * Soft Drop class for use in the Hlt and offline. + * + * @see arXiv:1402.2657 + * + * This class essentially acts as a DaVinci wrapper for the code provided by + * the fastjet contrib package. For each jet in the container of input jets, + * HltSoftDrop converts the jet from an LHCb::Particle to a + * fastjet::PseudoJet, performs the SoftDrop algorithm on the jet, then + * converts the output back into an LHCb::Particle. The output jet will always + * have two daughters, the subjets at the terminal stage of SoftDrop. The + * daughters of each subjet are the actual jet constituents, which already + * exist in the TES. + * + * @class HltSoftDrop + * @file HltSoftDrop.h + * @author Jake Pfaller + * @date 11-11-2024 + */ +class HltSoftDrop : public DaVinciAlgorithm { + +public: + // -------------------------------------------------------------------------- + /** Constructor + */ + HltSoftDrop( const std::string& name, ISvcLocator* svc ); + + // -------------------------------------------------------------------------- + /** Destructor + */ + ~HltSoftDrop(){}; + + // -------------------------------------------------------------------------- + /** Initialize the algorithm + * + * @return StatusCode + */ + StatusCode initialize() override; + + // -------------------------------------------------------------------------- + /** Excecute the algorithm + * + * Applies the SoftDrop algorithm to a container of jets. Please note that + * the input jets should have already been clustered using a tool such as + * HltJetBuilder. + * + * @return StatusCode + */ + StatusCode execute() override; + + // -------------------------------------------------------------------------- + /** Finalize + * + * @return StatusCode + */ + StatusCode finalize() override; + +protected: + // Useful types ------------------------------------------------------------- + + typedef fastjet::PseudoJet Jet; + typedef LHCb::Particle Prt; + + // -------------------------------------------------------------------------- + /** Convert an LHCb:Particle to a fastjet:PseudoJet + * + * @param p Input particle to convert + * @param index User index to assign to the jet + * @return Output jet of type fastjet::PseudoJet + */ + Jet makeJet( const Prt* p, const int& index ); + + // Members ------------------------------------------------------------------ + + // Beta parameter + double m_beta; + // Value of the cut on the symmetry measure + double m_symmetryCut; + // Choice of symmetry measure + int m_symmetryMeasure; + // Jet radius + double m_r; + // Strategy to decide which subjet to recurse into + int m_recursionChoice; + // Jet definition for reclustering + fastjet::JetDefinition m_jd; + +private: + // Default constructor is disabled + HltSoftDrop() = delete; + + // Copy constructor is disabled + HltSoftDrop( HltSoftDrop& ) = delete; + + // Assignment operator is disabled + HltSoftDrop& operator=( const HltSoftDrop& ) = delete; +}; + +// ============================================================================ + +#endif // HLTSOFTDROP_H \ No newline at end of file diff --git a/Phys/JetTagging/CMakeLists.txt b/Phys/JetTagging/CMakeLists.txt index e22f21b88720f5dfa2d6782d9fb80322e2f17981..bbc919543a8adf9d25c1a0f49b67db510b9dcdf8 100644 --- a/Phys/JetTagging/CMakeLists.txt +++ b/Phys/JetTagging/CMakeLists.txt @@ -22,6 +22,7 @@ gaudi_add_header_only_library(JetTaggingLib gaudi_add_module(JetTagging SOURCES + src/BDTTag.cpp src/FilterJet.cpp src/LoKiBDTTag.cpp src/LoKiElectronTag.cpp diff --git a/Phys/JetTagging/src/BDTTag.cpp b/Phys/JetTagging/src/BDTTag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31fa036fd4680da45eed3ba5ab46c697433d9add --- /dev/null +++ b/Phys/JetTagging/src/BDTTag.cpp @@ -0,0 +1,162 @@ +/*****************************************************************************\ +* (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration * +* * +* This software is distributed under the terms of the GNU General Public * +* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\*****************************************************************************/ + +// ============================================================================ +// Includes +// ---------------------------------------------------------------------------- +// Local +// ---------------------------------------------------------------------------- +#include "BDTTag.h" +// ============================================================================ + +// ---------------------------------------------------------------------------- +/** Constructor */ +BDTTag::BDTTag( const std::string& name, ISvcLocator* svc ) : DaVinciAlgorithm( name, svc ), m_tagger( 0 ) { + + declareProperty( "GhostFac", m_gfac = 1., "Scaling factor for ghost particle momenta" ); + declareProperty( "Bdt0Weights", m_bdt0Weights = "data/bdt_configs/LHCb_ANA_2014_076_BDT0.weights.xml", + "BDT0 TMVA weights filename and path from $JETTAGGINGROOT." ); + declareProperty( "Bdt1Weights", m_bdt1Weights = "data/bdt_configs/LHCb_ANA_2014_076_BDT1.weights.xml", + "BDT1 TMVA weights filename and path from $JETTAGGINGROOT." ); + declareProperty( "TmvaOptions", m_tmvaOptions = "Silent", "Options to pass to the TMVA reader." ); + declareProperty( "FitName", m_fitName = "LoKi::VertexFitter", "Name of the vertex fitter tool used to create SVRs." ); + declareProperty( "DstName", m_dstName = "LoKi::DistanceCalculator:PUBLIC", + "Name of the distance calculator tool used to create SVRs." ); + declareProperty( "DR", m_dr = 0.5, + "The maximum dR(SVR flight direction, jet momentum) " + "for linking two-body SVRs." ); + declareProperty( "Backwards", m_backwards = false, + "If true, build backwards SVRs by reversing the SVR flight " + "direction." ); + declareProperty( "PrtSelect", m_prtSelect = true, "If true, apply the default selection to the particles." ); + declareProperty( "NbvSelect", m_nbvSelect = true, "If true, apply the default selection to the n-body SVRs." ); + declareProperty( "NbvSort", m_nbvSort = "pt", "Sort the n-body SVRs by \"pt\", \"bdt0\", or \"bdt1\"." ); + declareProperty( "TbvLocation", m_tbvLocation = "", + "Optional TES location of two-body SVRs. If not set, the " + "two-body SVRs will be automatically built." ); + declareProperty( "PrtLocation", m_prtLocation = "Phys/StdAllNoPIDsPions/Particles", + "TES location of particles used to build the SVRs." ); +} + +// ---------------------------------------------------------------------------- +/** Initialize the algorithm */ +StatusCode BDTTag::initialize() { + + DaVinciAlgorithm::initialize().ignore(); + + // Initialize the BDT tagger + if ( !m_tagger ) m_tagger = tool<IJetTagTool>( "LoKi::BDTTag", this ); + if ( !m_tagger ) return Error( "Could not retrieve LoKi::BDTTag" ); + GaudiTool* tagger = dynamic_cast<GaudiTool*>( m_tagger ); + tagger->setProperty( "Bdt0Weights", m_bdt0Weights ).ignore(); + tagger->setProperty( "Bdt1Weights", m_bdt1Weights ).ignore(); + tagger->setProperty( "TmvaOptions", m_tmvaOptions ).ignore(); + tagger->setProperty( "FitName", m_fitName ).ignore(); + tagger->setProperty( "DstName", m_dstName ).ignore(); + tagger->setProperty( "DR", m_dr ).ignore(); + tagger->setProperty( "Backwards", m_backwards ).ignore(); + tagger->setProperty( "PrtSelect", m_prtSelect ).ignore(); + tagger->setProperty( "NbvSelect", m_nbvSelect ).ignore(); + tagger->setProperty( "NbvSort", m_nbvSort ).ignore(); + tagger->setProperty( "FitName", m_fitName ).ignore(); + tagger->setProperty( "TbvLocation", m_tbvLocation ).ignore(); + tagger->setProperty( "PrtLocation", m_prtLocation ).ignore(); + + return StatusCode::SUCCESS; +} + +// ---------------------------------------------------------------------------- +/** Excecute the algorithm */ +StatusCode BDTTag::execute() { + + // Grab the input jets + m_inputs = particles(); + + // Container for the secondary vertices + LHCb::Particles* svs = new LHCb::Particles(); + put( svs, outputLocation() + "/SVs" ); + + // Loop over the jets + for ( const Prt* inJet : m_inputs ) { + + // Tag the jet + m_tags.clear(); + if ( !( m_tagger->calculateJetProperty( inJet, m_tags ) ) && ( m_tags.count( "Tag" ) == 0 ) ) continue; + + // Create the output jet + Prt* outJet = inJet->clone(); + + // Loop over the tags + for ( int iTag = 0; iTag < m_tags["Tag"]; iTag++ ) { + + // Create the output SV + Prt* sv = new Prt(); + if ( !setInfo( sv, iTag ) ) continue; + sv->setMomentum( Gaudi::LorentzVector( sv->info( 2, 0 ) * m_gfac, sv->info( 3, 0 ) * m_gfac, + sv->info( 4, 0 ) * m_gfac, sv->info( 5, 0 ) * m_gfac ) ); + svs->insert( sv ); + + // Add SV to the jet's daughters + outJet->addToDaughters( sv ); + } + + // Add output jet to the TES + markParticle( outJet ); + } + + setFilterPassed( true ); + return StatusCode::SUCCESS; +} + +// ---------------------------------------------------------------------------- +/** Finalize */ +StatusCode BDTTag::finalize() { return StatusCode::SUCCESS; } + +// ---------------------------------------------------------------------------- +/** Store info from the BDT tagger in a particle */ +bool BDTTag::setInfo( Prt* prt, const int& index ) { + + // Check for valid index + int nTags = m_tags["Tag"]; + if ( ( index < 0 ) || ( index >= nTags ) ) return false; + + // Set the BDT info + std::stringstream pre; + pre << "Tag" << index << "_"; + prt->addInfo( 0, m_tags[pre.str() + "bdt0"] ); + prt->addInfo( 1, m_tags[pre.str() + "bdt1"] ); + prt->addInfo( 2, m_tags[pre.str() + "px"] ); + prt->addInfo( 3, m_tags[pre.str() + "py"] ); + prt->addInfo( 4, m_tags[pre.str() + "pz"] ); + prt->addInfo( 5, m_tags[pre.str() + "e"] ); + prt->addInfo( 6, m_tags[pre.str() + "m"] ); + prt->addInfo( 7, m_tags[pre.str() + "pt"] ); + prt->addInfo( 8, m_tags[pre.str() + "fdrMin"] ); + prt->addInfo( 9, m_tags[pre.str() + "ptSvrJet"] ); + prt->addInfo( 10, m_tags[pre.str() + "nTrk"] ); + prt->addInfo( 11, m_tags[pre.str() + "nTrkJet"] ); + prt->addInfo( 12, m_tags[pre.str() + "drSvrJet"] ); + prt->addInfo( 13, m_tags[pre.str() + "absQSum"] ); + prt->addInfo( 14, m_tags[pre.str() + "mCor"] ); + prt->addInfo( 15, m_tags[pre.str() + "fdChi2"] ); + prt->addInfo( 16, m_tags[pre.str() + "ipChi2Sum"] ); + prt->addInfo( 17, m_tags[pre.str() + "pass"] ); + prt->addInfo( 18, m_tags[pre.str() + "tau"] ); + prt->addInfo( 19, m_tags[pre.str() + "z"] ); + prt->addInfo( 20, m_tags[pre.str() + "backwards"] ); + + return true; +} + +// ============================================================================ +// Declare the algorithm factory +DECLARE_COMPONENT( BDTTag ) +// ============================================================================ \ No newline at end of file diff --git a/Phys/JetTagging/src/BDTTag.h b/Phys/JetTagging/src/BDTTag.h new file mode 100644 index 0000000000000000000000000000000000000000..df63baecbeb3585ad154ce67a5b74afa76a365b2 --- /dev/null +++ b/Phys/JetTagging/src/BDTTag.h @@ -0,0 +1,277 @@ +/*****************************************************************************\ +* (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration * +* * +* This software is distributed under the terms of the GNU General Public * +* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\*****************************************************************************/ + +#ifndef BDTTAG_H +#define BDTTAG_H 1 + +// ============================================================================ +// Includes +// ---------------------------------------------------------------------------- +// Gaudi +// ---------------------------------------------------------------------------- +#include "GaudiAlg/GaudiTool.h" +// ---------------------------------------------------------------------------- +// DaVinci +// ---------------------------------------------------------------------------- +#include "Kernel/DaVinciAlgorithm.h" +#include "Kernel/IJetTagTool.h" +// ---------------------------------------------------------------------------- +// Event +// ---------------------------------------------------------------------------- +#include "Event/Particle.h" +// ============================================================================ + +/** + * Jet tagging via the secondary vertex (SVR) method of LHCb-ANA-2014-074. + * + * This class acts as a DaVinci algorithm wrapper for LoKi::BDTTag. The input + * jets are each run through Loki::BDTTag, and the output secondary vertices + * are included amongst the daughter particles of the output jet, with their + * momentum scalable by some ghost particle factor. When looping over daughter + * particles, one can check if the particle is a BDT tagged SV by using the + * hasInfo method. The BDT output information can then be accessed by the info + * method, with the appropriate keys found in the bdtInfo enumerator. + * + * @class BDTTag + * @file BDTTag.h + * @author Jake Pfaller, Philip Ilten, Mike Williams + * @date 11-11-2024 + */ +class BDTTag : public DaVinciAlgorithm { + +public: + // -------------------------------------------------------------------------- + /** Constructor + */ + BDTTag( const std::string& name, ISvcLocator* svc ); + + // -------------------------------------------------------------------------- + /** Destructor + */ + ~BDTTag(){}; + + // -------------------------------------------------------------------------- + /** Initialize the algorithm + * + * @return StatusCode + */ + StatusCode initialize() override; + + // -------------------------------------------------------------------------- + /** Excecute the algorithm + * + * Runs the BDT tagging algorithm of LHCb-ANA-2014-074 on a container of + * jets. Any jets with a tagged SV are output into a new container, with + * the SVs clustered into the jet as ghost particles. + * + * @return StatusCode + */ + StatusCode execute() override; + + // -------------------------------------------------------------------------- + /** Finalize + * + * @return StatusCode + */ + StatusCode finalize() override; + + // Enumerator for BDT info + enum bdtInfo { + bdt0, + bdt1, + px, + py, + pz, + e, + m, + pt, + fdrMin, + ptSvrJet, + nTrk, + nTrkJet, + drSvrJet, + absQSum, + mCor, + fdChi2, + ipChi2Sum, + pass, + tau, + z, + backwards + }; + +protected: + // Useful types ------------------------------------------------------------- + + typedef LHCb::Particle Prt; + + // -------------------------------------------------------------------------- + /** Store info from the BDT tagger in a particle + * + * The information from LoKi::BDTTag is stored in the map m_tags, and this + * method then takes that info and stores it in the given particle. The + * given index corresponds to index of a tagged SV, sorted by pT. Returns + * false if requested index does not exist. + */ + bool setInfo( Prt* prt, const int& index ); + + // Members ------------------------------------------------------------------ + + // Input jets + Prt::Range m_inputs; + // Tagged SV information + std::map<std::string, double> m_tags; + // BDT Tagging tool + IJetTagTool* m_tagger; + // Ghost particle momentum factor + double m_gfac; + /** + * BDT0 TMVA weights filename and path from $JETTAGGINGROOT. + * + * Configured via "Bdt0Weights" with a default of + * "data/bdt_configs/LHCb_ANA_2014_076_BDT0.weights.xml". Changing + * this property takes effect only after initialization. Warning, + * changing this invalidates the results of LHCb-ANA-2014-074. + */ + std::string m_bdt0Weights; + /** + * BDT1 TMVA weights filename and path from $JETTAGGINGROOT. + * + * Configured via "Bdt1Weights" with a default of + * "data/bdt_configs/LHCb_ANA_2014_076_BDT1.weights.xml". Changing + * this property takes effect only after initialization. Warning, + * changing this invalidates the results of LHCb-ANA-2014-074. + */ + std::string m_bdt1Weights; + /** + * Options to pass to the TMVA reader. + * + * Configured via "TmvaOptions" with a default of + * "Silent". Changing this property takes effect only after + * initialization. To switch to verbose TMVA output change this + * option to "V". + */ + std::string m_tmvaOptions; + /** + * Name of the vertex fitter tool used to create SVRs. + * + * Configured via "FitName" with a default of + * "OfflineVertexFitter". Changing this property takes effect only + * after initialization. Warning, changing this invalidates the + * results of LHCb-ANA-2014-074. + */ + std::string m_fitName; + /** + * Name of the distance calculator tool used to create SVRs. + * + * Configured via "DstName" with a default of + * "LoKi::DistanceCalculator:PUBLIC". Changing this property takes + * effect only after initialization. Warning, changing this + * invalidates the results of LHCb-ANA-2014-074. + */ + std::string m_dstName; + /** + * The maximum dR(SVR flight direction, jet momentum) for linking + * two-body SVRs. + * + * Configured via "DR" with a default of 0.5. Only two-body SVRs + * with dR(SVR flight direction, jet momentum) < m_dr are linked + * to build SVR candidates for a jet. Changing this property takes + * effect only after initialization. Warning, changing this + * invalidates the results of LHCb-ANA-2014-074. + */ + double m_dr; + /** + * If true, build backwards n-body SVRs by reversing the SVR + * flight directions. + * + * Configured via "Backwards" with a default of false. Backwards + * SVRs are used in LHCb-ANA-2014-074 to cross-check light jet + * backgrounds. If this flag is set to true the n-body SVRs are + * built with two-body SVRs satisfying dR(-SVR flight direction, + * jet momentum) < m_dr. Additionally, the flight direction of the + * n-body vertex is reversed when calculating dR with the + * jet. This property can be set at any time and will take + * immediate effect when calculateJetProperty is called. + */ + bool m_backwards; + /** + * If true, apply the default selection to the particles. + * + * Configured via "PrtSelect" with a default of true. The particle + * selection applied is given by Table 3 in LHCb-ANA-2014-074. One + * can apply a different selection by filtering particles, + * providing the filtered location via m_prtLocation, and setting + * m_prtSelect to false. Changing this property takes effect only + * after the next event is read if calculateJetProperty has + * already been called. Warning, changing the particle selection + * invalidates the results of LHCb-ANA-2014-074. + */ + bool m_prtSelect; + /** + * If true, apply the default selection to the n-body SVRs. + * + * Configured via "NbvSelect" with a default of true. The n-body + * vertex selection is given by Table 5 in LHCb-ANA-2014-074. This + * property can be set at any time and will take immediate effect + * when calculateJetProperty is called. Warning, changing the + * n-body selection invalidates the results of LHCb-ANA-2014-074. + */ + bool m_nbvSelect; + /** + * Sort the n-body SVRs by "pt", "bdt0", or "bdt1". + * + * Configured via "NbvSort" with a default of "pt". If the value + * of m_nbvSort is not set to one of the three recognized options, + * the n-body SVRs will not be sorted. This sorting only affects + * the order in which the SVR information is written out via + * calculateJetProperty. This property can be set at any time and + * will take immediate effect when calculateJetProperty is called. + */ + std::string m_nbvSort; + /** + * TES location of particles used to build the SVRs. + * + * Configured via "PrtLocation" with a default of + * "Phys/StdAllNoPIDsPions/Particles". Changing this property + * takes effect only after the next event is read if + * calculateJetProperty has already been called. Warning, changing + * the particle location invalidates the results of + * LHCb-ANA-2014-074. + */ + std::string m_prtLocation; + /** + * Optional TES location of two-body SVRs. If not set, the + * two-body SVRs will be automatically built. + * + * Configured via "TbvLocation" with a default of "". The two-body + * SVRs used to build the final n-body SVRs are created from the + * particles provided by m_prtLocation. However, if a valid TES + * location is provided by m_tbvLocation, all two-body + * combinations from this location are used instead. Changing this + * property takes effect only after the next event is read if + * calculateJetProperty has already been called. Warning, changing + * the SVR location invalidates the results of LHCb-ANA-2014-074. + */ + std::string m_tbvLocation; + +private: + // Default constructor is disabled + BDTTag() = delete; + + // Copy constructor is disabled + BDTTag( BDTTag& ) = delete; + + // Assignment operator is disabled + BDTTag& operator=( const BDTTag& ) = delete; +}; + +#endif // DAVINCIBDTTAG_H \ No newline at end of file diff --git a/cmake/FindFJContrib.cmake b/cmake/FindFJContrib.cmake index 06277862391fa5f6c6a82d67704a377a0696b6a8..fb0081c198a5bbc5c06b8b0b52321a5c25904eaa 100644 --- a/cmake/FindFJContrib.cmake +++ b/cmake/FindFJContrib.cmake @@ -33,7 +33,6 @@ mark_as_advanced(FJContrib_FOUND FJContrib_INCLUDE_DIR FJContrib_LIBRARIES) if(FJContrib_FOUND) foreach(CONTRIB ${FJContrib_LIBRARIES}) string(REGEX REPLACE ".*/lib([^/]+)\\.a" "\\1" COMPONENT ${CONTRIB}) - message("${CONTRIB}\n${COMPONENT}") add_library(FJContrib::${COMPONENT} STATIC IMPORTED) set_target_properties(FJContrib::${COMPONENT} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FJContrib_INCLUDE_DIR}"