 |
DAS
3.0
Das Analysis System
|
Go to the documentation of this file.
19 #include <type_traits>
21 namespace pt = boost::property_tree;
40 class BranchFlattener {
58 std::list<std::unique_ptr<DT::SelfAwareBranch<const T&>>>
60 std::unique_ptr<DT::SelfAwareBranch<const std::vector<T>&>>
multiplicity;
67 const std::string&
name,
68 const std::function<Ret(
const T&)>&
f)
76 const std::string& nameIn,
77 const std::string& nameOut
86 Add<float>(flow, nameOut +
"_pt" , [
this](
const T& el) {
return el.CorrP4(this->v).
pt (); });
87 Add<float>(flow, nameOut +
"_eta" , [
this](
const T& el) {
return el.CorrP4(this->v).
eta (); });
88 Add<float>(flow, nameOut +
"_phi" , [
this](
const T& el) {
return el.CorrP4(this->v).phi (); });
89 Add<float>(flow, nameOut +
"_mass", [
this](
const T& el) {
return el.CorrP4(this->v).mass(); });
92 multiplicity = make_unique<DT::SelfAwarePlainBranch<int, const vector<T>&>>(flow,
"n" + nameOut, getMult);
136 template<
typename GenObject,
typename RecObject>
141 std::list<std::unique_ptr<BranchFlattener>> branch_flatteners;
156 for (
const auto& br: branch_flatteners)
166 for (
const auto& br: branch_flatteners)
name
Definition: DYToLL_M-50_13TeV_pythia8_cff_GEN_SIM_RECOBEFMIX_DIGI_L1_DIGI2RAW_L1Reco_RECO.py:48
std::list< std::unique_ptr< DT::SelfAwareBranch< const T & > > > branchesOut
container for output branches
Definition: Flattener.h:59
virtual ~PhysicsObjectFlattener()=default
PhysicsObjectFlattener()=default
pt
Definition: jmarExample.py:19
ScaledObjectBranchFlattener(Tools::Flow &flow, const Variation &v, const std::string &nameIn, const std::string &nameOut)
Generic class to project vectors of a given scaled object.
Definition: Flattener.h:75
virtual void ExecuteAtBegin(const std::set< Variation > &={nominal}) override
Clear output branches.
Definition: Flattener.h:154
virtual void ExecuteAtEnd(const std::set< Variation > &={nominal}) override
Fill output branches.
Definition: Flattener.h:164
f
Definition: Ntupliser_cfg.py:322
void Clear() override
Clear output branches.
Definition: Flattener.h:110
Definition: Variation.h:26
virtual ~ScaledObjectBranchFlattener()=default
Variation v
Definition: Flattener.h:42
std::vector< T > * branchIn
input structured branch (e.g. in Darwin format)
Definition: Flattener.h:57
Wrapper for flat branches for gen- or rec-level final-state objects.
Definition: Flattener.h:55
const Variation nominal("", "nominal")
virtual int GetParamsVeto() noexcept override
Plugin's forbidden modes.
Definition: Flattener.h:143
virtual ~BranchFlattener()=default
std::unique_ptr< DT::SelfAwareBranch< const std::vector< T > & > > multiplicity
Definition: Flattener.h:60
Plugin template to produce flat branches for physics objects.
Definition: Flattener.h:137
BranchFlattener(const Variation &v)
Definition: Flattener.h:43
Everything what concerns physics analysis directly.
Definition: darwin.h:25
void Fill() override
Fill output branches.
Definition: Flattener.h:97
void Add(Tools::Flow &flow, const std::string &name, const std::function< Ret(const T &)> &f)
Helper to add a new self-aware input branch.
Definition: Flattener.h:66
eta
DeepAK8/ParticleNet tagging.
Definition: jmarExample.py:19
Abstract class to produce flat branch(es) onto one or a set of ouput branches.
Definition: Flattener.h:40