ATLAS Offline Software
NSubjettinessRatiosTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
19 #ifndef jetsubstructuremomenttools_nsubjetinessratiostool_header
20 #define jetsubstructuremomenttools_nsubjetinessratiostool_header
21 
24 
28 
29  public:
30 
32  NSubjettinessRatiosTool(const std::string& name);
33 
35 
36  int modifyJet(xAOD::Jet &jet) const;
37 
38  private:
39 
41  struct moments_t;
42 
44  std::vector<float> m_rawAlphaVals;
46 
48  std::map< float, moments_t > m_moments;
49 
50  };
51 
61 
63  std::string prefix;
64 
66  std::string suffix;
67 
69  float alpha;
70 
72  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau1;
73  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2;
74  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3;
75  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4;
76 
78  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2_ungroomed;
79  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3_ungroomed;
80  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4_ungroomed;
81 
83  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau1_wta;
84  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2_wta;
85  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3_wta;
86  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4_wta;
87 
89  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau2_wta_ungroomed;
90  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau3_wta_ungroomed;
91  std::unique_ptr< SG::AuxElement::ConstAccessor<float> > acc_Tau4_wta_ungroomed;
92 
94  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21;
95  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32;
96  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42;
97 
99  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21_dichroic;
100  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32_dichroic;
101  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42_dichroic;
102 
104  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21_wta;
105  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32_wta;
106  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42_wta;
107 
109  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau21_wta_dichroic;
110  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau32_wta_dichroic;
111  std::unique_ptr< SG::AuxElement::Decorator<float> > dec_Tau42_wta_dichroic;
112 
113  moments_t (float Alpha, const std::string& Prefix)
114  : prefix (Prefix),
115  suffix (GetAlphaSuffix(Alpha)),
116  alpha (Alpha),
117 
118  acc_Tau1 (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau1"+suffix)),
119  acc_Tau2 (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2"+suffix)),
120  acc_Tau3 (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3"+suffix)),
121  acc_Tau4 (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4"+suffix)),
122 
123  acc_Tau2_ungroomed (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2_ungroomed"+suffix)),
124  acc_Tau3_ungroomed (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3_ungroomed"+suffix)),
125  acc_Tau4_ungroomed (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4_ungroomed"+suffix)),
126 
127  acc_Tau1_wta (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau1_wta"+suffix)),
128  acc_Tau2_wta (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2_wta"+suffix)),
129  acc_Tau3_wta (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3_wta"+suffix)),
130  acc_Tau4_wta (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4_wta"+suffix)),
131 
132  acc_Tau2_wta_ungroomed (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau2_wta_ungroomed"+suffix)),
133  acc_Tau3_wta_ungroomed (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau3_wta_ungroomed"+suffix)),
134  acc_Tau4_wta_ungroomed (std::make_unique< SG::AuxElement::ConstAccessor<float> >(prefix+"Tau4_wta_ungroomed"+suffix)),
135 
136  dec_Tau21 (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21"+suffix)),
137  dec_Tau32 (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32"+suffix)),
138  dec_Tau42 (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42"+suffix)),
139 
140  dec_Tau21_dichroic (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21_dichroic"+suffix)),
141  dec_Tau32_dichroic (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32_dichroic"+suffix)),
142  dec_Tau42_dichroic (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42_dichroic"+suffix)),
143 
144  dec_Tau21_wta (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21_wta"+suffix)),
145  dec_Tau32_wta (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32_wta"+suffix)),
146  dec_Tau42_wta (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42_wta"+suffix)),
147 
148  dec_Tau21_wta_dichroic (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau21_wta_dichroic"+suffix)),
149  dec_Tau32_wta_dichroic (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau32_wta_dichroic"+suffix)),
150  dec_Tau42_wta_dichroic (std::make_unique< SG::AuxElement::Decorator<float> >(prefix+"Tau42_wta_dichroic"+suffix))
151  {
152  }
153 
154 };
155 
156 #endif
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
NSubjettinessRatiosTool::moments_t::acc_Tau1
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau1
NSubjettiness accessors.
Definition: NSubjettinessRatiosTool.h:72
GetAlphaSuffix
std::string GetAlphaSuffix(float alpha)
Definition: NSubjettinessHelper.cxx:10
NSubjettinessRatiosTool::moments_t::dec_Tau32_wta
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau32_wta
Definition: NSubjettinessRatiosTool.h:105
NSubjettinessRatiosTool::moments_t::moments_t
moments_t(float Alpha, const std::string &Prefix)
Definition: NSubjettinessRatiosTool.h:113
NSubjettinessRatiosTool::moments_t::alpha
float alpha
Beta value for calculations.
Definition: NSubjettinessRatiosTool.h:69
NSubjettinessRatiosTool::moments_t::acc_Tau4_ungroomed
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau4_ungroomed
Definition: NSubjettinessRatiosTool.h:80
NSubjettinessRatiosTool::moments_t::dec_Tau21_wta
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau21_wta
WTA NSubjettiness Ratios decorators.
Definition: NSubjettinessRatiosTool.h:104
NSubjettinessRatiosTool::m_doDichroic
bool m_doDichroic
Vector of input values before cleaning.
Definition: NSubjettinessRatiosTool.h:45
NSubjettinessRatiosTool::moments_t::dec_Tau42_wta_dichroic
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau42_wta_dichroic
Definition: NSubjettinessRatiosTool.h:111
NSubjettinessRatiosTool::modifyJet
int modifyJet(xAOD::Jet &jet) const
Modify a single jet. This is obsolete and set to be removed.
Definition: NSubjettinessRatiosTool.cxx:48
NSubjettinessRatiosTool::m_rawAlphaVals
std::vector< float > m_rawAlphaVals
Configurable as properties.
Definition: NSubjettinessRatiosTool.h:41
NSubjettinessRatiosTool::moments_t::acc_Tau1_wta
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau1_wta
WTA NSubjettiness accessors.
Definition: NSubjettinessRatiosTool.h:83
NSubjettinessRatiosTool
Definition: NSubjettinessRatiosTool.h:26
NSubjettinessRatiosTool::moments_t::dec_Tau32_dichroic
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau32_dichroic
Definition: NSubjettinessRatiosTool.h:100
NSubjettinessRatiosTool::moments_t::acc_Tau2_wta
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau2_wta
Definition: NSubjettinessRatiosTool.h:84
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
NSubjettinessRatiosTool::moments_t::dec_Tau32
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau32
Definition: NSubjettinessRatiosTool.h:95
NSubjettinessRatiosTool::m_moments
std::map< float, moments_t > m_moments
Map of moment accessors and decorators using alpha as the key.
Definition: NSubjettinessRatiosTool.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetSubStructureMomentToolsBase.h
NSubjettinessRatiosTool::moments_t
Definition: NSubjettinessRatiosTool.h:60
NSubjettinessRatiosTool::moments_t::dec_Tau21_dichroic
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau21_dichroic
Dichroic NSubjettiness Ratios decorators.
Definition: NSubjettinessRatiosTool.h:99
NSubjettinessRatiosTool::moments_t::suffix
std::string suffix
Suffix for decorations.
Definition: NSubjettinessRatiosTool.h:66
NSubjettinessRatiosTool::moments_t::dec_Tau42_wta
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau42_wta
Definition: NSubjettinessRatiosTool.h:106
NSubjettinessRatiosTool::NSubjettinessRatiosTool
NSubjettinessRatiosTool(const std::string &name)
Constructor.
Definition: NSubjettinessRatiosTool.cxx:7
NSubjettinessRatiosTool::moments_t::dec_Tau32_wta_dichroic
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau32_wta_dichroic
Definition: NSubjettinessRatiosTool.h:110
NSubjettinessRatiosTool::moments_t::acc_Tau4_wta_ungroomed
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau4_wta_ungroomed
Definition: NSubjettinessRatiosTool.h:91
NSubjettinessRatiosTool::moments_t::acc_Tau3_ungroomed
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau3_ungroomed
Definition: NSubjettinessRatiosTool.h:79
NSubjettinessRatiosTool::moments_t::dec_Tau21
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau21
NSubjettiness Ratios decorators.
Definition: NSubjettinessRatiosTool.h:94
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
NSubjettinessRatiosTool::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: NSubjettinessRatiosTool.cxx:14
NSubjettinessRatiosTool::moments_t::dec_Tau21_wta_dichroic
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau21_wta_dichroic
WTA Dichroic NSubjettiness Ratios decorators.
Definition: NSubjettinessRatiosTool.h:109
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
NSubjettinessRatiosTool::moments_t::dec_Tau42
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau42
Definition: NSubjettinessRatiosTool.h:96
NSubjettinessRatiosTool::moments_t::acc_Tau3_wta
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau3_wta
Definition: NSubjettinessRatiosTool.h:85
NSubjettinessRatiosTool::moments_t::acc_Tau3
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau3
Definition: NSubjettinessRatiosTool.h:74
NSubjettinessRatiosTool::moments_t::acc_Tau4_wta
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau4_wta
Definition: NSubjettinessRatiosTool.h:86
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
NSubjettinessRatiosTool::moments_t::acc_Tau2_wta_ungroomed
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau2_wta_ungroomed
WTA NSubjettiness ungroomed accessors.
Definition: NSubjettinessRatiosTool.h:89
NSubjettinessRatiosTool::moments_t::acc_Tau3_wta_ungroomed
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau3_wta_ungroomed
Definition: NSubjettinessRatiosTool.h:90
NSubjettinessRatiosTool::moments_t::dec_Tau42_dichroic
std::unique_ptr< SG::AuxElement::Decorator< float > > dec_Tau42_dichroic
Definition: NSubjettinessRatiosTool.h:101
NSubjettinessRatiosTool::moments_t::acc_Tau2
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau2
Definition: NSubjettinessRatiosTool.h:73
JetSubStructureMomentToolsBase
Definition: JetSubStructureMomentToolsBase.h:18
NSubjettinessRatiosTool::moments_t::acc_Tau2_ungroomed
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau2_ungroomed
NSubjettiness ungroomed accessors.
Definition: NSubjettinessRatiosTool.h:78
readCCLHist.float
float
Definition: readCCLHist.py:83
NSubjettinessRatiosTool::moments_t::acc_Tau4
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > acc_Tau4
Definition: NSubjettinessRatiosTool.h:75
IJetModifier
IJetModifier is a dual-use tool interface for a tool that modifies a jet collection.
Definition: IJetModifier.h:20
NSubjettinessRatiosTool::moments_t::prefix
std::string prefix
Prefix for decorations.
Definition: NSubjettinessRatiosTool.h:63
NSubjettinessHelper.h