Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
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;
63 return StatusCode::SUCCESS;
67 for (
const std::string&
key :
keys) {
81 return StatusCode::SUCCESS;
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) {
172 clusterID.emplace_back(
DataType(cluster->index()));
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()));
182 ATH_MSG_VERBOSE(
" Associated cluster: eta = " << cluster->eta() <<
", phi = " << cluster->phi());
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) {
209 trackKey.emplace_back(
DataType(track->index()));
212 ATH_MSG_VERBOSE(
" Associated track: d0 = " << track->d0() <<
", pt = " << track->pt());
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;
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;
char data[hepevt_bytes_allocation_ATLAS]
Extra patterns decribing particle interation process.
std::string find(const std::string &s)
return a remapped string
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.
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
#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 StatusCode initialize()
TrackParticle_v1 TrackParticle
Reference the current persistent version:
xAODJetRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
For each jet collections retrieve basic parameters.
const std::vector< std::string > getKeys()
Gets the StoreGate keys for the desired containers.
Gaudi::Property< std::string > m_tracksName
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
size_t index() const
Return the index of this element within its container.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isCharged() const
is a charged PFO
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
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)
Wrapper to avoid constant divisions when using units.
@ Ok
The correction was done successfully.
#define ATH_MSG_WARNING(x)
Return value from object correction CP tools.
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::Property< std::vector< std::string > > m_bTaggerNames
Gaudi::Property< std::string > m_priorityKey
A detector object made of other lower level object(s)