Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Retrieves all Jet
objects
(JetAODCollection etc.)
More...
#include <xAODJetRetriever.h>
|
| xAODJetRetriever (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Constructor. More...
|
|
virtual StatusCode | retrieve (ToolHandle< IFormatTool > &FormatTool) |
| For each jet collections retrieve basic parameters. More...
|
|
const DataMap | getData (const xAOD::JetContainer *, const std::string &jetkey) |
| Puts the variables into a DataMap. More...
|
|
const std::vector< std::string > | getKeys () |
| Gets the StoreGate keys for the desired containers. More...
|
|
virtual std::string | dataTypeName () const |
| Return the name of the data type that is generated by this retriever. More...
|
|
virtual StatusCode | initialize () |
|
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 |
|
|
const std::string | m_typeName = "Jet" |
| The data type that is generated by this retriever. More...
|
|
Gaudi::Property< bool > | m_doWriteHLT {this, "DoWriteHLT", false, "Write out other collections that have HLT in the name"} |
|
Gaudi::Property< bool > | m_doWriteAllCollections {this, "DoWriteAllCollections", false, "Write out all Jet collections"} |
|
Gaudi::Property< std::vector< std::string > > | m_otherKeys {this, "OtherJetCollections", {"AntiKt4EMTopoJets", "AntiKt4LCTopoJets", "AntiKt10LCTopoJets", "AntiKt10UFOCSSKJets"}, "Other collections to be retrieved. If DoWriteAllCollections is set to true all available Jet collections will be retrieved"} |
|
Gaudi::Property< std::string > | m_priorityKey {this,"PriorityJetCollection","AntiKt4TopoEMJets", "Name of the priority Jet container that will be written out first"} |
|
Gaudi::Property< bool > | m_writeJetQuality |
|
Gaudi::Property< std::string > | m_tracksName |
|
Gaudi::Property< std::vector< std::string > > | m_bTaggerNames |
|
Gaudi::Property< std::vector< std::string > > | m_CDIPaths |
|
std::unordered_map< std::string, asg::AnaToolHandle< IBTaggingSelectionTool > > | m_btagSelTools |
|
unsigned int | m_nTaggers =0 |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Retrieves all Jet
objects
(JetAODCollection etc.)
- Properties
- PriorityJetCollection: First collection to be retrieved, displayed in Atlantis without switching. All other collections are also retrieved.
- OtherJetCollections
- DoWriteHLT
- DoWriteAllCollections
- WriteJetQuality
- TracksName
- CDIPaths
- Retrieved Data
- Usual four-vectors: phi, eta, et etc.
- Associations for clusters and tracks via ElementLink: key/index scheme
Definition at line 40 of file xAODJetRetriever.h.
◆ StoreGateSvc_t
◆ xAODJetRetriever()
JiveXML::xAODJetRetriever::xAODJetRetriever |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Constructor.
This is the standard AthAlgTool constructor.
- Parameters
-
type | AlgTool type name |
name | AlgTool instance name |
parent | AlgTools parent owning this tool |
Definition at line 25 of file xAODJetRetriever.cxx.
◆ dataTypeName()
virtual std::string JiveXML::xAODJetRetriever::dataTypeName |
( |
| ) |
const |
|
inlinevirtual |
◆ 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
◆ getData()
Puts the variables into a DataMap.
Retrieve basic parameters, mainly four-vectors, for each collection.
Also association with clusters and tracks (ElementLink).
Definition at line 89 of file xAODJetRetriever.cxx.
112 DataVect trackContKey; trackContKey.reserve(jetCont->
size());
113 DataVect trackLinkCount; trackLinkCount.reserve(jetCont->
size());
122 for (
const auto jet : *jetCont) {
127 size_t numConstit =
jet->numConstituents();
128 std::vector<std::string> tempCellID;
129 size_t trackcounter = 0;
138 for (
size_t i = 0;
i < numConstit;
i++) {
150 size_t numConstit =
jet->numConstituents();
151 for (
size_t i = 0;
i < numConstit;
i++) {
158 if (thisTrack !=
nullptr) {
170 for (
size_t j = 0; j < numConstit; ++j) {
173 if(!
cluster->getCellLinks())
continue;
174 for (
const auto cc : *(
cluster->getCellLinks())) {
175 if (
std::find(tempCellID.begin(), tempCellID.end(),
std::to_string(
cc->caloDDE()->identify().get_compact())) != tempCellID.end()) {
178 cellID.emplace_back(
DataType(
cc->caloDDE()->identify().get_compact()));
179 tempCellID.emplace_back(
std::to_string(
cc->caloDDE()->identify().get_compact()));
185 std::vector<const xAOD::TrackParticle*> ghosttracks;
187 if (ghosttracks.empty()) {
190 for (
size_t i = 0;
i < ghosttracks.size();
i++) {
198 ATH_MSG_VERBOSE(
" Associated track: d0 = " << ghosttracks[
i]->
d0() <<
", pt = " << ghosttracks[
i]->
pt());
200 trackcounter = ghosttracks.size();
203 for (
size_t j = 0; j < numConstit; ++j) {
218 trackLinkCount.emplace_back(
DataType(trackcounter));
225 idVec.emplace_back(
DataType( ++
id ));
235 if (jetkey!=
"AntiKt4EMPFlowJets" || (
m_nTaggers==0)){
236 bTagName.emplace_back(
DataType(
"None"));
237 bTagValue.emplace_back(
DataType(0.));
243 ATH_MSG_DEBUG(
"Failed to get btagging weight for tagger " << taggerName);
246 bTagName.emplace_back(
DataType(taggerName));
247 bTagValue.emplace_back(
DataType(btagValue));
261 std::vector<float> jvfread;
266 jvf.emplace_back(
DataType( jvfread[0] ));
274 jvt.emplace_back(
DataType(jvtread));
277 float emfracread = 0;
280 emfrac.emplace_back(
DataType( 0. ));
282 emfrac.emplace_back(
DataType( emfracread ));
294 DataMap[
"bTagName multiple=\""+str_nTaggers+
"\""] = bTagName;
295 DataMap[
"bTagValue multiple=\""+str_nTaggers+
"\""] = bTagValue;
305 if ((trackKey.size()) != 0){
306 double NTracksPerVertex = trackKey.size()*1./jetCont->size();
307 std::string
tag =
"trackIndex multiple=\"" +
DataType(NTracksPerVertex).toString()+
"\"";
309 tag =
"trackKey multiple=\"" +
DataType(NTracksPerVertex).toString()+
"\"";
313 if ((clusterID.size())!=0){
314 std::string
tag =
"clusterIndex multiple=\"" +
DataType(clusterID.size()).toString()+
"\"";
315 double NCellsPerJet = cellID.size()*1./jetCont->size();
316 tag =
"cells multiple=\"" +
DataType(NCellsPerJet).toString()+
"\"";
320 DataMap[
"trackLinkCount"] = trackLinkCount;
◆ getKeys()
const std::vector< std::string > JiveXML::xAODJetRetriever::getKeys |
( |
| ) |
|
Gets the StoreGate keys for the desired containers.
Definition at line 329 of file xAODJetRetriever.cxx.
333 std::vector<std::string>
keys = {};
351 std::vector<std::string> allKeys;
356 for(
const std::string&
key : allKeys){
359 if(it2 !=
keys.end())
continue;
◆ initialize()
StatusCode JiveXML::xAODJetRetriever::initialize |
( |
| ) |
|
|
virtual |
Definition at line 28 of file xAODJetRetriever.cxx.
30 ATH_MSG_WARNING(
"Number of btaggers and CDI files do not match. Will not retrieve b-tagging information.");
31 return StatusCode::SUCCESS;
38 btagSelTool.
setTypeAndName(
"BTaggingSelectionTool/btagSelTool_"+taggerName);
48 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.
◆ interfaceID()
const InterfaceID & JiveXML::IDataRetriever::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Return the interface identifier.
Definition at line 40 of file IDataRetriever.h.
40 {
return IID_IDataRetriever; }
◆ 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()
◆ retrieve()
StatusCode JiveXML::xAODJetRetriever::retrieve |
( |
ToolHandle< IFormatTool > & |
FormatTool | ) |
|
|
virtual |
For each jet collections retrieve basic parameters.
- Parameters
-
FormatTool | the tool that will create formated output from the DataMap |
Implements JiveXML::IDataRetriever.
Definition at line 55 of file xAODJetRetriever.cxx.
63 return StatusCode::SUCCESS;
67 for (
const std::string&
key :
keys) {
81 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_bTaggerNames
Gaudi::Property<std::vector<std::string> > JiveXML::xAODJetRetriever::m_bTaggerNames |
|
private |
Initial value:{
this, "BTaggerNames", {"DL1dv01", "GN2v01"}, "Names of the b-taggers to be retrieved"}
Definition at line 73 of file xAODJetRetriever.h.
◆ m_btagSelTools
◆ m_CDIPaths
Gaudi::Property<std::vector<std::string> > JiveXML::xAODJetRetriever::m_CDIPaths |
|
private |
Initial value:{
this, "CDIPaths", {"xAODBTaggingEfficiency/13p6TeV/2023-22-13p6TeV-MC21-CDI_Test_2023-08-1_v1.root", "xAODBTaggingEfficiency/13p6TeV/2023-02_MC23_CDI_GN2v01-noSF.root"}, "Paths to the CDI files storing the b-tagger properties"}
Definition at line 75 of file xAODJetRetriever.h.
◆ m_detStore
◆ m_doWriteAllCollections
Gaudi::Property<bool> JiveXML::xAODJetRetriever::m_doWriteAllCollections {this, "DoWriteAllCollections", false, "Write out all Jet collections"} |
|
private |
◆ m_doWriteHLT
Gaudi::Property<bool> JiveXML::xAODJetRetriever::m_doWriteHLT {this, "DoWriteHLT", false, "Write out other collections that have HLT in the name"} |
|
private |
◆ m_evtStore
◆ m_nTaggers
unsigned int JiveXML::xAODJetRetriever::m_nTaggers =0 |
|
private |
◆ m_otherKeys
Gaudi::Property<std::vector<std::string> > JiveXML::xAODJetRetriever::m_otherKeys {this, "OtherJetCollections", {"AntiKt4EMTopoJets", "AntiKt4LCTopoJets", "AntiKt10LCTopoJets", "AntiKt10UFOCSSKJets"}, "Other collections to be retrieved. If DoWriteAllCollections is set to true all available Jet collections will be retrieved"} |
|
private |
◆ m_priorityKey
Gaudi::Property<std::string> JiveXML::xAODJetRetriever::m_priorityKey {this,"PriorityJetCollection","AntiKt4TopoEMJets", "Name of the priority Jet container that will be written out first"} |
|
private |
◆ m_tracksName
Gaudi::Property<std::string> JiveXML::xAODJetRetriever::m_tracksName |
|
private |
Initial value:{
this, "TracksName", "InDetTrackParticles_xAOD", "Name of the track container to be retrieved"}
Definition at line 71 of file xAODJetRetriever.h.
◆ m_typeName
const std::string JiveXML::xAODJetRetriever::m_typeName = "Jet" |
|
private |
The data type that is generated by this retriever.
Definition at line 61 of file xAODJetRetriever.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeJetQuality
Gaudi::Property<bool> JiveXML::xAODJetRetriever::m_writeJetQuality |
|
private |
Initial value:{
this, "WriteJetQuality", false, "Write out extended jet quality information. False by default."}
Definition at line 69 of file xAODJetRetriever.h.
The documentation for this class was generated from the following files:
char data[hepevt_bytes_allocation_ATLAS]
Extra patterns decribing particle interation process.
Scalar phi() const
phi method
std::string find(const std::string &s)
return a remapped string
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const TrackParticle * track(unsigned int index) const
Retrieve a const pointer to a Rec::TrackParticle.
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::unordered_map< std::string, asg::AnaToolHandle< IBTaggingSelectionTool > > m_btagSelTools
const DataMap getData(const xAOD::JetContainer *, const std::string &jetkey)
Puts the variables into a DataMap.
Gaudi::Property< bool > m_doWriteHLT
const std::string m_typeName
The data type that is generated by this retriever.
#define ATH_MSG_VERBOSE(x)
std::map< std::string, DataVect > DataMap
Class providing the definition of the 4-vector interface.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
virtual void setOwner(IDataHandleHolder *o)=0
TrackParticle_v1 TrackParticle
Reference the current persistent version:
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
const std::vector< std::string > getKeys()
Gets the StoreGate keys for the desired containers.
Gaudi::Property< std::string > m_tracksName
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Gaudi::Property< std::vector< std::string > > m_otherKeys
signal_t signalType() const
@ ParticleFlow
The object is a particle-flow object.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
size_t index() const
Return the index of this element within its container.
bool isCharged() const
is a charged PFO
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const xAOD::IParticle * chargedObject(std::size_t i) const
Class describing a particle flow object.
virtual std::string dataTypeName() const
Return the name of the data type that is generated by this retriever.
std::string to_string(const DetectorType &type)
double charge(const T &p)
@ Ok
The correction was done successfully.
#define ATH_MSG_WARNING(x)
Return value from object correction CP tools.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Property< std::vector< std::string > > m_CDIPaths
Gaudi::Property< bool > m_doWriteAllCollections
Class describing a TrackParticle.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Gaudi::Property< std::vector< std::string > > m_bTaggerNames
Gaudi::Property< std::string > m_priorityKey
A detector object made of other lower level object(s)