Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <TrigJetHypoTool.h>
|
| TrigJetHypoTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
| ~TrigJetHypoTool () |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
StatusCode | decide (const xAOD::JetContainer *jets, const TrigCompositeUtils::DecisionIDContainer &previousDecisionIDs, std::vector< JetDecision > &jetHypoInputs) const |
|
const HLT::Identifier & | getID (std::size_t) const |
|
const std::vector< HLT::Identifier > & | getIDs () const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 29 of file TrigJetHypoTool.h.
◆ JetDecision
◆ StoreGateSvc_t
◆ TrigJetHypoTool()
TrigJetHypoTool::TrigJetHypoTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~TrigJetHypoTool()
TrigJetHypoTool::~TrigJetHypoTool |
( |
| ) |
|
◆ checkPassingJets()
Definition at line 251 of file TrigJetHypoTool.cxx.
254 if (jetCollector.
empty()) {
257 ", but did not specify which jets participated");
258 return StatusCode::FAILURE;
261 auto legIndices = jetCollector.
legInds();
264 return StatusCode::FAILURE;
268 ATH_MSG_DEBUG(
"There are some indices: " << legIndices.size());
269 for(
size_t i = 0;
i < legIndices.size();
i ++){
276 auto participating_jets = jetCollector.
xAODJets();
282 auto legInds = jetCollector.
legInds();
283 std::stringstream
ss;
285 for(
const auto&
label : legInds){
288 for(
const auto& j :
jets){
289 ss << static_cast<const void*>(j) <<
'\n';
296 return StatusCode::SUCCESS;
◆ decide()
Definition at line 100 of file TrigJetHypoTool.cxx.
107 previousDecisionIDs)) {
108 return StatusCode::SUCCESS;
111 std::unique_ptr<ITrigJetHypoInfoCollector> infocollector(
nullptr);
112 std::unique_ptr<ITrigJetHypoInfoCollector> jetdumper(
nullptr);
131 <<
" no of jets ... "
145 pass =
m_helper->pass(hypoJets, jetCollector, infocollector);
147 ATH_MSG_ERROR(
"Exception raised by the TrigJetHypoToolHelper: "
149 return StatusCode::FAILURE;
162 infocollector->collect(
"TrigJetHypoTool",
msg);
165 return StatusCode::SUCCESS;
182 infocollector->collect(
"TrigJetHypoTool",
msg);
183 infocollector->write();
185 std::stringstream
ss;
187 jetdumper->collect(
"passed",
ss.str());
193 mon_NOutputs = hjv.size();
194 for(
const auto& j : hjv) {
200 float this_negLogSigma2 = 999;
201 j->getAttribute(
"dipz20231122_z", this_z);
202 j->getAttribute(
"dipz20231122_negLogSigma2", this_negLogSigma2);
204 auto mon_dipz_negLogSigma2 =
Monitored::Scalar(
"dipz_negLogSigma2", this_negLogSigma2);
205 float this_GN2X_phbb{999.}, this_GN2X_phcc{999.}, this_GN2X_pqcd{999.}, this_GN2X_ptop{999.};
206 j->getAttribute(
"GN2Xv01_phbb", this_GN2X_phbb);
207 j->getAttribute(
"GN2Xv01_phcc", this_GN2X_phcc);
208 j->getAttribute(
"GN2Xv01_ptop", this_GN2X_ptop);
209 j->getAttribute(
"GN2Xv01_pqcd", this_GN2X_pqcd);
214 float this_GN2X_discriminant{999.};
215 if (this_GN2X_phbb > 0.){
216 float top_frac{0.25};
217 float denom = this_GN2X_pqcd*(1. - top_frac) + this_GN2X_ptop * top_frac;
219 this_GN2X_discriminant =
log(this_GN2X_phbb/
denom);
222 auto mon_GN2X_discriminant =
Monitored::Scalar(
"GN2Xv01_discriminant", this_GN2X_discriminant);
223 auto monitor_group_passingjets =
Monitored::Group(
m_monTool, mon_jetEt, mon_jetEta, mon_jetPhi , mon_dipz_z, mon_dipz_negLogSigma2, mon_jetMass, mon_GN2X_phbb, mon_GN2X_phcc, mon_GN2X_ptop, mon_GN2X_pqcd, mon_GN2X_discriminant);
227 auto legInds = jetCollector.
legInds();
228 for (
const auto&
label : legInds) {
232 [](
double sum,
const HypoJetVector::value_type jptr){return sum + jptr->et()*0.001;} ));
236 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode TrigJetHypoTool::finalize |
( |
| ) |
|
◆ getID()
◆ getIDs()
◆ initialize()
StatusCode TrigJetHypoTool::initialize |
( |
| ) |
|
Definition at line 49 of file TrigJetHypoTool.cxx.
53 return StatusCode::FAILURE;
67 " to " <<
m_endLabelIndex <<
", the HypoTool's name must therefore start with legXXX_ rather than HLT_");
68 return StatusCode::FAILURE;
82 auto s = collector.toString();
90 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ inputJetParticipates()
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ reportLeg()
Definition at line 316 of file TrigJetHypoTool.cxx.
322 for (
auto& pair : jetHypoInputs) {
332 passingIDs.insert(
getID(legInd).numeric());
339 return StatusCode::SUCCESS;
◆ reportPassingJets()
Definition at line 300 of file TrigJetHypoTool.cxx.
303 auto legIndices = jetCollector.
legInds();
304 for(
const auto& legInd : legIndices){
305 auto participating_jets = jetCollector.
xAODJets(legInd);
309 return StatusCode::SUCCESS;
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_chainName
Gaudi::Property<std::string> TrigJetHypoTool::m_chainName |
|
private |
Initial value:{
this, "chain_name", {}, "chain name"}
Definition at line 89 of file TrigJetHypoTool.h.
◆ m_decisionID
◆ m_decisionIDs
◆ m_detStore
◆ m_endLabelIndex
Gaudi::Property<std::size_t> TrigJetHypoTool::m_endLabelIndex |
|
private |
Initial value:{
this, "endLabelIndex", {0}, "end value for leg indices"}
Definition at line 83 of file TrigJetHypoTool.h.
◆ m_evtStore
◆ m_helper
Initial value:{
this, "helper_tool", {}, "Jet hypo helper AlgTool"}
Definition at line 77 of file TrigJetHypoTool.h.
◆ m_id
std::atomic<size_t> TrigJetHypoTool::m_id = 0 |
|
mutableprivate |
◆ m_monTool
◆ m_startLabelIndex
Gaudi::Property<std::size_t> TrigJetHypoTool::m_startLabelIndex |
|
private |
Initial value:{
this, "startLabelIndex", {0}, "start value for leg indices"}
Definition at line 80 of file TrigJetHypoTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_visitDebug
Gaudi::Property<bool> TrigJetHypoTool::m_visitDebug |
|
private |
Initial value:{
this, "visit_debug", false, "debug flag"}
Definition at line 86 of file TrigJetHypoTool.h.
The documentation for this class was generated from the following files:
Group
Properties of a chain group.
HypoJetVector hypoJets() const
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
std::string find(const std::string &s)
return a remapped string
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
std::vector< std::string > lineSplitter(const std::string &s, char delimiter)
virtual void collect(const std::string &, const std::string &)=0
@ u
Enums for curvilinear frames.
virtual void setOwner(IDataHandleHolder *o)=0
static HLT::Identifier fromToolName(const std::string &tname)
std::vector< const xAOD::Jet * > xAODJets() const
std::vector< int > legInds() const
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
#define CHECK(...)
Evaluate an expression and check for errors.
std::vector< pHypoJet > HypoJetVector
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string to_string(const DetectorType &type)
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
accumulate
Update flags based on parser line args.
std::set< DecisionID > DecisionIDContainer
void collect(const HLT::TriggerElement *te, std::vector< Trig::Feature< T > > &data, const std::string &label, unsigned int condition, const std::string &teName, const HLT::TrigNavStructure *navstructure)
actual feature acceess implementation It has (thanks to the ClassTraits) functionality to flatten con...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
HLT::Identifier getIDFromLeg(const HLT::Identifier &legIdentifier)
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
Declare a monitored scalar variable.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>