Commit 2965187c authored by Murilo Rangel's avatar Murilo Rangel
Browse files

added TupleToolJetInfo

parent dcc77e17
Pipeline #3254863 failed with stage
in 19 seconds
This diff is collapsed.
/*****************************************************************************\
* (c) Copyright 2020 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. *
\*****************************************************************************/
// $Id: TupleToolJetInfo.h
#ifndef TupleToolJetInfo_H
#define TupleToolJetInfo_H 1
// Include files
// from DaVinci, this is a specialized GaudiAlgorithm
//#include "Kernel/DVAlgorithm.h"
#include "DecayTreeTupleBase/TupleToolBase.h"
#include "Event/MCParticle.h"
#include "Kernel/IJetTagTool.h"
#include "Kernel/IParticleTupleTool.h"
class TupleToolJetInfo : public TupleToolBase, virtual public IParticleTupleTool {
public:
/// Standard constructor
TupleToolJetInfo( const std::string& type, const std::string& name, const IInterface* parent );
/// Loop over the particles not in the decay and fill them into a vector
virtual StatusCode fill( const LHCb::Particle*, const LHCb::Particle*, const std::string&, Tuples::Tuple& );
bool fillJet( const LHCb::Particle* jet, const std::string& head, Tuples::Tuple& tuple,
const std::string& suffix = "" );
bool fillTrueJet( const LHCb::Particle* jet, const LHCb::MCParticle* mcjet, const std::string& head,
Tuples::Tuple& tuple, const std::string& suffix = "" );
bool fillTagInfo( std::string tagger, const std::string& head, const std::string& tail, Tuples::Tuple& tuple,
std::map<std::string, double> jetWeights );
bool partinjet( const LHCb::Particle* j, const LHCb::Particle* part );
double delta_r( const Gaudi::LorentzVector& a, const Gaudi::LorentzVector& b );
double delta_r( const LHCb::Particle* j, const LHCb::Particle* part );
double delta_r( const LHCb::Particle* j, std::vector<const LHCb::Particle*> parts );
double delta_r( const LHCb::MCParticle* j, std::vector<const LHCb::Particle*> parts );
std::vector<const LHCb::ProtoParticle*> getprotos( std::vector<const LHCb::Particle*> parts );
std::vector<const LHCb::Track*> gettracks( std::vector<const LHCb::Particle*> parts );
std::vector<const LHCb::Particle*> getdecaytree( const LHCb::Particle* top );
const LHCb::MCParticle* jet_deltar_truthmatch( const LHCb::Particle* jet,
std::vector<const LHCb::MCParticle*> truthjets );
virtual ~TupleToolJetInfo(); ///< Destructor
virtual StatusCode initialize(); ///< Algorithm initialization
std::pair<int, double> get_jet_flavour( const LHCb::MCParticle* mcjet );
double get_jet_width( const LHCb::Particle* jet );
double get_jet_charge( const LHCb::Particle* jet );
std::map<std::string, double> get_tagging_vars( const LHCb::Particle* jet );
std::map<std::string, double> get_ip_vars( const LHCb::Particle* jet );
struct pred {
bool operator()( const LHCb::Particle* a, const LHCb::Particle* b ) const { return a->pt() > b->pt(); }
bool operator()( const LHCb::MCParticle* a, const LHCb::MCParticle* b ) const { return a->pt() > b->pt(); }
};
protected:
private:
IDVAlgorithm* m_dva;
const IDistanceCalculator* m_dist;
IJetTagTool* m_jetTagger;
std::vector<IJetTagTool*> m_jetTaggers;
int m_njets;
bool m_fillsigjet;
bool m_flavourvars;
bool m_tag;
bool m_applytag;
bool m_filltag;
bool m_tagbyparton;
bool m_mc;
double m_deltaR;
bool m_samepv;
std::vector<double> m_jetetarange;
std::vector<double> m_multpts;
std::string m_jetlocation;
std::string m_noidjetlocation;
std::string m_mcjetlocation;
std::string m_jettaggername;
std::string m_jetprefix;
std::vector<std::string> m_jettaggernames;
LHCb::MCParticles* m_mcparts;
};
#endif // TupleToolJetInfo_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment